1*408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*408a4873SAndrew Rist * distributed with this work for additional information
6*408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9*408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10*408a4873SAndrew Rist *
11*408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*408a4873SAndrew Rist *
13*408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*408a4873SAndrew Rist * software distributed under the License is distributed on an
15*408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17*408a4873SAndrew Rist * specific language governing permissions and limitations
18*408a4873SAndrew Rist * under the License.
19*408a4873SAndrew Rist *
20*408a4873SAndrew Rist *************************************************************/
21*408a4873SAndrew Rist
22*408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef _COM_SUN_STAR_BRIDGE_XBRIDGEFACTORY_IDL_
24cdf0e10cSrcweir#define _COM_SUN_STAR_BRIDGE_XBRIDGEFACTORY_IDL_
25cdf0e10cSrcweir
26cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
27cdf0e10cSrcweir
28cdf0e10cSrcweir#include <com/sun/star/connection/XConnection.idl>
29cdf0e10cSrcweir#include <com/sun/star/bridge/XBridge.idl>
30cdf0e10cSrcweir#include <com/sun/star/bridge/BridgeExistsException.idl>
31cdf0e10cSrcweir#include <com/sun/star/bridge/XInstanceProvider.idl>
32cdf0e10cSrcweir
33cdf0e10cSrcweir module com {  module sun {  module star {  module bridge {
34cdf0e10cSrcweir
35cdf0e10cSrcweir/** factory to create interprocess bridges.
36cdf0e10cSrcweir */
37cdf0e10cSrcweirpublished interface XBridgeFactory: com::sun::star::uno::XInterface
38cdf0e10cSrcweir{
39cdf0e10cSrcweir	/** tries to create a UNO interprocess bridge.
40cdf0e10cSrcweir
41cdf0e10cSrcweir		@param sName
42cdf0e10cSrcweir			The name of the bridge. This allows other components to reuse
43cdf0e10cSrcweir			 an already created bridge (using getBridge).
44cdf0e10cSrcweir			 <p>
45cdf0e10cSrcweir			 If empty, an anonymous bridge is created, which cannot be retrieved with
46cdf0e10cSrcweir			 getBridge(). No BridgeExistsException can be thrown in this case.
47cdf0e10cSrcweir
48cdf0e10cSrcweir		@param sProtocol
49cdf0e10cSrcweir			The protocol, that will be used on the connection (e.g., urp) plus additional
50cdf0e10cSrcweir			comma separated name=value protocol properties.
51cdf0e10cSrcweir
52cdf0e10cSrcweir		@param aConnection
53cdf0e10cSrcweir			The connection, which is used to transfer the calls. The bridge expects to
54cdf0e10cSrcweir			own the connection, thus it will close the connection, in case it does not
55cdf0e10cSrcweir			need it anymore.
56cdf0e10cSrcweir
57cdf0e10cSrcweir		@param anInstanceProvider
58cdf0e10cSrcweir			gets called, when a request from remote comes in. You can pass a null reference
59cdf0e10cSrcweir			in case you don't want to export any objects.
60cdf0e10cSrcweir
61cdf0e10cSrcweir		@throws BridgeExistsException
62cdf0e10cSrcweir			There is already a bridge registered with this name.  Use getBridge instead.
63cdf0e10cSrcweir
64cdf0e10cSrcweir		@throws IllegalArgumentException
65cdf0e10cSrcweir			The protocol is unknown or the connection is null.
66cdf0e10cSrcweir	 */
67cdf0e10cSrcweir	XBridge createBridge(
68cdf0e10cSrcweir		[in] string sName,
69cdf0e10cSrcweir		[in] string sProtocol ,
70cdf0e10cSrcweir		[in] com::sun::star::connection::XConnection aConnection ,
71cdf0e10cSrcweir		[in] XInstanceProvider anInstanceProvider )
72cdf0e10cSrcweir		raises ( BridgeExistsException , com::sun::star::lang::IllegalArgumentException );
73cdf0e10cSrcweir
74cdf0e10cSrcweir
75cdf0e10cSrcweir	/** tries to get a bridge by this name.
76cdf0e10cSrcweir		<p> Cannot be retrieved, when the bridge got disposed before.
77cdf0e10cSrcweir
78cdf0e10cSrcweir		@return An existing remote bridge or a null reference.
79cdf0e10cSrcweir	 */
80cdf0e10cSrcweir	XBridge getBridge( [in] string  sName );
81cdf0e10cSrcweir
82cdf0e10cSrcweir	/** returns the sequence of all named and unnamed UNO interprocess
83cdf0e10cSrcweir		bridges that are instantiated at the time the call is made.
84cdf0e10cSrcweir	 */
85cdf0e10cSrcweir	sequence < XBridge > getExistingBridges( );
86cdf0e10cSrcweir};
87cdf0e10cSrcweir
88cdf0e10cSrcweir
89cdf0e10cSrcweir};};};};
90cdf0e10cSrcweir
91cdf0e10cSrcweir#endif
92