Mercurial > pidgin.yaz
annotate libpurple/protocols/oscar/family_icq.c @ 22475:3225c99785b8
Fix a bunch of compiler warnings caused by my addition of G_GNUC_PRINTF()
to our debug functions (I really thought we had added that in a while ago?)
I didn't fix all of them... just most of them.
Oh, see these pages for a little info:
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Macros.html#G-GNUC-PRINTF:CAPS
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 16 Mar 2008 20:36:52 +0000 |
parents | a8c025929245 |
children | 979a81468e19 |
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; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 FlapFrame *frame; |
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 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
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 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
48 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 byte_stream_putle16(&frame->data, 0x003c); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
54 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
55 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
57 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
58 } |
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 int aim_icq_ackofflinemsgs(OscarData *od) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
61 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
62 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
66 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
67 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
|
68 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
69 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
70 bslen = 2 + 4 + 2 + 2; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 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
|
75 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
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 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 byte_stream_putle16(&frame->data, 0x003e); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
85 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
86 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
87 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
88 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
89 } |
22337
a8c025929245
Add support for offline messages for AIM, thanks to some info from
Mark Doliner <mark@kingant.net>
parents:
21993
diff
changeset
|
90 #endif /* OLDSTYLE_ICQ_OFFLINEMSGS */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
91 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
92 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 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
|
94 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 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
|
101 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
102 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
103 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
|
104 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
105 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
106 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
107 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
|
108 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
109 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
110 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
111 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
112 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
113 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
114 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
115 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
116 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
117 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 byte_stream_putle16(&frame->data, 0x0c3a); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 byte_stream_putle16(&frame->data, 0x030c); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 byte_stream_putle16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 byte_stream_putle8(&frame->data, webaware); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 byte_stream_putle8(&frame->data, 0xf8); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 byte_stream_putle8(&frame->data, 0x02); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 byte_stream_putle8(&frame->data, 0x01); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 byte_stream_putle8(&frame->data, 0x00); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 byte_stream_putle8(&frame->data, !auth_required); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
127 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
128 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
131 } |
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 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 * Change your ICQ password. |
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 * @param od The oscar session |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 * @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
|
138 * will be truncated. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 * @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
|
140 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 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
|
142 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 int bslen, passwdlen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
147 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
148 if (!passwd) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 return -EINVAL; |
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 (!od || !(conn = flap_connection_findbygroup(od, 0x0015))) |
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 passwdlen = strlen(passwd); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 if (passwdlen > MAXICQPASSLEN) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 passwdlen = MAXICQPASSLEN; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 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
|
158 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 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
|
162 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
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 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
167 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
169 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
170 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
171 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
172 byte_stream_putle16(&frame->data, 0x042e); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
173 byte_stream_putle16(&frame->data, passwdlen+1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
174 byte_stream_putstr(&frame->data, passwd); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
175 byte_stream_putle8(&frame->data, '\0'); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
176 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
177 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
178 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
179 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
180 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
181 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 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
|
183 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
185 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
187 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
188 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
189 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 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
|
191 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
193 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
|
194 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
195 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
196 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
198 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
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 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
|
201 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
202 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
204 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 byte_stream_putle16(&frame->data, 0x04b2); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 byte_stream_putle32(&frame->data, atoi(uin)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
216 /* 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
|
217 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
|
218 info->reqid = snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 info->uin = atoi(uin); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 od->icq_info = info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
222 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
223 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 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
|
227 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 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
|
235 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 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
|
238 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
239 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
240 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
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 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
243 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
244 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
|
245 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 byte_stream_put16(&frame->data, bslen); |
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 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
253 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
254 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
255 byte_stream_putle16(&frame->data, 0x04ba); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
256 byte_stream_putle32(&frame->data, atoi(uin)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
257 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
258 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
259 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
260 /* 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
|
261 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
|
262 info->reqid = snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
263 info->uin = atoi(uin); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
264 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
265 od->icq_info = info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
266 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
267 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
268 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
269 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
270 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
|
271 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
272 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
273 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
274 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
275 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
276 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
277 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
|
278 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
279 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
280 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
|
281 return -EINVAL; |
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 bslen = 2 + 4 + 2 + 2 + 2 + 4; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
284 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
285 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
286 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
287 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
|
288 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
289 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
290 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
291 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
292 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
293 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
294 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
295 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
296 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
297 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
298 byte_stream_putle16(&frame->data, 0x051f); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
299 byte_stream_putle32(&frame->data, atoi(uin)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
300 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
301 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
302 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
303 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
304 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
305 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
306 #if 0 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
307 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
|
308 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
309 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
310 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
311 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
312 int bslen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
313 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
314 if (!xml || !strlen(xml)) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
315 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
316 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
317 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
|
318 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
319 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
320 bslen = 2 + 10 + 2 + strlen(xml) + 1; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
321 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
322 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
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 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
|
325 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
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 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
328 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
329 byte_stream_put16(&frame->data, bslen); |
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 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
332 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
333 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
334 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
335 byte_stream_putle16(&frame->data, 0x0998); /* shrug. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
336 byte_stream_putle16(&frame->data, strlen(xml) + 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
337 byte_stream_putraw(&frame->data, (guint8 *)xml, strlen(xml) + 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
338 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
339 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
340 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
341 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
342 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
343 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
344 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
345 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
346 * 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
|
347 * their cell phone number (+19195551234). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
348 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
349 * 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
|
350 * <icq_sms_message> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
351 * <destination>full_phone_without_leading_+</destination> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
352 * <text>message</text> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
353 * <codepage>1252</codepage> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
354 * <senders_UIN>self_uin</senders_UIN> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
355 * <senders_name>self_name</senders_name> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
356 * <delivery_receipt>Yes|No</delivery_receipt> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
357 * <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
|
358 * </icq_sms_message> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
359 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
360 * 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
|
361 * 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
|
362 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
363 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
|
364 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
365 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
366 FlapFrame *frame; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
367 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
368 int bslen, xmllen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
369 char *xml; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
370 const char *timestr; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
371 time_t t; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
372 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
|
373 gchar *stripped; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
374 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
375 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
|
376 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
377 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
378 if (!name || !msg || !alias) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
379 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
380 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
381 time(&t); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
382 tm = gmtime(&t); |
15823 | 383 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
|
384 |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
385 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
|
386 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
387 /* 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
|
388 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
|
389 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
390 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
|
391 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
|
392 "<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
|
393 "<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
|
394 "<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
|
395 "<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
|
396 "<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
|
397 "<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
|
398 "<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
|
399 "</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 name, stripped, od->sn, alias, timestr); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
401 |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
402 bslen = 36 + xmllen; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
403 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
404 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
405 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
406 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
|
407 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
408 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
409 /* For simplicity, don't bother using a tlvlist */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
410 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
411 byte_stream_put16(&frame->data, bslen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
412 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
413 byte_stream_putle16(&frame->data, bslen - 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
414 byte_stream_putle32(&frame->data, atoi(od->sn)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
415 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
416 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
417 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
418 /* From libicq200-0.3.2/src/SNAC-SRV.cpp */ |
19640
eb0933e158a4
Add non-US SMS support for ICQ. This is a patch from DB42.
Mark Doliner <mark@kingant.net>
parents:
17445
diff
changeset
|
419 byte_stream_putle16(&frame->data, 0x1482); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
420 byte_stream_put16(&frame->data, 0x0001); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
421 byte_stream_put16(&frame->data, 0x0016); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
422 byte_stream_put32(&frame->data, 0x00000000); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
423 byte_stream_put32(&frame->data, 0x00000000); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
424 byte_stream_put32(&frame->data, 0x00000000); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
425 byte_stream_put32(&frame->data, 0x00000000); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
426 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
427 byte_stream_put16(&frame->data, 0x0000); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
428 byte_stream_put16(&frame->data, xmllen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
429 byte_stream_putstr(&frame->data, 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
|
430 byte_stream_put8(&frame->data, 0x00); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
431 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
432 flap_connection_send(conn, frame); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
433 |
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
|
434 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
|
435 g_free(stripped); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
436 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
437 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
438 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
439 |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
440 /* |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
441 * 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
|
442 * 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
|
443 * 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
|
444 */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
445 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
|
446 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
447 FlapConnection *conn; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
448 FlapFrame *frame; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
449 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
|
450 int bslen; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
451 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
452 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
|
453 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
454 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
|
455 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
456 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
|
457 return -EINVAL; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
458 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
459 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
460 bslen = 2 + 4 + 2 + 2 + 2 + 2 + 58 + strlen(uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
461 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
462 frame = flap_frame_new(od, 0x02, 10 + 4 + bslen); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
463 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
464 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
|
465 aim_putsnac(&frame->data, 0x0015, 0x0002, 0x0000, snacid); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
466 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
467 /* For simplicity, don't bother using a tlvlist */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
468 byte_stream_put16(&frame->data, 0x0001); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
469 byte_stream_put16(&frame->data, bslen); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
470 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
471 byte_stream_putle16(&frame->data, bslen - 2); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
472 byte_stream_putle32(&frame->data, atoi(od->sn)); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
473 byte_stream_putle16(&frame->data, 0x07d0); /* I command thee. */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
474 byte_stream_putle16(&frame->data, snacid); /* eh. */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
475 byte_stream_putle16(&frame->data, 0x0fa0); /* shrug. */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
476 byte_stream_putle16(&frame->data, 58 + strlen(uin)); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
477 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
478 byte_stream_put32(&frame->data, 0x05b90002); /* don't ask */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
479 byte_stream_put32(&frame->data, 0x80000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
480 byte_stream_put32(&frame->data, 0x00000006); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
481 byte_stream_put32(&frame->data, 0x00010002); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
482 byte_stream_put32(&frame->data, 0x00020000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
483 byte_stream_put32(&frame->data, 0x04e30000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
484 byte_stream_put32(&frame->data, 0x00020002); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
485 byte_stream_put32(&frame->data, 0x00000001); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
486 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
487 byte_stream_put16(&frame->data, 24 + strlen(uin)); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
488 byte_stream_put32(&frame->data, 0x003c0010); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
489 byte_stream_putraw(&frame->data, note_hash, 16); /* status note hash */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
490 byte_stream_put16(&frame->data, 0x0032); /* buddy uin */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
491 byte_stream_put16(&frame->data, strlen(uin)); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
492 byte_stream_putstr(&frame->data, uin); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
493 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
494 flap_connection_send(conn, frame); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
495 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
496 return 0; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
497 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
498 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 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
|
500 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
501 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 if (!info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
503 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
|
504 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
|
505 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
|
506 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
|
507 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
|
508 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
|
509 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
|
510 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
|
511 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
|
512 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
|
513 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
|
514 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
|
515 g_free(info->personalwebpage); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
516 if (info->email2) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 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
|
518 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
|
519 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
|
520 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
|
521 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
|
522 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
|
523 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
|
524 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
|
525 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
|
526 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
|
527 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
|
528 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
|
529 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
|
530 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
|
531 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
|
532 g_free(info); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
533 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
534 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
535 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
536 * 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
|
537 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
539 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
|
540 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
541 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
|
542 GSList *tlvlist; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
543 aim_tlv_t *datatlv; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 ByteStream qbs; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 guint32 ouruin; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
546 guint16 cmdlen, cmd, reqid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
548 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
|
549 aim_tlvlist_free(tlvlist); |
15823 | 550 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
|
551 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
552 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
553 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
554 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
|
555 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
556 cmdlen = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
557 ouruin = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
558 cmd = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
559 reqid = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
560 |
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
|
561 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
|
562 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
563 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
|
564 #ifdef OLDSTYLE_ICQ_OFFLINEMSGS |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
565 struct aim_icq_offlinemsg msg; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
566 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
567 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
568 memset(&msg, 0, sizeof(msg)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
569 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
570 msg.sender = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
571 msg.year = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
572 msg.month = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
573 msg.day = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
574 msg.hour = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
575 msg.minute = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
576 msg.type = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
577 msg.flags = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
578 msg.msglen = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
579 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
|
580 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
581 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
|
582 ret = userfunc(od, conn, frame, &msg); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
583 |
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
|
584 g_free(msg.msg); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
585 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
586 } else if (cmd == 0x0042) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
587 aim_rxcallback_t userfunc; |
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_OFFLINEMSGCOMPLETE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
590 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
|
591 #endif /* OLDSTYLE_ICQ_OFFLINEMSGS */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
592 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
593 } else if (cmd == 0x07da) { /* information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
594 guint16 subtype; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
595 struct aim_icq_info *info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
596 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
597 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
598 subtype = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
599 byte_stream_advance(&qbs, 1); /* 0x0a */ |
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 /* find other data from the same request */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
602 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
|
603 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
|
604 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
|
605 info->reqid = reqid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
606 info->next = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
607 od->icq_info = info; |
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 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
610 switch (subtype) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
611 case 0x00a0: { /* hide ip status */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
612 /* nothing */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
613 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
614 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
615 case 0x00aa: { /* password change status */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
616 /* nothing */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
617 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
618 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
619 case 0x00c8: { /* general and "home" information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
620 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
|
621 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
|
622 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
|
623 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
|
624 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
|
625 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
|
626 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
|
627 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
|
628 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
|
629 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
|
630 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
|
631 info->homecountry = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
632 /* 0x0a 00 02 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
633 /* 1 byte timezone? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
634 /* 1 byte hide email flag? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
635 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
636 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
637 case 0x00dc: { /* personal information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
638 info->age = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
639 info->unknown = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
640 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
|
641 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
|
642 info->birthyear = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
643 info->birthmonth = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
644 info->birthday = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
645 info->language1 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
646 info->language2 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
647 info->language3 = byte_stream_getle8(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
648 /* 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
|
649 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
650 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
651 case 0x00d2: { /* work information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
652 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
|
653 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
|
654 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
|
655 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
|
656 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
|
657 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
|
658 info->workcountry = byte_stream_getle16(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
659 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
|
660 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
|
661 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
|
662 byte_stream_advance(&qbs, 2); /* 0x01 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
663 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
|
664 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
665 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
666 case 0x00e6: { /* additional personal information */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
667 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
|
668 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
669 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
670 case 0x00eb: { /* email address(es) */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
671 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
672 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
|
673 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
|
674 for (i = 0; i < info->numaddresses; i++) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
675 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
|
676 if (i+1 != info->numaddresses) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
677 byte_stream_advance(&qbs, 1); /* 0x00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
678 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
679 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
680 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
681 case 0x00f0: { /* personal interests */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
682 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
683 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
684 case 0x00fa: { /* past background and current organizations */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
685 } break; |
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 case 0x0104: { /* alias info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
688 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
|
689 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
|
690 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
|
691 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
|
692 /* Then 0x00 02 00 */ |
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 0x010e: { /* unknown */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
696 /* 0x00 00 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
697 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
698 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
699 case 0x019a: { /* simple info */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
700 byte_stream_advance(&qbs, 2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
701 info->uin = byte_stream_getle32(&qbs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
702 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
|
703 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
|
704 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
|
705 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
|
706 /* 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
|
707 } break; |
21993
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
708 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
709 /* 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
|
710 case 0x0fb4: { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
711 GSList *tlvlist; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
712 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
|
713 FlapConnection *conn; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
714 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
|
715 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
|
716 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
717 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
|
718 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
|
719 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
720 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
|
721 break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
722 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
723 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
724 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
|
725 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
|
726 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
727 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
|
728 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
729 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
|
730 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
|
731 /* 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
|
732 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
|
733 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
734 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
|
735 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
|
736 /* 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
|
737 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
|
738 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
739 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
|
740 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
741 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
|
742 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
743 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
|
744 "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
|
745 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
|
746 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
|
747 break; |
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 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
750 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
|
751 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
752 PurpleAccount *account; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
753 PurpleBuddy *buddy; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
754 PurplePresence *presence; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
755 PurpleStatus *status; |
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 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
|
758 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
|
759 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
|
760 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
|
761 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
762 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
|
763 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
|
764 "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
|
765 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
766 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
|
767 } |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
768 else |
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 struct aim_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
|
771 guint32 data_len; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
772 FlapFrame *frame; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
773 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
|
774 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
|
775 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
776 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
|
777 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
778 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
|
779 { |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
780 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
|
781 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
|
782 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
783 break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
784 } |
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 data_len = 13 + strlen(uin) + 30 + 6 + 4 + 55 + 85 + 4; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
787 frame = flap_frame_new(od, 0x0002, 10 + 4 + data_len); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
788 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
|
789 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
790 aim_putsnac(&frame->data, 0x0004, 0x0006, 0x0000, snacid); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
791 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
792 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
|
793 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
794 byte_stream_putraw(&frame->data, cookie, 8); /* ICBM cookie */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
795 byte_stream_put16(&frame->data, 0x0002); /* message channel */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
796 byte_stream_put8(&frame->data, strlen(uin)); /* uin */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
797 byte_stream_putstr(&frame->data, uin); |
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 byte_stream_put16(&frame->data, 0x0005); /* rendez vous data */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
800 byte_stream_put16(&frame->data, 0x00b2); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
801 byte_stream_put16(&frame->data, 0x0000); /* request */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
802 byte_stream_putraw(&frame->data, cookie, 8); /* ICBM cookie */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
803 byte_stream_put32(&frame->data, 0x09461349); /* ICQ server relaying */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
804 byte_stream_put16(&frame->data, 0x4c7f); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
805 byte_stream_put16(&frame->data, 0x11d1); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
806 byte_stream_put32(&frame->data, 0x82224445); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
807 byte_stream_put32(&frame->data, 0x53540000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
808 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
809 byte_stream_put16(&frame->data, 0x000a); /* unknown TLV */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
810 byte_stream_put16(&frame->data, 0x0002); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
811 byte_stream_put16(&frame->data, 0x0001); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
812 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
813 byte_stream_put16(&frame->data, 0x000f); /* unknown TLV */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
814 byte_stream_put16(&frame->data, 0x0000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
815 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
816 byte_stream_put16(&frame->data, 0x2711); /* extended data */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
817 byte_stream_put16(&frame->data, 0x008a); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
818 byte_stream_putle16(&frame->data, 0x001b); /* length */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
819 byte_stream_putle16(&frame->data, 0x0009); /* version */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
820 byte_stream_putle32(&frame->data, 0x00000000); /* plugin: none */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
821 byte_stream_putle32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
822 byte_stream_putle32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
823 byte_stream_putle32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
824 byte_stream_putle16(&frame->data, 0x0000); /* unknown */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
825 byte_stream_putle32(&frame->data, 0x00000000); /* client capabilities flags */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
826 byte_stream_put8(&frame->data, 0x00); /* unknown */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
827 byte_stream_putle16(&frame->data, 0x0064); /* downcounter? */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
828 byte_stream_putle16(&frame->data, 0x000e); /* length */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
829 byte_stream_putle16(&frame->data, 0x0064); /* downcounter? */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
830 byte_stream_putle32(&frame->data, 0x00000000); /* unknown */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
831 byte_stream_putle32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
832 byte_stream_putle32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
833 byte_stream_put8(&frame->data, 0x1a); /* message type: plugin message descibed by text string */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
834 byte_stream_put8(&frame->data, 0x00); /* message flags */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
835 byte_stream_putle16(&frame->data, 0x0000); /* status code */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
836 byte_stream_putle16(&frame->data, 0x0001); /* priority code */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
837 byte_stream_putle16(&frame->data, 0x0000); /* text length */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
838 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
839 byte_stream_put8(&frame->data, 0x3a); /* message dump */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
840 byte_stream_put32(&frame->data, 0x00811a18); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
841 byte_stream_put32(&frame->data, 0xbc0e6c18); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
842 byte_stream_put32(&frame->data, 0x47a5916f); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
843 byte_stream_put32(&frame->data, 0x18dcc76f); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
844 byte_stream_put32(&frame->data, 0x1a010013); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
845 byte_stream_put32(&frame->data, 0x00000041); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
846 byte_stream_put32(&frame->data, 0x77617920); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
847 byte_stream_put32(&frame->data, 0x53746174); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
848 byte_stream_put32(&frame->data, 0x7573204d); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
849 byte_stream_put32(&frame->data, 0x65737361); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
850 byte_stream_put32(&frame->data, 0x67650100); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
851 byte_stream_put32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
852 byte_stream_put32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
853 byte_stream_put32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
854 byte_stream_put32(&frame->data, 0x00000015); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
855 byte_stream_put32(&frame->data, 0x00000000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
856 byte_stream_put32(&frame->data, 0x0000000d); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
857 byte_stream_put32(&frame->data, 0x00000074); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
858 byte_stream_put32(&frame->data, 0x6578742f); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
859 byte_stream_put32(&frame->data, 0x782d616f); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
860 byte_stream_put32(&frame->data, 0x6c727466); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
861 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
862 byte_stream_put16(&frame->data, 0x0003); /* server ACK requested */ |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
863 byte_stream_put16(&frame->data, 0x0000); |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
864 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
865 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
|
866 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
|
867 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
868 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
|
869 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
870 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
|
871 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
|
872 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
873 flap_connection_send(conn, frame); |
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 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
876 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
|
877 |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
878 } break; |
bb1190d6961c
Partial support for reading ICQ 6 status notes. The status note will
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
879 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
880 } /* End switch statement */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
881 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
882 if (!(snac->flags & 0x0001)) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
883 if (subtype != 0x0104) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
884 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
|
885 ret = userfunc(od, conn, frame, info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
886 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
887 if (info->uin && info->nick) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
888 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
|
889 ret = userfunc(od, conn, frame, info); |
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 (od->icq_info == info) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
892 od->icq_info = info->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
893 } else { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
894 struct aim_icq_info *cur; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
895 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
|
896 if (cur->next) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
897 cur->next = cur->next->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
898 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
899 aim_icq_freeinfo(info); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
900 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
901 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
902 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
903 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
904 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
905 return ret; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
906 } |
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 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
909 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
|
910 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
911 if (snac->subtype == 0x0003) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
912 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
|
913 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
914 return 0; |
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 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
918 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
|
919 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
920 struct aim_icq_info *del; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
921 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
922 while (od->icq_info) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
923 del = od->icq_info; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
924 od->icq_info = od->icq_info->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
925 aim_icq_freeinfo(del); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
926 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
927 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
928 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
929 } |
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 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
932 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
|
933 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
934 mod->family = 0x0015; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
935 mod->version = 0x0001; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
936 mod->toolid = 0x0110; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
937 mod->toolversion = 0x047c; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
938 mod->flags = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
939 strncpy(mod->name, "icq", sizeof(mod->name)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
940 mod->snachandler = snachandler; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
941 mod->shutdown = icq_shutdown; |
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 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
944 } |