blob: ee094840486e1696a69a68765c49f766d39014e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
/* $Id$ */
/*-
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xfce4-session/xfsm-client.h>
XfsmClient*
xfsm_client_new (SmsConn sms_conn)
{
XfsmClient *client;
client = g_new0 (XfsmClient, 1);
client->sms_conn = sms_conn;
client->state = XFSM_CLIENT_IDLE;
return client;
}
void
xfsm_client_free (XfsmClient *client)
{
g_return_if_fail (client != NULL);
if (client->properties != NULL)
xfsm_properties_free (client->properties);
if (client->save_timeout_id > 0)
g_source_remove (client->save_timeout_id);
g_free (client);
}
void
xfsm_client_set_initial_properties (XfsmClient *client,
XfsmProperties *properties)
{
g_return_if_fail (client != NULL);
g_return_if_fail (properties != NULL);
if (client->properties != NULL)
xfsm_properties_free (client->properties);
client->properties = properties;
client->id = properties->client_id;
}
|