1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_frame_SessionManager_idl__
28 #define __com_sun_star_frame_SessionManager_idl__
30 #ifndef __com_sun_star_frame_XSessionManagerClient_idl__
31 #include
<com
/sun
/star
/frame
/XSessionManagerClient.idl
>
34 //=============================================================================
36 module com
{ module sun
{ module star
{ module frame
{
38 //=============================================================================
39 /** The SessionManager service provides an interface to the session manager
40 of the desktop. A session manager keeps track of applications that are
41 running when the desktop shuts down and starts them again in the same
42 state they were left when the desktop starts up the next time. To be able
43 to do this the session manager needs cooperation from applications;
44 applications have to provide sufficient information to be started again as
45 well as restore the state they were left in. The normal flow of operation
49 <li>The user starts the desktop shutdown.</li>
50 <li>The session manager informs all its connected applications
51 about the pending shutdown.</li>
52 <li>Each application saves its current state; while doing this it may
54 <li>The application may request to interact with the user (e.g. to ask
55 where to save documents). This request is necessary because at any one
56 time only one application can iteract with the user. The session manager
57 coordinates these requests and grants every application in need of user
58 interaction a timeslot in which it may interact with the user</li>
59 <li>try to cancel the whole shutdown; the session manager may or may
60 not honor that request.</li>
63 <li>After saving is done the session manager signals all applications
65 <li>Applications answer the exit message by disconnecting from the
67 <li>After all applications have exited or a reasonable timeout the
68 session manager kills all remaining applications and finally lets the
69 desktop shut down.</li>
71 service SessionManager
73 /** XSessionManagerClient (of which there can only be one instance per
74 process) provides an application's interface to the session manager.
75 It keeps track of every listener inside the application and multiplexes
76 the session manager's signals as well as requests to the session manager.
78 interface XSessionManagerClient
;