2006-07-31 [wwp] 2.4.0cvs3
[claws.git] / src / addrindex.h
index ab08261ef31418e1a156bd6120d6a596fffd557f..31e089406658685dcc8e7b557ac2ac310f99ed81 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2001-2003 Match Grun
+ * Copyright (C) 2001-2006 Match Grun and the Sylpheed-Claws 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.
  */
 
 /*
@@ -99,7 +99,11 @@ struct _AddressDataSource {
        gpointer rawDataSource;
 };
 
+void addrindex_initialize              ( void );
+void addrindex_teardown                        ( void );
+
 AddressIndex *addrindex_create_index   ( void );
+AddressIndex *addrindex_get_object     ( void );
 void addrindex_set_file_path           ( AddressIndex *addrIndex,
                                          const gchar *value );
 void addrindex_set_file_name           ( AddressIndex *addrIndex,
@@ -154,20 +158,35 @@ GList *addrindex_ds_get_all_persons       ( AddressDataSource *ds );
 GList *addrindex_ds_get_all_groups     ( AddressDataSource *ds );
 
 /* Search support */
-gint addrindex_setup_search    ( AddressIndex *addrIndex,
-                                 const gchar *searchTerm,
-                                 const gpointer target,
-                                 AddrSearchCallbackFunc callBack );
-gboolean addrindex_start_search        ( AddressIndex *addrIndex,
-                                 const gint queryID );
-void addrindex_stop_search     ( AddressIndex *addrIndex,
-                                 const gint queryID );
-
-void addrindex_read_all                ( AddressIndex *addrIndex );
+gint addrindex_setup_search            ( const gchar *searchTerm,
+                                         void *callBackEnd,
+                                         void *callBackEntry );
+
+gint addrindex_setup_static_search     ( AddressDataSource *ds,
+                                         const gchar *searchTerm,
+                                         ItemFolder *folder,
+                                         void *callBackEnd,
+                                         void *callBackEntry );
+
+gboolean addrindex_start_search                ( const gint queryID );
+void addrindex_stop_search             ( const gint queryID );
+gint addrindex_setup_explicit_search   ( AddressDataSource *ds, 
+                                         const gchar *searchTerm, 
+                                         ItemFolder *folder,
+                                         void *callBackEnd,
+                                         void *callBackEntry );
+void addrindex_remove_results          ( AddressDataSource *ds,
+                                         ItemFolder *folder );
+
 gboolean addrindex_load_completion(
-               AddressIndex *addrIndex,
                gint (*callBackFunc)
-                       ( const gchar *, const gchar *, const gchar * ) );
+                       ( const gchar *, const gchar *, 
+                         const gchar *, const gchar * ),
+                       gchar *folderpath );
+
+gboolean addrindex_load_person_attribute( const gchar *attr,
+               gint (*callBackFunc)
+                       ( ItemPerson *, const gchar * ) );
 
 #endif /* __ADDRINDEX_H__ */