2006-12-13 [mones] 2.6.1cvs29
[claws.git] / src / syldap.h
index c6e9d49a72e86370b10183e860daebfd8cd9ae7d..ef4a1896a22d993a6ba244fcc9af6ddc01670cf9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2001 Match Grun
+ * Copyright (C) 2001-2006 Match Grun and the Claws Mail team
  *
  * 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
@@ -14,7 +14,7 @@
  *
  * 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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 /*
@@ -31,6 +31,7 @@
 
 #include "addritem.h"
 #include "addrcache.h"
+#include "adbookbase.h"
 
 #define SYLDAP_DFL_PORT        389
 #define SYLDAP_MAX_ENTRIES     20
 #define SYLDAP_ATTR_EMAIL      "mail"
 #define SYLDAP_ATTR_UID        "uid"
 
+#define MGU_LDAP_CONNECT   -51
+#define MGU_LDAP_INIT      -52
+#define MGU_LDAP_BIND      -53
+#define MGU_LDAP_SEARCH    -54
+#define MGU_LDAP_TIMEOUT   -55
+#define MGU_LDAP_CRITERIA  -56
+#define MGU_LDAP_NOENTRIES -57
+
 typedef struct _SyldapServer SyldapServer;
 struct _SyldapServer {
-       gchar        *name;
-       gchar        *hostName;
-       gint         port;
-       gchar        *baseDN;
-       gchar        *bindDN;
-       gchar        *bindPass;
-       gchar        *searchCriteria;
-       gchar        *searchValue;
-       gint         entriesRead;
-       gint         maxEntries;
-       gint         timeOut;
-       gboolean     newSearch;
+       AddressBookType type;
        AddressCache *addressCache;
-       /* ItemFolder   *rootFolder; */
-       gboolean     accessFlag;
-       gint         retVal;
-       pthread_t    *thread;
-       gboolean     busyFlag;
-       void         (*callBack)( void * );
-       guint        idleId;
+       gint      retVal;
+       gchar     *hostName;
+       gint      port;
+       gchar     *baseDN;
+       gchar     *bindDN;
+       gchar     *bindPass;
+       gchar     *searchCriteria;
+       gchar     *searchValue;
+       gint      entriesRead;
+       gint      maxEntries;
+       gint      timeOut;
+       gboolean  newSearch;
+       pthread_t *thread;
+       gboolean  busyFlag;
+       void      (*callBack)( void * );
+       guint     idleId;
 };
 
 /* Function prototypes */
@@ -87,6 +94,8 @@ void syldap_free              ( SyldapServer *ldapServer );
 gint syldap_get_status         ( SyldapServer *ldapServer );
 gboolean syldap_get_accessed   ( SyldapServer *ldapServer );
 gchar *syldap_get_name         ( SyldapServer *ldapServer );
+gboolean syldap_get_modified   ( SyldapServer *ldapServer );
+void syldap_set_modified       ( SyldapServer *ldapServer, const gboolean value );
 
 void syldap_print_data         ( SyldapServer *ldapServer, FILE *stream );
 gboolean syldap_check_search   ( SyldapServer *ldapServer );
@@ -94,7 +103,6 @@ gint syldap_read_data                ( SyldapServer *ldapServer );
 gint syldap_read_data_th       ( SyldapServer *ldapServer );
 void syldap_cancel_read                ( SyldapServer *ldapServer );
 
-/* GList *syldap_get_address_list      ( const SyldapServer *ldapServer ); */
 ItemFolder *syldap_get_root_folder     ( SyldapServer *ldapServer );
 GList *syldap_get_list_person  ( SyldapServer *ldapServer );
 GList *syldap_get_list_folder  ( SyldapServer *ldapServer );
@@ -109,4 +117,3 @@ gboolean syldap_test_ldap_lib       ( void );
 #endif /* USE_LDAP */
 
 #endif /* __SYLDAP_H__ */
-