~ubuntu-branches/ubuntu/karmic/xfce4-session/karmic

« back to all changes in this revision

Viewing changes to xfce4-session/xfsm-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2005-11-06 22:01:12 UTC
  • mto: (4.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051106220112-5rusox237ymjghsp
Tags: upstream-4.2.3
ImportĀ upstreamĀ versionĀ 4.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: xfsm-manager.h 4715 2004-11-03 21:09:16Z benny $ */
 
2
/*-
 
3
 * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
 
4
 * All rights reserved.
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2, or (at your option)
 
9
 * any later version.
 
10
 *                                                                              
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *                                                                              
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
19
 * 02111-1307, USA.
 
20
 */
 
21
 
 
22
#ifndef __XFSM_MANAGER_H__
 
23
#define __XFSM_MANAGER_H__
 
24
 
 
25
#include <libxfce4util/libxfce4util.h>
 
26
 
 
27
#include <xfce4-session/xfsm-client.h>
 
28
 
 
29
 
 
30
#define DIE_TIMEOUT     ( 7 * 1000)
 
31
#define SAVE_TIMEOUT    (60 * 1000)
 
32
#define STARTUP_TIMEOUT ( 8 * 1000)
 
33
 
 
34
typedef enum
 
35
{
 
36
  XFSM_MANAGER_STARTUP,
 
37
  XFSM_MANAGER_IDLE,
 
38
  XFSM_MANAGER_CHECKPOINT,
 
39
  XFSM_MANAGER_SHUTDOWN,
 
40
  XFSM_MANAGER_SHUTDOWNPHASE2,
 
41
} XfsmManagerState;
 
42
 
 
43
 
 
44
void xfsm_manager_init (XfceRc *rc);
 
45
 
 
46
gboolean xfsm_manager_restart (void);
 
47
 
 
48
gchar* xfsm_manager_generate_client_id (SmsConn sms_conn) G_GNUC_PURE;
 
49
 
 
50
XfsmClient* xfsm_manager_new_client           (SmsConn      sms_conn,
 
51
                                               gchar      **error);
 
52
gboolean        xfsm_manager_register_client      (XfsmClient  *client,
 
53
                                                   const gchar *previous_id);
 
54
void xfsm_manager_start_interact (XfsmClient *client);
 
55
void xfsm_manager_interact             (XfsmClient *client,
 
56
                                   gint        dialog_type);
 
57
void xfsm_manager_interact_done        (XfsmClient *client,
 
58
                                   gboolean    cancel_shutdown);
 
59
void xfsm_manager_save_yourself        (XfsmClient *client,
 
60
                                   gint        save_type,
 
61
                                   gboolean    shutdown,
 
62
                                   gint        interact_style,
 
63
                                   gboolean    fast,
 
64
                                   gboolean    global);
 
65
void xfsm_manager_save_yourself_phase2 (XfsmClient *client);
 
66
void xfsm_manager_save_yourself_done   (XfsmClient *client,
 
67
                                   gboolean    success);
 
68
void xfsm_manager_close_connection (XfsmClient *client,
 
69
                                    gboolean    cleanup);
 
70
void xfsm_manager_close_connection_by_ice_conn (IceConn ice_conn);
 
71
 
 
72
gboolean xfsm_manager_check_clients_saving (void);
 
73
gboolean xfsm_manager_maybe_enter_phase2 (void);
 
74
gboolean xfsm_manager_save_timeout (gpointer client_data);
 
75
void xfsm_manager_perform_shutdown (void);
 
76
gboolean xfsm_manager_run_command (const XfsmProperties *properties,
 
77
                                   const gchar          *command);
 
78
void xfsm_manager_store_session (void);
 
79
void xfsm_manager_complete_saveyourself (void);
 
80
 
 
81
#endif /* !__XFSM_MANAGER_H__ */
 
82