diff options
author | JP Rosevear <jpr@ximian.com> | 2002-01-17 01:31:05 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-01-17 01:31:05 +0800 |
commit | ac62bd148595f30859871925e8c41d827c560485 (patch) | |
tree | d61c9510e54741e8df5721a62147f5352025f4de /addressbook/conduit/address-conduit-config.h | |
parent | af1b3098c28bbf1ce7cf64131c33ac578a01213b (diff) | |
download | gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar.gz gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar.bz2 gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar.lz gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar.xz gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.tar.zst gsoc2013-evolution-ac62bd148595f30859871925e8c41d827c560485.zip |
move all functions here, get rid of header files, use e-pilot-settings to
2002-01-16 JP Rosevear <jpr@ximian.com>
* conduit/address-conduit.c: move all functions here, get rid of
header files, use e-pilot-settings to display gui
svn path=/trunk/; revision=15342
Diffstat (limited to 'addressbook/conduit/address-conduit-config.h')
-rw-r--r-- | addressbook/conduit/address-conduit-config.h | 128 |
1 files changed, 0 insertions, 128 deletions
diff --git a/addressbook/conduit/address-conduit-config.h b/addressbook/conduit/address-conduit-config.h deleted file mode 100644 index 2387f67ef3..0000000000 --- a/addressbook/conduit/address-conduit-config.h +++ /dev/null @@ -1,128 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Evolution addressbook - Addressbook Conduit Configuration - * - * Copyright (C) 1998 Free Software Foundation - * Copyright (C) 2000 Ximian, Inc. - * - * Authors: Eskil Heyn Olsen <deity@eskil.dk> - * JP Rosevear <jpr@ximian.com> - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * 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 __ADDR_CONDUIT_CONFIG_H__ -#define __ADDR_CONDUIT_CONFIG_H__ - -#include <gnome.h> -#include <libgpilotdCM/gnome-pilot-conduit-management.h> -#include <gpilotd/gnome-pilot-conduit.h> -#include <libgpilotdCM/gnome-pilot-conduit-config.h> - -/* Configuration info */ -typedef struct _EAddrConduitCfg EAddrConduitCfg; -struct _EAddrConduitCfg { - guint32 pilot_id; - GnomePilotConduitSyncType sync_type; - - gboolean open_secret; - gchar *last_uri; -}; - -#ifdef ADDR_CONFIG_LOAD -/* Loads the configuration data */ -static void -addrconduit_load_configuration (EAddrConduitCfg **c, guint32 pilot_id) -{ - GnomePilotConduitManagement *management; - GnomePilotConduitConfig *config; - gchar prefix[256]; - g_snprintf (prefix, 255, "/gnome-pilot.d/e-address-conduit/Pilot_%u/", - pilot_id); - - *c = g_new0 (EAddrConduitCfg,1); - g_assert (*c != NULL); - - (*c)->pilot_id = pilot_id; - management = gnome_pilot_conduit_management_new ("e_address_conduit", GNOME_PILOT_CONDUIT_MGMT_ID); - config = gnome_pilot_conduit_config_new (management, pilot_id); - if (!gnome_pilot_conduit_config_is_enabled (config, &(*c)->sync_type)) - (*c)->sync_type = GnomePilotConduitSyncTypeNotSet; - gtk_object_unref (GTK_OBJECT (config)); - gtk_object_unref (GTK_OBJECT (management)); - - /* Custom settings */ - gnome_config_push_prefix (prefix); - - (*c)->open_secret = gnome_config_get_bool ("open_secret=FALSE"); - (*c)->last_uri = gnome_config_get_string ("last_uri"); - - gnome_config_pop_prefix (); -} -#endif - -#ifdef ADDR_CONFIG_SAVE -/* Saves the configuration data. */ -static void -addrconduit_save_configuration (EAddrConduitCfg *c) -{ - gchar prefix[256]; - - g_snprintf (prefix, 255, "/gnome-pilot.d/e-address-conduit/Pilot_%u/", - c->pilot_id); - - gnome_config_push_prefix (prefix); - gnome_config_set_bool ("open_secret", c->open_secret); - gnome_config_set_string ("last_uri", c->last_uri); - gnome_config_pop_prefix (); - - gnome_config_sync (); - gnome_config_drop_all (); -} -#endif - -#ifdef ADDR_CONFIG_DUPE -/* Creates a duplicate of the configuration data */ -static EAddrConduitCfg* -addrconduit_dupe_configuration (EAddrConduitCfg *c) -{ - EAddrConduitCfg *retval; - - g_return_val_if_fail (c != NULL, NULL); - - retval = g_new0 (EAddrConduitCfg, 1); - retval->sync_type = c->sync_type; - retval->open_secret = c->open_secret; - - retval->pilot_id = c->pilot_id; - retval->last_uri = g_strdup (c->last_uri); - - return retval; -} -#endif - -#ifdef ADDR_CONFIG_DESTROY -/* Destroy a configuration */ -static void -addrconduit_destroy_configuration (EAddrConduitCfg **c) -{ - g_return_if_fail (c != NULL); - g_return_if_fail (*c != NULL); - - g_free ((*c)->last_uri); - g_free (*c); - *c = NULL; -} -#endif - -#endif /* __ADDR_CONDUIT_CONFIG_H__ */ |