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