Mercurial > pidgin.yaz
annotate libpurple/protocols/oscar/family_icq.c @ 22700:979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
flap_connection_send_snac() instead of flap_connection_send(). This allows
them to be tallied into the rate limiting calculations and to be throttled
as necessary to prevent rate limiting violations.
This does fix the instantaneous disconnection seen with the addition of ICQ
Status Notes support for people with many ICQ contacts with status notes on
their buddy list. Unfortunately, we still request the ICQ Status Note many
times per contact, so such people now may be rate limited for a
significant period of time as they connect.
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Thu, 24 Apr 2008 11:10:03 +0000 |
parents | 3225c99785b8 |
children | ab2322195dab |
rev | line source |
---|---|
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /* |
15823 | 2 * Purple's oscar protocol plugin |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * This file is the legal property of its developers. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
4 * Please see the AUTHORS file distributed alongside this file. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
6 * This library is free software; you can redistribute it and/or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * version 2 of the License, or (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * Lesser General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * License along with this library; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19640
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
22 * Family 0x0015 - Encapsulated ICQ. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #include "oscar.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 |
22337
a8c025929245
Add support for offline messages for AIM, thanks to some info from
Mark Doliner <mark@kingant.net>
parents:
21993
diff
changeset
|
28 #ifdef OLDSTYLE_ICQ_OFFLINEMSGS |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 int aim_icq_reqofflinemsgs(OscarData *od) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
32 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 bslen = 2 + 4 + 2 + 2; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
41 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
46 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
47 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
49 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
50 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
51 byte_stream_putle16(&bs, 0x003c); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
52 byte_stream_putle16(&bs, snacid); /* eh. */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
54 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
55 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
56 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 int aim_icq_ackofflinemsgs(OscarData *od) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
62 { |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
63 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
68 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 bslen = 2 + 4 + 2 + 2; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
73 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
75 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
78 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
79 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
81 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
82 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
83 byte_stream_putle16(&bs, 0x003e); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
84 byte_stream_putle16(&bs, snacid); /* eh. */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
86 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
87 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
88 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
89 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
90 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 } |
22337
a8c025929245
Add support for offline messages for AIM, thanks to some info from
Mark Doliner <mark@kingant.net>
parents:
21993
diff
changeset
|
92 #endif /* OLDSTYLE_ICQ_OFFLINEMSGS */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
94 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 aim_icq_setsecurity(OscarData *od, gboolean auth_required, gboolean webaware) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
98 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
104 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
105 bslen = 2+4+2+2+2+2+2+1+1+1+1+1+1; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
107 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
108 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
112 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
113 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
115 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
116 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
117 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
118 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
119 byte_stream_putle16(&bs, 0x0c3a); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
120 byte_stream_putle16(&bs, 0x030c); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
121 byte_stream_putle16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
122 byte_stream_putle8(&bs, webaware); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
123 byte_stream_putle8(&bs, 0xf8); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
124 byte_stream_putle8(&bs, 0x02); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
125 byte_stream_putle8(&bs, 0x01); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
126 byte_stream_putle8(&bs, 0x00); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
127 byte_stream_putle8(&bs, !auth_required); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
129 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
130 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
131 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
132 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
135 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
136 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 * Change your ICQ password. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 * @param od The oscar session |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 * @param passwd The new password. If this is longer than 8 characters it |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 * will be truncated. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 * @return Return 0 if no errors, otherwise return the error number. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 int aim_icq_changepasswd(OscarData *od, const char *passwd) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
147 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 int bslen, passwdlen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 if (!passwd) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 passwdlen = strlen(passwd); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
158 if (passwdlen > MAXICQPASSLEN) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 passwdlen = MAXICQPASSLEN; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 bslen = 2+4+2+2+2+2+passwdlen+1; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
162 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
164 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
167 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
168 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
170 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
171 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
172 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
173 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
174 byte_stream_putle16(&bs, 0x042e); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
175 byte_stream_putle16(&bs, passwdlen+1); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
176 byte_stream_putstr(&bs, passwd); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
177 byte_stream_putle8(&bs, '\0'); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
179 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
180 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
181 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
185 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 int aim_icq_getallinfo(OscarData *od, const char *uin) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
187 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
188 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
189 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
191 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
193 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
194 if (!uin || uin[0] < '0' || uin[0] > '9') |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
195 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
196 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
198 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
199 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
200 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
201 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
202 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
207 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
208 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
210 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
211 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
212 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
213 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
214 byte_stream_putle16(&bs, 0x04b2); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
215 byte_stream_putle32(&bs, atoi(uin)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
217 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
218 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
219 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 /* Keep track of this request and the ICQ number and request ID */ |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
222 info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 info->reqid = snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 info->uin = atoi(uin); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 od->icq_info = info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 int aim_icq_getalias(OscarData *od, const char *uin) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
234 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 if (!uin || uin[0] < '0' || uin[0] > '9') |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
247 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
252 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
253 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
255 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
256 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
257 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
258 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
259 byte_stream_putle16(&bs, 0x04ba); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
260 byte_stream_putle32(&bs, atoi(uin)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
261 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
262 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
263 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
264 byte_stream_destroy(&bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
265 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
266 /* Keep track of this request and the ICQ number and request ID */ |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
267 info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 info->reqid = snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 info->uin = atoi(uin); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
270 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
271 od->icq_info = info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 int aim_icq_getsimpleinfo(OscarData *od, const char *uin) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
278 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
279 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
280 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
281 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
282 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
283 if (!uin || uin[0] < '0' || uin[0] > '9') |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
284 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
285 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
286 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
287 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
288 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
289 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
290 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
291 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
292 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
293 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
294 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
295 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
296 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
297 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
298 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
299 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
300 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
301 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
302 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
303 byte_stream_putle16(&bs, 0x051f); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
304 byte_stream_putle32(&bs, atoi(uin)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
305 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
306 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
307 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
308 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
309 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
310 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
311 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
312 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
313 #if 0 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
314 int aim_icq_sendxmlreq(OscarData *od, const char *xml) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
315 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
317 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
318 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
319 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
320 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
321 if (!xml || !strlen(xml)) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
322 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
323 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
324 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
325 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
326 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
327 bslen = 2 + 10 + 2 + strlen(xml) + 1; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
328 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
329 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
330 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
331 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
333 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
334 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
335 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
336 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
337 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
338 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
339 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
340 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
341 byte_stream_putle16(&bs, 0x0998); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
342 byte_stream_putle16(&bs, strlen(xml) + 1); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
343 byte_stream_putraw(&bs, (guint8 *)xml, strlen(xml) + 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
345 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
346 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
347 byte_stream_destroy(&bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
348 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
350 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
351 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
353 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 * Send an SMS message. This is the non-US way. The US-way is to IM |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 * their cell phone number (+19195551234). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
357 * We basically construct and send an XML message. The format is: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
358 * <icq_sms_message> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 * <destination>full_phone_without_leading_+</destination> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
360 * <text>message</text> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
361 * <codepage>1252</codepage> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
362 * <senders_UIN>self_uin</senders_UIN> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 * <senders_name>self_name</senders_name> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
364 * <delivery_receipt>Yes|No</delivery_receipt> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
365 * <time>Wkd, DD Mmm YYYY HH:MM:SS TMZ</time> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 * </icq_sms_message> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 * Yeah hi Peter, whaaaat's happening. If there's any way to use |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 * a codepage other than 1252 that would be great. Thaaaanks. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
371 int aim_icq_sendsms(OscarData *od, const char *name, const char *msg, const char *alias) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
373 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
374 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
376 int bslen, xmllen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
377 char *xml; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
378 const char *timestr; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
379 time_t t; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
380 struct tm *tm; |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
381 gchar *stripped; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
383 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
384 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
385 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
386 if (!name || !msg || !alias) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
387 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
388 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
389 time(&t); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 tm = gmtime(&t); |
15823 | 391 timestr = purple_utf8_strftime("%a, %d %b %Y %T %Z", tm); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
392 |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
393 stripped = purple_markup_strip_html(msg); |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
394 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
395 /* The length of xml included the null terminating character */ |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
396 xmllen = 209 + strlen(name) + strlen(stripped) + strlen(od->sn) + strlen(alias) + strlen(timestr) + 1; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
397 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
398 xml = g_new(char, xmllen); |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
399 snprintf(xml, xmllen, "<icq_sms_message>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
400 "<destination>%s</destination>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
401 "<text>%s</text>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
402 "<codepage>1252</codepage>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
403 "<senders_UIN>%s</senders_UIN>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
404 "<senders_name>%s</senders_name>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
405 "<delivery_receipt>Yes</delivery_receipt>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
406 "<time>%s</time>" |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
407 "</icq_sms_message>", |
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
408 name, stripped, od->sn, alias, timestr); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
409 |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
410 bslen = 36 + xmllen; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
412 byte_stream_new(&bs, 4 + bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
413 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
414 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
415 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
416 /* For simplicity, don't bother using a tlvlist */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
417 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
418 byte_stream_put16(&bs, bslen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
419 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
420 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
421 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
422 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
423 byte_stream_putle16(&bs, snacid); /* eh. */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
424 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
425 /* From libicq200-0.3.2/src/SNAC-SRV.cpp */ |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
426 byte_stream_putle16(&bs, 0x1482); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
427 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
428 byte_stream_put16(&bs, 0x0016); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
429 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
430 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
431 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
432 byte_stream_put32(&bs, 0x00000000); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
433 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
434 byte_stream_put16(&bs, 0x0000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
435 byte_stream_put16(&bs, xmllen); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
436 byte_stream_putstr(&bs, xml); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
437 byte_stream_put8(&bs, 0x00); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
438 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
439 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
440 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
441 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
442 |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
443 g_free(xml); |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
444 g_free(stripped); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
445 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
446 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
447 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
448 |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
449 /* |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
450 * getstatusnote may be a misleading name because the response |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
451 * contains a lot of different information but currently it's only |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
452 * used to get that. |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
453 */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
454 int aim_icq_getstatusnote(OscarData *od, const char *uin, guint8 *note_hash, guint16 note_hash_len) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
455 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
456 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
457 ByteStream bs; |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
458 aim_snacid_t snacid; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
459 int bslen; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
460 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
461 purple_debug_misc("oscar", "aim_icq_getstatusnote: requesting status note for %s.\n", uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
462 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
463 if (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
464 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
465 purple_debug_misc("oscar", "aim_icq_getstatusnote: no connection.\n"); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
466 return -EINVAL; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
467 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
468 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
469 bslen = 2 + 4 + 2 + 2 + 2 + 2 + 58 + strlen(uin); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
470 byte_stream_new(&bs, 4 + bslen); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
471 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
472 snacid = aim_cachesnac(od, 0x0015, 0x0002, 0x0000, NULL, 0); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
473 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
474 byte_stream_put16(&bs, 0x0001); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
475 byte_stream_put16(&bs, bslen); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
476 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
477 byte_stream_putle16(&bs, bslen - 2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
478 byte_stream_putle32(&bs, atoi(od->sn)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
479 byte_stream_putle16(&bs, 0x07d0); /* I command thee. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
480 byte_stream_putle16(&bs, snacid); /* eh. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
481 byte_stream_putle16(&bs, 0x0fa0); /* shrug. */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
482 byte_stream_putle16(&bs, 58 + strlen(uin)); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
483 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
484 byte_stream_put32(&bs, 0x05b90002); /* don't ask */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
485 byte_stream_put32(&bs, 0x80000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
486 byte_stream_put32(&bs, 0x00000006); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
487 byte_stream_put32(&bs, 0x00010002); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
488 byte_stream_put32(&bs, 0x00020000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
489 byte_stream_put32(&bs, 0x04e30000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
490 byte_stream_put32(&bs, 0x00020002); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
491 byte_stream_put32(&bs, 0x00000001); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
492 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
493 byte_stream_put16(&bs, 24 + strlen(uin)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
494 byte_stream_put32(&bs, 0x003c0010); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
495 byte_stream_putraw(&bs, note_hash, 16); /* status note hash */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
496 byte_stream_put16(&bs, 0x0032); /* buddy uin */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
497 byte_stream_put16(&bs, strlen(uin)); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
498 byte_stream_putstr(&bs, uin); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
499 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
500 flap_connection_send_snac(od, conn, 0x0015, 0x0002, 0x000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
501 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
502 byte_stream_destroy(&bs); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
503 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
504 return 0; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
505 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
506 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
507 static void aim_icq_freeinfo(struct aim_icq_info *info) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
508 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
509 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
510 if (!info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
511 return; |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
512 g_free(info->nick); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
513 g_free(info->first); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
514 g_free(info->last); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
515 g_free(info->email); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
516 g_free(info->homecity); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
517 g_free(info->homestate); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
518 g_free(info->homephone); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
519 g_free(info->homefax); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
520 g_free(info->homeaddr); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
521 g_free(info->mobile); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
522 g_free(info->homezip); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
523 g_free(info->personalwebpage); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
524 if (info->email2) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
525 for (i = 0; i < info->numaddresses; i++) |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
526 g_free(info->email2[i]); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
527 g_free(info->email2); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
528 g_free(info->workcity); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
529 g_free(info->workstate); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
530 g_free(info->workphone); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
531 g_free(info->workfax); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
532 g_free(info->workaddr); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
533 g_free(info->workzip); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
534 g_free(info->workcompany); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
535 g_free(info->workdivision); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
536 g_free(info->workposition); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
537 g_free(info->workwebpage); |
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
538 g_free(info->info); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
539 g_free(info->status_note_title); |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
540 g_free(info); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
541 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
542 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
543 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 * Subtype 0x0003 - Response to 0x0015/0x002, contains an ICQesque packet. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
546 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 icqresponse(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
548 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
549 int ret = 0; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
550 GSList *tlvlist; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
551 aim_tlv_t *datatlv; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
552 ByteStream qbs; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
553 guint32 ouruin; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
554 guint16 cmdlen, cmd, reqid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
555 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
556 if (!(tlvlist = aim_tlvlist_read(bs)) || !(datatlv = aim_tlv_gettlv(tlvlist, 0x0001, 1))) { |
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
557 aim_tlvlist_free(tlvlist); |
15823 | 558 purple_debug_misc("oscar", "corrupt ICQ response\n"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
559 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
560 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
561 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
562 byte_stream_init(&qbs, datatlv->value, datatlv->length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
563 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
564 cmdlen = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
565 ouruin = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
566 cmd = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
567 reqid = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
568 |
22475
3225c99785b8
Fix a bunch of compiler warnings caused by my addition of G_GNUC_PRINTF()
Mark Doliner <mark@kingant.net>
parents:
22337
diff
changeset
|
569 purple_debug_misc("oscar", "icq response: %d bytes, %u, 0x%04x, 0x%04x\n", cmdlen, ouruin, cmd, reqid); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
570 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
571 if (cmd == 0x0041) { /* offline message */ |
22337
a8c025929245
Add support for offline messages for AIM, thanks to some info from
Mark Doliner <mark@kingant.net>
parents:
21993
diff
changeset
|
572 #ifdef OLDSTYLE_ICQ_OFFLINEMSGS |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
573 struct aim_icq_offlinemsg msg; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
574 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
575 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
576 memset(&msg, 0, sizeof(msg)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
577 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
578 msg.sender = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
579 msg.year = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
580 msg.month = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
581 msg.day = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
582 msg.hour = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
583 msg.minute = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
584 msg.type = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
585 msg.flags = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
586 msg.msglen = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
587 msg.msg = byte_stream_getstr(&qbs, msg.msglen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
588 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
589 if ((userfunc = aim_callhandler(od, SNAC_FAMILY_ICQ, SNAC_SUBTYPE_ICQ_OFFLINEMSG))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
590 ret = userfunc(od, conn, frame, &msg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
591 |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
592 g_free(msg.msg); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
593 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
594 } else if (cmd == 0x0042) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
595 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
596 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
597 if ((userfunc = aim_callhandler(od, SNAC_FAMILY_ICQ, SNAC_SUBTYPE_ICQ_OFFLINEMSGCOMPLETE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
598 ret = userfunc(od, conn, frame); |
22337
a8c025929245
Add support for offline messages for AIM, thanks to some info from
Mark Doliner <mark@kingant.net>
parents:
21993
diff
changeset
|
599 #endif /* OLDSTYLE_ICQ_OFFLINEMSGS */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
600 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
601 } else if (cmd == 0x07da) { /* information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
602 guint16 subtype; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
603 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
604 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
605 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
606 subtype = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
607 byte_stream_advance(&qbs, 1); /* 0x0a */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
608 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
609 /* find other data from the same request */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
610 for (info = od->icq_info; info && (info->reqid != reqid); info = info->next); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
611 if (!info) { |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
612 info = (struct aim_icq_info *)g_new0(struct aim_icq_info, 1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
613 info->reqid = reqid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
614 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
615 od->icq_info = info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
616 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
617 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
618 switch (subtype) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
619 case 0x00a0: { /* hide ip status */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
620 /* nothing */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
621 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
622 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
623 case 0x00aa: { /* password change status */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
624 /* nothing */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
625 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
626 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
627 case 0x00c8: { /* general and "home" information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
628 info->nick = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
629 info->first = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
630 info->last = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
631 info->email = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
632 info->homecity = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
633 info->homestate = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
634 info->homephone = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
635 info->homefax = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
636 info->homeaddr = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
637 info->mobile = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
638 info->homezip = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
639 info->homecountry = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
640 /* 0x0a 00 02 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
641 /* 1 byte timezone? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
642 /* 1 byte hide email flag? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
643 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
644 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
645 case 0x00dc: { /* personal information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
646 info->age = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
647 info->unknown = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
648 info->gender = byte_stream_getle8(&qbs); /* Not specified=0x00, Female=0x01, Male=0x02 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
649 info->personalwebpage = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
650 info->birthyear = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
651 info->birthmonth = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
652 info->birthday = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
653 info->language1 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
654 info->language2 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
655 info->language3 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
656 /* 0x00 00 01 00 00 01 00 00 00 00 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
657 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
658 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
659 case 0x00d2: { /* work information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
660 info->workcity = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
661 info->workstate = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
662 info->workphone = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
663 info->workfax = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
664 info->workaddr = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
665 info->workzip = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
666 info->workcountry = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
667 info->workcompany = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
668 info->workdivision = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
669 info->workposition = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
670 byte_stream_advance(&qbs, 2); /* 0x01 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
671 info->workwebpage = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
672 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
673 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
674 case 0x00e6: { /* additional personal information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
675 info->info = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)-1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
676 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
677 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
678 case 0x00eb: { /* email address(es) */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
679 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
680 info->numaddresses = byte_stream_getle16(&qbs); |
17235
1927f4ead3ca
Make all the oscar memory allocations and frees use the glib functions to avoid problems when mixing C runtimes.
Daniel Atallah <daniel.atallah@gmail.com>
parents:
15823
diff
changeset
|
681 info->email2 = (char **)g_new0(char *, info->numaddresses); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
682 for (i = 0; i < info->numaddresses; i++) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
683 info->email2[i] = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
684 if (i+1 != info->numaddresses) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
685 byte_stream_advance(&qbs, 1); /* 0x00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
686 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
687 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
688 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
689 case 0x00f0: { /* personal interests */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
690 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
691 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
692 case 0x00fa: { /* past background and current organizations */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
693 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
694 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
695 case 0x0104: { /* alias info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
696 info->nick = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
697 info->first = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
698 info->last = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
699 byte_stream_advance(&qbs, byte_stream_getle16(&qbs)); /* email address? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
700 /* Then 0x00 02 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
701 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
702 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
703 case 0x010e: { /* unknown */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
704 /* 0x00 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
705 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
706 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
707 case 0x019a: { /* simple info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
708 byte_stream_advance(&qbs, 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
709 info->uin = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
710 info->nick = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
711 info->first = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
712 info->last = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
713 info->email = byte_stream_getstr(&qbs, byte_stream_getle16(&qbs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
714 /* Then 0x00 02 00 00 00 00 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
715 } break; |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
716 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
717 /* status note title and send request for status note text */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
718 case 0x0fb4: { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
719 GSList *tlvlist; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
720 aim_tlv_t *tlv; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
721 FlapConnection *conn; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
722 char *uin = NULL; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
723 char *status_note_title = NULL; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
724 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
725 conn = flap_connection_findbygroup(od, 0x0004); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
726 if (conn == NULL) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
727 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
728 purple_debug_misc("oscar", "icq/0x0fb4: flap connection was not found.\n"); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
729 break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
730 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
731 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
732 byte_stream_advance(&qbs, 0x02); /* length */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
733 byte_stream_advance(&qbs, 0x2f); /* unknown stuff */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
734 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
735 tlvlist = aim_tlvlist_read(&qbs); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
736 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
737 tlv = aim_tlv_gettlv(tlvlist, 0x0032, 1); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
738 if (tlv != NULL) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
739 /* Get user number */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
740 uin = aim_tlv_getvalue_as_string(tlv); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
741 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
742 tlv = aim_tlv_gettlv(tlvlist, 0x0226, 1); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
743 if (tlv != NULL) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
744 /* Get status note title */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
745 status_note_title = aim_tlv_getvalue_as_string(tlv); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
746 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
747 aim_tlvlist_free(tlvlist); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
748 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
749 if (uin == NULL || status_note_title == NULL) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
750 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
751 purple_debug_misc("oscar", "icq/0x0fb4: uin or " |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
752 "status_note_title was not found\n"); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
753 g_free(uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
754 g_free(status_note_title); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
755 break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
756 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
757 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
758 if (status_note_title[0] == '\0') |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
759 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
760 PurpleAccount *account; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
761 PurpleBuddy *buddy; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
762 PurplePresence *presence; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
763 PurpleStatus *status; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
764 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
765 account = purple_connection_get_account(od->gc); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
766 buddy = purple_find_buddy(account, uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
767 presence = purple_buddy_get_presence(buddy); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
768 status = purple_presence_get_active_status(presence); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
769 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
770 purple_prpl_got_user_status(account, uin, |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
771 purple_status_get_id(status), |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
772 "message", NULL, NULL); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
773 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
774 g_free(status_note_title); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
775 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
776 else |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
777 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
778 struct aim_icq_info *info; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
779 ByteStream bs; |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
780 guint32 bslen; |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
781 aim_snacid_t snacid; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
782 guchar cookie[8]; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
783 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
784 info = g_new0(struct aim_icq_info, 1); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
785 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
786 if (info == NULL) |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
787 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
788 g_free(uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
789 g_free(status_note_title); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
790 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
791 break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
792 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
793 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
794 bslen = 13 + strlen(uin) + 30 + 6 + 4 + 55 + 85 + 4; |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
795 byte_stream_new(&bs, 4 + bslen); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
796 |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
797 snacid = aim_cachesnac(od, 0x0004, 0x0006, 0x0000, NULL, 0); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
798 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
799 aim_icbm_makecookie(cookie); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
800 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
801 byte_stream_putraw(&bs, cookie, 8); /* ICBM cookie */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
802 byte_stream_put16(&bs, 0x0002); /* message channel */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
803 byte_stream_put8(&bs, strlen(uin)); /* uin */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
804 byte_stream_putstr(&bs, uin); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
805 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
806 byte_stream_put16(&bs, 0x0005); /* rendez vous data */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
807 byte_stream_put16(&bs, 0x00b2); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
808 byte_stream_put16(&bs, 0x0000); /* request */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
809 byte_stream_putraw(&bs, cookie, 8); /* ICBM cookie */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
810 byte_stream_put32(&bs, 0x09461349); /* ICQ server relaying */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
811 byte_stream_put16(&bs, 0x4c7f); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
812 byte_stream_put16(&bs, 0x11d1); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
813 byte_stream_put32(&bs, 0x82224445); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
814 byte_stream_put32(&bs, 0x53540000); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
815 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
816 byte_stream_put16(&bs, 0x000a); /* unknown TLV */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
817 byte_stream_put16(&bs, 0x0002); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
818 byte_stream_put16(&bs, 0x0001); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
819 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
820 byte_stream_put16(&bs, 0x000f); /* unknown TLV */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
821 byte_stream_put16(&bs, 0x0000); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
822 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
823 byte_stream_put16(&bs, 0x2711); /* extended data */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
824 byte_stream_put16(&bs, 0x008a); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
825 byte_stream_putle16(&bs, 0x001b); /* length */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
826 byte_stream_putle16(&bs, 0x0009); /* version */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
827 byte_stream_putle32(&bs, 0x00000000); /* plugin: none */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
828 byte_stream_putle32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
829 byte_stream_putle32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
830 byte_stream_putle32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
831 byte_stream_putle16(&bs, 0x0000); /* unknown */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
832 byte_stream_putle32(&bs, 0x00000000); /* client capabilities flags */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
833 byte_stream_put8(&bs, 0x00); /* unknown */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
834 byte_stream_putle16(&bs, 0x0064); /* downcounter? */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
835 byte_stream_putle16(&bs, 0x000e); /* length */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
836 byte_stream_putle16(&bs, 0x0064); /* downcounter? */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
837 byte_stream_putle32(&bs, 0x00000000); /* unknown */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
838 byte_stream_putle32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
839 byte_stream_putle32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
840 byte_stream_put8(&bs, 0x1a); /* message type: plugin message descibed by text string */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
841 byte_stream_put8(&bs, 0x00); /* message flags */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
842 byte_stream_putle16(&bs, 0x0000); /* status code */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
843 byte_stream_putle16(&bs, 0x0001); /* priority code */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
844 byte_stream_putle16(&bs, 0x0000); /* text length */ |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
845 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
846 byte_stream_put8(&bs, 0x3a); /* message dump */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
847 byte_stream_put32(&bs, 0x00811a18); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
848 byte_stream_put32(&bs, 0xbc0e6c18); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
849 byte_stream_put32(&bs, 0x47a5916f); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
850 byte_stream_put32(&bs, 0x18dcc76f); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
851 byte_stream_put32(&bs, 0x1a010013); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
852 byte_stream_put32(&bs, 0x00000041); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
853 byte_stream_put32(&bs, 0x77617920); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
854 byte_stream_put32(&bs, 0x53746174); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
855 byte_stream_put32(&bs, 0x7573204d); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
856 byte_stream_put32(&bs, 0x65737361); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
857 byte_stream_put32(&bs, 0x67650100); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
858 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
859 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
860 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
861 byte_stream_put32(&bs, 0x00000015); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
862 byte_stream_put32(&bs, 0x00000000); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
863 byte_stream_put32(&bs, 0x0000000d); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
864 byte_stream_put32(&bs, 0x00000074); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
865 byte_stream_put32(&bs, 0x6578742f); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
866 byte_stream_put32(&bs, 0x782d616f); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
867 byte_stream_put32(&bs, 0x6c727466); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
868 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
869 byte_stream_put16(&bs, 0x0003); /* server ACK requested */ |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
870 byte_stream_put16(&bs, 0x0000); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
871 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
872 info->uin = atoi(uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
873 info->status_note_title = status_note_title; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
874 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
875 memcpy(&info->icbm_cookie, cookie, 8); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
876 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
877 info->next = od->icq_info; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
878 od->icq_info = info; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
879 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
880 flap_connection_send_snac(od, conn, 0x0004, 0x0006, 0x0000, snacid, &bs); |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
881 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22475
diff
changeset
|
882 byte_stream_destroy(&bs); |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
883 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
884 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
885 g_free(uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
886 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
887 } break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
888 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
889 } /* End switch statement */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
890 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
891 if (!(snac->flags & 0x0001)) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
892 if (subtype != 0x0104) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
893 if ((userfunc = aim_callhandler(od, SNAC_FAMILY_ICQ, SNAC_SUBTYPE_ICQ_INFO))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
894 ret = userfunc(od, conn, frame, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
895 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
896 if (info->uin && info->nick) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
897 if ((userfunc = aim_callhandler(od, SNAC_FAMILY_ICQ, SNAC_SUBTYPE_ICQ_ALIAS))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
898 ret = userfunc(od, conn, frame, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
899 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
900 if (od->icq_info == info) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
901 od->icq_info = info->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
902 } else { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
903 struct aim_icq_info *cur; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
904 for (cur=od->icq_info; (cur->next && (cur->next!=info)); cur=cur->next); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
905 if (cur->next) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
906 cur->next = cur->next->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
907 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
908 aim_icq_freeinfo(info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
909 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
910 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
911 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
912 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
913 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
914 return ret; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
915 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
916 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
917 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
918 snachandler(OscarData *od, FlapConnection *conn, aim_module_t *mod, FlapFrame *frame, aim_modsnac_t *snac, ByteStream *bs) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
919 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
920 if (snac->subtype == 0x0003) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
921 return icqresponse(od, conn, mod, frame, snac, bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
922 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
923 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
924 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
925 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
926 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
927 icq_shutdown(OscarData *od, aim_module_t *mod) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
928 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
929 struct aim_icq_info *del; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
930 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
931 while (od->icq_info) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
932 del = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
933 od->icq_info = od->icq_info->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
934 aim_icq_freeinfo(del); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
935 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
936 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
937 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
938 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
939 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
940 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
941 icq_modfirst(OscarData *od, aim_module_t *mod) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
942 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
943 mod->family = 0x0015; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
944 mod->version = 0x0001; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
945 mod->toolid = 0x0110; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
946 mod->toolversion = 0x047c; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
947 mod->flags = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
948 strncpy(mod->name, "icq", sizeof(mod->name)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
949 mod->snachandler = snachandler; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
950 mod->shutdown = icq_shutdown; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
951 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
952 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
953 } |