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: XBridgeSupplier2.idl,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 ************************************************************************/
30 #ifndef __com_sun_star_bridge_XBridgeSupplier2_idl__
31 #define __com_sun_star_bridge_XBridgeSupplier2_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
38 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
42 //=============================================================================
44 module com
{ module sun
{ module star
{ module bridge
{
46 //=============================================================================
48 /** defines the interface for creating bridges to other object models.
51 The created bridges are transparent to the user. That is, if one maps
52 an interface into the target model, then the resulting target interface
53 is a bridge implementation, that is not being noticed by an user. During
54 a call on that interface, the bridge is invoked to convert the arguments
55 and carry out a call according to the rules of the source model.
56 Return values are automatically mapped to the types of the target model.
59 Simple types are mapped to simple target types. That is, there is no additional
60 bridging code involved when those types are being used.
63 <p>Sometimes a bridge cannot be created, depending on whether a programm uses
64 the XBridgeSupplier2 interface remotely. Assuming one wants to bridge an
65 OLE Automation object to UNO by calling createBridge on a proxy, then the UNO remote
66 bridge would not recognise that the Any argument contains an IDispatch interface.
67 Therefore it cannot marshal it as COM requires it and the bridgeing would fail.
68 To prevent this, implementations of this interface should be aware of this scenario and
69 if necessary take the appropriate steps. The process ID argument to the createBridge
70 function represents the calling process and may be used by the implementation to determine
71 if it is being accessed remotely.
73 <p>All objects, whether they are part of the UNO object model or not,
74 are carried in an <atom>any</atom>. The representation of this object
75 is heavily model-dependent and has to be specified in the following list: </p>
79 <dd>The any carries normal UNO types, which can be any base type,
80 struct, sequence, enum or interface. </dd>
83 <dd>The any carries an <atom>unsigned long</atom> (on 32-bit systems)
84 or an <atom>unsigned hyper</atom> (on 64-bit systems), which is
85 interpreted as a variant pointer. The any does not control the
86 lifetime of the represented variant. That implies that the caller
87 has the responsibility of freeing the OLE resources represented
88 by the any value. </dd>
91 <dd>not specified yet. </dd>
94 <dd>not specified yet. </dd>
98 <p>Any implementation can supply its own bridges to other object
99 models by implementing this interface and returning the bridge
100 when the method <member>XBridgeSupplier2::createBridge()</member>
101 is called with itself as the first parameter. </p>
103 @see com::sun::star::bridge::OleBridgeSupplier2
105 published
interface XBridgeSupplier2
: com
::sun
::star
::uno
::XInterface
107 /** creates a bridge to provide an object of one object model with another.
109 any createBridge
( [in] any aModelDepObject
,
110 [in] sequence
< byte > aProcessId
,
111 [in] short nSourceModelType
,
112 [in] short nDestModelType
)
113 raises
( com
::sun
::star
::lang
::IllegalArgumentException
);
117 //=============================================================================
121 /*=============================================================================
123 =============================================================================*/