1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _CACHED_DYNAMIC_RESULTSET_HXX
21 #define _CACHED_DYNAMIC_RESULTSET_HXX
23 #include <dynamicresultsetwrapper.hxx>
24 #include <com/sun/star/ucb/XContentIdentifierMapping.hpp>
25 #include <com/sun/star/ucb/XCachedDynamicResultSetFactory.hpp>
27 #define CACHED_DRS_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSet"
28 #define CACHED_DRS_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetFactory"
30 //=========================================================================
32 class CachedDynamicResultSet
33 : public DynamicResultSetWrapper
34 , public com::sun::star::lang::XTypeProvider
35 , public com::sun::star::lang::XServiceInfo
37 com::sun::star::uno::Reference
< com::sun::star::ucb::XContentIdentifierMapping
>
38 m_xContentIdentifierMapping
;
42 impl_InitResultSetOne( const com::sun::star::uno::Reference
<
43 com::sun::star::sdbc::XResultSet
>& xResultSet
);
45 impl_InitResultSetTwo( const com::sun::star::uno::Reference
<
46 com::sun::star::sdbc::XResultSet
>& xResultSet
);
49 CachedDynamicResultSet( com::sun::star::uno::Reference
<
50 com::sun::star::ucb::XDynamicResultSet
> xOrigin
51 , const com::sun::star::uno::Reference
<
52 com::sun::star::ucb::XContentIdentifierMapping
> & xContentMapping
53 , const com::sun::star::uno::Reference
<
54 com::sun::star::lang::XMultiServiceFactory
> & xSMgr
);
56 virtual ~CachedDynamicResultSet();
59 //-----------------------------------------------------------------
60 // XInterface inherited
61 //-----------------------------------------------------------------
63 //-----------------------------------------------------------------
65 //-----------------------------------------------------------------
67 //-----------------------------------------------------------------
69 //-----------------------------------------------------------------
70 XSERVICEINFO_NOFACTORY_DECL()
72 //-----------------------------------------------------------------
73 // own methods ( inherited )
74 //-----------------------------------------------------------------
76 impl_disposing( const com::sun::star::lang::EventObject
& Source
)
77 throw( com::sun::star::uno::RuntimeException
);
80 //=========================================================================
82 class CachedDynamicResultSetFactory
83 : public cppu::OWeakObject
84 , public com::sun::star::lang::XTypeProvider
85 , public com::sun::star::lang::XServiceInfo
86 , public com::sun::star::ucb::XCachedDynamicResultSetFactory
89 com::sun::star::uno::Reference
<
90 com::sun::star::lang::XMultiServiceFactory
> m_xSMgr
;
94 CachedDynamicResultSetFactory(
95 const com::sun::star::uno::Reference
<
96 com::sun::star::lang::XMultiServiceFactory
> & rSMgr
);
98 virtual ~CachedDynamicResultSetFactory();
100 //-----------------------------------------------------------------
104 //-----------------------------------------------------------------
108 //-----------------------------------------------------------------
112 //-----------------------------------------------------------------
113 // XCachedDynamicResultSetFactory
115 virtual com::sun::star::uno::Reference
<
116 com::sun::star::ucb::XDynamicResultSet
> SAL_CALL
117 createCachedDynamicResultSet(
118 const com::sun::star::uno::Reference
<
119 com::sun::star::ucb::XDynamicResultSet
> &
121 , const com::sun::star::uno::Reference
<
122 com::sun::star::ucb::XContentIdentifierMapping
> &
123 ContentIdentifierMapping
125 throw( com::sun::star::uno::RuntimeException
);
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */