LibreOffice Module ucb (master)  1
cacheddynamicresultsetstub.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_CACHEDDYNAMICRESULTSETSTUB_HXX
21 #define INCLUDED_UCB_SOURCE_CACHER_CACHEDDYNAMICRESULTSETSTUB_HXX
22 
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/lang/XTypeProvider.hpp>
28 #include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
29 #include <cppuhelper/implbase.hxx>
30 
31 #define CACHED_DRS_STUB_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSetStub"
32 #define CACHED_DRS_STUB_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetStubFactory"
33 
34 
37  , public css::lang::XTypeProvider
38  , public css::lang::XServiceInfo
39 {
40 protected:
41  virtual void
42  impl_InitResultSetOne( const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
43  virtual void
44  impl_InitResultSetTwo( const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
45 
46 public:
47  CachedDynamicResultSetStub( css::uno::Reference< css::ucb::XDynamicResultSet > const & xOrigin
48  , const css::uno::Reference< css::uno::XComponentContext > & rxContext );
49 
50  virtual ~CachedDynamicResultSetStub() override;
51 
52 
53  // XInterface
54  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
55  virtual void SAL_CALL acquire()
56  throw() override;
57  virtual void SAL_CALL release()
58  throw() override;
59 
60  // XTypeProvider
61 
62  virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
63  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
64 
65  // XServiceInfo
66  virtual OUString SAL_CALL getImplementationName() override;
67  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
68  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
69 };
70 
71 
73  public cppu::WeakImplHelper<
74  css::lang::XServiceInfo,
75  css::ucb::XCachedDynamicResultSetStubFactory>
76 {
77  css::uno::Reference< css::uno::XComponentContext > m_xContext;
78 
79 public:
80 
82  const css::uno::Reference< css::uno::XComponentContext > & rxContext);
83 
84  virtual ~CachedDynamicResultSetStubFactory() override;
85 
86  // XServiceInfo
87  virtual OUString SAL_CALL getImplementationName() override;
88  virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
89  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
90 
91  static OUString getImplementationName_Static();
92  static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
93 
94  static css::uno::Reference< css::lang::XSingleServiceFactory >
95  createServiceFactory( const css::uno::Reference<
96  css::lang::XMultiServiceFactory >& rxServiceMgr );
97 
98  // XCachedDynamicResultSetStubFactory
99 
100  virtual css::uno::Reference< css::ucb::XDynamicResultSet > SAL_CALL
102  const css::uno::Reference< css::ucb::XDynamicResultSet > & Source ) override;
103 
104 
105  virtual void SAL_CALL connectToCache(
106  const css::uno::Reference< css::ucb::XDynamicResultSet > & Source
107  , const css::uno::Reference< css::ucb::XDynamicResultSet > & TargetCache
108  , const css::uno::Sequence< css::ucb::NumberedSortingInfo > & SortingInfo
109  , const css::uno::Reference< css::ucb::XAnyCompareFactory > & CompareFactory
110  ) override;
111 };
112 
113 #endif
114 
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL release() override
CachedDynamicResultSetStub(css::uno::Reference< css::ucb::XDynamicResultSet > const &xOrigin, const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual css::uno::Reference< css::ucb::XDynamicResultSet > SAL_CALL createCachedDynamicResultSetStub(const css::uno::Reference< css::ucb::XDynamicResultSet > &Source) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
CachedDynamicResultSetStubFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
unsigned char sal_Bool
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void impl_InitResultSetOne(const css::uno::Reference< css::sdbc::XResultSet > &xResultSet) override
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory(const css::uno::Reference< css::lang::XMultiServiceFactory > &rxServiceMgr)
virtual void impl_InitResultSetTwo(const css::uno::Reference< css::sdbc::XResultSet > &xResultSet) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
static css::uno::Sequence< OUString > getSupportedServiceNames_Static()
virtual void SAL_CALL acquire() override
virtual void SAL_CALL connectToCache(const css::uno::Reference< css::ucb::XDynamicResultSet > &Source, const css::uno::Reference< css::ucb::XDynamicResultSet > &TargetCache, const css::uno::Sequence< css::ucb::NumberedSortingInfo > &SortingInfo, const css::uno::Reference< css::ucb::XAnyCompareFactory > &CompareFactory) override
static OUString getImplementationName_Static()