1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_frame_SessionManager_idl__
24cdf0e10cSrcweir#define __com_sun_star_frame_SessionManager_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_frame_XSessionManagerClient_idl__
27cdf0e10cSrcweir#include <com/sun/star/frame/XSessionManagerClient.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir//=============================================================================
31cdf0e10cSrcweir
32cdf0e10cSrcweir module com {  module sun {  module star {  module frame {
33cdf0e10cSrcweir
34cdf0e10cSrcweir//=============================================================================
35cdf0e10cSrcweir/** The SessionManager service provides an interface to the session manager
36cdf0e10cSrcweir    of the desktop. A session manager keeps track of applications that are
37cdf0e10cSrcweir    running when the desktop shuts down and starts them again in the same
38cdf0e10cSrcweir    state they were left when the desktop starts up the next time. To be able
39cdf0e10cSrcweir    to do this the session manager needs cooperation from applications;
40cdf0e10cSrcweir    applications have to provide sufficient information to be started again as
41cdf0e10cSrcweir    well as restore the state they were left in. The normal flow of operation
42cdf0e10cSrcweir    looks like this:
43cdf0e10cSrcweir
44cdf0e10cSrcweir    <ol>
45cdf0e10cSrcweir    <li>The user starts the desktop shutdown.</li>
46cdf0e10cSrcweir    <li>The session manager informs all its connected applications
47cdf0e10cSrcweir    about the pending shutdown.</li>
48cdf0e10cSrcweir    <li>Each application saves its current state; while doing this it may
49cdf0e10cSrcweir    	<ul>
50cdf0e10cSrcweir        <li>The application may request to interact with the user (e.g. to ask
51cdf0e10cSrcweir        where to save documents). This request is necessary because at any one
52cdf0e10cSrcweir        time only one application can iteract with the user. The session manager
53cdf0e10cSrcweir        coordinates these requests and grants every application in need of user
54cdf0e10cSrcweir        interaction a timeslot in which it may interact with the user</li>
55cdf0e10cSrcweir        <li>try to cancel the whole shutdown; the session manager may or may
56cdf0e10cSrcweir        not honor that request.</li>
57cdf0e10cSrcweir       </ul>
58cdf0e10cSrcweir     </li>
59cdf0e10cSrcweir     <li>After saving is done the session manager signals all applications
60cdf0e10cSrcweir     to exit.</li>
61cdf0e10cSrcweir     <li>Applications answer the exit message by disconnecting from the
62cdf0e10cSrcweir     session manager.</li>
63cdf0e10cSrcweir     <li>After all applications have exited or a reasonable timeout the
64cdf0e10cSrcweir     session manager kills all remaining applications and finally lets the
65cdf0e10cSrcweir     desktop shut down.</li>
66cdf0e10cSrcweir*/
67cdf0e10cSrcweirservice SessionManager
68cdf0e10cSrcweir{
69cdf0e10cSrcweir    /** XSessionManagerClient (of which there can only be one instance per
70cdf0e10cSrcweir        process) provides an application's interface to the session manager.
71cdf0e10cSrcweir        It keeps track of every listener inside the application and multiplexes
72cdf0e10cSrcweir        the session manager's signals as well as requests to the session manager.
73cdf0e10cSrcweir    */
74cdf0e10cSrcweir    interface XSessionManagerClient;
75cdf0e10cSrcweir
76cdf0e10cSrcweir};
77cdf0e10cSrcweir
78cdf0e10cSrcweir}; }; }; };
79cdf0e10cSrcweir
80cdf0e10cSrcweir#endif
81