1
/* $Id: xfsm-client.c 4711 2004-11-01 16:10:55Z benny $ */
3
* Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
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)
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.
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
26
#include <libxfsm/xfsm-util.h>
28
#include <xfce4-session/xfsm-client.h>
29
#include <xfce4-session/xfsm-global.h>
33
xfsm_client_new (SmsConn sms_conn)
37
client = g_new0 (XfsmClient, 1);
38
client->sms_conn = sms_conn;
39
client->state = XFSM_CLIENT_IDLE;
45
xfsm_client_free (XfsmClient *client)
47
g_return_if_fail (client != NULL);
49
if (client->properties != NULL)
50
xfsm_properties_free (client->properties);
51
if (client->save_timeout_id > 0)
52
g_source_remove (client->save_timeout_id);
58
xfsm_client_set_initial_properties (XfsmClient *client,
59
XfsmProperties *properties)
61
g_return_if_fail (client != NULL);
62
g_return_if_fail (properties != NULL);
64
if (client->properties != NULL)
65
xfsm_properties_free (client->properties);
66
client->properties = properties;
67
client->id = properties->client_id;