2
* Copyright (c) 2003 Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de>
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
#ifndef __XFSM_CLIENT_H__
28
#define __XFSM_CLIENT_H__
32
#include <X11/ICE/ICElib.h>
33
#include <X11/SM/SMlib.h>
45
CLIENT_WAITFORINTERACT,
50
typedef struct _Client Client;
56
/* clients host machine */
59
/* connection handles */
63
/* session properties */
71
#define CLIENT(obj) ((Client *)(obj))
74
extern Client *client_new(SmsConn);
75
extern void client_free(Client *);
76
extern gboolean client_save(const Client *, FILE *fp);
77
extern Client *client_load(FILE *fp);
78
extern gchar *client_get_current_directory(const Client *);
79
extern gchar *client_get_program(const Client *);
80
extern gchar *client_get_userid(const Client *);
81
extern gchar **client_get_restart_command(const Client *);
82
extern gint client_get_priority(const Client *);
83
extern gint client_get_restart_style_hint(const Client *);
84
extern gint client_compare_priority(const Client *, const Client *);
85
extern gchar **client_get_command(const Client *, const gchar *);
86
extern gboolean client_run_command(const Client *, const gchar *, GError **);
88
extern void client_kill(const Client *);
90
#define client_get_id(client) (g_strdup(CLIENT((client))->id))
91
#define client_get_hostname(client) (g_strdup(CLIENT((client))->hostname))
93
#define client_state(client) (CLIENT((client))->state)
95
#endif /* !__XFSM_CLIENT_H__ */