Version 4.0.0.1, tag libreoffice-4.0.0.1
[LibreOffice.git] / ucb / source / cacher / cacheddynamicresultset.hxx
blob18dd49a0d41caca66101115c998607b3d9086fd5
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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;
40 protected:
41 virtual void SAL_CALL
42 impl_InitResultSetOne( const com::sun::star::uno::Reference<
43 com::sun::star::sdbc::XResultSet >& xResultSet );
44 virtual void SAL_CALL
45 impl_InitResultSetTwo( const com::sun::star::uno::Reference<
46 com::sun::star::sdbc::XResultSet >& xResultSet );
48 public:
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 //-----------------------------------------------------------------
62 XINTERFACE_DECL()
63 //-----------------------------------------------------------------
64 // XTypeProvider
65 //-----------------------------------------------------------------
66 XTYPEPROVIDER_DECL()
67 //-----------------------------------------------------------------
68 // XServiceInfo
69 //-----------------------------------------------------------------
70 XSERVICEINFO_NOFACTORY_DECL()
72 //-----------------------------------------------------------------
73 // own methods ( inherited )
74 //-----------------------------------------------------------------
75 virtual void SAL_CALL
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
88 protected:
89 com::sun::star::uno::Reference<
90 com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
92 public:
94 CachedDynamicResultSetFactory(
95 const com::sun::star::uno::Reference<
96 com::sun::star::lang::XMultiServiceFactory > & rSMgr);
98 virtual ~CachedDynamicResultSetFactory();
100 //-----------------------------------------------------------------
101 // XInterface
102 XINTERFACE_DECL()
104 //-----------------------------------------------------------------
105 // XTypeProvider
106 XTYPEPROVIDER_DECL()
108 //-----------------------------------------------------------------
109 // XServiceInfo
110 XSERVICEINFO_DECL()
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 > &
120 SourceStub
121 , const com::sun::star::uno::Reference<
122 com::sun::star::ucb::XContentIdentifierMapping > &
123 ContentIdentifierMapping
125 throw( com::sun::star::uno::RuntimeException );
128 #endif
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */