Mercurial > pidgin
comparison src/protocols/oscar/family_chatnav.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 |
---|---|
33 * Subtype 0x0002 | 33 * Subtype 0x0002 |
34 * | 34 * |
35 * conn must be a chatnav connection! | 35 * conn must be a chatnav connection! |
36 * | 36 * |
37 */ | 37 */ |
38 faim_export int aim_chatnav_reqrights(aim_session_t *sess, aim_conn_t *conn) | 38 faim_export int aim_chatnav_reqrights(OscarSession *sess, OscarConnection *conn) |
39 { | 39 { |
40 return aim_genericreq_n_snacid(sess, conn, 0x000d, 0x0002); | 40 return aim_genericreq_n_snacid(sess, conn, 0x000d, 0x0002); |
41 } | 41 } |
42 | 42 |
43 /* | 43 /* |
44 * Subtype 0x0008 | 44 * Subtype 0x0008 |
45 */ | 45 */ |
46 faim_export int aim_chatnav_createroom(aim_session_t *sess, aim_conn_t *conn, const char *name, guint16 exchange) | 46 faim_export int aim_chatnav_createroom(OscarSession *sess, OscarConnection *conn, const char *name, guint16 exchange) |
47 { | 47 { |
48 static const char ck[] = {"create"}; | 48 static const char ck[] = {"create"}; |
49 static const char lang[] = {"en"}; | 49 static const char lang[] = {"en"}; |
50 static const char charset[] = {"us-ascii"}; | 50 static const char charset[] = {"us-ascii"}; |
51 aim_frame_t *fr; | 51 FlapFrame *fr; |
52 aim_snacid_t snacid; | 52 aim_snacid_t snacid; |
53 aim_tlvlist_t *tl = NULL; | 53 aim_tlvlist_t *tl = NULL; |
54 | 54 |
55 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152))) | 55 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 1152))) |
56 return -ENOMEM; | 56 return -ENOMEM; |
99 aim_tx_enqueue(sess, fr); | 99 aim_tx_enqueue(sess, fr); |
100 | 100 |
101 return 0; | 101 return 0; |
102 } | 102 } |
103 | 103 |
104 static int parseinfo_perms(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs, aim_snac_t *snac2) | 104 static int parseinfo_perms(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs, aim_snac_t *snac2) |
105 { | 105 { |
106 aim_rxcallback_t userfunc; | 106 aim_rxcallback_t userfunc; |
107 int ret = 0; | 107 int ret = 0; |
108 struct aim_chat_exchangeinfo *exchanges = NULL; | 108 struct aim_chat_exchangeinfo *exchanges = NULL; |
109 int curexchange; | 109 int curexchange; |
125 * There can be any number of these, each one | 125 * There can be any number of these, each one |
126 * representing another exchange. | 126 * representing another exchange. |
127 * | 127 * |
128 */ | 128 */ |
129 for (curexchange = 0; ((exchangetlv = aim_tlv_gettlv(tlvlist, 0x0003, curexchange+1))); ) { | 129 for (curexchange = 0; ((exchangetlv = aim_tlv_gettlv(tlvlist, 0x0003, curexchange+1))); ) { |
130 aim_bstream_t tbs; | 130 ByteStream tbs; |
131 | 131 |
132 aim_bstream_init(&tbs, exchangetlv->value, exchangetlv->length); | 132 aim_bstream_init(&tbs, exchangetlv->value, exchangetlv->length); |
133 | 133 |
134 curexchange++; | 134 curexchange++; |
135 | 135 |
310 aim_tlvlist_free(&tlvlist); | 310 aim_tlvlist_free(&tlvlist); |
311 | 311 |
312 return ret; | 312 return ret; |
313 } | 313 } |
314 | 314 |
315 static int parseinfo_create(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs, aim_snac_t *snac2) | 315 static int parseinfo_create(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs, aim_snac_t *snac2) |
316 { | 316 { |
317 aim_rxcallback_t userfunc; | 317 aim_rxcallback_t userfunc; |
318 aim_tlvlist_t *tlvlist, *innerlist; | 318 aim_tlvlist_t *tlvlist, *innerlist; |
319 char *ck = NULL, *fqcn = NULL, *name = NULL; | 319 char *ck = NULL, *fqcn = NULL, *name = NULL; |
320 guint16 exchange = 0, instance = 0, unknown = 0, flags = 0, maxmsglen = 0, maxoccupancy = 0; | 320 guint16 exchange = 0, instance = 0, unknown = 0, flags = 0, maxmsglen = 0, maxoccupancy = 0; |
321 guint32 createtime = 0; | 321 guint32 createtime = 0; |
322 guint8 createperms = 0, detaillevel; | 322 guint8 createperms = 0, detaillevel; |
323 int cklen; | 323 int cklen; |
324 aim_tlv_t *bigblock; | 324 aim_tlv_t *bigblock; |
325 int ret = 0; | 325 int ret = 0; |
326 aim_bstream_t bbbs; | 326 ByteStream bbbs; |
327 | 327 |
328 tlvlist = aim_tlvlist_read(bs); | 328 tlvlist = aim_tlvlist_read(bs); |
329 | 329 |
330 if (!(bigblock = aim_tlv_gettlv(tlvlist, 0x0004, 1))) { | 330 if (!(bigblock = aim_tlv_gettlv(tlvlist, 0x0004, 1))) { |
331 gaim_debug_misc("oscar", "no bigblock in top tlv in create room response\n"); | 331 gaim_debug_misc("oscar", "no bigblock in top tlv in create room response\n"); |
402 * And then everything is really asynchronous. There is no specific | 402 * And then everything is really asynchronous. There is no specific |
403 * attachment of a response to a create room request, for example. Creating | 403 * attachment of a response to a create room request, for example. Creating |
404 * the room yields no different a response than requesting the room's info. | 404 * the room yields no different a response than requesting the room's info. |
405 * | 405 * |
406 */ | 406 */ |
407 static int parseinfo(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 407 static int parseinfo(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs) |
408 { | 408 { |
409 aim_snac_t *snac2; | 409 aim_snac_t *snac2; |
410 int ret = 0; | 410 int ret = 0; |
411 | 411 |
412 if (!(snac2 = aim_remsnac(sess, snac->id))) { | 412 if (!(snac2 = aim_remsnac(sess, snac->id))) { |
444 free(snac2); | 444 free(snac2); |
445 | 445 |
446 return ret; | 446 return ret; |
447 } | 447 } |
448 | 448 |
449 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) | 449 static int snachandler(OscarSession *sess, aim_module_t *mod, FlapFrame *rx, aim_modsnac_t *snac, ByteStream *bs) |
450 { | 450 { |
451 | 451 |
452 if (snac->subtype == 0x0009) | 452 if (snac->subtype == 0x0009) |
453 return parseinfo(sess, mod, rx, snac, bs); | 453 return parseinfo(sess, mod, rx, snac, bs); |
454 | 454 |
455 return 0; | 455 return 0; |
456 } | 456 } |
457 | 457 |
458 faim_internal int chatnav_modfirst(aim_session_t *sess, aim_module_t *mod) | 458 faim_internal int chatnav_modfirst(OscarSession *sess, aim_module_t *mod) |
459 { | 459 { |
460 | 460 |
461 mod->family = 0x000d; | 461 mod->family = 0x000d; |
462 mod->version = 0x0001; | 462 mod->version = 0x0001; |
463 mod->toolid = 0x0010; | 463 mod->toolid = 0x0010; |