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