LibreOffice Module ucb (master)  1
cacheddynamicresultset.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_UCB_SOURCE_CACHER_CACHEDDYNAMICRESULTSET_HXX
21 #define INCLUDED_UCB_SOURCE_CACHER_CACHEDDYNAMICRESULTSET_HXX
22 
24 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/lang/XTypeProvider.hpp>
28 #include <com/sun/star/ucb/XContentIdentifierMapping.hpp>
29 #include <com/sun/star/ucb/XCachedDynamicResultSetFactory.hpp>
30 #include <cppuhelper/implbase.hxx>
31 
32 #define CACHED_DRS_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSet"
33 #define CACHED_DRS_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetFactory"
34 
35 
38  , public css::lang::XTypeProvider
39  , public css::lang::XServiceInfo
40 {
41  css::uno::Reference< css::ucb::XContentIdentifierMapping >
43 
44 protected:
45  virtual void
46  impl_InitResultSetOne( const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
47  virtual void
48  impl_InitResultSetTwo( const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
49 
50 public:
51  CachedDynamicResultSet( css::uno::Reference< css::ucb::XDynamicResultSet > const & xOrigin
52  , const css::uno::Reference< css::ucb::XContentIdentifierMapping > & xContentMapping
53  , const css::uno::Reference< css::uno::XComponentContext > & xContext );
54 
55  virtual ~CachedDynamicResultSet() override;
56 
57 
58  // XInterface
59  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
60  virtual void SAL_CALL acquire()
61  throw() override;
62  virtual void SAL_CALL release()
63  throw() override;
64 
65  // XTypeProvider
66 
67  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
68  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
69 
70  // XServiceInfo
71  virtual OUString SAL_CALL getImplementationName() override;
72  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
73  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
74 
75  // own methods ( inherited )
76 
77  virtual void
78  impl_disposing( const css::lang::EventObject& Source ) override;
79 };
80 
81 
83  public cppu::WeakImplHelper<
84  css::lang::XServiceInfo,
85  css::ucb::XCachedDynamicResultSetFactory>
86 {
87  css::uno::Reference< css::uno::XComponentContext > m_xContext;
88 
89 public:
90 
92  const css::uno::Reference< css::uno::XComponentContext > & xContext);
93 
94  virtual ~CachedDynamicResultSetFactory() override;
95 
96  // XServiceInfo
97  virtual OUString SAL_CALL getImplementationName() override;
98  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
99  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
100 
101  static OUString getImplementationName_Static();
102  static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
103 
104  static css::uno::Reference< css::lang::XSingleServiceFactory >
105  createServiceFactory( const css::uno::Reference<
106  css::lang::XMultiServiceFactory >& rxServiceMgr );
107 
108  // XCachedDynamicResultSetFactory
109 
110  virtual css::uno::Reference< css::ucb::XDynamicResultSet > SAL_CALL
111  createCachedDynamicResultSet(
112  const css::uno::Reference< css::ucb::XDynamicResultSet > & SourceStub
113  , const css::uno::Reference< css::ucb::XContentIdentifierMapping > & ContentIdentifierMapping
114  ) override;
115 };
116 
117 #endif
118 
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Type
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
signed char sal_Int8
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL release() override
virtual void SAL_CALL acquire() override
CachedDynamicResultSet(css::uno::Reference< css::ucb::XDynamicResultSet > const &xOrigin, const css::uno::Reference< css::ucb::XContentIdentifierMapping > &xContentMapping, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual ~CachedDynamicResultSet() override
unsigned char sal_Bool
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void impl_InitResultSetOne(const css::uno::Reference< css::sdbc::XResultSet > &xResultSet) override
css::uno::Reference< css::ucb::XContentIdentifierMapping > m_xContentIdentifierMapping
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual void impl_InitResultSetTwo(const css::uno::Reference< css::sdbc::XResultSet > &xResultSet) override
virtual void impl_disposing(const css::lang::EventObject &Source) override