Mercurial > pidgin
comparison src/protocols/oscar/family_buddy.c @ 13239:f260d319bbbc
[gaim-migrate @ 15605]
Renaming a bunch of structs and typedefs to use the same naming
scheme as the rest of Gaim
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Feb 2006 16:02:05 +0000 |
parents | f2431a7e33aa |
children | 87a7c3077c19 |
comparison
equal
deleted
inserted
replaced
13238:1e855032d7bc | 13239:f260d319bbbc |
---|---|
31 * Subtype 0x0002 - Request rights. | 31 * Subtype 0x0002 - Request rights. |
32 * | 32 * |
33 * Request Buddy List rights. | 33 * Request Buddy List rights. |
34 * | 34 * |
35 */ | 35 */ |
36 faim_export int aim_buddylist_reqrights(aim_session_t *sess, aim_conn_t *conn) | 36 faim_export int aim_buddylist_reqrights(OscarSession *sess, OscarConnection *conn) |
37 { | 37 { |
38 return aim_genericreq_n_snacid(sess, conn, 0x0003, 0x0002); | 38 return aim_genericreq_n_snacid(sess, conn, 0x0003, 0x0002); |
39 } | 39 } |
40 | 40 |
41 /* | 41 /* |
42 * Subtype 0x0003 - Rights. | 42 * Subtype 0x0003 - Rights. |
43 * | 43 * |
44 */ | 44 */ |
45 static int rights(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 45 static int rights(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs) |
46 { | 46 { |
47 aim_rxcallback_t userfunc; | 47 aim_rxcallback_t userfunc; |
48 aim_tlvlist_t *tlvlist; | 48 aim_tlvlist_t *tlvlist; |
49 guint16 maxbuddies = 0, maxwatchers = 0; | 49 guint16 maxbuddies = 0, maxwatchers = 0; |
50 int ret = 0; | 50 int ret = 0; |
90 * | 90 * |
91 * Adds a single buddy to your buddy list after login. | 91 * Adds a single buddy to your buddy list after login. |
92 * XXX This should just be an extension of setbuddylist() | 92 * XXX This should just be an extension of setbuddylist() |
93 * | 93 * |
94 */ | 94 */ |
95 faim_export int aim_buddylist_addbuddy(aim_session_t *sess, aim_conn_t *conn, const char *sn) | 95 faim_export int aim_buddylist_addbuddy(OscarSession *sess, OscarConnection *conn, const char *sn) |
96 { | 96 { |
97 aim_frame_t *fr; | 97 FlapFrame *fr; |
98 aim_snacid_t snacid; | 98 aim_snacid_t snacid; |
99 | 99 |
100 if (!sn || !strlen(sn)) | 100 if (!sn || !strlen(sn)) |
101 return -EINVAL; | 101 return -EINVAL; |
102 | 102 |
122 * buddy_list = "Screen Name One&ScreenNameTwo&"; | 122 * buddy_list = "Screen Name One&ScreenNameTwo&"; |
123 * | 123 * |
124 * XXX Clean this up. | 124 * XXX Clean this up. |
125 * | 125 * |
126 */ | 126 */ |
127 faim_export int aim_buddylist_set(aim_session_t *sess, aim_conn_t *conn, const char *buddy_list) | 127 faim_export int aim_buddylist_set(OscarSession *sess, OscarConnection *conn, const char *buddy_list) |
128 { | 128 { |
129 aim_frame_t *fr; | 129 FlapFrame *fr; |
130 aim_snacid_t snacid; | 130 aim_snacid_t snacid; |
131 int len = 0; | 131 int len = 0; |
132 char *localcpy = NULL; | 132 char *localcpy = NULL; |
133 char *tmpptr = NULL; | 133 char *tmpptr = NULL; |
134 | 134 |
170 * | 170 * |
171 * XXX generalise to support removing multiple buddies (basically, its | 171 * XXX generalise to support removing multiple buddies (basically, its |
172 * the same as setbuddylist() but with a different snac subtype). | 172 * the same as setbuddylist() but with a different snac subtype). |
173 * | 173 * |
174 */ | 174 */ |
175 faim_export int aim_buddylist_removebuddy(aim_session_t *sess, aim_conn_t *conn, const char *sn) | 175 faim_export int aim_buddylist_removebuddy(OscarSession *sess, OscarConnection *conn, const char *sn) |
176 { | 176 { |
177 aim_frame_t *fr; | 177 FlapFrame *fr; |
178 aim_snacid_t snacid; | 178 aim_snacid_t snacid; |
179 | 179 |
180 if (!sn || !strlen(sn)) | 180 if (!sn || !strlen(sn)) |
181 return -EINVAL; | 181 return -EINVAL; |
182 | 182 |
198 * Subtype 0x000b | 198 * Subtype 0x000b |
199 * | 199 * |
200 * XXX Why would we send this? | 200 * XXX Why would we send this? |
201 * | 201 * |
202 */ | 202 */ |
203 faim_export int aim_buddylist_oncoming(aim_session_t *sess, aim_conn_t *conn, aim_userinfo_t *info) | 203 faim_export int aim_buddylist_oncoming(OscarSession *sess, OscarConnection *conn, aim_userinfo_t *info) |
204 { | 204 { |
205 aim_frame_t *fr; | 205 FlapFrame *fr; |
206 aim_snacid_t snacid; | 206 aim_snacid_t snacid; |
207 | 207 |
208 if (!sess || !conn || !info) | 208 if (!sess || !conn || !info) |
209 return -EINVAL; | 209 return -EINVAL; |
210 | 210 |
225 * Subtype 0x000c | 225 * Subtype 0x000c |
226 * | 226 * |
227 * XXX Why would we send this? | 227 * XXX Why would we send this? |
228 * | 228 * |
229 */ | 229 */ |
230 faim_export int aim_buddylist_offgoing(aim_session_t *sess, aim_conn_t *conn, const char *sn) | 230 faim_export int aim_buddylist_offgoing(OscarSession *sess, OscarConnection *conn, const char *sn) |
231 { | 231 { |
232 aim_frame_t *fr; | 232 FlapFrame *fr; |
233 aim_snacid_t snacid; | 233 aim_snacid_t snacid; |
234 | 234 |
235 if (!sess || !conn || !sn) | 235 if (!sess || !conn || !sn) |
236 return -EINVAL; | 236 return -EINVAL; |
237 | 237 |
258 * | 258 * |
259 * Although the offgoing notification contains no information, | 259 * Although the offgoing notification contains no information, |
260 * it is still in a format parsable by aim_info_extract(). | 260 * it is still in a format parsable by aim_info_extract(). |
261 * | 261 * |
262 */ | 262 */ |
263 static int buddychange(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 263 static int buddychange(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs) |
264 { | 264 { |
265 int ret = 0; | 265 int ret = 0; |
266 aim_userinfo_t userinfo; | 266 aim_userinfo_t userinfo; |
267 aim_rxcallback_t userfunc; | 267 aim_rxcallback_t userfunc; |
268 | 268 |
276 aim_info_free(&userinfo); | 276 aim_info_free(&userinfo); |
277 | 277 |
278 return ret; | 278 return ret; |
279 } | 279 } |
280 | 280 |
281 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 281 static int snachandler(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs) |
282 { | 282 { |
283 | 283 |
284 if (snac->subtype == 0x0003) | 284 if (snac->subtype == 0x0003) |
285 return rights(sess, mod, rx, snac, bs); | 285 return rights(sess, mod, rx, snac, bs); |
286 else if ((snac->subtype == 0x000b) || (snac->subtype == 0x000c)) | 286 else if ((snac->subtype == 0x000b) || (snac->subtype == 0x000c)) |
287 return buddychange(sess, mod, rx, snac, bs); | 287 return buddychange(sess, mod, rx, snac, bs); |
288 | 288 |
289 return 0; | 289 return 0; |
290 } | 290 } |
291 | 291 |
292 faim_internal int buddylist_modfirst(aim_session_t *sess, aim_module_t *mod) | 292 faim_internal int buddylist_modfirst(OscarSession *sess, aim_module_t *mod) |
293 { | 293 { |
294 | 294 |
295 mod->family = 0x0003; | 295 mod->family = 0x0003; |
296 mod->version = 0x0001; | 296 mod->version = 0x0001; |
297 mod->toolid = 0x0110; | 297 mod->toolid = 0x0110; |