Mercurial > pidgin.yaz
comparison libpurple/protocols/gg/search.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 19 Mar 2007 07:01:17 +0000 |
parents | 5fe8042783c1 |
children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
15822:84b0f9b23ede | 15823:32c366eeeb99 |
---|---|
1 /** | 1 /** |
2 * @file search.c | 2 * @file search.c |
3 * | 3 * |
4 * gaim | 4 * purple |
5 * | 5 * |
6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> | 6 * Copyright (C) 2005 Bartosz Oler <bartosz@bzimage.us> |
7 * | 7 * |
8 * This program is free software; you can redistribute it and/or modify | 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 | 9 * it under the terms of the GNU General Public License as published by |
130 | 130 |
131 g_hash_table_destroy(searches); | 131 g_hash_table_destroy(searches); |
132 } | 132 } |
133 /* }}} */ | 133 /* }}} */ |
134 | 134 |
135 /* guint32 ggp_search_start(GaimConnection *gc, GGPSearchForm *form) {{{ */ | 135 /* guint32 ggp_search_start(PurpleConnection *gc, GGPSearchForm *form) {{{ */ |
136 guint32 ggp_search_start(GaimConnection *gc, GGPSearchForm *form) | 136 guint32 ggp_search_start(PurpleConnection *gc, GGPSearchForm *form) |
137 { | 137 { |
138 GGPInfo *info = gc->proto_data; | 138 GGPInfo *info = gc->proto_data; |
139 gg_pubdir50_t req; | 139 gg_pubdir50_t req; |
140 guint seq; | 140 guint seq; |
141 | 141 |
142 gaim_debug_info("gg", "It's time to perform a search...\n"); | 142 purple_debug_info("gg", "It's time to perform a search...\n"); |
143 | 143 |
144 if ((req = gg_pubdir50_new(GG_PUBDIR50_SEARCH)) == NULL) { | 144 if ((req = gg_pubdir50_new(GG_PUBDIR50_SEARCH)) == NULL) { |
145 gaim_debug_error("gg", | 145 purple_debug_error("gg", |
146 "ggp_bmenu_show_details: Unable to create req variable.\n"); | 146 "ggp_bmenu_show_details: Unable to create req variable.\n"); |
147 return 0; | 147 return 0; |
148 } | 148 } |
149 | 149 |
150 if (form->uin != NULL) { | 150 if (form->uin != NULL) { |
151 gaim_debug_info("gg", " uin: %s\n", form->uin); | 151 purple_debug_info("gg", " uin: %s\n", form->uin); |
152 gg_pubdir50_add(req, GG_PUBDIR50_UIN, form->uin); | 152 gg_pubdir50_add(req, GG_PUBDIR50_UIN, form->uin); |
153 } else { | 153 } else { |
154 if (form->lastname != NULL) { | 154 if (form->lastname != NULL) { |
155 gaim_debug_info("gg", " lastname: %s\n", form->lastname); | 155 purple_debug_info("gg", " lastname: %s\n", form->lastname); |
156 gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, form->lastname); | 156 gg_pubdir50_add(req, GG_PUBDIR50_LASTNAME, form->lastname); |
157 } | 157 } |
158 | 158 |
159 if (form->firstname != NULL) { | 159 if (form->firstname != NULL) { |
160 gaim_debug_info("gg", " firstname: %s\n", form->firstname); | 160 purple_debug_info("gg", " firstname: %s\n", form->firstname); |
161 gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, form->firstname); | 161 gg_pubdir50_add(req, GG_PUBDIR50_FIRSTNAME, form->firstname); |
162 } | 162 } |
163 | 163 |
164 if (form->nickname != NULL) { | 164 if (form->nickname != NULL) { |
165 gaim_debug_info("gg", " nickname: %s\n", form->nickname); | 165 purple_debug_info("gg", " nickname: %s\n", form->nickname); |
166 gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, form->nickname); | 166 gg_pubdir50_add(req, GG_PUBDIR50_NICKNAME, form->nickname); |
167 } | 167 } |
168 | 168 |
169 if (form->city != NULL) { | 169 if (form->city != NULL) { |
170 gaim_debug_info("gg", " city: %s\n", form->city); | 170 purple_debug_info("gg", " city: %s\n", form->city); |
171 gg_pubdir50_add(req, GG_PUBDIR50_CITY, form->city); | 171 gg_pubdir50_add(req, GG_PUBDIR50_CITY, form->city); |
172 } | 172 } |
173 | 173 |
174 if (form->birthyear != NULL) { | 174 if (form->birthyear != NULL) { |
175 gaim_debug_info("gg", " birthyear: %s\n", form->birthyear); | 175 purple_debug_info("gg", " birthyear: %s\n", form->birthyear); |
176 gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, form->birthyear); | 176 gg_pubdir50_add(req, GG_PUBDIR50_BIRTHYEAR, form->birthyear); |
177 } | 177 } |
178 | 178 |
179 if (form->gender != NULL) { | 179 if (form->gender != NULL) { |
180 gaim_debug_info("gg", " gender: %s\n", form->gender); | 180 purple_debug_info("gg", " gender: %s\n", form->gender); |
181 gg_pubdir50_add(req, GG_PUBDIR50_GENDER, form->gender); | 181 gg_pubdir50_add(req, GG_PUBDIR50_GENDER, form->gender); |
182 } | 182 } |
183 | 183 |
184 if (form->active != NULL) { | 184 if (form->active != NULL) { |
185 gaim_debug_info("gg", " active: %s\n", form->active); | 185 purple_debug_info("gg", " active: %s\n", form->active); |
186 gg_pubdir50_add(req, GG_PUBDIR50_ACTIVE, form->active); | 186 gg_pubdir50_add(req, GG_PUBDIR50_ACTIVE, form->active); |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
190 gaim_debug_info("gg", "offset: %s\n", form->offset); | 190 purple_debug_info("gg", "offset: %s\n", form->offset); |
191 gg_pubdir50_add(req, GG_PUBDIR50_START, g_strdup(form->offset)); | 191 gg_pubdir50_add(req, GG_PUBDIR50_START, g_strdup(form->offset)); |
192 | 192 |
193 if ((seq = gg_pubdir50(info->session, req)) == 0) { | 193 if ((seq = gg_pubdir50(info->session, req)) == 0) { |
194 gaim_debug_warning("gg", "ggp_bmenu_show_details: Search failed.\n"); | 194 purple_debug_warning("gg", "ggp_bmenu_show_details: Search failed.\n"); |
195 return 0; | 195 return 0; |
196 } | 196 } |
197 | 197 |
198 gaim_debug_info("gg", "search sequence number: %d\n", seq); | 198 purple_debug_info("gg", "search sequence number: %d\n", seq); |
199 gg_pubdir50_free(req); | 199 gg_pubdir50_free(req); |
200 | 200 |
201 return seq; | 201 return seq; |
202 } | 202 } |
203 /* }}} */ | 203 /* }}} */ |