1
/* Generated by GOB (v1.0.10) on Mon Dec 3 03:10:36 2001
2
(do not edit directly) */
4
/* End world hunger, donate to the World Food Programme, http://www.wfp.org */
6
#define GOB_VERSION_MAJOR 1
7
#define GOB_VERSION_MINOR 0
8
#define GOB_VERSION_PATCHLEVEL 10
10
#include "gnome-pilot-client.h"
12
#include "gnome-pilot-client-private.h"
15
#line 62 "gnome-pilot-client.gob"
18
#include <sys/types.h>
22
POA_GNOME_Pilot_Client servant;
23
GnomePilotClient *self;
24
} GnomePilotClientServant;
26
GnomePilotClient* get_self (PortableServer_Servant servant);
27
pid_t gpilotd_get_pid (void);
29
PortableServer_ServantBase__epv base_epv = {
35
static POA_GNOME_Pilot_Client__epv gnome_pilot_client_epv;
36
static POA_GNOME_Pilot_Client__vepv gnome_pilot_client_vepv = { &base_epv, &gnome_pilot_client_epv };
38
enum get_triple_ptr_action {
39
GPILOTD_APP_PILOT_NAMES,
40
GPILOTD_APP_PILOT_IDS,
41
GPILOTD_APP_PILOTS_BY_NAME,
42
GPILOTD_APP_PILOTS_BY_LOGIN,
43
GPILOTD_APP_USER_NAMES,
44
GPILOTD_APP_DATABASES_FROM_CACHE,
49
gboolean xfer_callback (GnomeVFSXferProgressInfo *info,
50
GnomePilotClient *this);
54
#line 55 "gnome-pilot-client.c"
55
/* self casting macros */
56
#define SELF(x) GNOME_PILOT_CLIENT(x)
57
#define SELF_CONST(x) GNOME_PILOT_CLIENT_CONST(x)
58
#define IS_SELF(x) GNOME_IS_PILOT_CLIENT(x)
59
#define TYPE_SELF GNOME_TYPE_PILOT_CLIENT
60
#define SELF_CLASS(x) GNOME_PILOT_CLIENT_CLASS(x)
62
#define SELF_GET_CLASS(x) GNOME_PILOT_CLIENT_GET_CLASS(x)
65
typedef GnomePilotClient Self;
66
typedef GnomePilotClientClass SelfClass;
68
/* GTK_CLASS_TYPE for 1.2<->1.3/2.0 GTK+ compatibility */
69
#ifndef GTK_CLASS_TYPE
70
#define GTK_CLASS_TYPE(x) (GTK_OBJECT_CLASS(x)->type)
71
#endif /* GTK_CLASS_TYPE */
73
/* here are local prototypes */
74
static void gnome_pilot_client_class_init (GnomePilotClientClass * class) G_GNUC_UNUSED;
75
static ORBit_MessageValidationResult gnome_pilot_client_accept_all_cookies (CORBA_unsigned_long request_id, CORBA_Principal * principal, CORBA_char * operation) G_GNUC_UNUSED;
76
static void gnome_pilot_client_init_corba_class (GnomePilotClient * self) G_GNUC_UNUSED;
77
static void gnome_pilot_client_init (GnomePilotClient * self) G_GNUC_UNUSED;
78
static CORBA_char * gnome_pilot_client_corba_get_client_id (PortableServer_Servant servant, CORBA_Environment * ev) G_GNUC_UNUSED;
79
static void gnome_pilot_client_corba_set_client_id (PortableServer_Servant servant, const CORBA_char * id, CORBA_Environment * ev) G_GNUC_UNUSED;
80
static void gnome_pilot_client_corba_connect (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev) G_GNUC_UNUSED;
81
static void gnome_pilot_client_corba_disconnect (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_Environment * ev) G_GNUC_UNUSED;
82
static void gnome_pilot_client_corba_request_completed (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_unsigned_long id, CORBA_Environment * ev) G_GNUC_UNUSED;
83
static void gnome_pilot_client_corba_user_info_requested (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev) G_GNUC_UNUSED;
84
static void gnome_pilot_client_corba_system_info_requested (PortableServer_Servant servant, const CORBA_char * device, const GNOME_Pilot_SysInfo * sysinfo, CORBA_Environment * ev) G_GNUC_UNUSED;
85
static void gnome_pilot_client_corba_conduit_start (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * database, CORBA_Environment * ev) G_GNUC_UNUSED;
86
static void gnome_pilot_client_corba_conduit_end (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, CORBA_Environment * ev) G_GNUC_UNUSED;
87
static void gnome_pilot_client_corba_overall_progress (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev) G_GNUC_UNUSED;
88
static void gnome_pilot_client_corba_conduit_progress (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev) G_GNUC_UNUSED;
89
static void gnome_pilot_client_corba_conduit_message (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) G_GNUC_UNUSED;
90
static void gnome_pilot_client_corba_daemon_message (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) G_GNUC_UNUSED;
91
static void gnome_pilot_client_corba_daemon_error (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * message, CORBA_Environment * ev) G_GNUC_UNUSED;
92
static void gnome_pilot_client_corba_conduit_error (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) G_GNUC_UNUSED;
93
static void gnome_pilot_client_corba_pause (PortableServer_Servant servant, const CORBA_boolean on_off, CORBA_Environment * ev) G_GNUC_UNUSED;
94
static void ___real_gnome_pilot_client_pilot_connect (GnomePilotClient * self, const gchar * pilot_name, const GNOME_Pilot_UserInfo * userinfo);
95
static void ___real_gnome_pilot_client_pilot_disconnect (GnomePilotClient * self, const gchar * pilot_name);
96
static void ___real_gnome_pilot_client_completed_request (GnomePilotClient * self, const gchar * pilot_name, unsigned long request_id);
97
static void ___real_gnome_pilot_client_user_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_UserInfo * userinfo);
98
static void ___real_gnome_pilot_client_system_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_SysInfo * sysinfo);
99
static void ___real_gnome_pilot_client_start_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * database);
100
static void ___real_gnome_pilot_client_end_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name);
101
static void ___real_gnome_pilot_client_progress_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, guint current, guint total);
102
static void ___real_gnome_pilot_client_message_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message);
103
static void ___real_gnome_pilot_client_message_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message);
104
static void ___real_gnome_pilot_client_error_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * message);
105
static void ___real_gnome_pilot_client_error_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message);
106
static void ___real_gnome_pilot_client_daemon_pause (GnomePilotClient * self, gboolean on_off);
107
static gint gnome_pilot_client_get_triple_ptr (GnomePilotClient * self, enum get_triple_ptr_action action, const gchar * name, GList ** output) G_GNUC_UNUSED;
109
typedef void (*___Sig1) (GnomePilotClient *, gpointer , gpointer , gpointer);
112
___marshal_Sig1 (GtkObject * object,
119
rfunc = (___Sig1)func;
121
(*rfunc)((GnomePilotClient *)object,
122
GTK_VALUE_POINTER(args[0]),
123
GTK_VALUE_POINTER(args[1]),
128
typedef void (*___Sig2) (GnomePilotClient *, gpointer , gpointer);
131
___marshal_Sig2 (GtkObject * object,
138
rfunc = (___Sig2)func;
140
(*rfunc)((GnomePilotClient *)object,
141
GTK_VALUE_POINTER(args[0]),
146
typedef void (*___Sig3) (GnomePilotClient *, gpointer , gint , gpointer);
149
___marshal_Sig3 (GtkObject * object,
156
rfunc = (___Sig3)func;
158
(*rfunc)((GnomePilotClient *)object,
159
GTK_VALUE_POINTER(args[0]),
160
GTK_VALUE_INT(args[1]),
165
typedef void (*___Sig4) (GnomePilotClient *, gpointer , gpointer , gpointer , gpointer);
168
___marshal_Sig4 (GtkObject * object,
175
rfunc = (___Sig4)func;
177
(*rfunc)((GnomePilotClient *)object,
178
GTK_VALUE_POINTER(args[0]),
179
GTK_VALUE_POINTER(args[1]),
180
GTK_VALUE_POINTER(args[2]),
185
typedef void (*___Sig5) (GnomePilotClient *, gpointer , gpointer , guint , guint , gpointer);
188
___marshal_Sig5 (GtkObject * object,
195
rfunc = (___Sig5)func;
197
(*rfunc)((GnomePilotClient *)object,
198
GTK_VALUE_POINTER(args[0]),
199
GTK_VALUE_POINTER(args[1]),
200
GTK_VALUE_UINT(args[2]),
201
GTK_VALUE_UINT(args[3]),
206
typedef void (*___Sig6) (GnomePilotClient *, gpointer , guint , guint , gpointer);
209
___marshal_Sig6 (GtkObject * object,
216
rfunc = (___Sig6)func;
218
(*rfunc)((GnomePilotClient *)object,
219
GTK_VALUE_POINTER(args[0]),
220
GTK_VALUE_UINT(args[1]),
221
GTK_VALUE_UINT(args[2]),
226
typedef void (*___Sig7) (GnomePilotClient *, gboolean , gpointer);
229
___marshal_Sig7 (GtkObject * object,
236
rfunc = (___Sig7)func;
238
(*rfunc)((GnomePilotClient *)object,
239
GTK_VALUE_BOOL(args[0]),
245
PILOT_CONNECT_SIGNAL,
246
PILOT_DISCONNECT_SIGNAL,
247
COMPLETED_REQUEST_SIGNAL,
250
START_CONDUIT_SIGNAL,
252
PROGRESS_CONDUIT_SIGNAL,
253
PROGRESS_OVERALL_SIGNAL,
254
MESSAGE_CONDUIT_SIGNAL,
255
MESSAGE_DAEMON_SIGNAL,
257
ERROR_CONDUIT_SIGNAL,
262
static guint object_signals[LAST_SIGNAL] = {0};
264
/* pointer to the class of our parent */
265
static GtkObjectClass *parent_class = NULL;
268
gnome_pilot_client_get_type (void)
270
static GtkType type = 0;
273
static const GtkTypeInfo info = {
275
sizeof (GnomePilotClient),
276
sizeof (GnomePilotClientClass),
277
(GtkClassInitFunc) gnome_pilot_client_class_init,
278
(GtkObjectInitFunc) gnome_pilot_client_init,
279
/* reserved_1 */ NULL,
280
/* reserved_2 */ NULL,
281
(GtkClassInitFunc) NULL
284
type = gtk_type_unique (gtk_object_get_type(), &info);
290
/* Short form macros */
291
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
292
#define accept_all_cookies(args...) gnome_pilot_client_accept_all_cookies(args)
293
#define init_corba_class(args...) gnome_pilot_client_init_corba_class(args)
294
#define new() gnome_pilot_client_new()
295
#define destroy(args...) gnome_pilot_client_destroy(args)
296
#define connect_to_daemon(args...) gnome_pilot_client_connect_to_daemon(args)
297
#define corba_get_client_id(args...) gnome_pilot_client_corba_get_client_id(args)
298
#define corba_set_client_id(args...) gnome_pilot_client_corba_set_client_id(args)
299
#define corba_connect(args...) gnome_pilot_client_corba_connect(args)
300
#define corba_disconnect(args...) gnome_pilot_client_corba_disconnect(args)
301
#define corba_request_completed(args...) gnome_pilot_client_corba_request_completed(args)
302
#define corba_user_info_requested(args...) gnome_pilot_client_corba_user_info_requested(args)
303
#define corba_system_info_requested(args...) gnome_pilot_client_corba_system_info_requested(args)
304
#define corba_conduit_start(args...) gnome_pilot_client_corba_conduit_start(args)
305
#define corba_conduit_end(args...) gnome_pilot_client_corba_conduit_end(args)
306
#define corba_overall_progress(args...) gnome_pilot_client_corba_overall_progress(args)
307
#define corba_conduit_progress(args...) gnome_pilot_client_corba_conduit_progress(args)
308
#define corba_conduit_message(args...) gnome_pilot_client_corba_conduit_message(args)
309
#define corba_daemon_message(args...) gnome_pilot_client_corba_daemon_message(args)
310
#define corba_daemon_error(args...) gnome_pilot_client_corba_daemon_error(args)
311
#define corba_conduit_error(args...) gnome_pilot_client_corba_conduit_error(args)
312
#define corba_pause(args...) gnome_pilot_client_corba_pause(args)
313
#define pilot_connect(args...) gnome_pilot_client_pilot_connect(args)
314
#define pilot_disconnect(args...) gnome_pilot_client_pilot_disconnect(args)
315
#define completed_request(args...) gnome_pilot_client_completed_request(args)
316
#define user_info(args...) gnome_pilot_client_user_info(args)
317
#define system_info(args...) gnome_pilot_client_system_info(args)
318
#define start_conduit(args...) gnome_pilot_client_start_conduit(args)
319
#define end_conduit(args...) gnome_pilot_client_end_conduit(args)
320
#define progress_conduit(args...) gnome_pilot_client_progress_conduit(args)
321
#define progress_overall(args...) gnome_pilot_client_progress_overall(args)
322
#define message_conduit(args...) gnome_pilot_client_message_conduit(args)
323
#define message_daemon(args...) gnome_pilot_client_message_daemon(args)
324
#define error_daemon(args...) gnome_pilot_client_error_daemon(args)
325
#define error_conduit(args...) gnome_pilot_client_error_conduit(args)
326
#define daemon_pause(args...) gnome_pilot_client_daemon_pause(args)
327
#define pause_daemon(args...) gnome_pilot_client_pause_daemon(args)
328
#define unpause_daemon(args...) gnome_pilot_client_unpause_daemon(args)
329
#define noop(args...) gnome_pilot_client_noop(args)
330
#define restart_daemon(args...) gnome_pilot_client_restart_daemon(args)
331
#define monitor_on(args...) gnome_pilot_client_monitor_on(args)
332
#define monitor_on_all_pilots(args...) gnome_pilot_client_monitor_on_all_pilots(args)
333
#define monitor_off(args...) gnome_pilot_client_monitor_off(args)
334
#define monitor_off_all_pilots(args...) gnome_pilot_client_monitor_off_all_pilots(args)
335
#define notify_on(args...) gnome_pilot_client_notify_on(args)
336
#define notify_off(args...) gnome_pilot_client_notify_off(args)
337
#define restore(args...) gnome_pilot_client_restore(args)
338
#define install_file(args...) gnome_pilot_client_install_file(args)
339
#define get_user_info(args...) gnome_pilot_client_get_user_info(args)
340
#define set_user_info(args...) gnome_pilot_client_set_user_info(args)
341
#define get_system_info(args...) gnome_pilot_client_get_system_info(args)
342
#define remove_request(args...) gnome_pilot_client_remove_request(args)
343
#define conduit(args...) gnome_pilot_client_conduit(args)
344
#define get_triple_ptr(args...) gnome_pilot_client_get_triple_ptr(args)
345
#define get_users(args...) gnome_pilot_client_get_users(args)
346
#define get_databases_from_cache(args...) gnome_pilot_client_get_databases_from_cache(args)
347
#define get_cradles(args...) gnome_pilot_client_get_cradles(args)
348
#define get_pilots(args...) gnome_pilot_client_get_pilots(args)
349
#define get_pilot_ids(args...) gnome_pilot_client_get_pilot_ids(args)
350
#define get_pilots_by_user_name(args...) gnome_pilot_client_get_pilots_by_user_name(args)
351
#define get_pilots_by_user_login(args...) gnome_pilot_client_get_pilots_by_user_login(args)
352
#define get_user_name_by_pilot_name(args...) gnome_pilot_client_get_user_name_by_pilot_name(args)
353
#define get_user_login_by_pilot_name(args...) gnome_pilot_client_get_user_login_by_pilot_name(args)
354
#define get_pilot_base_dir_by_name(args...) gnome_pilot_client_get_pilot_base_dir_by_name(args)
355
#define get_pilot_base_dir_by_id(args...) gnome_pilot_client_get_pilot_base_dir_by_id(args)
356
#define get_pilot_id_by_name(args...) gnome_pilot_client_get_pilot_id_by_name(args)
357
#define get_pilot_name_by_id(args...) gnome_pilot_client_get_pilot_name_by_id(args)
358
#endif /* __GNUC__ && !__STRICT_ANSI__ */
360
/* Short form pointers */
361
static ORBit_MessageValidationResult (* const accept_all_cookies) (CORBA_unsigned_long request_id, CORBA_Principal * principal, CORBA_char * operation) = gnome_pilot_client_accept_all_cookies;
362
static void (* const init_corba_class) (GnomePilotClient * self) = gnome_pilot_client_init_corba_class;
363
static GtkObject * (* const new) (void) = gnome_pilot_client_new;
364
static void (* const destroy) (GnomePilotClient * self) = gnome_pilot_client_destroy;
365
static gint (* const connect_to_daemon) (GnomePilotClient * self) = gnome_pilot_client_connect_to_daemon;
366
static CORBA_char * (* const corba_get_client_id) (PortableServer_Servant servant, CORBA_Environment * ev) = gnome_pilot_client_corba_get_client_id;
367
static void (* const corba_set_client_id) (PortableServer_Servant servant, const CORBA_char * id, CORBA_Environment * ev) = gnome_pilot_client_corba_set_client_id;
368
static void (* const corba_connect) (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev) = gnome_pilot_client_corba_connect;
369
static void (* const corba_disconnect) (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_Environment * ev) = gnome_pilot_client_corba_disconnect;
370
static void (* const corba_request_completed) (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_unsigned_long id, CORBA_Environment * ev) = gnome_pilot_client_corba_request_completed;
371
static void (* const corba_user_info_requested) (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev) = gnome_pilot_client_corba_user_info_requested;
372
static void (* const corba_system_info_requested) (PortableServer_Servant servant, const CORBA_char * device, const GNOME_Pilot_SysInfo * sysinfo, CORBA_Environment * ev) = gnome_pilot_client_corba_system_info_requested;
373
static void (* const corba_conduit_start) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * database, CORBA_Environment * ev) = gnome_pilot_client_corba_conduit_start;
374
static void (* const corba_conduit_end) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, CORBA_Environment * ev) = gnome_pilot_client_corba_conduit_end;
375
static void (* const corba_overall_progress) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev) = gnome_pilot_client_corba_overall_progress;
376
static void (* const corba_conduit_progress) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev) = gnome_pilot_client_corba_conduit_progress;
377
static void (* const corba_conduit_message) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) = gnome_pilot_client_corba_conduit_message;
378
static void (* const corba_daemon_message) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) = gnome_pilot_client_corba_daemon_message;
379
static void (* const corba_daemon_error) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * message, CORBA_Environment * ev) = gnome_pilot_client_corba_daemon_error;
380
static void (* const corba_conduit_error) (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev) = gnome_pilot_client_corba_conduit_error;
381
static void (* const corba_pause) (PortableServer_Servant servant, const CORBA_boolean on_off, CORBA_Environment * ev) = gnome_pilot_client_corba_pause;
382
static void (* const pilot_connect) (GnomePilotClient * self, const gchar * pilot_name, const GNOME_Pilot_UserInfo * userinfo) = gnome_pilot_client_pilot_connect;
383
static void (* const pilot_disconnect) (GnomePilotClient * self, const gchar * pilot_name) = gnome_pilot_client_pilot_disconnect;
384
static void (* const completed_request) (GnomePilotClient * self, const gchar * pilot_name, unsigned long request_id) = gnome_pilot_client_completed_request;
385
static void (* const user_info) (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_UserInfo * userinfo) = gnome_pilot_client_user_info;
386
static void (* const system_info) (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_SysInfo * sysinfo) = gnome_pilot_client_system_info;
387
static void (* const start_conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * database) = gnome_pilot_client_start_conduit;
388
static void (* const end_conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name) = gnome_pilot_client_end_conduit;
389
static void (* const progress_conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, guint current, guint total) = gnome_pilot_client_progress_conduit;
390
static void (* const progress_overall) (GnomePilotClient * self, const gchar * pilot_name, guint current, guint total) = gnome_pilot_client_progress_overall;
391
static void (* const message_conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message) = gnome_pilot_client_message_conduit;
392
static void (* const message_daemon) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message) = gnome_pilot_client_message_daemon;
393
static void (* const error_daemon) (GnomePilotClient * self, const gchar * pilot_name, const gchar * message) = gnome_pilot_client_error_daemon;
394
static void (* const error_conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message) = gnome_pilot_client_error_conduit;
395
static void (* const daemon_pause) (GnomePilotClient * self, gboolean on_off) = gnome_pilot_client_daemon_pause;
396
static gint (* const pause_daemon) (GnomePilotClient * self) = gnome_pilot_client_pause_daemon;
397
static gint (* const unpause_daemon) (GnomePilotClient * self) = gnome_pilot_client_unpause_daemon;
398
static gint (* const noop) (GnomePilotClient * self) = gnome_pilot_client_noop;
399
static gint (* const restart_daemon) (GnomePilotClient * self) = gnome_pilot_client_restart_daemon;
400
static gint (* const monitor_on) (GnomePilotClient * self, const gchar * pilot_id) = gnome_pilot_client_monitor_on;
401
static gint (* const monitor_on_all_pilots) (GnomePilotClient * self) = gnome_pilot_client_monitor_on_all_pilots;
402
static gint (* const monitor_off) (GnomePilotClient * self, const gchar * pilot_id) = gnome_pilot_client_monitor_off;
403
static gint (* const monitor_off_all_pilots) (GnomePilotClient * self) = gnome_pilot_client_monitor_off_all_pilots;
404
static gint (* const notify_on) (GnomePilotClient * self, GNOME_Pilot_EventType type) = gnome_pilot_client_notify_on;
405
static gint (* const notify_off) (GnomePilotClient * self, GNOME_Pilot_EventType type) = gnome_pilot_client_notify_off;
406
static gint (* const restore) (GnomePilotClient * self, const gchar * pilot_id, const gchar * directory, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_restore;
407
static gint (* const install_file) (GnomePilotClient * self, const gchar * pilot_name, const gchar * infile, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_install_file;
408
static gint (* const get_user_info) (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_get_user_info;
409
static gint (* const set_user_info) (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_UserInfo user, gboolean continue_sync, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_set_user_info;
410
static gint (* const get_system_info) (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_get_system_info;
411
static gint (* const remove_request) (GnomePilotClient * self, gint handle) = gnome_pilot_client_remove_request;
412
static gint (* const conduit) (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, GNOME_Pilot_ConduitOperation operation, GNOME_Pilot_Survival survival, gint timeout, gint * handle) = gnome_pilot_client_conduit;
413
static gint (* const get_triple_ptr) (GnomePilotClient * self, enum get_triple_ptr_action action, const gchar * name, GList ** output) = gnome_pilot_client_get_triple_ptr;
414
static gint (* const get_users) (GnomePilotClient * self, GList ** output) = gnome_pilot_client_get_users;
415
static gint (* const get_databases_from_cache) (GnomePilotClient * self, const gchar * pilot_name, GList ** output) = gnome_pilot_client_get_databases_from_cache;
416
static gint (* const get_cradles) (GnomePilotClient * self, GList ** output) = gnome_pilot_client_get_cradles;
417
static gint (* const get_pilots) (GnomePilotClient * self, GList ** output) = gnome_pilot_client_get_pilots;
418
static gint (* const get_pilot_ids) (GnomePilotClient * self, gint ** output) = gnome_pilot_client_get_pilot_ids;
419
static gint (* const get_pilots_by_user_name) (GnomePilotClient * self, const gchar * name, GList ** output) = gnome_pilot_client_get_pilots_by_user_name;
420
static gint (* const get_pilots_by_user_login) (GnomePilotClient * self, const gchar * login, GList ** output) = gnome_pilot_client_get_pilots_by_user_login;
421
static gint (* const get_user_name_by_pilot_name) (GnomePilotClient * self, const gchar * pilot_name, gchar ** output) = gnome_pilot_client_get_user_name_by_pilot_name;
422
static gint (* const get_user_login_by_pilot_name) (GnomePilotClient * self, const gchar * pilot_name, gchar ** output) = gnome_pilot_client_get_user_login_by_pilot_name;
423
static gint (* const get_pilot_base_dir_by_name) (GnomePilotClient * self, const gchar * pilot_name, gchar ** output) = gnome_pilot_client_get_pilot_base_dir_by_name;
424
static gint (* const get_pilot_base_dir_by_id) (GnomePilotClient * self, guint32 pilot_id, gchar ** output) = gnome_pilot_client_get_pilot_base_dir_by_id;
425
static gint (* const get_pilot_id_by_name) (GnomePilotClient * self, const gchar * pilot_name, guint32 * output) = gnome_pilot_client_get_pilot_id_by_name;
426
static gint (* const get_pilot_name_by_id) (GnomePilotClient * self, guint32 pilot_id, gchar ** output) = gnome_pilot_client_get_pilot_name_by_id;
428
/* a macro for creating a new object of our type */
429
#define GET_NEW ((GnomePilotClient *)gtk_type_new(gnome_pilot_client_get_type()))
431
#line 108 "gnome-pilot-client.gob"
433
gnome_pilot_client_class_init (GnomePilotClientClass * class)
434
#line 435 "gnome-pilot-client.c"
436
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::class_init"
437
GtkObjectClass *gtk_object_class = (GtkObjectClass*) class;
438
#ifdef G_OBJECT_CLASS
439
GObjectClass *g_object_class = (GObjectClass*) class;
440
#endif /* G_OBJECT_CLASS */
442
parent_class = gtk_type_class (gtk_object_get_type ());
444
object_signals[PILOT_CONNECT_SIGNAL] =
445
gtk_signal_new ("pilot_connect",
446
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
447
GTK_CLASS_TYPE(gtk_object_class),
448
GTK_SIGNAL_OFFSET (GnomePilotClientClass, pilot_connect),
453
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const GNOME_Pilot_UserInfo * ) != sizeof(gpointer )) {
454
g_error("gnome-pilot-client.gob line 402: Type mismatch of \"pilot_connect\" signal signature");
456
object_signals[PILOT_DISCONNECT_SIGNAL] =
457
gtk_signal_new ("pilot_disconnect",
458
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
459
GTK_CLASS_TYPE(gtk_object_class),
460
GTK_SIGNAL_OFFSET (GnomePilotClientClass, pilot_disconnect),
464
if(sizeof(const gchar * ) != sizeof(gpointer )) {
465
g_error("gnome-pilot-client.gob line 407: Type mismatch of \"pilot_disconnect\" signal signature");
467
object_signals[COMPLETED_REQUEST_SIGNAL] =
468
gtk_signal_new ("completed_request",
469
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
470
GTK_CLASS_TYPE(gtk_object_class),
471
GTK_SIGNAL_OFFSET (GnomePilotClientClass, completed_request),
476
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(unsigned long ) != sizeof(gint )) {
477
g_error("gnome-pilot-client.gob line 412: Type mismatch of \"completed_request\" signal signature");
479
object_signals[USER_INFO_SIGNAL] =
480
gtk_signal_new ("user_info",
481
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
482
GTK_CLASS_TYPE(gtk_object_class),
483
GTK_SIGNAL_OFFSET (GnomePilotClientClass, user_info),
488
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const GNOME_Pilot_UserInfo * ) != sizeof(gpointer )) {
489
g_error("gnome-pilot-client.gob line 417: Type mismatch of \"user_info\" signal signature");
491
object_signals[SYSTEM_INFO_SIGNAL] =
492
gtk_signal_new ("system_info",
493
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
494
GTK_CLASS_TYPE(gtk_object_class),
495
GTK_SIGNAL_OFFSET (GnomePilotClientClass, system_info),
500
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const GNOME_Pilot_SysInfo * ) != sizeof(gpointer )) {
501
g_error("gnome-pilot-client.gob line 422: Type mismatch of \"system_info\" signal signature");
503
object_signals[START_CONDUIT_SIGNAL] =
504
gtk_signal_new ("start_conduit",
505
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
506
GTK_CLASS_TYPE(gtk_object_class),
507
GTK_SIGNAL_OFFSET (GnomePilotClientClass, start_conduit),
513
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
514
g_error("gnome-pilot-client.gob line 427: Type mismatch of \"start_conduit\" signal signature");
516
object_signals[END_CONDUIT_SIGNAL] =
517
gtk_signal_new ("end_conduit",
518
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
519
GTK_CLASS_TYPE(gtk_object_class),
520
GTK_SIGNAL_OFFSET (GnomePilotClientClass, end_conduit),
525
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
526
g_error("gnome-pilot-client.gob line 432: Type mismatch of \"end_conduit\" signal signature");
528
object_signals[PROGRESS_CONDUIT_SIGNAL] =
529
gtk_signal_new ("progress_conduit",
530
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
531
GTK_CLASS_TYPE(gtk_object_class),
532
GTK_SIGNAL_OFFSET (GnomePilotClientClass, progress_conduit),
539
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(guint ) != sizeof(guint ) || sizeof(guint ) != sizeof(guint )) {
540
g_error("gnome-pilot-client.gob line 437: Type mismatch of \"progress_conduit\" signal signature");
542
object_signals[PROGRESS_OVERALL_SIGNAL] =
543
gtk_signal_new ("progress_overall",
544
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
545
GTK_CLASS_TYPE(gtk_object_class),
546
GTK_SIGNAL_OFFSET (GnomePilotClientClass, progress_overall),
552
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(guint ) != sizeof(guint ) || sizeof(guint ) != sizeof(guint )) {
553
g_error("gnome-pilot-client.gob line 442: Type mismatch of \"progress_overall\" signal signature");
555
object_signals[MESSAGE_CONDUIT_SIGNAL] =
556
gtk_signal_new ("message_conduit",
557
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
558
GTK_CLASS_TYPE(gtk_object_class),
559
GTK_SIGNAL_OFFSET (GnomePilotClientClass, message_conduit),
565
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
566
g_error("gnome-pilot-client.gob line 448: Type mismatch of \"message_conduit\" signal signature");
568
object_signals[MESSAGE_DAEMON_SIGNAL] =
569
gtk_signal_new ("message_daemon",
570
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
571
GTK_CLASS_TYPE(gtk_object_class),
572
GTK_SIGNAL_OFFSET (GnomePilotClientClass, message_daemon),
578
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
579
g_error("gnome-pilot-client.gob line 453: Type mismatch of \"message_daemon\" signal signature");
581
object_signals[ERROR_DAEMON_SIGNAL] =
582
gtk_signal_new ("error_daemon",
583
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
584
GTK_CLASS_TYPE(gtk_object_class),
585
GTK_SIGNAL_OFFSET (GnomePilotClientClass, error_daemon),
590
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
591
g_error("gnome-pilot-client.gob line 458: Type mismatch of \"error_daemon\" signal signature");
593
object_signals[ERROR_CONDUIT_SIGNAL] =
594
gtk_signal_new ("error_conduit",
595
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
596
GTK_CLASS_TYPE(gtk_object_class),
597
GTK_SIGNAL_OFFSET (GnomePilotClientClass, error_conduit),
603
if(sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer ) || sizeof(const gchar * ) != sizeof(gpointer )) {
604
g_error("gnome-pilot-client.gob line 463: Type mismatch of \"error_conduit\" signal signature");
606
object_signals[DAEMON_PAUSE_SIGNAL] =
607
gtk_signal_new ("daemon_pause",
608
(GtkSignalRunType)(GTK_RUN_FIRST | GTK_RUN_ACTION),
609
GTK_CLASS_TYPE(gtk_object_class),
610
GTK_SIGNAL_OFFSET (GnomePilotClientClass, daemon_pause),
614
if(sizeof(gboolean ) != sizeof(gboolean )) {
615
g_error("gnome-pilot-client.gob line 468: Type mismatch of \"daemon_pause\" signal signature");
617
gtk_object_class_add_signals (gtk_object_class,
618
object_signals, LAST_SIGNAL);
621
#line 402 "gnome-pilot-client.gob"
622
class->pilot_connect = ___real_gnome_pilot_client_pilot_connect;
623
#line 407 "gnome-pilot-client.gob"
624
class->pilot_disconnect = ___real_gnome_pilot_client_pilot_disconnect;
625
#line 412 "gnome-pilot-client.gob"
626
class->completed_request = ___real_gnome_pilot_client_completed_request;
627
#line 417 "gnome-pilot-client.gob"
628
class->user_info = ___real_gnome_pilot_client_user_info;
629
#line 422 "gnome-pilot-client.gob"
630
class->system_info = ___real_gnome_pilot_client_system_info;
631
#line 427 "gnome-pilot-client.gob"
632
class->start_conduit = ___real_gnome_pilot_client_start_conduit;
633
#line 432 "gnome-pilot-client.gob"
634
class->end_conduit = ___real_gnome_pilot_client_end_conduit;
635
#line 437 "gnome-pilot-client.gob"
636
class->progress_conduit = ___real_gnome_pilot_client_progress_conduit;
637
#line 638 "gnome-pilot-client.c"
638
class->progress_overall = NULL;
639
#line 448 "gnome-pilot-client.gob"
640
class->message_conduit = ___real_gnome_pilot_client_message_conduit;
641
#line 453 "gnome-pilot-client.gob"
642
class->message_daemon = ___real_gnome_pilot_client_message_daemon;
643
#line 458 "gnome-pilot-client.gob"
644
class->error_daemon = ___real_gnome_pilot_client_error_daemon;
645
#line 463 "gnome-pilot-client.gob"
646
class->error_conduit = ___real_gnome_pilot_client_error_conduit;
647
#line 468 "gnome-pilot-client.gob"
648
class->daemon_pause = ___real_gnome_pilot_client_daemon_pause;
649
#line 650 "gnome-pilot-client.c"
651
#line 108 "gnome-pilot-client.gob"
654
if (gnome_vfs_initialized () == FALSE) {
655
g_message ("Initing gnome vfs");
656
if (gnome_vfs_init () == FALSE) {
657
g_warning ("Failed to init gnome-vfs");
660
#endif /* WITH_VFS */
662
#line 663 "gnome-pilot-client.c"
666
gtk_object_class = NULL;
667
#ifdef G_OBJECT_CLASS
668
g_object_class = NULL;
669
#endif /* G_OBJECT_CLASS */
671
#undef __GOB_FUNCTION__
672
#line 151 "gnome-pilot-client.gob"
674
gnome_pilot_client_init (GnomePilotClient * self)
675
#line 676 "gnome-pilot-client.c"
677
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::init"
679
#line 151 "gnome-pilot-client.gob"
684
#endif /* USING_OAF */
685
CORBA_Environment *ev;
686
PortableServer_POA the_poa;
687
GnomePilotClientServant *gnome_pilot_client_servant;
690
init_corba_class (self);
692
CORBA_exception_init (ev);
694
if (!oaf_is_initialized ())
695
self->orb = oaf_init (argc, &argv);
697
self->orb = oaf_orb_get ();
698
ORBit_set_request_validation_handler (accept_all_cookies);
699
#else /* USING_OAF */
700
self->orb = gnome_CORBA_ORB ();
701
#endif /* USING_OAF */
703
g_assert (self->orb!=NULL);
705
gnome_pilot_client_servant = g_new0(GnomePilotClientServant,1);
706
gnome_pilot_client_servant->servant.vepv =
707
&gnome_pilot_client_vepv;
708
gnome_pilot_client_servant->self = self;
710
the_poa = (PortableServer_POA)CORBA_ORB_resolve_initial_references (self->orb,"RootPOA",ev);
711
if (ev->_major != CORBA_NO_EXCEPTION) {
712
g_warning ("%s:%d: Caught exception: %s",
714
CORBA_exception_id (ev));
715
CORBA_exception_free (ev);
718
PortableServer_POAManager_activate (PortableServer_POA__get_the_POAManager (the_poa, ev), ev);
719
if (ev->_major != CORBA_NO_EXCEPTION) {
720
g_warning ("%s:%d: Caught exception: %s",
722
CORBA_exception_id (ev));
723
CORBA_exception_free (ev);
726
POA_GNOME_Pilot_Client__init ((PortableServer_Servant)gnome_pilot_client_servant,ev);
727
if (ev->_major != CORBA_NO_EXCEPTION) {
728
g_warning ("%s:%d: Caught exception: %s",
730
CORBA_exception_id (ev));
731
CORBA_exception_free (ev);
735
PortableServer_POA_activate_object (the_poa,
736
gnome_pilot_client_servant,
739
if (ev->_major != CORBA_NO_EXCEPTION) {
740
g_warning ("%s:%d: Caught exception: %s",
742
CORBA_exception_id (ev));
743
CORBA_exception_free (ev);
746
self->gpilotdclient =
747
PortableServer_POA_servant_to_reference (the_poa,
748
gnome_pilot_client_servant,
750
if (ev->_major != CORBA_NO_EXCEPTION) {
751
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (ev));
752
CORBA_exception_free (ev);
755
#line 756 "gnome-pilot-client.c"
760
#undef __GOB_FUNCTION__
763
#line 119 "gnome-pilot-client.gob"
764
static ORBit_MessageValidationResult
765
gnome_pilot_client_accept_all_cookies (CORBA_unsigned_long request_id, CORBA_Principal * principal, CORBA_char * operation)
766
#line 767 "gnome-pilot-client.c"
768
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::accept_all_cookies"
770
#line 121 "gnome-pilot-client.gob"
772
/* allow ALL cookies */
773
return ORBIT_MESSAGE_ALLOW_ALL;
775
#line 776 "gnome-pilot-client.c"
776
#undef __GOB_FUNCTION__
778
#line 126 "gnome-pilot-client.gob"
780
gnome_pilot_client_init_corba_class (GnomePilotClient * self)
781
#line 782 "gnome-pilot-client.c"
783
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::init_corba_class"
784
#line 126 "gnome-pilot-client.gob"
785
g_return_if_fail (self != NULL);
786
#line 126 "gnome-pilot-client.gob"
787
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
788
#line 789 "gnome-pilot-client.c"
790
#line 126 "gnome-pilot-client.gob"
792
static gboolean inited = FALSE;
795
self->client_id = NULL;
797
gnome_pilot_client_epv._get_client_id = corba_get_client_id;
798
gnome_pilot_client_epv._set_client_id = corba_set_client_id;
799
gnome_pilot_client_epv.connect = corba_connect;
800
gnome_pilot_client_epv.disconnect = corba_disconnect;
801
gnome_pilot_client_epv.request_completed = corba_request_completed;
802
gnome_pilot_client_epv.userinfo_requested = corba_user_info_requested;
803
gnome_pilot_client_epv.sysinfo_requested = corba_system_info_requested;
804
gnome_pilot_client_epv.conduit_start = corba_conduit_start;
805
gnome_pilot_client_epv.conduit_end = corba_conduit_end;
806
gnome_pilot_client_epv.overall_progress = corba_overall_progress;
807
gnome_pilot_client_epv.conduit_progress = corba_conduit_progress;
808
gnome_pilot_client_epv.conduit_message = corba_conduit_message;
809
gnome_pilot_client_epv.daemon_message = corba_daemon_message;
810
gnome_pilot_client_epv.daemon_error = corba_daemon_error;
811
gnome_pilot_client_epv.conduit_error = corba_conduit_error;
812
gnome_pilot_client_epv.pause = corba_pause;
815
#line 816 "gnome-pilot-client.c"
816
#undef __GOB_FUNCTION__
819
#line 227 "gnome-pilot-client.gob"
821
gnome_pilot_client_new (void)
822
#line 823 "gnome-pilot-client.c"
824
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::new"
826
#line 228 "gnome-pilot-client.gob"
828
GnomePilotClient *ret = GET_NEW;
829
return GTK_OBJECT (ret);
831
#line 832 "gnome-pilot-client.c"
832
#undef __GOB_FUNCTION__
834
#line 233 "gnome-pilot-client.gob"
836
gnome_pilot_client_destroy (GnomePilotClient * self)
837
#line 838 "gnome-pilot-client.c"
839
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::destroy"
840
#line 233 "gnome-pilot-client.gob"
841
g_return_if_fail (self != NULL);
842
#line 233 "gnome-pilot-client.gob"
843
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
844
#line 845 "gnome-pilot-client.c"
846
#line 233 "gnome-pilot-client.gob"
848
g_free (self->client_id);
849
/* FIXME: ick, what more to do here ? */
851
#line 852 "gnome-pilot-client.c"
852
#undef __GOB_FUNCTION__
854
#line 238 "gnome-pilot-client.gob"
856
gnome_pilot_client_connect_to_daemon (GnomePilotClient * self)
857
#line 858 "gnome-pilot-client.c"
859
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::connect_to_daemon"
860
#line 238 "gnome-pilot-client.gob"
861
g_return_val_if_fail (self != NULL, (gint )0);
862
#line 238 "gnome-pilot-client.gob"
863
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )0);
864
#line 865 "gnome-pilot-client.c"
866
#line 238 "gnome-pilot-client.gob"
869
OAF_ServerInfoList *list;
870
CORBA_Environment *ev;
873
list = oaf_query ("repo_ids.has ('IDL:GNOME/Pilot/Daemon:1.0')", NULL, ev);
874
if (list->_length == 0) {
875
return GPILOTD_ERR_NOT_CONNECTED;
878
info = list->_buffer[0];
879
g_message ("Activating OAF object %s", info.iid);
880
self->gpilotddaemon = oaf_activate_from_id (info.iid,
881
OAF_FLAG_NO_LOCAL, NULL, NULL);
884
CORBA_exception_free (ev);
885
#else /* USING_OAF */
886
self->gpilotddaemon = goad_server_activate_with_repo_id (NULL,
887
"IDL:GNOME/Pilot/Daemon:1.0",
889
#endif /* USING_OAF */
890
if (self->gpilotddaemon == NULL) return GPILOTD_ERR_NOT_CONNECTED;
894
#line 895 "gnome-pilot-client.c"
895
#undef __GOB_FUNCTION__
897
#line 266 "gnome-pilot-client.gob"
899
gnome_pilot_client_corba_get_client_id (PortableServer_Servant servant, CORBA_Environment * ev)
900
#line 901 "gnome-pilot-client.c"
902
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_get_client_id"
904
#line 268 "gnome-pilot-client.gob"
907
id = get_self (servant)->client_id;
908
if (id==NULL) return CORBA_string_dup ("");
909
return CORBA_string_dup (id);
911
#line 912 "gnome-pilot-client.c"
912
#undef __GOB_FUNCTION__
914
#line 275 "gnome-pilot-client.gob"
916
gnome_pilot_client_corba_set_client_id (PortableServer_Servant servant, const CORBA_char * id, CORBA_Environment * ev)
917
#line 918 "gnome-pilot-client.c"
919
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_set_client_id"
921
#line 278 "gnome-pilot-client.gob"
923
if (get_self (servant)->client_id!=NULL) {
924
/* throw exception */
926
} get_self (servant)->client_id = g_strdup (id);
928
#line 929 "gnome-pilot-client.c"
929
#undef __GOB_FUNCTION__
931
#line 285 "gnome-pilot-client.gob"
933
gnome_pilot_client_corba_connect (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev)
934
#line 935 "gnome-pilot-client.c"
936
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_connect"
938
#line 289 "gnome-pilot-client.gob"
940
pilot_connect (get_self (servant),pilot_id,user);
942
#line 943 "gnome-pilot-client.c"
943
#undef __GOB_FUNCTION__
945
#line 293 "gnome-pilot-client.gob"
947
gnome_pilot_client_corba_disconnect (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_Environment * ev)
948
#line 949 "gnome-pilot-client.c"
950
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_disconnect"
952
#line 296 "gnome-pilot-client.gob"
954
pilot_disconnect (get_self (servant),pilot_id);
956
#line 957 "gnome-pilot-client.c"
957
#undef __GOB_FUNCTION__
959
#line 300 "gnome-pilot-client.gob"
961
gnome_pilot_client_corba_request_completed (PortableServer_Servant servant, const CORBA_char * pilot_id, CORBA_unsigned_long id, CORBA_Environment * ev)
962
#line 963 "gnome-pilot-client.c"
964
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_request_completed"
966
#line 304 "gnome-pilot-client.gob"
968
completed_request (get_self (servant),pilot_id,id);
970
#line 971 "gnome-pilot-client.c"
971
#undef __GOB_FUNCTION__
973
#line 308 "gnome-pilot-client.gob"
975
gnome_pilot_client_corba_user_info_requested (PortableServer_Servant servant, const CORBA_char * pilot_id, const GNOME_Pilot_UserInfo * user, CORBA_Environment * ev)
976
#line 977 "gnome-pilot-client.c"
978
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_user_info_requested"
980
#line 312 "gnome-pilot-client.gob"
982
user_info (get_self (servant),pilot_id,user);
984
#line 985 "gnome-pilot-client.c"
985
#undef __GOB_FUNCTION__
987
#line 316 "gnome-pilot-client.gob"
989
gnome_pilot_client_corba_system_info_requested (PortableServer_Servant servant, const CORBA_char * device, const GNOME_Pilot_SysInfo * sysinfo, CORBA_Environment * ev)
990
#line 991 "gnome-pilot-client.c"
992
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_system_info_requested"
994
#line 320 "gnome-pilot-client.gob"
996
system_info (get_self (servant),device,sysinfo);
998
#line 999 "gnome-pilot-client.c"
999
#undef __GOB_FUNCTION__
1001
#line 324 "gnome-pilot-client.gob"
1003
gnome_pilot_client_corba_conduit_start (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * database, CORBA_Environment * ev)
1004
#line 1005 "gnome-pilot-client.c"
1006
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_conduit_start"
1008
#line 329 "gnome-pilot-client.gob"
1010
start_conduit (get_self (servant),pilot_id,conduit_name,database);
1012
#line 1013 "gnome-pilot-client.c"
1013
#undef __GOB_FUNCTION__
1015
#line 333 "gnome-pilot-client.gob"
1017
gnome_pilot_client_corba_conduit_end (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, CORBA_Environment * ev)
1018
#line 1019 "gnome-pilot-client.c"
1020
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_conduit_end"
1022
#line 337 "gnome-pilot-client.gob"
1024
end_conduit (get_self (servant),pilot_id,conduit_name);
1026
#line 1027 "gnome-pilot-client.c"
1027
#undef __GOB_FUNCTION__
1029
#line 341 "gnome-pilot-client.gob"
1031
gnome_pilot_client_corba_overall_progress (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev)
1032
#line 1033 "gnome-pilot-client.c"
1034
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_overall_progress"
1036
#line 346 "gnome-pilot-client.gob"
1038
progress_overall (get_self (servant),pilot_id, current, total);
1040
#line 1041 "gnome-pilot-client.c"
1041
#undef __GOB_FUNCTION__
1043
#line 350 "gnome-pilot-client.gob"
1045
gnome_pilot_client_corba_conduit_progress (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_unsigned_long current, const CORBA_unsigned_long total, CORBA_Environment * ev)
1046
#line 1047 "gnome-pilot-client.c"
1048
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_conduit_progress"
1050
#line 356 "gnome-pilot-client.gob"
1052
progress_conduit (get_self (servant),pilot_id,conduit_name,current,total);
1054
#line 1055 "gnome-pilot-client.c"
1055
#undef __GOB_FUNCTION__
1057
#line 360 "gnome-pilot-client.gob"
1059
gnome_pilot_client_corba_conduit_message (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev)
1060
#line 1061 "gnome-pilot-client.c"
1062
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_conduit_message"
1064
#line 365 "gnome-pilot-client.gob"
1066
message_conduit (get_self (servant),pilot_id,conduit_name,message);
1068
#line 1069 "gnome-pilot-client.c"
1069
#undef __GOB_FUNCTION__
1071
#line 369 "gnome-pilot-client.gob"
1073
gnome_pilot_client_corba_daemon_message (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev)
1074
#line 1075 "gnome-pilot-client.c"
1076
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_daemon_message"
1078
#line 374 "gnome-pilot-client.gob"
1080
message_daemon (get_self (servant),pilot_id,conduit_name,message);
1082
#line 1083 "gnome-pilot-client.c"
1083
#undef __GOB_FUNCTION__
1085
#line 378 "gnome-pilot-client.gob"
1087
gnome_pilot_client_corba_daemon_error (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * message, CORBA_Environment * ev)
1088
#line 1089 "gnome-pilot-client.c"
1090
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_daemon_error"
1092
#line 382 "gnome-pilot-client.gob"
1094
error_daemon (get_self (servant), pilot_id, message);
1096
#line 1097 "gnome-pilot-client.c"
1097
#undef __GOB_FUNCTION__
1099
#line 386 "gnome-pilot-client.gob"
1101
gnome_pilot_client_corba_conduit_error (PortableServer_Servant servant, const CORBA_char * pilot_id, const CORBA_char * conduit_name, const CORBA_char * message, CORBA_Environment * ev)
1102
#line 1103 "gnome-pilot-client.c"
1104
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_conduit_error"
1106
#line 391 "gnome-pilot-client.gob"
1108
error_conduit (get_self (servant),pilot_id,conduit_name,message);
1110
#line 1111 "gnome-pilot-client.c"
1111
#undef __GOB_FUNCTION__
1113
#line 395 "gnome-pilot-client.gob"
1115
gnome_pilot_client_corba_pause (PortableServer_Servant servant, const CORBA_boolean on_off, CORBA_Environment * ev)
1116
#line 1117 "gnome-pilot-client.c"
1118
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::corba_pause"
1120
#line 398 "gnome-pilot-client.gob"
1122
daemon_pause (get_self (servant), on_off);
1124
#line 1125 "gnome-pilot-client.c"
1125
#undef __GOB_FUNCTION__
1127
#line 402 "gnome-pilot-client.gob"
1129
gnome_pilot_client_pilot_connect (GnomePilotClient * self, const gchar * pilot_name, const GNOME_Pilot_UserInfo * userinfo)
1130
#line 1131 "gnome-pilot-client.c"
1132
#line 402 "gnome-pilot-client.gob"
1133
g_return_if_fail (self != NULL);
1134
#line 402 "gnome-pilot-client.gob"
1135
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1136
#line 1137 "gnome-pilot-client.c"
1137
gtk_signal_emit (GTK_OBJECT (self),
1138
object_signals[PILOT_CONNECT_SIGNAL],
1139
(gpointer )pilot_name,
1140
(gpointer )userinfo);
1142
#line 402 "gnome-pilot-client.gob"
1144
___real_gnome_pilot_client_pilot_connect (GnomePilotClient * self, const gchar * pilot_name, const GNOME_Pilot_UserInfo * userinfo)
1145
#line 1146 "gnome-pilot-client.c"
1147
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::pilot_connect"
1149
#line 403 "gnome-pilot-client.gob"
1153
#line 1154 "gnome-pilot-client.c"
1154
#undef __GOB_FUNCTION__
1156
#line 407 "gnome-pilot-client.gob"
1158
gnome_pilot_client_pilot_disconnect (GnomePilotClient * self, const gchar * pilot_name)
1159
#line 1160 "gnome-pilot-client.c"
1161
#line 407 "gnome-pilot-client.gob"
1162
g_return_if_fail (self != NULL);
1163
#line 407 "gnome-pilot-client.gob"
1164
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1165
#line 1166 "gnome-pilot-client.c"
1166
gtk_signal_emit (GTK_OBJECT (self),
1167
object_signals[PILOT_DISCONNECT_SIGNAL],
1168
(gpointer )pilot_name);
1170
#line 407 "gnome-pilot-client.gob"
1172
___real_gnome_pilot_client_pilot_disconnect (GnomePilotClient * self, const gchar * pilot_name)
1173
#line 1174 "gnome-pilot-client.c"
1175
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::pilot_disconnect"
1177
#line 408 "gnome-pilot-client.gob"
1181
#line 1182 "gnome-pilot-client.c"
1182
#undef __GOB_FUNCTION__
1184
#line 412 "gnome-pilot-client.gob"
1186
gnome_pilot_client_completed_request (GnomePilotClient * self, const gchar * pilot_name, unsigned long request_id)
1187
#line 1188 "gnome-pilot-client.c"
1189
#line 412 "gnome-pilot-client.gob"
1190
g_return_if_fail (self != NULL);
1191
#line 412 "gnome-pilot-client.gob"
1192
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1193
#line 1194 "gnome-pilot-client.c"
1194
gtk_signal_emit (GTK_OBJECT (self),
1195
object_signals[COMPLETED_REQUEST_SIGNAL],
1196
(gpointer )pilot_name,
1199
#line 412 "gnome-pilot-client.gob"
1201
___real_gnome_pilot_client_completed_request (GnomePilotClient * self, const gchar * pilot_name, unsigned long request_id)
1202
#line 1203 "gnome-pilot-client.c"
1204
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::completed_request"
1206
#line 413 "gnome-pilot-client.gob"
1210
#line 1211 "gnome-pilot-client.c"
1211
#undef __GOB_FUNCTION__
1213
#line 417 "gnome-pilot-client.gob"
1215
gnome_pilot_client_user_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_UserInfo * userinfo)
1216
#line 1217 "gnome-pilot-client.c"
1218
#line 417 "gnome-pilot-client.gob"
1219
g_return_if_fail (self != NULL);
1220
#line 417 "gnome-pilot-client.gob"
1221
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1222
#line 1223 "gnome-pilot-client.c"
1223
gtk_signal_emit (GTK_OBJECT (self),
1224
object_signals[USER_INFO_SIGNAL],
1226
(gpointer )userinfo);
1228
#line 417 "gnome-pilot-client.gob"
1230
___real_gnome_pilot_client_user_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_UserInfo * userinfo)
1231
#line 1232 "gnome-pilot-client.c"
1233
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::user_info"
1235
#line 418 "gnome-pilot-client.gob"
1239
#line 1240 "gnome-pilot-client.c"
1240
#undef __GOB_FUNCTION__
1242
#line 422 "gnome-pilot-client.gob"
1244
gnome_pilot_client_system_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_SysInfo * sysinfo)
1245
#line 1246 "gnome-pilot-client.c"
1247
#line 422 "gnome-pilot-client.gob"
1248
g_return_if_fail (self != NULL);
1249
#line 422 "gnome-pilot-client.gob"
1250
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1251
#line 1252 "gnome-pilot-client.c"
1252
gtk_signal_emit (GTK_OBJECT (self),
1253
object_signals[SYSTEM_INFO_SIGNAL],
1255
(gpointer )sysinfo);
1257
#line 422 "gnome-pilot-client.gob"
1259
___real_gnome_pilot_client_system_info (GnomePilotClient * self, const gchar * device, const GNOME_Pilot_SysInfo * sysinfo)
1260
#line 1261 "gnome-pilot-client.c"
1262
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::system_info"
1264
#line 423 "gnome-pilot-client.gob"
1268
#line 1269 "gnome-pilot-client.c"
1269
#undef __GOB_FUNCTION__
1271
#line 427 "gnome-pilot-client.gob"
1273
gnome_pilot_client_start_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * database)
1274
#line 1275 "gnome-pilot-client.c"
1276
#line 427 "gnome-pilot-client.gob"
1277
g_return_if_fail (self != NULL);
1278
#line 427 "gnome-pilot-client.gob"
1279
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1280
#line 1281 "gnome-pilot-client.c"
1281
gtk_signal_emit (GTK_OBJECT (self),
1282
object_signals[START_CONDUIT_SIGNAL],
1283
(gpointer )pilot_name,
1284
(gpointer )conduit_name,
1285
(gpointer )database);
1287
#line 427 "gnome-pilot-client.gob"
1289
___real_gnome_pilot_client_start_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * database)
1290
#line 1291 "gnome-pilot-client.c"
1292
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::start_conduit"
1294
#line 428 "gnome-pilot-client.gob"
1298
#line 1299 "gnome-pilot-client.c"
1299
#undef __GOB_FUNCTION__
1301
#line 432 "gnome-pilot-client.gob"
1303
gnome_pilot_client_end_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name)
1304
#line 1305 "gnome-pilot-client.c"
1306
#line 432 "gnome-pilot-client.gob"
1307
g_return_if_fail (self != NULL);
1308
#line 432 "gnome-pilot-client.gob"
1309
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1310
#line 1311 "gnome-pilot-client.c"
1311
gtk_signal_emit (GTK_OBJECT (self),
1312
object_signals[END_CONDUIT_SIGNAL],
1313
(gpointer )pilot_name,
1314
(gpointer )conduit_name);
1316
#line 432 "gnome-pilot-client.gob"
1318
___real_gnome_pilot_client_end_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name)
1319
#line 1320 "gnome-pilot-client.c"
1321
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::end_conduit"
1323
#line 433 "gnome-pilot-client.gob"
1327
#line 1328 "gnome-pilot-client.c"
1328
#undef __GOB_FUNCTION__
1330
#line 437 "gnome-pilot-client.gob"
1332
gnome_pilot_client_progress_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, guint current, guint total)
1333
#line 1334 "gnome-pilot-client.c"
1335
#line 437 "gnome-pilot-client.gob"
1336
g_return_if_fail (self != NULL);
1337
#line 437 "gnome-pilot-client.gob"
1338
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1339
#line 1340 "gnome-pilot-client.c"
1340
gtk_signal_emit (GTK_OBJECT (self),
1341
object_signals[PROGRESS_CONDUIT_SIGNAL],
1342
(gpointer )pilot_name,
1343
(gpointer )conduit_name,
1347
#line 437 "gnome-pilot-client.gob"
1349
___real_gnome_pilot_client_progress_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, guint current, guint total)
1350
#line 1351 "gnome-pilot-client.c"
1352
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::progress_conduit"
1354
#line 438 "gnome-pilot-client.gob"
1358
#line 1359 "gnome-pilot-client.c"
1359
#undef __GOB_FUNCTION__
1361
#line 442 "gnome-pilot-client.gob"
1363
gnome_pilot_client_progress_overall (GnomePilotClient * self, const gchar * pilot_name, guint current, guint total)
1364
#line 1365 "gnome-pilot-client.c"
1366
#line 442 "gnome-pilot-client.gob"
1367
g_return_if_fail (self != NULL);
1368
#line 442 "gnome-pilot-client.gob"
1369
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1370
#line 1371 "gnome-pilot-client.c"
1371
gtk_signal_emit (GTK_OBJECT (self),
1372
object_signals[PROGRESS_OVERALL_SIGNAL],
1373
(gpointer )pilot_name,
1378
#line 448 "gnome-pilot-client.gob"
1380
gnome_pilot_client_message_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1381
#line 1382 "gnome-pilot-client.c"
1383
#line 448 "gnome-pilot-client.gob"
1384
g_return_if_fail (self != NULL);
1385
#line 448 "gnome-pilot-client.gob"
1386
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1387
#line 1388 "gnome-pilot-client.c"
1388
gtk_signal_emit (GTK_OBJECT (self),
1389
object_signals[MESSAGE_CONDUIT_SIGNAL],
1390
(gpointer )pilot_name,
1391
(gpointer )conduit_name,
1392
(gpointer )message);
1394
#line 448 "gnome-pilot-client.gob"
1396
___real_gnome_pilot_client_message_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1397
#line 1398 "gnome-pilot-client.c"
1399
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::message_conduit"
1401
#line 449 "gnome-pilot-client.gob"
1405
#line 1406 "gnome-pilot-client.c"
1406
#undef __GOB_FUNCTION__
1408
#line 453 "gnome-pilot-client.gob"
1410
gnome_pilot_client_message_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1411
#line 1412 "gnome-pilot-client.c"
1413
#line 453 "gnome-pilot-client.gob"
1414
g_return_if_fail (self != NULL);
1415
#line 453 "gnome-pilot-client.gob"
1416
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1417
#line 1418 "gnome-pilot-client.c"
1418
gtk_signal_emit (GTK_OBJECT (self),
1419
object_signals[MESSAGE_DAEMON_SIGNAL],
1420
(gpointer )pilot_name,
1421
(gpointer )conduit_name,
1422
(gpointer )message);
1424
#line 453 "gnome-pilot-client.gob"
1426
___real_gnome_pilot_client_message_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1427
#line 1428 "gnome-pilot-client.c"
1429
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::message_daemon"
1431
#line 454 "gnome-pilot-client.gob"
1435
#line 1436 "gnome-pilot-client.c"
1436
#undef __GOB_FUNCTION__
1438
#line 458 "gnome-pilot-client.gob"
1440
gnome_pilot_client_error_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * message)
1441
#line 1442 "gnome-pilot-client.c"
1443
#line 458 "gnome-pilot-client.gob"
1444
g_return_if_fail (self != NULL);
1445
#line 458 "gnome-pilot-client.gob"
1446
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1447
#line 1448 "gnome-pilot-client.c"
1448
gtk_signal_emit (GTK_OBJECT (self),
1449
object_signals[ERROR_DAEMON_SIGNAL],
1450
(gpointer )pilot_name,
1451
(gpointer )message);
1453
#line 458 "gnome-pilot-client.gob"
1455
___real_gnome_pilot_client_error_daemon (GnomePilotClient * self, const gchar * pilot_name, const gchar * message)
1456
#line 1457 "gnome-pilot-client.c"
1458
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::error_daemon"
1460
#line 459 "gnome-pilot-client.gob"
1464
#line 1465 "gnome-pilot-client.c"
1465
#undef __GOB_FUNCTION__
1467
#line 463 "gnome-pilot-client.gob"
1469
gnome_pilot_client_error_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1470
#line 1471 "gnome-pilot-client.c"
1472
#line 463 "gnome-pilot-client.gob"
1473
g_return_if_fail (self != NULL);
1474
#line 463 "gnome-pilot-client.gob"
1475
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1476
#line 1477 "gnome-pilot-client.c"
1477
gtk_signal_emit (GTK_OBJECT (self),
1478
object_signals[ERROR_CONDUIT_SIGNAL],
1479
(gpointer )pilot_name,
1480
(gpointer )conduit_name,
1481
(gpointer )message);
1483
#line 463 "gnome-pilot-client.gob"
1485
___real_gnome_pilot_client_error_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, const gchar * message)
1486
#line 1487 "gnome-pilot-client.c"
1488
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::error_conduit"
1490
#line 464 "gnome-pilot-client.gob"
1494
#line 1495 "gnome-pilot-client.c"
1495
#undef __GOB_FUNCTION__
1497
#line 468 "gnome-pilot-client.gob"
1499
gnome_pilot_client_daemon_pause (GnomePilotClient * self, gboolean on_off)
1500
#line 1501 "gnome-pilot-client.c"
1502
#line 468 "gnome-pilot-client.gob"
1503
g_return_if_fail (self != NULL);
1504
#line 468 "gnome-pilot-client.gob"
1505
g_return_if_fail (GNOME_IS_PILOT_CLIENT (self));
1506
#line 1507 "gnome-pilot-client.c"
1507
gtk_signal_emit (GTK_OBJECT (self),
1508
object_signals[DAEMON_PAUSE_SIGNAL],
1511
#line 468 "gnome-pilot-client.gob"
1513
___real_gnome_pilot_client_daemon_pause (GnomePilotClient * self, gboolean on_off)
1514
#line 1515 "gnome-pilot-client.c"
1516
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::daemon_pause"
1518
#line 469 "gnome-pilot-client.gob"
1522
#line 1523 "gnome-pilot-client.c"
1523
#undef __GOB_FUNCTION__
1525
#line 473 "gnome-pilot-client.gob"
1527
gnome_pilot_client_pause_daemon (GnomePilotClient * self)
1528
#line 1529 "gnome-pilot-client.c"
1530
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::pause_daemon"
1531
#line 473 "gnome-pilot-client.gob"
1532
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1533
#line 473 "gnome-pilot-client.gob"
1534
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1535
#line 1536 "gnome-pilot-client.c"
1537
#line 473 "gnome-pilot-client.gob"
1539
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1541
GNOME_Pilot_Daemon_pause (self->gpilotddaemon,TRUE,&self->ev);
1542
if (self->ev._major != CORBA_NO_EXCEPTION) {
1543
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1544
CORBA_exception_free (&self->ev);
1545
return GPILOTD_ERR_FAILED;
1549
#line 1550 "gnome-pilot-client.c"
1550
#undef __GOB_FUNCTION__
1552
#line 485 "gnome-pilot-client.gob"
1554
gnome_pilot_client_unpause_daemon (GnomePilotClient * self)
1555
#line 1556 "gnome-pilot-client.c"
1557
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::unpause_daemon"
1558
#line 485 "gnome-pilot-client.gob"
1559
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1560
#line 485 "gnome-pilot-client.gob"
1561
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1562
#line 1563 "gnome-pilot-client.c"
1564
#line 485 "gnome-pilot-client.gob"
1566
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1568
GNOME_Pilot_Daemon_pause (self->gpilotddaemon,FALSE,&self->ev);
1569
if (self->ev._major != CORBA_NO_EXCEPTION) {
1570
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1571
CORBA_exception_free (&self->ev);
1572
return GPILOTD_ERR_FAILED;
1576
#line 1577 "gnome-pilot-client.c"
1577
#undef __GOB_FUNCTION__
1579
#line 497 "gnome-pilot-client.gob"
1581
gnome_pilot_client_noop (GnomePilotClient * self)
1582
#line 1583 "gnome-pilot-client.c"
1584
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::noop"
1585
#line 497 "gnome-pilot-client.gob"
1586
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1587
#line 497 "gnome-pilot-client.gob"
1588
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1589
#line 1590 "gnome-pilot-client.c"
1591
#line 497 "gnome-pilot-client.gob"
1593
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1595
GNOME_Pilot_Daemon_noop (self->gpilotddaemon, &self->ev);
1596
if (self->ev._major != CORBA_NO_EXCEPTION) {
1597
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1598
CORBA_exception_free (&self->ev);
1599
return GPILOTD_ERR_NOT_CONNECTED;
1603
#line 1604 "gnome-pilot-client.c"
1604
#undef __GOB_FUNCTION__
1606
#line 509 "gnome-pilot-client.gob"
1608
gnome_pilot_client_restart_daemon (GnomePilotClient * self)
1609
#line 1610 "gnome-pilot-client.c"
1611
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::restart_daemon"
1612
#line 509 "gnome-pilot-client.gob"
1613
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1614
#line 509 "gnome-pilot-client.gob"
1615
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1616
#line 1617 "gnome-pilot-client.c"
1618
#line 509 "gnome-pilot-client.gob"
1622
/* NOTE: this is going to suck when gpilotd is running on another machine... */
1623
pid = gpilotd_get_pid ();
1624
if (pid == -1) return -1;
1627
return connect_to_daemon (self);
1629
#line 1630 "gnome-pilot-client.c"
1630
#undef __GOB_FUNCTION__
1632
#line 520 "gnome-pilot-client.gob"
1634
gnome_pilot_client_monitor_on (GnomePilotClient * self, const gchar * pilot_id)
1635
#line 1636 "gnome-pilot-client.c"
1637
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::monitor_on"
1638
#line 520 "gnome-pilot-client.gob"
1639
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1640
#line 520 "gnome-pilot-client.gob"
1641
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1642
#line 520 "gnome-pilot-client.gob"
1643
g_return_val_if_fail (pilot_id != NULL, (gint )GPILOTD_ERR_INVAL);
1644
#line 1645 "gnome-pilot-client.c"
1646
#line 521 "gnome-pilot-client.gob"
1648
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1649
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1650
GNOME_Pilot_Daemon_monitor_on (self->gpilotddaemon,self->gpilotdclient,pilot_id,&self->ev);
1651
if (self->ev._major != CORBA_NO_EXCEPTION) {
1652
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1653
CORBA_exception_free (&self->ev);
1654
return GPILOTD_ERR_FAILED;
1658
#line 1659 "gnome-pilot-client.c"
1659
#undef __GOB_FUNCTION__
1661
#line 533 "gnome-pilot-client.gob"
1663
gnome_pilot_client_monitor_on_all_pilots (GnomePilotClient * self)
1664
#line 1665 "gnome-pilot-client.c"
1666
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::monitor_on_all_pilots"
1667
#line 533 "gnome-pilot-client.gob"
1668
g_return_val_if_fail (self != NULL, (gint )0);
1669
#line 533 "gnome-pilot-client.gob"
1670
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )0);
1671
#line 1672 "gnome-pilot-client.c"
1673
#line 533 "gnome-pilot-client.gob"
1675
GList *pilots = NULL,
1677
gint ret = GPILOTD_OK;
1679
if (get_pilots (self,&pilots) != GPILOTD_OK) return GPILOTD_ERR_FAILED;
1681
for (ptr = pilots; ptr; ptr = ptr->next) {
1682
ret = monitor_on (self,(gchar*)ptr->data);
1684
g_list_foreach (pilots,(GFunc)g_free,NULL);
1687
#line 1688 "gnome-pilot-client.c"
1688
#undef __GOB_FUNCTION__
1690
#line 547 "gnome-pilot-client.gob"
1692
gnome_pilot_client_monitor_off (GnomePilotClient * self, const gchar * pilot_id)
1693
#line 1694 "gnome-pilot-client.c"
1695
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::monitor_off"
1696
#line 547 "gnome-pilot-client.gob"
1697
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1698
#line 547 "gnome-pilot-client.gob"
1699
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1700
#line 547 "gnome-pilot-client.gob"
1701
g_return_val_if_fail (pilot_id != NULL, (gint )GPILOTD_ERR_INVAL);
1702
#line 1703 "gnome-pilot-client.c"
1704
#line 548 "gnome-pilot-client.gob"
1706
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1707
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1709
GNOME_Pilot_Daemon_monitor_off (self->gpilotddaemon,self->gpilotdclient,pilot_id,&self->ev);
1710
if (self->ev._major != CORBA_NO_EXCEPTION) {
1711
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1712
CORBA_exception_free (&self->ev);
1713
return GPILOTD_ERR_FAILED;
1717
#line 1718 "gnome-pilot-client.c"
1718
#undef __GOB_FUNCTION__
1720
#line 561 "gnome-pilot-client.gob"
1722
gnome_pilot_client_monitor_off_all_pilots (GnomePilotClient * self)
1723
#line 1724 "gnome-pilot-client.c"
1725
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::monitor_off_all_pilots"
1726
#line 561 "gnome-pilot-client.gob"
1727
g_return_val_if_fail (self != NULL, (gint )0);
1728
#line 561 "gnome-pilot-client.gob"
1729
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )0);
1730
#line 1731 "gnome-pilot-client.c"
1732
#line 561 "gnome-pilot-client.gob"
1734
GList *pilots = NULL,
1736
gint ret = GPILOTD_OK;
1738
if (get_pilots (self,&pilots) != GPILOTD_OK) return GPILOTD_ERR_FAILED;
1740
for (ptr = pilots; ptr; ptr = ptr->next) {
1741
ret = monitor_on (self,(gchar*)ptr->data);
1743
g_list_foreach (pilots,(GFunc)g_free,NULL);
1746
#line 1747 "gnome-pilot-client.c"
1747
#undef __GOB_FUNCTION__
1749
#line 575 "gnome-pilot-client.gob"
1751
gnome_pilot_client_notify_on (GnomePilotClient * self, GNOME_Pilot_EventType type)
1752
#line 1753 "gnome-pilot-client.c"
1754
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::notify_on"
1755
#line 575 "gnome-pilot-client.gob"
1756
g_return_val_if_fail (self != NULL, (gint )0);
1757
#line 575 "gnome-pilot-client.gob"
1758
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )0);
1759
#line 1760 "gnome-pilot-client.c"
1761
#line 576 "gnome-pilot-client.gob"
1763
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1764
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1766
GNOME_Pilot_Daemon_notify_on (self->gpilotddaemon,type,self->gpilotdclient,&self->ev);
1767
if (self->ev._major != CORBA_NO_EXCEPTION) {
1768
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1769
CORBA_exception_free (&self->ev);
1770
return GPILOTD_ERR_FAILED;
1774
#line 1775 "gnome-pilot-client.c"
1775
#undef __GOB_FUNCTION__
1777
#line 589 "gnome-pilot-client.gob"
1779
gnome_pilot_client_notify_off (GnomePilotClient * self, GNOME_Pilot_EventType type)
1780
#line 1781 "gnome-pilot-client.c"
1782
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::notify_off"
1783
#line 589 "gnome-pilot-client.gob"
1784
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1785
#line 589 "gnome-pilot-client.gob"
1786
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1787
#line 1788 "gnome-pilot-client.c"
1789
#line 590 "gnome-pilot-client.gob"
1791
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1792
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1794
GNOME_Pilot_Daemon_notify_off (self->gpilotddaemon,type,self->gpilotdclient,&self->ev);
1795
if (self->ev._major != CORBA_NO_EXCEPTION) {
1796
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1797
CORBA_exception_free (&self->ev);
1798
return GPILOTD_ERR_FAILED;
1802
#line 1803 "gnome-pilot-client.c"
1803
#undef __GOB_FUNCTION__
1805
#line 603 "gnome-pilot-client.gob"
1807
gnome_pilot_client_restore (GnomePilotClient * self, const gchar * pilot_id, const gchar * directory, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
1808
#line 1809 "gnome-pilot-client.c"
1810
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::restore"
1811
#line 603 "gnome-pilot-client.gob"
1812
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1813
#line 603 "gnome-pilot-client.gob"
1814
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1815
#line 603 "gnome-pilot-client.gob"
1816
g_return_val_if_fail (pilot_id != NULL, (gint )GPILOTD_ERR_INVAL);
1817
#line 603 "gnome-pilot-client.gob"
1818
g_return_val_if_fail (directory != NULL, (gint )GPILOTD_ERR_INVAL);
1819
#line 603 "gnome-pilot-client.gob"
1820
g_return_val_if_fail (timeout >= 0, (gint )GPILOTD_ERR_INVAL);
1821
#line 1822 "gnome-pilot-client.c"
1823
#line 608 "gnome-pilot-client.gob"
1827
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1828
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1830
val = GNOME_Pilot_Daemon_request_restore (self->gpilotddaemon,
1831
self->gpilotdclient,
1837
switch (self->ev._major) {
1838
case CORBA_SYSTEM_EXCEPTION:
1839
case CORBA_USER_EXCEPTION: {
1840
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
1841
if (strcmp (ex_GNOME_Pilot_MissingFile,CORBA_exception_id (&self->ev))==0) {
1842
g_warning ("Missing file");
1844
CORBA_exception_free (&self->ev);
1845
return GPILOTD_ERR_FAILED;
1848
case CORBA_NO_EXCEPTION:
1853
if (handle!=NULL) *handle = val;
1857
#line 1858 "gnome-pilot-client.c"
1858
#undef __GOB_FUNCTION__
1860
#line 642 "gnome-pilot-client.gob"
1862
gnome_pilot_client_install_file (GnomePilotClient * self, const gchar * pilot_name, const gchar * infile, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
1863
#line 1864 "gnome-pilot-client.c"
1865
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::install_file"
1866
#line 642 "gnome-pilot-client.gob"
1867
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
1868
#line 642 "gnome-pilot-client.gob"
1869
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
1870
#line 642 "gnome-pilot-client.gob"
1871
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
1872
#line 642 "gnome-pilot-client.gob"
1873
g_return_val_if_fail (infile != NULL, (gint )GPILOTD_ERR_INVAL);
1874
#line 642 "gnome-pilot-client.gob"
1875
g_return_val_if_fail (timeout >= 0, (gint )GPILOTD_ERR_INVAL);
1876
#line 1877 "gnome-pilot-client.c"
1878
#line 647 "gnome-pilot-client.gob"
1881
gboolean file_copied = FALSE;
1884
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
1885
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
1887
/* g_message ("Installing %s to %s", infile, pilot_name); */
1891
GnomeVFSResult result;
1892
GnomeVFSXferOptions xfer_options = 0;
1893
GnomeVFSURI *src_uri;
1894
GnomeVFSURI *dest_uri;
1897
char *infile_with_path;
1900
queue = g_strdup_printf ("%s/.gpilotd/",g_get_home_dir ());
1901
filename = tempnam (queue,"PDB");
1903
filename_uri = g_strdup_printf ("file://%s", filename);
1906
g_message ("%s test is %d %d", infile,
1908
strncmp (infile, "file:/", 6)!=0);
1911
if (infile[0] != '/' && strncmp (infile, "file:/", 6)!=0) {
1912
/* gnomevfs needs the file with path */
1914
infile_with_path = g_strdup_printf ("%s/%s", pwd, infile);
1916
infile_with_path = g_strdup (infile);
1919
src_uri = gnome_vfs_uri_new (infile_with_path);
1920
dest_uri = gnome_vfs_uri_new (filename_uri);
1923
g_message ("from : \"%s\"", infile_with_path);
1924
g_message ("to : \"%s\"", filename_uri);
1927
result = gnome_vfs_xfer_uri (src_uri, dest_uri,
1929
GNOME_VFS_XFER_ERROR_MODE_QUERY,
1930
GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
1931
(GnomeVFSXferProgressCallback)xfer_callback,
1934
/* g_message ("gnome-vfs-xfer-uri: %s\n",gnome_vfs_result_to_string (result)); */
1936
if (result == GNOME_VFS_OK) {
1939
file_copied = FALSE;
1941
g_free (filename_uri);
1942
gnome_vfs_uri_unref (src_uri);
1943
gnome_vfs_uri_unref (dest_uri);
1945
g_free (infile_with_path);
1947
#else /* WITH_VFS */
1952
queue = g_strdup_printf ("%s/.gnome/gnome-pilot.d/",g_get_home_dir ());
1953
filename = tempnam (queue,"PDB");
1955
in = fopen (infile,"rb");
1957
file_copied = FALSE;
1960
out = fopen (filename,"wb");
1962
file_copied = FALSE;
1965
while (!feof (in)) {
1968
act=fread (block,1,1024,in);
1970
file_copied = FALSE;
1972
if (fwrite (block,1,act,out)!=act) {
1973
file_copied = FALSE;
1976
file_copied = FALSE;
1991
#endif /* WITH_VFS */
1992
if (file_copied == FALSE) {
1994
g_message ("File copy failed");
1997
return GPILOTD_ERR_FAILED;
2000
val = GNOME_Pilot_Daemon_request_install (self->gpilotddaemon,
2001
self->gpilotdclient,
2008
switch (self->ev._major) {
2009
case CORBA_NO_EXCEPTION:
2011
case CORBA_SYSTEM_EXCEPTION:
2012
case CORBA_USER_EXCEPTION:
2013
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2015
if (strcmp (ex_GNOME_Pilot_MissingFile,CORBA_exception_id (&self->ev))==0) {
2016
g_warning ("Missing file");
2020
CORBA_exception_free (&self->ev);
2022
return GPILOTD_ERR_FAILED;
2028
if (handle!=NULL) *handle = val;
2033
#line 2034 "gnome-pilot-client.c"
2034
#undef __GOB_FUNCTION__
2036
#line 802 "gnome-pilot-client.gob"
2038
gnome_pilot_client_get_user_info (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
2039
#line 2040 "gnome-pilot-client.c"
2041
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_user_info"
2042
#line 802 "gnome-pilot-client.gob"
2043
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2044
#line 802 "gnome-pilot-client.gob"
2045
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2046
#line 802 "gnome-pilot-client.gob"
2047
g_return_val_if_fail (cradle_name != NULL, (gint )GPILOTD_ERR_INVAL);
2048
#line 802 "gnome-pilot-client.gob"
2049
g_return_val_if_fail (timeout >= 0, (gint )GPILOTD_ERR_INVAL);
2050
#line 2051 "gnome-pilot-client.c"
2052
#line 806 "gnome-pilot-client.gob"
2056
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2057
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
2059
val = GNOME_Pilot_Daemon_get_user_info (self->gpilotddaemon,
2060
self->gpilotdclient,
2066
if (self->ev._major != CORBA_NO_EXCEPTION) {
2067
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2068
CORBA_exception_free (&self->ev);
2069
return GPILOTD_ERR_FAILED;
2072
if (handle!=NULL) *handle =val;
2076
#line 2077 "gnome-pilot-client.c"
2077
#undef __GOB_FUNCTION__
2079
#line 830 "gnome-pilot-client.gob"
2081
gnome_pilot_client_set_user_info (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_UserInfo user, gboolean continue_sync, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
2082
#line 2083 "gnome-pilot-client.c"
2084
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::set_user_info"
2085
#line 830 "gnome-pilot-client.gob"
2086
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2087
#line 830 "gnome-pilot-client.gob"
2088
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2089
#line 830 "gnome-pilot-client.gob"
2090
g_return_val_if_fail (cradle_name != NULL, (gint )GPILOTD_ERR_INVAL);
2091
#line 830 "gnome-pilot-client.gob"
2092
g_return_val_if_fail (timeout >= 0, (gint )GPILOTD_ERR_INVAL);
2093
#line 2094 "gnome-pilot-client.c"
2095
#line 836 "gnome-pilot-client.gob"
2099
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2100
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
2102
val = GNOME_Pilot_Daemon_set_user_info (self->gpilotddaemon,
2103
self->gpilotdclient,
2111
if (self->ev._major != CORBA_NO_EXCEPTION) {
2112
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2113
CORBA_exception_free (&self->ev);
2114
return GPILOTD_ERR_FAILED;
2117
if (handle!=NULL) *handle =val;
2121
#line 2122 "gnome-pilot-client.c"
2122
#undef __GOB_FUNCTION__
2124
#line 862 "gnome-pilot-client.gob"
2126
gnome_pilot_client_get_system_info (GnomePilotClient * self, gchar * cradle_name, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
2127
#line 2128 "gnome-pilot-client.c"
2129
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_system_info"
2130
#line 862 "gnome-pilot-client.gob"
2131
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2132
#line 862 "gnome-pilot-client.gob"
2133
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2134
#line 862 "gnome-pilot-client.gob"
2135
g_return_val_if_fail (cradle_name != NULL, (gint )GPILOTD_ERR_INVAL);
2136
#line 2137 "gnome-pilot-client.c"
2138
#line 866 "gnome-pilot-client.gob"
2142
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2143
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
2145
val = GNOME_Pilot_Daemon_get_system_info (self->gpilotddaemon,
2146
self->gpilotdclient,
2152
if (self->ev._major != CORBA_NO_EXCEPTION) {
2153
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2154
CORBA_exception_free (&self->ev);
2155
return GPILOTD_ERR_FAILED;
2158
if (handle!=NULL) *handle =val;
2162
#line 2163 "gnome-pilot-client.c"
2163
#undef __GOB_FUNCTION__
2165
#line 890 "gnome-pilot-client.gob"
2167
gnome_pilot_client_remove_request (GnomePilotClient * self, gint handle)
2168
#line 2169 "gnome-pilot-client.c"
2170
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::remove_request"
2171
#line 890 "gnome-pilot-client.gob"
2172
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2173
#line 890 "gnome-pilot-client.gob"
2174
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2175
#line 2176 "gnome-pilot-client.c"
2177
#line 891 "gnome-pilot-client.gob"
2179
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2180
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
2182
GNOME_Pilot_Daemon_remove_request (self->gpilotddaemon,handle,&self->ev);
2183
if (self->ev._major != CORBA_NO_EXCEPTION) {
2184
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2185
CORBA_exception_free (&self->ev);
2186
return GPILOTD_ERR_FAILED;
2190
#line 2191 "gnome-pilot-client.c"
2191
#undef __GOB_FUNCTION__
2193
#line 904 "gnome-pilot-client.gob"
2195
gnome_pilot_client_conduit (GnomePilotClient * self, const gchar * pilot_name, const gchar * conduit_name, GNOME_Pilot_ConduitOperation operation, GNOME_Pilot_Survival survival, gint timeout, gint * handle)
2196
#line 2197 "gnome-pilot-client.c"
2198
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::conduit"
2199
#line 904 "gnome-pilot-client.gob"
2200
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2201
#line 904 "gnome-pilot-client.gob"
2202
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2203
#line 904 "gnome-pilot-client.gob"
2204
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
2205
#line 904 "gnome-pilot-client.gob"
2206
g_return_val_if_fail (conduit_name != NULL, (gint )GPILOTD_ERR_INVAL);
2207
#line 904 "gnome-pilot-client.gob"
2208
g_return_val_if_fail (timeout >= 0, (gint )GPILOTD_ERR_INVAL);
2209
#line 2210 "gnome-pilot-client.c"
2211
#line 910 "gnome-pilot-client.gob"
2215
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2216
g_return_val_if_fail (self->gpilotdclient!=NULL, GPILOTD_ERR_INTERNAL);
2218
val = GNOME_Pilot_Daemon_request_conduit (self->gpilotddaemon,
2219
self->gpilotdclient,
2227
if (self->ev._major != CORBA_NO_EXCEPTION) {
2228
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2229
CORBA_exception_free (&self->ev);
2230
return GPILOTD_ERR_FAILED;
2233
if (handle!=NULL) *handle =val;
2237
#line 2238 "gnome-pilot-client.c"
2238
#undef __GOB_FUNCTION__
2240
#line 936 "gnome-pilot-client.gob"
2242
gnome_pilot_client_get_triple_ptr (GnomePilotClient * self, enum get_triple_ptr_action action, const gchar * name, GList ** output)
2243
#line 2244 "gnome-pilot-client.c"
2245
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_triple_ptr"
2246
#line 936 "gnome-pilot-client.gob"
2247
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2248
#line 936 "gnome-pilot-client.gob"
2249
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2250
#line 936 "gnome-pilot-client.gob"
2251
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2252
#line 2253 "gnome-pilot-client.c"
2254
#line 939 "gnome-pilot-client.gob"
2256
GNOME_Pilot_StringSequence *seq=NULL;
2257
GNOME_Pilot_LongSequence *seq_long=NULL;
2259
#ifndef G_DISABLE_CHECKS
2260
if (*output!=NULL) {
2261
g_warning ("%s:%d: get_triple_ptr called with non-null pointer for output, leak-alert!",
2265
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2270
case GPILOTD_APP_PILOT_NAMES:
2271
seq = GNOME_Pilot_Daemon_get_pilots (self->gpilotddaemon, &self->ev);
2273
case GPILOTD_APP_PILOT_IDS:
2274
seq_long = GNOME_Pilot_Daemon_get_pilot_ids (self->gpilotddaemon, &self->ev);
2276
case GPILOTD_APP_PILOTS_BY_NAME:
2277
seq = GNOME_Pilot_Daemon_get_pilots_by_user_name (self->gpilotddaemon,name,&self->ev);
2279
case GPILOTD_APP_PILOTS_BY_LOGIN:
2280
seq = GNOME_Pilot_Daemon_get_pilots_by_user_login (self->gpilotddaemon,name,&self->ev);
2282
case GPILOTD_APP_USER_NAMES:
2283
seq = GNOME_Pilot_Daemon_get_users (self->gpilotddaemon,&self->ev);
2285
case GPILOTD_APP_DATABASES_FROM_CACHE:
2286
seq = GNOME_Pilot_Daemon_get_databases_from_cache (self->gpilotddaemon,name,&self->ev);
2288
case GPILOTD_APP_CRADLES:
2289
seq = GNOME_Pilot_Daemon_get_cradles (self->gpilotddaemon,&self->ev);
2292
if (self->ev._major != CORBA_NO_EXCEPTION) {
2293
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2294
CORBA_exception_free (&self->ev);
2295
return GPILOTD_ERR_FAILED;
2297
if (seq && seq->_length>0) {
2299
for (i=0;i<seq->_length;i++) {
2300
if (strlen (seq->_buffer[i]))
2301
(*output) = g_list_append ((*output),g_strdup (seq->_buffer[i]));
2304
if (seq_long && seq_long->_length>0) {
2306
for (i=0;i<seq_long->_length;i++) {
2307
(*output) = g_list_append ((*output),
2308
GINT_TO_POINTER (seq_long->_buffer[i]));
2313
CORBA_free (seq_long);
2317
#line 2318 "gnome-pilot-client.c"
2318
#undef __GOB_FUNCTION__
2320
#line 1002 "gnome-pilot-client.gob"
2322
gnome_pilot_client_get_users (GnomePilotClient * self, GList ** output)
2323
#line 2324 "gnome-pilot-client.c"
2325
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_users"
2326
#line 1002 "gnome-pilot-client.gob"
2327
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2328
#line 1002 "gnome-pilot-client.gob"
2329
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2330
#line 1002 "gnome-pilot-client.gob"
2331
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2332
#line 2333 "gnome-pilot-client.c"
2334
#line 1003 "gnome-pilot-client.gob"
2336
return get_triple_ptr (self,GPILOTD_APP_USER_NAMES,NULL,output);
2338
#line 2339 "gnome-pilot-client.c"
2339
#undef __GOB_FUNCTION__
2341
#line 1007 "gnome-pilot-client.gob"
2343
gnome_pilot_client_get_databases_from_cache (GnomePilotClient * self, const gchar * pilot_name, GList ** output)
2344
#line 2345 "gnome-pilot-client.c"
2346
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_databases_from_cache"
2347
#line 1007 "gnome-pilot-client.gob"
2348
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2349
#line 1007 "gnome-pilot-client.gob"
2350
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2351
#line 1007 "gnome-pilot-client.gob"
2352
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2353
#line 2354 "gnome-pilot-client.c"
2355
#line 1009 "gnome-pilot-client.gob"
2357
return get_triple_ptr (self,GPILOTD_APP_DATABASES_FROM_CACHE,pilot_name,output);
2359
#line 2360 "gnome-pilot-client.c"
2360
#undef __GOB_FUNCTION__
2362
#line 1013 "gnome-pilot-client.gob"
2364
gnome_pilot_client_get_cradles (GnomePilotClient * self, GList ** output)
2365
#line 2366 "gnome-pilot-client.c"
2367
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_cradles"
2368
#line 1013 "gnome-pilot-client.gob"
2369
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2370
#line 1013 "gnome-pilot-client.gob"
2371
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2372
#line 1013 "gnome-pilot-client.gob"
2373
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2374
#line 2375 "gnome-pilot-client.c"
2376
#line 1014 "gnome-pilot-client.gob"
2378
return get_triple_ptr (self,GPILOTD_APP_CRADLES,NULL,output);
2380
#line 2381 "gnome-pilot-client.c"
2381
#undef __GOB_FUNCTION__
2383
#line 1018 "gnome-pilot-client.gob"
2385
gnome_pilot_client_get_pilots (GnomePilotClient * self, GList ** output)
2386
#line 2387 "gnome-pilot-client.c"
2388
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilots"
2389
#line 1018 "gnome-pilot-client.gob"
2390
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2391
#line 1018 "gnome-pilot-client.gob"
2392
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2393
#line 1018 "gnome-pilot-client.gob"
2394
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2395
#line 2396 "gnome-pilot-client.c"
2397
#line 1019 "gnome-pilot-client.gob"
2399
return get_triple_ptr (self,GPILOTD_APP_PILOT_NAMES,NULL,output);
2401
#line 2402 "gnome-pilot-client.c"
2402
#undef __GOB_FUNCTION__
2404
#line 1023 "gnome-pilot-client.gob"
2406
gnome_pilot_client_get_pilot_ids (GnomePilotClient * self, gint ** output)
2407
#line 2408 "gnome-pilot-client.c"
2409
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilot_ids"
2410
#line 1023 "gnome-pilot-client.gob"
2411
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2412
#line 1023 "gnome-pilot-client.gob"
2413
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2414
#line 1023 "gnome-pilot-client.gob"
2415
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2416
#line 2417 "gnome-pilot-client.c"
2418
#line 1024 "gnome-pilot-client.gob"
2420
GList *long_output = NULL, *ptr;
2423
result = get_triple_ptr (self, GPILOTD_APP_PILOT_IDS, NULL, &long_output);
2425
(*output) = g_new0 (int, g_list_length (long_output));
2427
for (ptr = long_output; ptr; ptr = g_list_next (ptr)) {
2428
(*output)[idx] = GPOINTER_TO_INT (ptr->data);
2431
g_list_free (long_output);
2435
#line 2436 "gnome-pilot-client.c"
2436
#undef __GOB_FUNCTION__
2438
#line 1042 "gnome-pilot-client.gob"
2440
gnome_pilot_client_get_pilots_by_user_name (GnomePilotClient * self, const gchar * name, GList ** output)
2441
#line 2442 "gnome-pilot-client.c"
2443
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilots_by_user_name"
2444
#line 1042 "gnome-pilot-client.gob"
2445
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2446
#line 1042 "gnome-pilot-client.gob"
2447
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2448
#line 1042 "gnome-pilot-client.gob"
2449
g_return_val_if_fail (name != NULL, (gint )GPILOTD_ERR_INVAL);
2450
#line 1042 "gnome-pilot-client.gob"
2451
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2452
#line 2453 "gnome-pilot-client.c"
2454
#line 1044 "gnome-pilot-client.gob"
2456
return get_triple_ptr (self,GPILOTD_APP_PILOTS_BY_NAME,name,output);
2458
#line 2459 "gnome-pilot-client.c"
2459
#undef __GOB_FUNCTION__
2461
#line 1048 "gnome-pilot-client.gob"
2463
gnome_pilot_client_get_pilots_by_user_login (GnomePilotClient * self, const gchar * login, GList ** output)
2464
#line 2465 "gnome-pilot-client.c"
2466
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilots_by_user_login"
2467
#line 1048 "gnome-pilot-client.gob"
2468
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2469
#line 1048 "gnome-pilot-client.gob"
2470
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2471
#line 1048 "gnome-pilot-client.gob"
2472
g_return_val_if_fail (login != NULL, (gint )GPILOTD_ERR_INVAL);
2473
#line 1048 "gnome-pilot-client.gob"
2474
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2475
#line 2476 "gnome-pilot-client.c"
2477
#line 1050 "gnome-pilot-client.gob"
2479
return get_triple_ptr (self,GPILOTD_APP_PILOTS_BY_LOGIN,login,output);
2481
#line 2482 "gnome-pilot-client.c"
2482
#undef __GOB_FUNCTION__
2484
#line 1054 "gnome-pilot-client.gob"
2486
gnome_pilot_client_get_user_name_by_pilot_name (GnomePilotClient * self, const gchar * pilot_name, gchar ** output)
2487
#line 2488 "gnome-pilot-client.c"
2489
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_user_name_by_pilot_name"
2490
#line 1054 "gnome-pilot-client.gob"
2491
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2492
#line 1054 "gnome-pilot-client.gob"
2493
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2494
#line 1054 "gnome-pilot-client.gob"
2495
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
2496
#line 1054 "gnome-pilot-client.gob"
2497
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2498
#line 2499 "gnome-pilot-client.c"
2500
#line 1056 "gnome-pilot-client.gob"
2502
CORBA_char *user_name = NULL;
2504
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2505
#ifndef G_DISABLE_CHECKS
2506
if (*output!=NULL) {
2507
g_warning ("%s:%d: get_user_name_by_pilot_name called with non-null pointer for output, leak-alert!",
2511
user_name = GNOME_Pilot_Daemon_get_user_name_by_pilot_name (self->gpilotddaemon,
2514
if (self->ev._major != CORBA_NO_EXCEPTION) {
2515
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__,
2516
CORBA_exception_id (&self->ev));
2517
CORBA_exception_free (&self->ev);
2518
return GPILOTD_ERR_FAILED;
2521
*output = g_strdup (user_name);
2522
CORBA_free (user_name);
2526
#line 2527 "gnome-pilot-client.c"
2527
#undef __GOB_FUNCTION__
2529
#line 1082 "gnome-pilot-client.gob"
2531
gnome_pilot_client_get_user_login_by_pilot_name (GnomePilotClient * self, const gchar * pilot_name, gchar ** output)
2532
#line 2533 "gnome-pilot-client.c"
2534
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_user_login_by_pilot_name"
2535
#line 1082 "gnome-pilot-client.gob"
2536
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2537
#line 1082 "gnome-pilot-client.gob"
2538
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2539
#line 1082 "gnome-pilot-client.gob"
2540
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
2541
#line 1082 "gnome-pilot-client.gob"
2542
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2543
#line 2544 "gnome-pilot-client.c"
2545
#line 1084 "gnome-pilot-client.gob"
2547
CORBA_char *user_login = NULL;
2549
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2550
#ifndef G_DISABLE_CHECKS
2551
if (*output!=NULL) {
2552
g_warning ("%s:%d: get_user_login_by_pilot_name called with non-null pointer for output, leak-alert!",
2556
user_login = GNOME_Pilot_Daemon_get_user_login_by_pilot_name (self->gpilotddaemon,
2559
if (self->ev._major != CORBA_NO_EXCEPTION) {
2560
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__,
2561
CORBA_exception_id (&self->ev));
2562
CORBA_exception_free (&self->ev);
2563
return GPILOTD_ERR_FAILED;
2566
*output = g_strdup (user_login);
2567
CORBA_free (user_login);
2571
#line 2572 "gnome-pilot-client.c"
2572
#undef __GOB_FUNCTION__
2574
#line 1114 "gnome-pilot-client.gob"
2576
gnome_pilot_client_get_pilot_base_dir_by_name (GnomePilotClient * self, const gchar * pilot_name, gchar ** output)
2577
#line 2578 "gnome-pilot-client.c"
2579
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilot_base_dir_by_name"
2580
#line 1114 "gnome-pilot-client.gob"
2581
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2582
#line 1114 "gnome-pilot-client.gob"
2583
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2584
#line 1114 "gnome-pilot-client.gob"
2585
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
2586
#line 1114 "gnome-pilot-client.gob"
2587
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2588
#line 2589 "gnome-pilot-client.c"
2590
#line 1116 "gnome-pilot-client.gob"
2592
CORBA_char *basedir;
2594
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2595
#ifndef G_DISABLE_CHECKS
2596
if (*output!=NULL) {
2597
g_warning ("%s:%d: get_pilot_base_dir_by_name called with non-null pointer for output, leak-alert!",
2601
basedir = GNOME_Pilot_Daemon_get_pilot_base_dir (self->gpilotddaemon,pilot_name,&self->ev);
2602
if (self->ev._major != CORBA_NO_EXCEPTION) {
2603
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2604
CORBA_exception_free (&self->ev);
2605
return GPILOTD_ERR_FAILED;
2608
*output = g_strdup (basedir);
2609
CORBA_free (basedir);
2611
if (strlen (*output)==0) {
2613
*output = g_strdup_printf ("%s/%s",g_get_home_dir (),pilot_name);
2618
#line 2619 "gnome-pilot-client.c"
2619
#undef __GOB_FUNCTION__
2621
#line 1144 "gnome-pilot-client.gob"
2623
gnome_pilot_client_get_pilot_base_dir_by_id (GnomePilotClient * self, guint32 pilot_id, gchar ** output)
2624
#line 2625 "gnome-pilot-client.c"
2626
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilot_base_dir_by_id"
2627
#line 1144 "gnome-pilot-client.gob"
2628
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2629
#line 1144 "gnome-pilot-client.gob"
2630
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2631
#line 1144 "gnome-pilot-client.gob"
2632
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2633
#line 2634 "gnome-pilot-client.c"
2635
#line 1146 "gnome-pilot-client.gob"
2640
return_code = get_pilot_name_by_id (self,pilot_id,&pilot_name);
2641
if (return_code!=GPILOTD_OK) {
2645
return_code = get_pilot_base_dir_by_name (self,pilot_name,output);
2646
g_free (pilot_name);
2649
#line 2650 "gnome-pilot-client.c"
2650
#undef __GOB_FUNCTION__
2652
#line 1161 "gnome-pilot-client.gob"
2654
gnome_pilot_client_get_pilot_id_by_name (GnomePilotClient * self, const gchar * pilot_name, guint32 * output)
2655
#line 2656 "gnome-pilot-client.c"
2657
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilot_id_by_name"
2658
#line 1161 "gnome-pilot-client.gob"
2659
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2660
#line 1161 "gnome-pilot-client.gob"
2661
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2662
#line 1161 "gnome-pilot-client.gob"
2663
g_return_val_if_fail (pilot_name != NULL, (gint )GPILOTD_ERR_INVAL);
2664
#line 1161 "gnome-pilot-client.gob"
2665
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2666
#line 2667 "gnome-pilot-client.c"
2668
#line 1163 "gnome-pilot-client.gob"
2670
g_return_val_if_fail (self->gpilotddaemon!=NULL, GPILOTD_ERR_NOT_CONNECTED);
2672
*output = GNOME_Pilot_Daemon_get_pilot_id_from_name (self->gpilotddaemon,pilot_name,&self->ev);
2673
if (self->ev._major != CORBA_NO_EXCEPTION) {
2674
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2675
CORBA_exception_free (&self->ev);
2676
return GPILOTD_ERR_FAILED;
2681
#line 2682 "gnome-pilot-client.c"
2682
#undef __GOB_FUNCTION__
2684
#line 1176 "gnome-pilot-client.gob"
2686
gnome_pilot_client_get_pilot_name_by_id (GnomePilotClient * self, guint32 pilot_id, gchar ** output)
2687
#line 2688 "gnome-pilot-client.c"
2689
#define __GOB_FUNCTION__ "Gnome:Pilot:Client::get_pilot_name_by_id"
2690
#line 1176 "gnome-pilot-client.gob"
2691
g_return_val_if_fail (self != NULL, (gint )GPILOTD_ERR_INVAL);
2692
#line 1176 "gnome-pilot-client.gob"
2693
g_return_val_if_fail (GNOME_IS_PILOT_CLIENT (self), (gint )GPILOTD_ERR_INVAL);
2694
#line 1176 "gnome-pilot-client.gob"
2695
g_return_val_if_fail (output != NULL, (gint )GPILOTD_ERR_INVAL);
2696
#line 2697 "gnome-pilot-client.c"
2698
#line 1178 "gnome-pilot-client.gob"
2701
#ifndef G_DISABLE_CHECKS
2702
if (*output!=NULL) {
2703
g_warning ("%s:%d: get_pilot_name_by_id called with non-null pointer for output, leak-alert!",
2707
name = GNOME_Pilot_Daemon_get_pilot_name_from_id (self->gpilotddaemon,pilot_id,&self->ev);
2708
if (self->ev._major != CORBA_NO_EXCEPTION) {
2709
g_warning ("%s:%d: Caught exception: %s",__FILE__,__LINE__, CORBA_exception_id (&self->ev));
2710
CORBA_exception_free (&self->ev);
2711
return GPILOTD_ERR_FAILED;
2714
*output = g_strdup (name);
2717
if (output==NULL || strlen (*output)==0) {
2719
return GPILOTD_ERR_FAILED;
2724
#line 2725 "gnome-pilot-client.c"
2725
#undef __GOB_FUNCTION__
2728
#if (!defined __GNUC__) || (defined __GNUC__ && defined __STRICT_ANSI__)
2730
This is to avoid unused warnings if you don't call
2731
some method. I need to find a better way to do
2732
this, not needed in GCC since we use some gcc
2733
extentions to make saner, faster code */
2735
___gnome_pilot_client_really_bad_hack_to_avoid_warnings(void)
2737
((void (*)(void))accept_all_cookies)();
2738
((void (*)(void))init_corba_class)();
2739
((void (*)(void))new)();
2740
((void (*)(void))destroy)();
2741
((void (*)(void))connect_to_daemon)();
2742
((void (*)(void))corba_get_client_id)();
2743
((void (*)(void))corba_set_client_id)();
2744
((void (*)(void))corba_connect)();
2745
((void (*)(void))corba_disconnect)();
2746
((void (*)(void))corba_request_completed)();
2747
((void (*)(void))corba_user_info_requested)();
2748
((void (*)(void))corba_system_info_requested)();
2749
((void (*)(void))corba_conduit_start)();
2750
((void (*)(void))corba_conduit_end)();
2751
((void (*)(void))corba_overall_progress)();
2752
((void (*)(void))corba_conduit_progress)();
2753
((void (*)(void))corba_conduit_message)();
2754
((void (*)(void))corba_daemon_message)();
2755
((void (*)(void))corba_daemon_error)();
2756
((void (*)(void))corba_conduit_error)();
2757
((void (*)(void))corba_pause)();
2758
((void (*)(void))pilot_connect)();
2759
((void (*)(void))pilot_disconnect)();
2760
((void (*)(void))completed_request)();
2761
((void (*)(void))user_info)();
2762
((void (*)(void))system_info)();
2763
((void (*)(void))start_conduit)();
2764
((void (*)(void))end_conduit)();
2765
((void (*)(void))progress_conduit)();
2766
((void (*)(void))progress_overall)();
2767
((void (*)(void))message_conduit)();
2768
((void (*)(void))message_daemon)();
2769
((void (*)(void))error_daemon)();
2770
((void (*)(void))error_conduit)();
2771
((void (*)(void))daemon_pause)();
2772
((void (*)(void))pause_daemon)();
2773
((void (*)(void))unpause_daemon)();
2774
((void (*)(void))noop)();
2775
((void (*)(void))restart_daemon)();
2776
((void (*)(void))monitor_on)();
2777
((void (*)(void))monitor_on_all_pilots)();
2778
((void (*)(void))monitor_off)();
2779
((void (*)(void))monitor_off_all_pilots)();
2780
((void (*)(void))notify_on)();
2781
((void (*)(void))notify_off)();
2782
((void (*)(void))restore)();
2783
((void (*)(void))install_file)();
2784
((void (*)(void))get_user_info)();
2785
((void (*)(void))set_user_info)();
2786
((void (*)(void))get_system_info)();
2787
((void (*)(void))remove_request)();
2788
((void (*)(void))conduit)();
2789
((void (*)(void))get_triple_ptr)();
2790
((void (*)(void))get_users)();
2791
((void (*)(void))get_databases_from_cache)();
2792
((void (*)(void))get_cradles)();
2793
((void (*)(void))get_pilots)();
2794
((void (*)(void))get_pilot_ids)();
2795
((void (*)(void))get_pilots_by_user_name)();
2796
((void (*)(void))get_pilots_by_user_login)();
2797
((void (*)(void))get_user_name_by_pilot_name)();
2798
((void (*)(void))get_user_login_by_pilot_name)();
2799
((void (*)(void))get_pilot_base_dir_by_name)();
2800
((void (*)(void))get_pilot_base_dir_by_id)();
2801
((void (*)(void))get_pilot_id_by_name)();
2802
((void (*)(void))get_pilot_name_by_id)();
2803
___gnome_pilot_client_really_bad_hack_to_avoid_warnings();
2805
#endif /* !__GNUC__ || (__GNUC__ && __STRICT_ANSI__) */
2808
#line 1208 "gnome-pilot-client.gob"
2812
gboolean xfer_callback (GnomeVFSXferProgressInfo *info,
2813
GnomePilotClient *this) {
2814
switch (info->status) {
2815
case GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR:
2816
g_message ("VFS Error: %s\n",
2817
gnome_vfs_result_to_string (info->vfs_status));
2820
case GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE:
2821
g_message ("VFS: Overwriting `%s' with `%s'",
2822
info->target_name, info->source_name);
2825
case GNOME_VFS_XFER_PROGRESS_STATUS_OK:
2826
switch (info->phase) {
2827
case GNOME_VFS_XFER_PHASE_INITIAL:
2829
case GNOME_VFS_XFER_PHASE_COLLECTING:
2831
case GNOME_VFS_XFER_PHASE_READYTOGO:
2833
case GNOME_VFS_XFER_PHASE_OPENSOURCE:
2835
case GNOME_VFS_XFER_PHASE_OPENTARGET:
2837
case GNOME_VFS_XFER_PHASE_COPYING:
2839
g_message ("Transferring `%s' to `%s' (file %ld/%ld, byte %ld/%ld in file, "
2840
"%" GNOME_VFS_SIZE_FORMAT_STR "/%" GNOME_VFS_SIZE_FORMAT_STR " total)",
2845
(glong) info->bytes_copied,
2846
(glong) info->file_size,
2847
info->total_bytes_copied,
2851
case GNOME_VFS_XFER_PHASE_CLOSESOURCE:
2853
case GNOME_VFS_XFER_PHASE_CLOSETARGET:
2855
case GNOME_VFS_XFER_PHASE_FILECOMPLETED:
2857
case GNOME_VFS_XFER_PHASE_COMPLETED:
2860
/* g_message ("Unexpected phase %d", info->phase); */
2864
case GNOME_VFS_XFER_PROGRESS_STATUS_DUPLICATE:
2865
g_message ("VFS: Duplicate");
2868
g_message ("VFS: Unknown status");
2872
g_message ("VFS: doh!");
2876
#endif /* WITH_VFS */
2879
gpilotd_get_pid (void)
2887
homedir = g_get_home_dir ();
2891
str = g_string_new (homedir);
2892
g_string_append (str, "/.gpilotd.pid");
2893
f = fopen (str->str, "r");
2894
g_string_free (str, TRUE);
2898
fgets (pidstr, sizeof (pidstr), f);
2900
pid = strtol (pidstr, NULL, 10);
2909
get_self (PortableServer_Servant servant) {
2910
GnomePilotClientServant *s;
2911
s = (GnomePilotClientServant*)servant;
2916
#line 2917 "gnome-pilot-client.c"