tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / ucb / source / cacher / cacheddynamicresultsetstub.hxx
blobb7d19a1b78b4352f8b7f97fa1f3b83210fb99cf9
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 #pragma once
22 #include "dynamicresultsetwrapper.hxx"
23 #include <com/sun/star/lang/XServiceInfo.hpp>
24 #include <com/sun/star/lang/XTypeProvider.hpp>
25 #include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
26 #include <cppuhelper/implbase.hxx>
30 class CachedDynamicResultSetStub
31 : public DynamicResultSetWrapper
32 , public css::lang::XTypeProvider
33 , public css::lang::XServiceInfo
35 protected:
36 virtual void
37 impl_InitResultSetOne( std::unique_lock<std::mutex>& rGuard, const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
38 virtual void
39 impl_InitResultSetTwo( std::unique_lock<std::mutex>& rGuard, const css::uno::Reference< css::sdbc::XResultSet >& xResultSet ) override;
41 public:
42 CachedDynamicResultSetStub( css::uno::Reference< css::ucb::XDynamicResultSet > const & xOrigin
43 , const css::uno::Reference< css::uno::XComponentContext > & rxContext );
45 virtual ~CachedDynamicResultSetStub() override;
48 // XInterface
49 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
50 virtual void SAL_CALL acquire()
51 noexcept override;
52 virtual void SAL_CALL release()
53 noexcept override;
55 // XTypeProvider
57 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
58 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
60 // XServiceInfo
61 virtual OUString SAL_CALL getImplementationName() override;
62 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
63 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
67 class CachedDynamicResultSetStubFactory final :
68 public cppu::WeakImplHelper<
69 css::lang::XServiceInfo,
70 css::ucb::XCachedDynamicResultSetStubFactory>
72 css::uno::Reference< css::uno::XComponentContext > m_xContext;
74 public:
76 CachedDynamicResultSetStubFactory(
77 const css::uno::Reference< css::uno::XComponentContext > & rxContext);
79 virtual ~CachedDynamicResultSetStubFactory() override;
81 // XServiceInfo
82 virtual OUString SAL_CALL getImplementationName() override;
83 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
84 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
86 // XCachedDynamicResultSetStubFactory
88 virtual css::uno::Reference< css::ucb::XDynamicResultSet > SAL_CALL
89 createCachedDynamicResultSetStub(
90 const css::uno::Reference< css::ucb::XDynamicResultSet > & Source ) override;
93 virtual void SAL_CALL connectToCache(
94 const css::uno::Reference< css::ucb::XDynamicResultSet > & Source
95 , const css::uno::Reference< css::ucb::XDynamicResultSet > & TargetCache
96 , const css::uno::Sequence< css::ucb::NumberedSortingInfo > & SortingInfo
97 , const css::uno::Reference< css::ucb::XAnyCompareFactory > & CompareFactory
98 ) override;
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */