1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_embed_XEmbeddedObject_idl__
28#define __com_sun_star_embed_XEmbeddedObject_idl__
29
30#ifndef __com_sun_star_lang_XComponent_idl__
31#include <com/sun/star/lang/XComponent.idl>
32#endif
33
34#ifndef __com_sun_star_embed_XEmbeddedClient_idl__
35#include <com/sun/star/embed/XEmbeddedClient.idl>
36#endif
37
38#ifndef __com_sun_star_embed_XVisualObject_idl__
39#include <com/sun/star/embed/XVisualObject.idl>
40#endif
41
42#ifndef __com_sun_star_embed_XClassifiedObject_idl__
43#include <com/sun/star/embed/XClassifiedObject.idl>
44#endif
45
46#ifndef __com_sun_star_embed_XComponentSupplier_idl__
47#include <com/sun/star/embed/XComponentSupplier.idl>
48#endif
49
50#ifndef __com_sun_star_embed_XStateChangeBroadcaster_idl__
51#include <com/sun/star/embed/XStateChangeBroadcaster.idl>
52#endif
53
54#ifndef __com_sun_star_datatransfer_XTransferable_idl__
55#include <com/sun/star/datatransfer/XTransferable.idl>
56#endif
57
58#ifndef __com_sun_star_document_XEventBroadcaster_idl__
59#include <com/sun/star/document/XEventBroadcaster.idl>
60#endif
61
62#ifndef __com_sun_star_embed_VerbDescriptor_idl__
63#include <com/sun/star/embed/VerbDescriptor.idl>
64#endif
65
66#ifndef __com_sun_star_embed_UnreachableStateException_idl__
67#include <com/sun/star/embed/UnreachableStateException.idl>
68#endif
69
70#ifndef __com_sun_star_embed_WrongStateException_idl__
71#include <com/sun/star/embed/WrongStateException.idl>
72#endif
73
74#ifndef __com_sun_star_embed_NeedsRunningStateException_idl__
75#include <com/sun/star/embed/NeedsRunningStateException.idl>
76#endif
77
78#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
79#include <com/sun/star/lang/IllegalArgumentException.idl>
80#endif
81
82#ifndef __com_sun_star_util_XCloseable_idl__
83#include <com/sun/star/util/XCloseable.idl>
84#endif
85
86
87
88//============================================================================
89
90 module com {  module sun {  module star {  module embed {
91
92//============================================================================
93/** represents common functionality for embedded objects.
94 */
95published interface XEmbeddedObject
96{
97	// INTERFACES
98	//
99	//------------------------------------------------------------------------
100    /** represents common visualisation functionality for embedded objects.
101	 */
102	interface XVisualObject;
103
104	//------------------------------------------------------------------------
105    /** allows to detect class ID of the object.
106	 */
107	interface XClassifiedObject;
108
109	//------------------------------------------------------------------------
110    /** allows to get access to the component handled by the object.
111	 */
112	interface XComponentSupplier;
113
114	//------------------------------------------------------------------------
115    /** allows to be notified when object changes the state.
116	 */
117	interface XStateChangeBroadcaster;
118
119	//------------------------------------------------------------------------
120    /** allows to be notified about object related events.
121	 */
122	interface ::com::sun::star::document::XEventBroadcaster;
123
124	//------------------------------------------------------------------------
125    /** allows to control lifetime of the object.
126	 */
127	interface ::com::sun::star::util::XCloseable;
128
129	// METHODS
130	//
131	//------------------------------------------------------------------------
132    /** changes the state of the object to the requested one.
133
134        @param nNewState
135		    specifies the new state, can take values from the constant set
136			<type scope="com::sun::star::embed">EmbedStates</type>
137
138        @throws com::sun::star::embed::UnreachableStateException
139		    the specified state can not be reached
140
141        @throws com::sun::star::embed::WrongStateException
142			in case object is in invalid state
143
144        @throws com::sun::star::uno::Exception
145			in case of other problems
146	 */
147	void changeState( [in] long nNewState )
148		raises( ::com::sun::star::embed::UnreachableStateException,
149				::com::sun::star::embed::WrongStateException,
150		        ::com::sun::star::uno::Exception );
151
152	//------------------------------------------------------------------------
153    /** returns supported states for the object.
154
155        @returns
156            the sequence of states the object can be set to
157
158        @throws com::sun::star::embed::NeedsRunnignStateException
159			means that the object is in loaded state now and can be switched
160			to running state, other possible states can be detected only when
161			the object is not in loaded state any more
162
163        @throws com::sun::star::embed::WrongStateException
164			in case object is in invalid state
165	 */
166	sequence< long > getReachableStates()
167		raises( ::com::sun::star::embed::NeedsRunningStateException,
168				::com::sun::star::embed::WrongStateException );
169
170	//------------------------------------------------------------------------
171    /** returns the current state of the object.
172
173        @returns
174            the current state of the object
175
176        @throws com::sun::star::embed::WrongStateException
177			in case object is in invalid state
178	 */
179	long getCurrentState()
180		raises( ::com::sun::star::embed::WrongStateException );
181
182	//------------------------------------------------------------------------
183    /** lets object perform an action referenced by nVerbID.
184
185        @param nVerbID
186		    specifies an action to perform, can take values from
187			<type>EmbedVerbs</type>
188
189		@throws ::com::sun::star::lang::IllegalArgumentException
190			the verb is not supported
191
192        @throws com::sun::star::embed::WrongStateException
193		    the object is in wrong state to call the function
194
195        @throws com::sun::star::embed::UnreachableStateException
196		    the state, required by the verb, can not be reached
197
198        @throws com::sun::star::uno::Exception
199			in case of other problems
200	 */
201	void doVerb( [in] long nVerbID )
202		raises( ::com::sun::star::lang::IllegalArgumentException,
203				::com::sun::star::embed::WrongStateException,
204				::com::sun::star::embed::UnreachableStateException,
205		        ::com::sun::star::uno::Exception );
206
207	//------------------------------------------------------------------------
208    /** returns supported verbs for the object.
209
210        @returns
211            the sequence of verbs the object supports
212
213        @throws com::sun::star::embed::NeedsRunnignStateException
214			means that the object is in loaded state now and can be switched
215			to running state, acceptable verbs can be detected only when the
216			object is not in loaded state any more
217
218        @throws com::sun::star::embed::WrongStateException
219		    the object is in wrong state to call the function
220	 */
221	sequence< VerbDescriptor > getSupportedVerbs()
222		raises( ::com::sun::star::embed::NeedsRunningStateException,
223				::com::sun::star::embed::WrongStateException );
224
225	//------------------------------------------------------------------------
226    /** sets a connection to the container's client.
227
228        @param xClient
229			provides a reference to a client implementation
230
231        @throws com::sun::star::embed::WrongStateException
232		    the object is in wrong state
233	 */
234	void setClientSite( [in] XEmbeddedClient xClient )
235		raises( ::com::sun::star::embed::WrongStateException );
236
237	//------------------------------------------------------------------------
238    /** provides access to the internal link to the container client.
239
240        @returns
241			a reference to related container client if any is set
242
243        @throws com::sun::star::embed::WrongStateException
244		    the object is in wrong state
245	 */
246	XEmbeddedClient getClientSite()
247		raises( ::com::sun::star::embed::WrongStateException );
248
249	//------------------------------------------------------------------------
250    /** updates object's representations.
251
252        @throws com::sun::star::embed::WrongStateException
253		    the object is in wrong state to call the function
254
255        @throws com::sun::star::uno::Exception
256			in case problems detected
257	 */
258	void update()
259		raises( ::com::sun::star::embed::WrongStateException,
260				::com::sun::star::uno::Exception );
261
262	//------------------------------------------------------------------------
263    /** specifies how often the object's representation should be updated.
264
265		@param nMode
266			the new update mode, can take values from
267			<type>EmbeddedUpdateModes</type>
268
269        @throws ::com::sun::star::embed::WrongStateException
270		    the object is in wrong state
271	 */
272	void setUpdateMode( [in] long nMode )
273		raises( ::com::sun::star::embed::WrongStateException );
274
275	//------------------------------------------------------------------------
276    /** retrieves the status of the object.
277
278		@param nAspect
279			the aspect specifying the form of object representation
280
281		@return
282			the value specifying the status of the object for specified aspect
283			can take values from <type>EmbedMisc</type> constant set
284
285        @throws com::sun::star::embed::WrongStateException
286		    the object is in wrong state
287	 */
288	hyper getStatus( [in] hyper nAspect )
289		raises( ::com::sun::star::embed::WrongStateException );
290
291	//-------------------------------------------------------------------------
292    /** provides object with the name of container document.
293
294        @param sName
295			name of the container document
296	 */
297	void setContainerName( [in] string sName );
298
299};
300
301//============================================================================
302
303}; }; }; };
304
305#endif
306
307