2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 2003 Match Grun
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Functions to define an address query (a request).
24 #ifndef __ADDRQUERY_H__
25 #define __ADDRQUERY_H__
37 /* Address search call back function */
38 typedef gint ( AddrSearchCallbackFunc ) ( gint cacheID,
42 typedef void ( AddrSearchStaticFunc ) ( gint qid, AddrQueryType qty, gint status );
46 AddrQueryType queryType;
51 AddrSearchStaticFunc *callBack;
53 gpointer serverObject;
58 /* Function prototypes */
59 AddrQuery *addrqry_create ( void );
60 void addrqry_clear ( AddrQuery *qry );
61 void addrqry_free ( AddrQuery *qry );
62 void addrqry_set_query_type ( AddrQuery *qry, const AddrQueryType value );
63 void addrqry_set_idle_id ( AddrQuery *qry, const guint value );
64 void addrqry_set_search_term ( AddrQuery* qry, const gchar *value );
65 void addrqry_set_server ( AddrQuery* qry, const gpointer server );
66 void addrqry_set_query ( AddrQuery* qry, const gpointer query );
67 void addrqry_print ( const AddrQuery *qry, FILE *stream );
69 void qrymgr_initialize ( void );
70 void qrymgr_teardown ( void );
71 AddrQuery *qrymgr_add_query(
72 const gint queryID, const gchar *searchTerm,
73 void *callBack, gpointer target );
75 AddrQuery *qrymgr_find_query ( const gint queryID );
76 void qrymgr_delete_query ( const gint queryID );
77 void qrymgr_print ( FILE *stream );
79 #endif /* __ADDRQUERY_H__ */