LibreOffice Module ucbhelper (master) 1
resultsethelper.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_UCBHELPER_RESULTSETHELPER_HXX
21#define INCLUDED_UCBHELPER_RESULTSETHELPER_HXX
22
23#include <memory>
24#include <mutex>
25#include <com/sun/star/lang/XServiceInfo.hpp>
26#include <com/sun/star/ucb/XDynamicResultSet.hpp>
27#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
31
32namespace com::sun::star::uno { class XComponentContext; }
33
34namespace cppu {
35 class OInterfaceContainerHelper;
36}
37
38namespace ucbhelper {
39
40
41inline constexpr OUStringLiteral DYNAMICRESULTSET_SERVICE_NAME = u"com.sun.star.ucb.DynamicResultSet";
42
43
54 public cppu::WeakImplHelper<
55 css::lang::XServiceInfo,
56 css::ucb::XDynamicResultSet>
57{
61
62protected:
63 std::mutex m_aMutex;
64 css::ucb::OpenCommandArgument2 m_aCommand;
65 css::uno::Reference< css::uno::XComponentContext > m_xContext;
66 // Resultset #1
67 css::uno::Reference< css::sdbc::XResultSet > m_xResultSet1;
68 // Resultset #2
69 css::uno::Reference< css::sdbc::XResultSet > m_xResultSet2;
70 // Resultset changes listener.
71 css::uno::Reference< css::ucb::XDynamicResultSetListener > m_xListener;
72
73private:
74 UCBHELPER_DLLPRIVATE void init( bool bStatic );
75
90 UCBHELPER_DLLPRIVATE virtual void initStatic() = 0;
91
111
112public:
121 css::uno::Reference<
122 css::uno::XComponentContext > xContext,
123 css::ucb::OpenCommandArgument2 aCommand );
124
128 virtual ~ResultSetImplHelper() override;
129
130 // XServiceInfo
131 virtual OUString SAL_CALL getImplementationName() override;
132 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
133 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
134
135 // XComponent ( base class of XDynamicResultSet )
136 virtual void SAL_CALL
137 dispose() override;
138 virtual void SAL_CALL
139 addEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener ) override;
140 virtual void SAL_CALL
141 removeEventListener( const css::uno::Reference< css::lang::XEventListener >& Listener ) override;
142
143 // XDynamicResultSet
144 virtual css::uno::Reference< css::sdbc::XResultSet > SAL_CALL
145 getStaticResultSet() override;
146 virtual void SAL_CALL
147 setListener( const css::uno::Reference< css::ucb::XDynamicResultSetListener >& Listener ) override;
148 virtual void SAL_CALL
149 connectToCache( const css::uno::Reference< css::ucb::XDynamicResultSet > & xCache ) override;
150
155 virtual sal_Int16 SAL_CALL
156 getCapabilities() override;
157
158};
159
160}
161
162#endif /* ! INCLUDED_UCBHELPER_RESULTSETHELPER_HXX */
163
164/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
FILE * init(int, char **)
This is an abstract base class for implementations of the service com.sun.star.ucb....
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual UCBHELPER_DLLPRIVATE void initStatic()=0
Your implementation of this method has to fill the protected member m_xResultSet1.
css::ucb::OpenCommandArgument2 m_aCommand
virtual UCBHELPER_DLLPRIVATE void initDynamic()=0
Your implementation of this method has to fill the protected members m_xResultSet1 and m_xResultSet2 ...
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aDisposeEventListeners
css::uno::Reference< css::ucb::XDynamicResultSetListener > m_xListener
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet2
css::uno::Reference< css::sdbc::XResultSet > m_xResultSet1
float u
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void dispose()
constexpr OUStringLiteral DYNAMICRESULTSET_SERVICE_NAME
unsigned char sal_Bool
#define UCBHELPER_DLLPUBLIC
#define UCBHELPER_DLLPRIVATE