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#ifndef __com_sun_star_frame_XSessionManagerListener_idl__ 24#define __com_sun_star_frame_XSessionManagerListener_idl__ 25 26#ifndef __com_sun_star_lang_XEventListener_idl__ 27#include <com/sun/star/lang/XEventListener.idl> 28#endif 29//============================================================================= 30 31module com { module sun { module star { module frame { 32 33 interface XSessionManagerListener : com::sun::star::lang::XEventListener 34 { 35 36 /** doSave gets called when a save event was issued by the session manager 37 the listener should do what is necessary to restore 38 the current state of the application 39 40 <p>If the listener desires to interact with the user 41 it must first issue a user interaction request and 42 only do so if interaction was granted</p> 43 44 <p>When the save request is processed (with or without 45 user interaction) the listener must call 46 <member>XSessionManagerClient::saveDone()</member> 47 on the session manager client service object.</p> 48 49 @param bShutdown 50 <TRUE/> if a shutdown is in progress, 51 <FALSE/> if just a save point was requested 52 53 @param bCancelable 54 <TRUE/> if a shutdown in progress can be canceled by the listener, 55 <FALSE/> else 56 57 <p>the listener may choose to ignore the <member>saveDone</member> 58 event in case no real shutdown is in progress. He 59 still has to call 60 <member>XSessionManagerClient::saveDone()</member> 61 in that case.</p> 62 63 @see XSessionManagerClient 64 @see XSessionManagerClient::saveDone() 65 */ 66 [oneway] void doSave( [in] boolean bShutdown, [in] boolean bCancelable ); 67 68 /** approveInteraction is called when an outstanding 69 interaction request was processed by the session manager 70 71 @param bInteractionGranted 72 If <FALSE/> the listener must not interact with the user. 73 If <TRUE/> the listener can interact with the user now. 74 After interaction the listener must call 75 <member>XSessionManagerClient::interactionDone</member> 76 on the session manager client service object. 77 78 @see XSessionManagerClient 79 @see XSessionManagerClient::interactionDone() 80 */ 81 [oneway] void approveInteraction( [in] boolean bInteractionGranted ); 82 83 /** shutdownCanceled is called when a shutdown was canceled by the user 84 The listener can cancel his saving operations. No 85 further interaction is necessary and further calls 86 on the session manager client service object will 87 be ignored. 88 */ 89 [oneway] void shutdownCanceled(); 90 91 /** returns true, if a session was restored 92 */ 93 boolean doRestore(); 94 }; 95 96}; }; }; }; 97 98 99#endif 100