aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-18 12:18:37 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-18 12:18:37 +0800
commit4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe (patch)
tree8a2a9a4a0834f0cebd014362f136bc779abd5cc3 /addressbook/gui
parenta069bf38e597b321e23d8d970bd3e4964e517247 (diff)
downloadgsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar.gz
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar.bz2
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar.lz
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar.xz
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.tar.zst
gsoc2013-evolution-4be8d6a6d678e0f73c84cf6fdcaeb52d3961bbfe.zip
add prototype for addressbook_get_other_contact_storage.
2001-08-17 Chris Toshok <toshok@ximian.com> * gui/component/addressbook-storage.h: add prototype for addressbook_get_other_contact_storage. * gui/component/addressbook-storage.c (addressbook_get_other_contact_storage): rename register_storage to this, and return the EvolutionStorage. (load_source_data): register_storage => addressbook_get_other_contact_storage. (addressbook_storage_add_source): register_storage => addressbook_get_other_contact_storage. svn path=/trunk/; revision=12197
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook-storage.c12
-rw-r--r--addressbook/gui/component/addressbook-storage.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/addressbook/gui/component/addressbook-storage.c b/addressbook/gui/component/addressbook-storage.c
index 9a8554115e..b888375a26 100644
--- a/addressbook/gui/component/addressbook-storage.c
+++ b/addressbook/gui/component/addressbook-storage.c
@@ -69,7 +69,6 @@
static gboolean load_source_data (const char *file_path);
static gboolean save_source_data (const char *file_path);
-static void register_storage (void);
static void deregister_storage (void);
static GList *sources;
@@ -128,8 +127,9 @@ create_ldap_folder (EvolutionStorage *storage,
}
#endif
-static void
-register_storage (void)
+
+EvolutionStorage *
+addressbook_get_other_contact_storage (void)
{
#ifdef HAVE_LDAP
EvolutionStorageResult result;
@@ -164,6 +164,8 @@ register_storage (void)
}
}
#endif
+
+ return storage;
}
static void
@@ -274,7 +276,7 @@ load_source_data (const char *file_path)
xmlNode *root;
xmlNode *child;
- register_storage ();
+ addressbook_get_other_contact_storage();
tryagain:
doc = xmlParseFile (file_path);
@@ -437,7 +439,7 @@ addressbook_storage_add_source (AddressbookSource *source)
sources = g_list_append (sources, source);
/* And then to the ui */
- register_storage ();
+ addressbook_get_other_contact_storage();
path = g_strdup_printf ("/%s", source->name);
evolution_storage_new_folder (storage, path, source->name, "contacts",
source->uri, source->description, 0);
diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h
index 8f260b9d07..8480f2c4de 100644
--- a/addressbook/gui/component/addressbook-storage.h
+++ b/addressbook/gui/component/addressbook-storage.h
@@ -25,6 +25,7 @@
#define __ADDRESSBOOK_STORAGE_H__
#include "evolution-shell-component.h"
+#include "evolution-storage.h"
typedef enum {
ADDRESSBOOK_SOURCE_LDAP,
@@ -62,6 +63,7 @@ typedef struct {
void addressbook_storage_setup (EvolutionShellComponent *shell_component,
const char *evolution_homedir);
+EvolutionStorage *addressbook_get_other_contact_storage (void);
GList *addressbook_storage_get_sources (void);
AddressbookSource *addressbook_storage_get_source_by_uri (const char *uri);
void addressbook_storage_clear_sources (void);