LibreOffice Module binaryurp (master) 1
bridgefactory.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 <sal/config.h>
23
24#include <vector>
25#include <map>
26
27#include <com/sun/star/bridge/XBridgeFactory2.hpp>
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/uno/Reference.hxx>
32#include <sal/types.h>
33
34namespace com::sun::star {
35 namespace connection { class XConnection; }
36 namespace uno {
37 class XComponentContext;
38 class XInterface;
39 }
40}
41
42namespace binaryurp {
43
44// That BridgeFactory derives from XComponent appears to be a historic mistake;
45// the implementation does not care about a disposed state:
46
47typedef
48 cppu::WeakComponentImplHelper<
49 com::sun::star::lang::XServiceInfo,
50 com::sun::star::bridge::XBridgeFactory2 >
52
54{
55public:
56 void removeBridge(
58 const & bridge);
59
60 using BridgeFactoryBase::acquire;
61 using BridgeFactoryBase::release;
62
63 BridgeFactory(const BridgeFactory&) = delete;
65
67
68 virtual ~BridgeFactory() override;
69
70private:
71 virtual OUString SAL_CALL getImplementationName() override;
72
73 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
74
76 getSupportedServiceNames() override;
77
79 SAL_CALL createBridge(
80 OUString const & sName, OUString const & sProtocol,
82 com::sun::star::connection::XConnection > const & aConnection,
84 com::sun::star::bridge::XInstanceProvider > const &
85 anInstanceProvider) override;
86
88 SAL_CALL getBridge(
89 OUString const & sName) override;
90
91 virtual
94 SAL_CALL getExistingBridges() override;
95
96 void SAL_CALL disposing() override;
97
98 typedef
99 std::vector<
102
103 typedef
104 std::map<
105 OUString,
108
111};
112
113}
114
115/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< OUString, com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > BridgeMap
virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
BridgeFactory & operator=(const BridgeFactory &)=delete
BridgeFactory(const BridgeFactory &)=delete
void SAL_CALL disposing() override
virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > SAL_CALL createBridge(OUString const &sName, OUString const &sProtocol, com::sun::star::uno::Reference< com::sun::star::connection::XConnection > const &aConnection, com::sun::star::uno::Reference< com::sun::star::bridge::XInstanceProvider > const &anInstanceProvider) override
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > SAL_CALL getBridge(OUString const &sName) override
void removeBridge(com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > const &bridge)
virtual ~BridgeFactory() override
std::vector< com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > BridgeVector
virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > > SAL_CALL getExistingBridges() override
cppu::WeakComponentImplHelper< com::sun::star::lang::XServiceInfo, com::sun::star::bridge::XBridgeFactory2 > BridgeFactoryBase
unsigned char sal_Bool