Mercurial > pidgin
diff src/protocols/gg/search.h @ 13640:d12bbe6da705
[gaim-migrate @ 16038]
* Changed signatures of some of the search results notify API functions.
* GG PRPL: Support parallel public directory searches.
committer: Tailor Script <tailor@pidgin.im>
| author | Bartoz Oler <bartosz@pidgin.im> |
|---|---|
| date | Sun, 16 Apr 2006 10:10:55 +0000 |
| parents | 41747a38a1a8 |
| children |
line wrap: on
line diff
--- a/src/protocols/gg/search.h Sat Apr 15 15:01:30 2006 +0000 +++ b/src/protocols/gg/search.h Sun Apr 16 10:10:55 2006 +0000 @@ -30,6 +30,12 @@ #include "gg.h" +typedef enum { + GGP_SEARCH_TYPE_INFO, + GGP_SEARCH_TYPE_FULL + +} GGPSearchType; + typedef struct { char *uin; @@ -44,8 +50,16 @@ char *last_uin; + GGPSearchType search_type; + guint32 seq; + + void *user_data; + void *window; } GGPSearchForm; +typedef GHashTable GGPSearches; + + /** * Create a new GGPSearchForm structure, and set the fields * to the sane defaults. @@ -53,15 +67,72 @@ * @return Newly allocated GGPSearchForm. */ GGPSearchForm * -ggp_search_form_new(void); +ggp_search_form_new(GGPSearchType st); + +/** + * Destroy a Search Form. + * + * @param form Search Form to destroy. + */ +void +ggp_search_form_destroy(GGPSearchForm *form); + +/** + * Add a search to the list of searches. + * + * @param searches The list of searches. + * @param seq Search (form) ID number. + * @param form The search form to add. + */ +void +ggp_search_add(GGPSearches *searches, guint32 seq, GGPSearchForm *form); + +/** + * Remove a search from the list. + * + * If you want to destory the search completely also call: + * ggp_search_form_destroy(). + * + * @param searches The list of searches. + * @param seq ID number of the search. + */ +void +ggp_search_remove(GGPSearches *searches, guint32 seq); + +/** + * Return the search with the specified ID. + * + * @param searches The list of searches. + * @param seq ID number of the search. + */ +GGPSearchForm * +ggp_search_get(GGPSearches *searches, guint32 seq); + +/** + * Create a new GGPSearches structure. + * + * @return GGPSearches instance. + */ +GGPSearches * +ggp_search_new(void); + +/** + * Destroy GGPSearches instance. + * + * @param searches GGPSearches instance. + */ +void +ggp_search_destroy(GGPSearches *searches); /** * Initiate a search in the public directory. * * @param gc GaimConnection. * @param form Filled in GGPSearchForm. + * + * @return Sequence number of a search or 0 if an error occured. */ -void +guint32 ggp_search_start(GaimConnection *gc, GGPSearchForm *form); /*
