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