aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-storage.h
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-12-30 13:25:57 +0800
committerChris Toshok <toshok@src.gnome.org>2000-12-30 13:25:57 +0800
commitc4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab (patch)
treec8ac453d3b440e00f0de9481441b5c9ad60491aa /addressbook/gui/component/addressbook-storage.h
parent5e2b0aaf12ece4d701550cfda441eaaa38b89113 (diff)
downloadgsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar.gz
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar.bz2
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar.lz
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar.xz
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.tar.zst
gsoc2013-evolution-c4dfc8669bf21acf8c06cc7f79d0864c8e3d4fab.zip
new function, calling our new config ui code. (control_activate): no
2000-12-29 Chris Toshok <toshok@helixcode.com> * gui/component/addressbook.c (config_cb): new function, calling our new config ui code. (control_activate): no longer load evolution-addressbook-ldap.xml, as it's not there. * gui/component/addressbook-component.c (owner_set_cb): setup_ldap_storage => addressbook_storage_setup. * gui/component/Makefile.am (evolution_addressbook_SOURCES): remove e-ldap-storage.[ch] and add addressbook-storage.[ch]. (glade_DATA): remove ldap-server-dialog.glade and add addressbook-config.glade. (EXTRA_DIST): same. * gui/component/addressbook-config.[ch]: add another dialog to give a list of our sources and offer the Add/Delete/Edit interface. This plugs into the previous dialog work (the source editor.) * gui/component/addressbook-storage.[ch]: new files, containing the remains of e-ldap-storage.[ch] and adding the new AddressbookSource type and it's subordinates. Also, the xml format has changed slightly and the file name is no longer ~/evolution/ldap-servers.xml - it's ~/evolution/addressbook-sources.xml. * gui/component/addressbook-config.glade: new file, new config interface. * gui/component/ldap-server-dialog.glade: removed. * gui/component/e-ldap-storage.[ch]: removed. svn path=/trunk/; revision=7198
Diffstat (limited to 'addressbook/gui/component/addressbook-storage.h')
-rw-r--r--addressbook/gui/component/addressbook-storage.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/addressbook/gui/component/addressbook-storage.h b/addressbook/gui/component/addressbook-storage.h
new file mode 100644
index 0000000000..0262207603
--- /dev/null
+++ b/addressbook/gui/component/addressbook-storage.h
@@ -0,0 +1,80 @@
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* addressbook-storage.h
+ *
+ * Copyright (C) 2000 Helix Code, Inc.
+ *
+ * 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.
+ *
+ * Author: Chris Toshok
+ */
+
+#ifndef __ADDRESSBOOK_STORAGE_H__
+#define __ADDRESSBOOK_STORAGE_H__
+
+#include "evolution-shell-component.h"
+
+typedef enum {
+ ADDRESSBOOK_SOURCE_FILE,
+ ADDRESSBOOK_SOURCE_LDAP,
+ ADDRESSBOOK_SOURCE_LAST
+} AddressbookSourceType;
+
+typedef enum {
+ ADDRESSBOOK_LDAP_AUTH_NONE,
+ ADDRESSBOOK_LDAP_AUTH_SIMPLE,
+ ADDRESSBOOK_LDAP_AUTH_SASL, /* XXX currently unsupported */
+ ADDRESSBOOK_LDAP_AUTH_LAST
+} AddressbookLDAPAuthType;
+
+typedef enum {
+ ADDRESSBOOK_LDAP_SCOPE_SUBTREE,
+ ADDRESSBOOK_LDAP_SCOPE_BASE,
+ ADDRESSBOOK_LDAP_SCOPE_ONELEVEL,
+ ADDRESSBOOK_LDAP_SCOPE_LAST
+} AddressbookLDAPScopeType;
+
+typedef struct {
+ AddressbookSourceType type;
+ char *name;
+ char *description;
+ struct {
+ char *path;
+ } file;
+ struct {
+ char *host;
+ char *port;
+ char *rootdn;
+ AddressbookLDAPScopeType scope;
+ AddressbookLDAPAuthType auth;
+ char *binddn; /* used in AUTH_SIMPLE */
+ gboolean remember_passwd;
+ } ldap;
+ char *uri; /* filled in from the above */
+} AddressbookSource;
+
+void addressbook_storage_setup (EvolutionShellComponent *shell_component,
+ const char *evolution_homedir);
+
+GList *addressbook_storage_get_sources (void);
+void addressbook_storage_clear_sources (void);
+AddressbookSource *addressbook_source_copy (const AddressbookSource *source);
+void addressbook_source_free (AddressbookSource *source);
+void addressbook_storage_init_source_uri (AddressbookSource *source);
+
+void addressbook_storage_add_source (AddressbookSource *source);
+void addressbook_storage_remove_source (const char *name);
+
+#endif /* __ADDRESSBOOK_STORAGE_H__ */