aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/conduits/calendar/calendar-conduit-config.h
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-10-10 11:52:41 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-10-10 11:52:41 +0800
commitcde356b32b161e110c3024eb414660fe5b8f516c (patch)
tree21dfd0104c871e9d48adf08413a4dfec2938c2eb /calendar/conduits/calendar/calendar-conduit-config.h
parenteb33178c5cd15a24fc23569d2d4fa9a61edd7079 (diff)
downloadgsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar.gz
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar.bz2
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar.lz
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar.xz
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.tar.zst
gsoc2013-evolution-cde356b32b161e110c3024eb414660fe5b8f516c.zip
Adjust to using gnome-pilot-sync-abs conduit which is based on the latest
2000-10-09 JP Rosevear <jpr@helixcode.com> * conduits/*: Adjust to using gnome-pilot-sync-abs conduit which is based on the latest pilot link changes. svn path=/trunk/; revision=5812
Diffstat (limited to 'calendar/conduits/calendar/calendar-conduit-config.h')
-rw-r--r--calendar/conduits/calendar/calendar-conduit-config.h110
1 files changed, 110 insertions, 0 deletions
diff --git a/calendar/conduits/calendar/calendar-conduit-config.h b/calendar/conduits/calendar/calendar-conduit-config.h
new file mode 100644
index 0000000000..115a2ea272
--- /dev/null
+++ b/calendar/conduits/calendar/calendar-conduit-config.h
@@ -0,0 +1,110 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/* Evolution calendar - Calendar Conduit Configuration
+ *
+ * Copyright (C) 1998 Free Software Foundation
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * Authors: Eskil Heyn Olsen <deity@eskil.dk>
+ * JP Rosevear <jpr@helixcode.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __TODO_CONDUIT_CONFIG_H__
+#define __TODO_CONDUIT_CONFIG_H__
+
+#include <gnome.h>
+#include <libgpilotdCM/gnome-pilot-conduit-management.h>
+#include <libgpilotdCM/gnome-pilot-conduit-config.h>
+
+/* This is the configuration of the GnomeCal conduit. */
+typedef struct _ECalConduitCfg ECalConduitCfg;
+struct _ECalConduitCfg {
+ gboolean open_secret;
+ guint32 pilot_id;
+ GnomePilotConduitSyncType sync_type; /* only used by capplet */
+};
+
+static void
+calconduit_load_configuration (ECalConduitCfg **c, guint32 pilot_id)
+{
+ gchar prefix[256];
+ g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
+ pilot_id);
+
+ *c = g_new0 (ECalConduitCfg,1);
+ g_assert (*c != NULL);
+
+ gnome_config_push_prefix (prefix);
+ (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE");
+
+ /* set in capplets main */
+ (*c)->sync_type = GnomePilotConduitSyncTypeCustom;
+ gnome_config_pop_prefix ();
+
+ (*c)->pilot_id = pilot_id;
+}
+
+/* Saves the configuration data. */
+static void
+calconduit_save_configuration (ECalConduitCfg *c)
+{
+ gchar prefix[256];
+
+ g_snprintf (prefix, 255, "/gnome-pilot.d/e-todo-conduit/Pilot_%u/",
+ c->pilot_id);
+
+ 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 ();
+}
+
+/* Creates a duplicate of the configuration data */
+static ECalConduitCfg*
+calconduit_dupe_configuration (ECalConduitCfg *c)
+{
+ ECalConduitCfg *retval;
+
+ g_return_val_if_fail (c != NULL, NULL);
+
+ retval = g_new0 (ECalConduitCfg, 1);
+ retval->sync_type = c->sync_type;
+ retval->open_secret = c->open_secret;
+ retval->pilot_id = c->pilot_id;
+
+ return retval;
+}
+
+static void
+calconduit_destroy_configuration (ECalConduitCfg **c)
+{
+ g_return_if_fail (c != NULL);
+ g_return_if_fail (*c != NULL);
+
+ g_free (*c);
+ *c = NULL;
+}
+
+#endif __TODO_CONDUIT_CONFIG_H__
+
+
+
+
+
+
+