1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24#ifndef __com_sun_star_embed_InstanceLocker_idl__ 25#define __com_sun_star_embed_InstanceLocker_idl__ 26 27#ifndef __com_sun_star_lang_XComponent_idl__ 28#include <com/sun/star/lang/XComponent.idl> 29#endif 30#ifndef __com_sun_star_uno_XInterface_idl__ 31#include <com/sun/star/uno/XInterface.idl> 32#endif 33#ifndef __com_sun_star_embed_XActionsApproval_idl__ 34#include <com/sun/star/embed/XActionsApproval.idl> 35#endif 36#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 37#include <com/sun/star/lang/IllegalArgumentException.idl> 38#endif 39#ifndef __com_sun_star_frame_DoubleInitializationException_idl__ 40#include <com/sun/star/frame/DoubleInitializationException.idl> 41#endif 42 43//============================================================================= 44module com { module sun { module star { module embed { 45 46//----------------------------------------------------------------------------- 47/** The main task of this service is to prevent closing, terminating and/or 48 etc. of controlled object. 49 50 <p> 51 After creation the service adds a listener of requested type 52 ( close, terminate and/or etc. ) to the controlled object and let 53 the listener throw related veto exception until the service is disposed. 54 </p> 55*/ 56published service InstanceLocker : com::sun::star::lang::XComponent 57{ 58 /** is used to initialize the object on it's creation. 59 60 @param xInstance 61 the controlled object. Must implement the related to the 62 requested actions broadcaster interface. 63 64 @param nActions 65 specifies the actions that should be done ( prevent closing, 66 prevent termination and/or etc. ). It must not be empty and can 67 currently contain following values or their combination: 68 <type>Actions</type>::PREVENT_CLOSE and 69 <type>Actions</type>::PREVENT_TERMINATION. 70 */ 71 InstanceLockerCtor1( [in] com::sun::star::uno::XInterface xInstance, 72 [in] long nActions ) 73 raises( ::com::sun::star::lang::IllegalArgumentException, 74 ::com::sun::star::frame::DoubleInitializationException, 75 ::com::sun::star::uno::Exception ); 76 77 /** is used to initialize the object on it's creation. 78 79 @param xInstance 80 the controlled object. Must implement the related to the 81 requested actions broadcaster interface. 82 83 @param nActions 84 specifies the actions that should be done ( prevent closing, 85 prevent termination and/or etc. ). It must not be empty and can 86 currently contain following values or their combination: 87 <type>Actions</type>::PREVENT_CLOSE and 88 <type>Actions</type>::PREVENT_TERMINATION. 89 90 @param xApprove 91 The object implementing <type>XActionsApproval</type> interface. 92 If this parameter is an empty reference the object will proceed 93 with the specified in the first parameter action until it is 94 disposed ( just like in the case of the first constructor ). 95 If the instance is provided, it will be asked for approval each 96 time before proceeding with the action ( the action is 97 specified using <type>string</type> and can take following 98 values in this case: "PreventClose", "PreventTermination" ). 99 */ 100 InstanceLockerCtor2( [in] com::sun::star::uno::XInterface xInstance, 101 [in] long aActions, 102 [in] XActionsApproval xApprove ) 103 raises( ::com::sun::star::lang::IllegalArgumentException, 104 ::com::sun::star::frame::DoubleInitializationException, 105 ::com::sun::star::uno::Exception ); 106}; 107 108//============================================================================= 109 110}; }; }; }; 111 112#endif 113 114