LibreOffice Module ucb (master) 1
provprox.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#pragma once
21
22#include <com/sun/star/lang/XTypeProvider.hpp>
23#include <com/sun/star/lang/XServiceInfo.hpp>
24#include <com/sun/star/ucb/XContentProviderFactory.hpp>
25#include <com/sun/star/ucb/XContentProvider.hpp>
26#include <com/sun/star/ucb/XParameterizedContentProvider.hpp>
27#include <com/sun/star/ucb/XContentProviderSupplier.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
30#include <cppuhelper/weak.hxx>
31
32
33
35 css::lang::XServiceInfo,
36 css::ucb::XContentProviderFactory >;
38{
39 css::uno::Reference< css::uno::XComponentContext > m_xContext;
40
41public:
43 const css::uno::Reference< css::uno::XComponentContext >& rxContext );
44 virtual ~UcbContentProviderProxyFactory() override;
45
46 // XServiceInfo
47 virtual OUString SAL_CALL getImplementationName() override;
48 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
49 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
50
51 // XContentProviderFactory
52 virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL
53 createContentProvider( const OUString& Service ) override;
54};
55
56
57
58
60 public cppu::OWeakObject,
61 public css::lang::XTypeProvider,
62 public css::lang::XServiceInfo,
63 public css::ucb::XContentProviderSupplier,
64 public css::ucb::XContentProvider,
65 public css::ucb::XParameterizedContentProvider
66{
67 std::mutex m_aMutex;
68 OUString m_aService;
69 OUString m_aTemplate;
70 OUString m_aArguments;
73
74 css::uno::Reference< css::uno::XComponentContext >
76 css::uno::Reference< css::ucb::XContentProvider >
78 css::uno::Reference< css::ucb::XContentProvider >
80
81public:
83 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
84 OUString Service );
85 virtual ~UcbContentProviderProxy() override;
86
87 // XInterface
88 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
89 virtual void SAL_CALL acquire()
90 noexcept override;
91 virtual void SAL_CALL release()
92 noexcept override;
93
94 // XTypeProvider
95 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
96 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
97
98 // XServiceInfo
99 virtual OUString SAL_CALL getImplementationName() override;
100 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
101 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
102
103 // XContentProviderSupplier
104 virtual css::uno::Reference<
105 css::ucb::XContentProvider > SAL_CALL
106 getContentProvider() override;
107
108 // XContentProvider
109 virtual css::uno::Reference<
110 css::ucb::XContent > SAL_CALL
111 queryContent( const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier ) override;
112 virtual sal_Int32 SAL_CALL
113 compareContentIds( const css::uno::Reference< css::ucb::XContentIdentifier >& Id1,
114 const css::uno::Reference< css::ucb::XContentIdentifier >& Id2 ) override;
115
116 // XParameterizedContentProvider
117 virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL
118 registerInstance( const OUString& Template,
119 const OUString& Arguments,
120 sal_Bool ReplaceExisting ) override;
121 virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL
122 deregisterInstance( const OUString& Template,
123 const OUString& Arguments ) override;
124};
125
126/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: provprox.cxx:57
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: provprox.cxx:61
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL createContentProvider(const OUString &Service) override
Definition: provprox.cxx:82
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: provprox.hxx:39
virtual ~UcbContentProviderProxyFactory() override
Definition: provprox.cxx:47
virtual OUString SAL_CALL getImplementationName() override
Definition: provprox.cxx:53
UcbContentProviderProxyFactory(const css::uno::Reference< css::uno::XComponentContext > &rxContext)
Definition: provprox.cxx:39
virtual ~UcbContentProviderProxy() override
Definition: provprox.cxx:105
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Definition: provprox.cxx:125
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: provprox.cxx:183
css::uno::Reference< css::uno::XComponentContext > m_xContext
Definition: provprox.hxx:75
UcbContentProviderProxy(const css::uno::Reference< css::uno::XComponentContext > &rxContext, OUString Service)
Definition: provprox.cxx:93
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL queryContent(const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier) override
Definition: provprox.cxx:198
virtual sal_Int32 SAL_CALL compareContentIds(const css::uno::Reference< css::ucb::XContentIdentifier > &Id1, const css::uno::Reference< css::ucb::XContentIdentifier > &Id2) override
Definition: provprox.cxx:212
css::uno::Reference< css::ucb::XContentProvider > m_xProvider
Definition: provprox.hxx:77
virtual OUString SAL_CALL getImplementationName() override
Definition: provprox.cxx:178
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL release() noexcept override
Definition: provprox.cxx:117
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL registerInstance(const OUString &Template, const OUString &Arguments, sal_Bool ReplaceExisting) override
Definition: provprox.cxx:234
css::uno::Reference< css::ucb::XContentProvider > m_xTargetProvider
Definition: provprox.hxx:79
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL deregisterInstance(const OUString &Template, const OUString &Arguments) override
Definition: provprox.cxx:257
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Definition: provprox.cxx:155
virtual void SAL_CALL acquire() noexcept override
Definition: provprox.cxx:111
virtual css::uno::Reference< css::ucb::XContentProvider > SAL_CALL getContentProvider() override
Definition: provprox.cxx:293
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: provprox.cxx:188
Type
unsigned char sal_Bool
signed char sal_Int8