1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
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.
14 *
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).
20 *
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.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_frame_SessionManager_idl__
28#define __com_sun_star_frame_SessionManager_idl__
29
30#ifndef __com_sun_star_frame_XSessionManagerClient_idl__
31#include <com/sun/star/frame/XSessionManagerClient.idl>
32#endif
33
34//=============================================================================
35
36 module com {  module sun {  module star {  module frame {
37
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
46    looks like this:
47
48    <ol>
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
53    	<ul>
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>
61       </ul>
62     </li>
63     <li>After saving is done the session manager signals all applications
64     to exit.</li>
65     <li>Applications answer the exit message by disconnecting from the
66     session manager.</li>
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>
70*/
71service SessionManager
72{
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.
77    */
78    interface XSessionManagerClient;
79
80};
81
82}; }; }; };
83
84#endif
85