1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: bridgeimpl.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #include <osl/mutex.hxx>
32 #include <osl/diagnose.h>
34 #include <uno/mapping.hxx>
35 #include <uno/environment.h>
37 #include <bridges/remote/context.h>
38 #include <bridges/remote/remote.h>
40 #include <cppuhelper/factory.hxx>
41 #include <cppuhelper/component.hxx>
42 #include <cppuhelper/typeprovider.hxx>
44 #include <com/sun/star/lang/XComponent.hpp>
45 #include <com/sun/star/lang/XInitialization.hpp>
47 #include <com/sun/star/bridge/XBridge.hpp>
48 #include <com/sun/star/bridge/XInstanceProvider.hpp>
50 namespace remotebridges_factory
{
51 extern rtl_StandardModuleCount g_moduleCount
;
60 public remote_DisposingListener
,
61 public ::com::sun::star::bridge::XBridge
,
62 public ::cppu::OComponentHelper
65 OBridge( remote_Context
*pContext
);
70 ::com::sun::star::uno::Any SAL_CALL
71 queryInterface( const ::com::sun::star::uno::Type
& aType
) throw(com::sun::star::uno::RuntimeException
);
73 void SAL_CALL
acquire() throw()
74 { OComponentHelper::acquire(); }
75 void SAL_CALL
release() throw()
76 { OComponentHelper::release(); }
79 virtual void SAL_CALL
disposing(); // called by OComponentHelper
82 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
83 getInstance( const ::rtl::OUString
& sInstanceName
)
84 throw(::com::sun::star::uno::RuntimeException
);
86 virtual ::rtl::OUString SAL_CALL
getName( )
87 throw(::com::sun::star::uno::RuntimeException
);
88 virtual ::rtl::OUString SAL_CALL
getDescription( )
89 throw(::com::sun::star::uno::RuntimeException
);
92 virtual ::com::sun::star::uno::Sequence
< ::com::sun::star::uno::Type
> SAL_CALL
93 getTypes( ) throw(::com::sun::star::uno::RuntimeException
);
94 virtual ::com::sun::star::uno::Sequence
< sal_Int8
> SAL_CALL
95 getImplementationId( ) throw(::com::sun::star::uno::RuntimeException
);
98 static void SAL_CALL
thisAcquire( remote_DisposingListener
* );
99 static void SAL_CALL
thisRelease( remote_DisposingListener
* );
100 static void SAL_CALL
thisDisposing( remote_DisposingListener
* ,
101 rtl_uString
* pBridgeName
);
104 remote_Context
*m_pContext
;
105 ::rtl::OString m_sName
;
106 ::rtl::OString m_sDescription
;