aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-conduit.h
diff options
context:
space:
mode:
authorEskil Heyn Olsen <eskil@src.gnome.org>1999-09-08 21:06:07 +0800
committerEskil Heyn Olsen <eskil@src.gnome.org>1999-09-08 21:06:07 +0800
commit8550ca3f28108f315db18a0edc508f6e682b66fd (patch)
treedc34b88b0922da48c1acb8f19eb2f17d3c7846ad /calendar/gui/calendar-conduit.h
parent4a3be146661da5d5267af57482ba0a22656166f5 (diff)
downloadgsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar.gz
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar.bz2
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar.lz
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar.xz
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.tar.zst
gsoc2013-evolution-8550ca3f28108f315db18a0edc508f6e682b66fd.zip
uses GNOME_PILOT_CHECK
* configure.in: uses GNOME_PILOT_CHECK * gncal/GnomeCal.idl: added a get_objects() call, which returns all the objects in the calendar. * gncal/Makefile.am: added two conduits with control-applets. Compiled only if configure sets HAVE_GNOME_PILOT * gncal/calender-conduit.[ch]: began implementing conduit. * gncal/todo-conduit.[ch]: begin implementing conduit. * gncal/corba-cal.c: implemented the get_objects() call. svn path=/trunk/; revision=1216
Diffstat (limited to 'calendar/gui/calendar-conduit.h')
-rw-r--r--calendar/gui/calendar-conduit.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/calendar/gui/calendar-conduit.h b/calendar/gui/calendar-conduit.h
new file mode 100644
index 0000000000..5b7be2367d
--- /dev/null
+++ b/calendar/gui/calendar-conduit.h
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+#ifndef __CALENDAR_CONDUIT_H__
+#define __CALENDAR_CONDUIT_H__
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <pi-datebook.h>
+#include <gnome.h>
+
+
+typedef struct _ConduitCfg ConduitCfg;
+
+struct _ConduitCfg {
+ gboolean open_secret;
+ guint32 pilotId;
+};
+
+#define GET_CONFIG(c) ((ConduitCfg*)gtk_object_get_data(GTK_OBJECT(c),"conduit_cfg"))
+
+static void load_configuration(ConduitCfg **c,guint32 pilotId) {
+ gchar prefix[256];
+ g_snprintf(prefix,255,"/gnome-pilot.d/calendard-conduit/Pilot_%u/",pilotId);
+
+ *c = g_new0(ConduitCfg,1);
+ gnome_config_push_prefix(prefix);
+ (*c)->open_secret = gnome_config_get_bool("open secret=FALSE");
+ gnome_config_pop_prefix();
+
+ (*c)->pilotId = pilotId;
+}
+
+static void save_configuration(ConduitCfg *c) {
+ gchar prefix[256];
+
+ g_snprintf(prefix,255,"/gnome-pilot.d/calendar-conduit/Pilot_%u/",c->pilotId);
+
+ gnome_config_push_prefix(prefix);
+ gnome_config_set_bool("open secret",c->open_secret);
+ gnome_config_pop_prefix();
+
+ gnome_config_sync();
+ gnome_config_drop_all();
+}
+
+static void destroy_configuration(ConduitCfg **c) {
+ g_free(*c);
+ *c = NULL;
+}
+
+#endif __CALENDAR_CONDUIT_H__