1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <sal/config.h>
27 #include <com/sun/star/bridge/XBridgeFactory2.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <cppuhelper/basemutex.hxx>
31 #include <cppuhelper/compbase.hxx>
32 #include <sal/types.h>
34 namespace com::sun::star
{
35 namespace connection
{ class XConnection
; }
37 class XComponentContext
;
44 // That BridgeFactory derives from XComponent appears to be a historic mistake;
45 // the implementation does not care about a disposed state:
48 cppu::WeakComponentImplHelper
<
49 com::sun::star::lang::XServiceInfo
,
50 com::sun::star::bridge::XBridgeFactory2
>
53 class BridgeFactory
: private cppu::BaseMutex
, public BridgeFactoryBase
57 com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
>
60 using BridgeFactoryBase::acquire
;
61 using BridgeFactoryBase::release
;
63 BridgeFactory(const BridgeFactory
&) = delete;
64 BridgeFactory
& operator=(const BridgeFactory
&) = delete;
68 virtual ~BridgeFactory() override
;
71 virtual OUString SAL_CALL
getImplementationName() override
;
73 virtual sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
) override
;
75 virtual com::sun::star::uno::Sequence
< OUString
> SAL_CALL
76 getSupportedServiceNames() override
;
78 virtual com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
>
79 SAL_CALL
createBridge(
80 OUString
const & sName
, OUString
const & sProtocol
,
81 com::sun::star::uno::Reference
<
82 com::sun::star::connection::XConnection
> const & aConnection
,
83 com::sun::star::uno::Reference
<
84 com::sun::star::bridge::XInstanceProvider
> const &
85 anInstanceProvider
) override
;
87 virtual com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
>
89 OUString
const & sName
) override
;
92 com::sun::star::uno::Sequence
<
93 com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
> >
94 SAL_CALL
getExistingBridges() override
;
96 void SAL_CALL
disposing() override
;
100 com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
> >
106 com::sun::star::uno::Reference
< com::sun::star::bridge::XBridge
> >
109 BridgeVector unnamed_
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */