| |
1 /** |
| |
2 * @file search.h |
| |
3 * |
| |
4 * gaim |
| |
5 * |
| |
6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> |
| |
7 * |
| |
8 * This program is free software; you can redistribute it and/or modify |
| |
9 * it under the terms of the GNU General Public License as published by |
| |
10 * the Free Software Foundation; either version 2 of the License, or |
| |
11 * (at your option) any later version. |
| |
12 * |
| |
13 * This program is distributed in the hope that it will be useful, |
| |
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
16 * GNU General Public License for more details. |
| |
17 * |
| |
18 * You should have received a copy of the GNU General Public License |
| |
19 * along with this program; if not, write to the Free Software |
| |
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| |
21 */ |
| |
22 |
| |
23 |
| |
24 #ifndef _GAIM_GG_SEARCH_H |
| |
25 #define _GAIM_GG_SEARCH_H |
| |
26 |
| |
27 #include "connection.h" |
| |
28 |
| |
29 #include "lib/libgadu.h" |
| |
30 #include "gg.h" |
| |
31 |
| |
32 |
| |
33 typedef struct { |
| |
34 |
| |
35 char *uin; |
| |
36 char *lastname; |
| |
37 char *firstname; |
| |
38 char *nickname; |
| |
39 char *city; |
| |
40 char *birthyear; |
| |
41 char *gender; |
| |
42 char *active; |
| |
43 char *offset; |
| |
44 |
| |
45 char *last_uin; |
| |
46 |
| |
47 } GGPSearchForm; |
| |
48 |
| |
49 /** |
| |
50 * Create a new GGPSearchForm structure, and set the fields |
| |
51 * to the sane defaults. |
| |
52 * |
| |
53 * @return Newly allocated GGPSearchForm. |
| |
54 */ |
| |
55 GGPSearchForm * |
| |
56 ggp_search_form_new(); |
| |
57 |
| |
58 /** |
| |
59 * Initiate a search in the public directory. |
| |
60 * |
| |
61 * @param gc GaimConnection. |
| |
62 * @param form Filled in GGPSearchForm. |
| |
63 */ |
| |
64 void |
| |
65 ggp_search_start(GaimConnection *gc, GGPSearchForm *form); |
| |
66 |
| |
67 /* |
| |
68 * Return converted to the UTF-8 value of the specified field. |
| |
69 * |
| |
70 * @param res Public directory look-up result |
| |
71 * @param num Id of the record |
| |
72 * @param fileld Name of the field |
| |
73 * |
| |
74 * @return UTF-8 encoded value of the field |
| |
75 */ |
| |
76 char * |
| |
77 ggp_search_get_result(gg_pubdir50_t res, int num, const char *field); |
| |
78 |
| |
79 |
| |
80 #endif /* _GAIM_GG_SEARCH_H */ |
| |
81 |
| |
82 /* vim: set ts=4 sts=0 sw=4 noet: */ |