1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 *   Licensed to the Apache Software Foundation (ASF) under one or more
12 *   contributor license agreements. See the NOTICE file distributed
13 *   with this work for additional information regarding copyright
14 *   ownership. The ASF licenses this file to you under the Apache
15 *   License, Version 2.0 (the "License"); you may not use this file
16 *   except in compliance with the License. You may obtain a copy of
17 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef __com_sun_star_frame_SessionManager_idl__
20#define __com_sun_star_frame_SessionManager_idl__
21
22#include <com/sun/star/frame/XSessionManagerClient.idl>
23
24
25 module com {  module sun {  module star {  module frame {
26
27/** The SessionManager service provides an interface to the session manager
28    of the desktop. A session manager keeps track of applications that are
29    running when the desktop shuts down and starts them again in the same
30    state they were left when the desktop starts up the next time. To be able
31    to do this the session manager needs cooperation from applications;
32    applications have to provide sufficient information to be started again as
33    well as restore the state they were left in. The normal flow of operation
34    looks like this:
35
36    <ol>
37    <li>The user starts the desktop shutdown.</li>
38    <li>The session manager informs all its connected applications
39    about the pending shutdown.</li>
40    <li>Each application saves its current state; while doing this it may
41        <ul>
42        <li>The application may request to interact with the user (e.g. to ask
43        where to save documents). This request is necessary because at any one
44        time only one application can interact with the user. The session manager
45        coordinates these requests and grants every application in need of user
46        interaction a timeslot in which it may interact with the user</li>
47        <li>try to cancel the whole shutdown; the session manager may or may
48        not honor that request.</li>
49       </ul>
50     </li>
51     <li>After saving is done the session manager signals all applications
52     to exit.</li>
53     <li>Applications answer the exit message by disconnecting from the
54     session manager.</li>
55     <li>After all applications have exited or a reasonable timeout the
56     session manager kills all remaining applications and finally lets the
57     desktop shut down.</li>
58     </ol>
59*/
60service SessionManager
61{
62    /** XSessionManagerClient (of which there can only be one instance per
63        process) provides an application's interface to the session manager.
64        It keeps track of every listener inside the application and multiplexes
65        the session manager's signals as well as requests to the session manager.
66    */
67    interface XSessionManagerClient;
68
69};
70
71}; }; }; };
72
73#endif
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
76