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_SessionManager_idl__ 24#define __com_sun_star_frame_SessionManager_idl__ 25 26#ifndef __com_sun_star_frame_XSessionManagerClient_idl__ 27#include <com/sun/star/frame/XSessionManagerClient.idl> 28#endif 29 30//============================================================================= 31 32 module com { module sun { module star { module frame { 33 34//============================================================================= 35/** The SessionManager service provides an interface to the session manager 36 of the desktop. A session manager keeps track of applications that are 37 running when the desktop shuts down and starts them again in the same 38 state they were left when the desktop starts up the next time. To be able 39 to do this the session manager needs cooperation from applications; 40 applications have to provide sufficient information to be started again as 41 well as restore the state they were left in. The normal flow of operation 42 looks like this: 43 44 <ol> 45 <li>The user starts the desktop shutdown.</li> 46 <li>The session manager informs all its connected applications 47 about the pending shutdown.</li> 48 <li>Each application saves its current state; while doing this it may 49 <ul> 50 <li>The application may request to interact with the user (e.g. to ask 51 where to save documents). This request is necessary because at any one 52 time only one application can iteract with the user. The session manager 53 coordinates these requests and grants every application in need of user 54 interaction a timeslot in which it may interact with the user</li> 55 <li>try to cancel the whole shutdown; the session manager may or may 56 not honor that request.</li> 57 </ul> 58 </li> 59 <li>After saving is done the session manager signals all applications 60 to exit.</li> 61 <li>Applications answer the exit message by disconnecting from the 62 session manager.</li> 63 <li>After all applications have exited or a reasonable timeout the 64 session manager kills all remaining applications and finally lets the 65 desktop shut down.</li> 66*/ 67service SessionManager 68{ 69 /** XSessionManagerClient (of which there can only be one instance per 70 process) provides an application's interface to the session manager. 71 It keeps track of every listener inside the application and multiplexes 72 the session manager's signals as well as requests to the session manager. 73 */ 74 interface XSessionManagerClient; 75 76}; 77 78}; }; }; }; 79 80#endif 81