Mercurial > pidgin.yaz
annotate libpurple/protocols/oscar/family_locate.c @ 30746:c492cef26b88
jabber: Only take the character data from a <body/> element (non-XHTML)
rfc3921 and draft-ietf-xmpp-3921bis talk about the XML character data
of the <body/> and 3921bis also says it MUST NOT contain mixed content
(see 3.2.2 of the XML 1.0 spec). This should fix Google Talk's private
chats showing an empty line whenever someone joins/leaves (caused by
some ugly XMPP traffic from Google), and seems correct to me otherwise.
This was changed from _get_data to _to_str 7 years ago in
76319226b46e6e64b1ef61933baeb43a5a484a61.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 31 Jul 2010 20:39:55 +0000 |
parents | f18b6eb0ed02 |
children | 9881f18b95b1 |
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:
18630
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 0x0002 - Locate. |
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 * The functions here are responsible for requesting and parsing information- |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 * gathering SNACs. Or something like that. This family contains the SNACs |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 * for getting and setting info, away messages, directory profile thingy, etc. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "oscar.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 #ifdef _WIN32 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 #include "win32dep.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
33 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
34 /* Define to log unknown TLVs */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
35 /* #define LOG_UNKNOWN_TLV */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
36 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
37 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
38 * Capability blocks. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
39 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
40 * These are CLSIDs. They should actually be of the form: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
41 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
42 * {0x0946134b, 0x4c7f, 0x11d1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
43 * {0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
44 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
45 * But, eh. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
46 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
47 static const struct { |
29854 | 48 guint64 flag; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
49 guint8 data[16]; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
50 } aim_caps[] = { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
51 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
52 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
53 * These are in ascending numerical order. |
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 |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
56 /* Client understands short caps, a UUID of the form |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
57 * 0946XXYY-4C7F-11D1-8222-444553540000 where XXYY is the short cap. */ |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
58 {OSCAR_CAPABILITY_SHORTCAPS, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
59 {0x09, 0x46, 0x00, 0x00, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
60 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_SECUREIM, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
63 {0x09, 0x46, 0x00, 0x01, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
64 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
65 |
23675
46cc31494ff4
Undid the addition of 2 OscarCapability items I added previously, keeping the commented-out notes in family_locate. We can't let the OscarCapability bitmask get as large as 0x04000000, because if it exceeds the platforms MAX_UINT we'll end up in an infinite loop in oscar_caps_to_string() due to overflow.
Evan Schoenberg <evan.s@dreskin.net>
parents:
23636
diff
changeset
|
66 /* OSCAR_CAPABILITY_XHTML_IM */ |
46cc31494ff4
Undid the addition of 2 OscarCapability items I added previously, keeping the commented-out notes in family_locate. We can't let the OscarCapability bitmask get as large as 0x04000000, because if it exceeds the platforms MAX_UINT we'll end up in an infinite loop in oscar_caps_to_string() due to overflow.
Evan Schoenberg <evan.s@dreskin.net>
parents:
23636
diff
changeset
|
67 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
68 {0x09, 0x46, 0x00, 0x02, 0x4c, 0x7f, 0x11, 0xd1, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
69 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
70 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
71 {OSCAR_CAPABILITY_VIDEO, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
72 {0x09, 0x46, 0x01, 0x00, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
73 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
74 |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
75 /* "Live Video" (SIP/RTC Video) support in Windows AIM 5.5.3501 and newer */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
76 {OSCAR_CAPABILITY_LIVEVIDEO, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
77 {0x09, 0x46, 0x01, 0x01, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
78 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
79 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
80 /* "Camera" support in Windows AIM 5.5.3501 and newer */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
81 {OSCAR_CAPABILITY_CAMERA, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
82 {0x09, 0x46, 0x01, 0x02, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
83 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
85 /* "Microphone" support in Windows AIM 5.5.3501 and newer */ |
23675
46cc31494ff4
Undid the addition of 2 OscarCapability items I added previously, keeping the commented-out notes in family_locate. We can't let the OscarCapability bitmask get as large as 0x04000000, because if it exceeds the platforms MAX_UINT we'll end up in an infinite loop in oscar_caps_to_string() due to overflow.
Evan Schoenberg <evan.s@dreskin.net>
parents:
23636
diff
changeset
|
86 /* OSCAR_CAPABILITY_MICROPHONE */ |
46cc31494ff4
Undid the addition of 2 OscarCapability items I added previously, keeping the commented-out notes in family_locate. We can't let the OscarCapability bitmask get as large as 0x04000000, because if it exceeds the platforms MAX_UINT we'll end up in an infinite loop in oscar_caps_to_string() due to overflow.
Evan Schoenberg <evan.s@dreskin.net>
parents:
23636
diff
changeset
|
87 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
88 {0x09, 0x46, 0x01, 0x03, 0x4c, 0x7f, 0x11, 0xd1, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
89 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
90 |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
91 /* Supports RTC Audio */ |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
92 /* OSCAR_CAPABILITY_RTCAUDIO */ |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
93 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
94 {0x09, 0x46, 0x01, 0x04, 0x4c, 0x7f, 0x11, 0xd1, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
95 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
96 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
97 /* In iChatAV (version numbers...?) */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
98 {OSCAR_CAPABILITY_ICHATAV, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
99 {0x09, 0x46, 0x01, 0x05, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
100 0x82, 0x22, 0x44, 0x45, 0x45, 0x53, 0x54, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
101 |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
102 /* Supports "new status message features" (Who advertises this one?) */ |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24642
diff
changeset
|
103 /* OSCAR_CAPABILITY_HOST_STATUS_TEXT_AWARE */ |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
104 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
105 {0x09, 0x46, 0x01, 0x0a, 0x4c, 0x7f, 0x11, 0xd1, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
106 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
107 |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
108 /* Supports "see as I type" (Who advertises this one?) */ |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
109 /* OSCAR_CAPABILITY_SEE_AS_I_TYPE */ |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
110 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
111 {0x09, 0x46, 0x01, 0x0b, 0x4c, 0x7f, 0x11, 0xd1, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
112 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
113 |
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
114 /* Client only asserts caps for services in which it is participating */ |
25415
584063555949
Remove trailing whitespace
Mark Doliner <mark@kingant.net>
parents:
24642
diff
changeset
|
115 /* OSCAR_CAPABILITY_SMARTCAPS */ |
23636
da9cf296733e
Some cleanup to our capabilities definitions, and added information on
Evan Schoenberg <evan.s@dreskin.net>
parents:
23626
diff
changeset
|
116 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
117 {0x09, 0x46, 0x01, 0xff, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
118 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
119 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
120 {OSCAR_CAPABILITY_HIPTOP, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
121 {0x09, 0x46, 0x13, 0x23, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
122 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
123 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
124 {OSCAR_CAPABILITY_TALK, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
125 {0x09, 0x46, 0x13, 0x41, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
126 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_SENDFILE, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
129 {0x09, 0x46, 0x13, 0x43, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
130 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_ICQ_DIRECT, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
133 {0x09, 0x46, 0x13, 0x44, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
134 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_DIRECTIM, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
137 {0x09, 0x46, 0x13, 0x45, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
138 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
139 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
140 {OSCAR_CAPABILITY_BUDDYICON, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
141 {0x09, 0x46, 0x13, 0x46, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
142 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
143 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
144 {OSCAR_CAPABILITY_ADDINS, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
145 {0x09, 0x46, 0x13, 0x47, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
146 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_GETFILE, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
149 {0x09, 0x46, 0x13, 0x48, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
150 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
151 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
152 {OSCAR_CAPABILITY_ICQSERVERRELAY, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
153 {0x09, 0x46, 0x13, 0x49, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
154 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
155 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
156 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
157 * Indeed, there are two of these. The former appears to be correct, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
158 * but in some versions of winaim, the second one is set. Either they |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
159 * forgot to fix endianness, or they made a typo. It really doesn't |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
160 * matter which. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
161 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
162 {OSCAR_CAPABILITY_GAMES, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
163 {0x09, 0x46, 0x13, 0x4a, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
164 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
165 {OSCAR_CAPABILITY_GAMES2, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
166 {0x09, 0x46, 0x13, 0x4a, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
167 0x22, 0x82, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
168 |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
169 /* New format of caps (xtraz icons) */ |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
170 {OSCAR_CAPABILITY_NEWCAPS, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
171 {0x09, 0x46, 0x00, 0x00, 0x4c, 0x7f, 0x11, 0xd1, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
172 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
173 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
174 /* Support xtraz statuses */ |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
175 {OSCAR_CAPABILITY_XTRAZ, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
176 {0x1a, 0x09, 0x3c, 0x6c, 0xd7, 0xFD, 0x4e, 0xc5, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
177 0x9d, 0x51, 0xa6, 0x47, 0x4e, 0x34, 0xf5, 0xa0}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
178 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
179 {OSCAR_CAPABILITY_SENDBUDDYLIST, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
180 {0x09, 0x46, 0x13, 0x4b, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
181 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
182 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
183 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
184 * Setting this lets AIM users receive messages from ICQ users, and ICQ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
185 * users receive messages from AIM users. It also lets ICQ users show |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
186 * up in buddy lists for AIM users, and AIM users show up in buddy lists |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
187 * for ICQ users. And ICQ privacy/invisibility acts like AIM privacy, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
188 * in that if you add a user to your deny list, you will not be able to |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
189 * see them as online (previous you could still see them, but they |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
190 * couldn't see you. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
191 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
192 {OSCAR_CAPABILITY_INTEROPERATE, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
193 {0x09, 0x46, 0x13, 0x4d, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
194 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_UNICODE, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
197 {0x09, 0x46, 0x13, 0x4e, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
198 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
201 {0x09, 0x46, 0xf0, 0x03, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
202 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
203 |
23316
b3ec26e66e26
Specified one of the OSCAR_CAPABILITY_GENERICUNKNOWN capabilities to be
Evan Schoenberg <evan.s@dreskin.net>
parents:
23315
diff
changeset
|
204 {OSCAR_CAPABILITY_ICHAT_SCREENSHARE, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
205 {0x09, 0x46, 0xf0, 0x04, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
206 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
207 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
208 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
209 {0x09, 0x46, 0xf0, 0x05, 0x4c, 0x7f, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
210 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
211 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
212 {OSCAR_CAPABILITY_UNICODEOLD, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
213 {0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
214 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
215 |
24642
e4b1ba7c351c
Advertise the same typing capability on OSCAR that ICQ 6 does, since we claim
Jaromír Karmazín <blue.beret@seznam.cz>
parents:
23675
diff
changeset
|
216 {OSCAR_CAPABILITY_TYPING, |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
217 {0x56, 0x3f, 0xc8, 0x09, 0x0b, 0x6f, 0x41, 0xbd, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
218 0x9f, 0x79, 0x42, 0x26, 0x09, 0xdf, 0xa2, 0xf3}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
219 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
220 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
221 * Chat is oddball. |
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 {OSCAR_CAPABILITY_CHAT, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
224 {0x74, 0x8f, 0x24, 0x20, 0x62, 0x87, 0x11, 0xd1, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
225 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
226 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
227 /* This is added by the servers and it only shows up for ourselves... */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
228 {OSCAR_CAPABILITY_GENERICUNKNOWN, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
229 {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
230 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x09}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
231 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
232 {OSCAR_CAPABILITY_ICQRTF, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
233 {0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
234 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
235 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
236 {OSCAR_CAPABILITY_APINFO, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
237 {0xaa, 0x4a, 0x32, 0xb5, 0xf8, 0x84, 0x48, 0xc6, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
238 0xa3, 0xd7, 0x8c, 0x50, 0x97, 0x19, 0xfd, 0x5b}}, |
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 {OSCAR_CAPABILITY_TRILLIANCRYPT, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
241 {0xf2, 0xe7, 0xc7, 0xf4, 0xfe, 0xad, 0x4d, 0xfb, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
242 0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00}}, |
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 {OSCAR_CAPABILITY_EMPTY, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
245 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
247 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
248 {OSCAR_CAPABILITY_LAST, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
249 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
251 }; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
252 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
253 /* Keep this array synchronized with icq_purple_moods. */ |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
254 static const struct { |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
255 const char *mood; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
256 guint8 data[16]; |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
257 } icq_custom_icons[] = { |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
258 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
259 {"thinking", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
260 {0x3f, 0xb0, 0xbd, 0x36, 0xaf, 0x3b, 0x4a, 0x60, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
261 0x9e, 0xef, 0xcf, 0x19, 0x0f, 0x6a, 0x5a, 0x7f}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
262 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
263 {"busy", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
264 {0x48, 0x8e, 0x14, 0x89, 0x8a, 0xca, 0x4a, 0x08, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
265 0x82, 0xaa, 0x77, 0xce, 0x7a, 0x16, 0x52, 0x08}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
266 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
267 {"shopping", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
268 {0x63, 0x62, 0x73, 0x37, 0xa0, 0x3f, 0x49, 0xff, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
269 0x80, 0xe5, 0xf7, 0x09, 0xcd, 0xe0, 0xa4, 0xee}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
270 |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
271 /* This was in the original patch, but isn't what the official client |
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
272 * (ICQ 6) sets when you choose its typewriter icon. */ |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
273 {"typing", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
274 {0x63, 0x4f, 0x6b, 0xd8 ,0xad, 0xd2, 0x4a, 0xa1, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
275 0xaa, 0xb9, 0x11, 0x5b, 0xc2, 0x6d, 0x05, 0xa1}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
276 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
277 {"question", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
278 {0x63, 0x14, 0x36, 0xff, 0x3f, 0x8a, 0x40, 0xd0, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
279 0xa5, 0xcb, 0x7b, 0x66, 0xe0, 0x51, 0xb3, 0x64}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
280 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
281 {"angry", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
282 {0x01, 0xd8, 0xd7, 0xee, 0xac, 0x3b, 0x49, 0x2a, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
283 0xa5, 0x8d, 0xd3, 0xd8, 0x77, 0xe6, 0x6b, 0x92}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
284 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
285 {"plate", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
286 {0xf8, 0xe8, 0xd7, 0xb2, 0x82, 0xc4, 0x41, 0x42, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
287 0x90, 0xf8, 0x10, 0xc6, 0xce, 0x0a, 0x89, 0xa6}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
288 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
289 {"cinema", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
290 {0x10, 0x7a, 0x9a, 0x18, 0x12, 0x32, 0x4d, 0xa4, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
291 0xb6, 0xcd, 0x08, 0x79, 0xdb, 0x78, 0x0f, 0x09}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
292 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
293 {"sick", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
294 {0x1f, 0x7a, 0x40, 0x71, 0xbf, 0x3b, 0x4e, 0x60, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
295 0xbc, 0x32, 0x4c, 0x57, 0x87, 0xb0, 0x4c, 0xf1}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
296 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
297 {"typing", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
298 {0x2c, 0xe0, 0xe4, 0xe5, 0x7c, 0x64, 0x43, 0x70, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
299 0x9c, 0x3a, 0x7a, 0x1c, 0xe8, 0x78, 0xa7, 0xdc}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
300 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
301 {"suit", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
302 {0xb7, 0x08, 0x67, 0xf5, 0x38, 0x25, 0x43, 0x27, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
303 0xa1, 0xff, 0xcf, 0x4c, 0xc1, 0x93, 0x97, 0x97}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
304 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
305 {"bathing", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
306 {0x5a, 0x58, 0x1e, 0xa1, 0xe5, 0x80, 0x43, 0x0c, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
307 0xa0, 0x6f, 0x61, 0x22, 0x98, 0xb7, 0xe4, 0xc7}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
308 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
309 {"tv", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
310 {0x80, 0x53, 0x7d, 0xe2, 0xa4, 0x67, 0x4a, 0x76, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
311 0xb3, 0x54, 0x6d, 0xfd, 0x07, 0x5f, 0x5e, 0xc6}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
312 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
313 {"excited", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
314 {0x6f, 0x49, 0x30, 0x98, 0x4f, 0x7c, 0x4a, 0xff, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
315 0xa2, 0x76, 0x34, 0xa0, 0x3b, 0xce, 0xae, 0xa7}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
316 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
317 {"sleeping", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
318 {0x78, 0x5e, 0x8c, 0x48, 0x40, 0xd3, 0x4c, 0x65, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
319 0x88, 0x6f, 0x04, 0xcf, 0x3f, 0x3f, 0x43, 0xdf}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
320 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
321 {"hiptop", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
322 {0x10, 0x11, 0x17, 0xc9, 0xa3, 0xb0, 0x40, 0xf9, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
323 0x81, 0xac, 0x49, 0xe1, 0x59, 0xfb, 0xd5, 0xd4}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
324 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
325 {"in_love", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
326 {0xdd, 0xcf, 0x0e, 0xa9, 0x71, 0x95, 0x40, 0x48, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
327 0xa9, 0xc6, 0x41, 0x32, 0x06, 0xd6, 0xf2, 0x80}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
328 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
329 {"sleepy", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
330 {0x83, 0xc9, 0xb7, 0x8e, 0x77, 0xe7, 0x43, 0x78, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
331 0xb2, 0xc5, 0xfb, 0x6c, 0xfc, 0xc3, 0x5b, 0xec}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
332 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
333 {"meeting", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
334 {0xf1, 0x8a, 0xb5, 0x2e, 0xdc, 0x57, 0x49, 0x1d, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
335 0x99, 0xdc, 0x64, 0x44, 0x50, 0x24, 0x57, 0xaf}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
336 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
337 {"phone", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
338 {0x12, 0x92, 0xe5, 0x50, 0x1b, 0x64, 0x4f, 0x66, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
339 0xb2, 0x06, 0xb2, 0x9a, 0xf3, 0x78, 0xe4, 0x8d}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
340 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
341 {"surfing", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
342 {0xa6, 0xed, 0x55, 0x7e, 0x6b, 0xf7, 0x44, 0xd4, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
343 0xa5, 0xd4, 0xd2, 0xe7, 0xd9, 0x5c, 0xe8, 0x1f}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
344 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
345 {"mobile", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
346 {0x16, 0x0c, 0x60, 0xbb, 0xdd, 0x44, 0x43, 0xf3, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
347 0x91, 0x40, 0x05, 0x0f, 0x00, 0xe6, 0xc0, 0x09}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
348 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
349 {"search", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
350 {0xd4, 0xe2, 0xb0, 0xba, 0x33, 0x4e, 0x4f, 0xa5, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
351 0x98, 0xd0, 0x11, 0x7d, 0xbf, 0x4d, 0x3c, 0xc8}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
352 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
353 {"party", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
354 {0xe6, 0x01, 0xe4, 0x1c, 0x33, 0x73, 0x4b, 0xd1, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
355 0xbc, 0x06, 0x81, 0x1d, 0x6c, 0x32, 0x3d, 0x81}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
356 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
357 {"coffee", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
358 {0x1b, 0x78, 0xae, 0x31, 0xfa, 0x0b, 0x4d, 0x38, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
359 0x93, 0xd1, 0x99, 0x7e, 0xee, 0xaf, 0xb2, 0x18}}, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
360 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
361 {"console", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
362 {0xd4, 0xa6, 0x11, 0xd0, 0x8f, 0x01, 0x4e, 0xc0, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
363 0x92, 0x23, 0xc5, 0xb6, 0xbe, 0xc6, 0xcc, 0xf0}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
364 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
365 {"internet", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
366 {0x12, 0xd0, 0x7e, 0x3e, 0xf8, 0x85, 0x48, 0x9e, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
367 0x8e, 0x97, 0xa7, 0x2a, 0x65, 0x51, 0xe5, 0x8d}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
368 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
369 {"cigarette", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
370 {0x64, 0x43, 0xc6, 0xaf, 0x22, 0x60, 0x45, 0x17, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
371 0xb5, 0x8c, 0xd7, 0xdf, 0x8e, 0x29, 0x03, 0x52}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
372 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
373 {"writing", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
374 {0x00, 0x72, 0xd9, 0x08, 0x4a, 0xd1, 0x43, 0xdd, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
375 0x91, 0x99, 0x6f, 0x02, 0x69, 0x66, 0x02, 0x6f}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
376 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
377 {"beer", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
378 {0x8c, 0x50, 0xdb, 0xae, 0x81, 0xed, 0x47, 0x86, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
379 0xac, 0xca, 0x16, 0xcc, 0x32, 0x13, 0xc7, 0xb7}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
380 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
381 {"music", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
382 {0x61, 0xbe, 0xe0, 0xdd, 0x8b, 0xdd, 0x47, 0x5d, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
383 0x8d, 0xee, 0x5f, 0x4b, 0xaa, 0xcf, 0x19, 0xa7}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
384 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
385 {"studying", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
386 {0x60, 0x9d, 0x52, 0xf8, 0xa2, 0x9a, 0x49, 0xa6, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
387 0xb2, 0xa0, 0x25, 0x24, 0xc5, 0xe9, 0xd2, 0x60}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
388 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
389 {"working", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
390 {0xba, 0x74, 0xdb, 0x3e, 0x9e, 0x24, 0x43, 0x4b, |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
391 0x87, 0xb6, 0x2f, 0x6b, 0x8d, 0xfe, 0xe5, 0x0f}}, |
29818
2c95b7c57ebb
Fix up the X-Status code in many ways:
Richard Laager <rlaager@wiktel.com>
parents:
29812
diff
changeset
|
392 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
393 {"restroom", |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
394 {0x16, 0xf5, 0xb7, 0x6f, 0xa9, 0xd2, 0x40, 0x35, |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
395 0x8c, 0xc5, 0xc0, 0x84, 0x70, 0x3c, 0x98, 0xfa}}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
396 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
397 {NULL, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
398 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}} |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
400 }; |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
401 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
402 /* Keep this array synchronized with icq_custom_icons. */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
403 static PurpleMood icq_purple_moods[] = { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
404 {"thinking", N_("Thinking"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
405 {"busy", N_("Busy"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
406 {"shopping", N_("Shopping"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
407 /* This was in the original patch, but isn't what the official client |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
408 * (ICQ 6) sets when you choose its typewriter icon. */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
409 {"typing", NULL, NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
410 {"question", N_("Questioning"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
411 {"angry", N_("Angry"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
412 {"plate", N_("Eating"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
413 {"cinema", N_("Watching a movie"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
414 {"sick", N_("Sick"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
415 {"typing", N_("Typing"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
416 {"suit", N_("At the office"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
417 {"bathing", N_("Taking a bath"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
418 {"tv", N_("Watching TV"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
419 {"excited", N_("Having fun"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
420 {"sleeping", N_("Sleeping"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
421 {"hiptop", N_("Using a PDA"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
422 {"in_love", N_("In love"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
423 /* Sleepy / Tired */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
424 {"sleepy", N_("Sleepy"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
425 {"meeting", N_("Meeting friends"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
426 {"phone", N_("On the phone"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
427 {"surfing", N_("Surfing"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
428 /* "I am mobile." / "John is mobile." */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
429 {"mobile", N_("Mobile"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
430 {"search", N_("Searching the web"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
431 {"party", N_("At a party"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
432 {"coffee", N_("Having Coffee"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
433 /* Playing video games */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
434 {"console", N_("Gaming"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
435 {"internet", N_("Browsing the web"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
436 {"cigarette", N_("Smoking"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
437 {"writing", N_("Writing"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
438 /* Drinking [Alcohol] */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
439 {"beer", N_("Drinking"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
440 {"music", N_("Listening to music"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
441 {"studying", N_("Studying"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
442 {"working", N_("Working"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
443 {"restroom", N_("In the restroom"), NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
444 /* Mark the last record. */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
445 {NULL, NULL, NULL}, |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
446 }; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
447 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
448 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
449 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
450 * Add the userinfo to our linked list. If we already have userinfo |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
451 * for this buddy, then just overwrite parts of the old data. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
452 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
453 * @param userinfo Contains the new information for the buddy. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
454 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
455 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
456 aim_locate_adduserinfo(OscarData *od, aim_userinfo_t *userinfo) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
457 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
458 aim_userinfo_t *cur; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
459 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
460 cur = aim_locate_finduserinfo(od, userinfo->bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
461 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
462 if (cur == NULL) { |
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:
16318
diff
changeset
|
463 cur = (aim_userinfo_t *)g_new0(aim_userinfo_t, 1); |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
464 cur->bn = g_strdup(userinfo->bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
465 cur->next = od->locate.userinfo; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
466 od->locate.userinfo = cur; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
467 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
468 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
469 cur->warnlevel = userinfo->warnlevel; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
470 cur->idletime = userinfo->idletime; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
471 if (userinfo->flags != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
472 cur->flags = userinfo->flags; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
473 if (userinfo->createtime != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
474 cur->createtime = userinfo->createtime; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
475 if (userinfo->membersince != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
476 cur->membersince = userinfo->membersince; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
477 if (userinfo->onlinesince != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
478 cur->onlinesince = userinfo->onlinesince; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
479 if (userinfo->sessionlen != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
480 cur->sessionlen = userinfo->sessionlen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
481 if (userinfo->capabilities != 0) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
482 cur->capabilities = userinfo->capabilities; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
483 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
484 cur->present |= userinfo->present; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
485 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
486 if (userinfo->iconcsumlen > 0) { |
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:
16318
diff
changeset
|
487 g_free(cur->iconcsum); |
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:
16318
diff
changeset
|
488 cur->iconcsum = (guint8 *)g_malloc(userinfo->iconcsumlen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
489 memcpy(cur->iconcsum, userinfo->iconcsum, userinfo->iconcsumlen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
490 cur->iconcsumlen = userinfo->iconcsumlen; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
491 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
492 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
493 if (userinfo->info != NULL) { |
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:
16318
diff
changeset
|
494 g_free(cur->info); |
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:
16318
diff
changeset
|
495 g_free(cur->info_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
496 if (userinfo->info_len > 0) { |
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:
16318
diff
changeset
|
497 cur->info = (char *)g_malloc(userinfo->info_len); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
498 memcpy(cur->info, userinfo->info, userinfo->info_len); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
499 } else |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
500 cur->info = NULL; |
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:
16318
diff
changeset
|
501 cur->info_encoding = g_strdup(userinfo->info_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
502 cur->info_len = userinfo->info_len; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
503 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
504 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
505 if (userinfo->status != NULL) { |
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:
16318
diff
changeset
|
506 g_free(cur->status); |
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:
16318
diff
changeset
|
507 g_free(cur->status_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
508 if (userinfo->status_len > 0) { |
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:
16318
diff
changeset
|
509 cur->status = (char *)g_malloc(userinfo->status_len); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
510 memcpy(cur->status, userinfo->status, userinfo->status_len); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
511 } else |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
512 cur->status = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
513 if (userinfo->status_encoding != NULL) |
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:
16318
diff
changeset
|
514 cur->status_encoding = g_strdup(userinfo->status_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
515 else |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
516 cur->status_encoding = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
517 cur->status_len = userinfo->status_len; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
518 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
519 |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
520 if (userinfo->itmsurl != NULL) { |
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:
16318
diff
changeset
|
521 g_free(cur->itmsurl); |
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:
16318
diff
changeset
|
522 g_free(cur->itmsurl_encoding); |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
523 if (userinfo->itmsurl_len > 0) { |
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:
16318
diff
changeset
|
524 cur->itmsurl = (char *)g_malloc(userinfo->itmsurl_len); |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
525 memcpy(cur->itmsurl, userinfo->itmsurl, userinfo->itmsurl_len); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
526 } else |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
527 cur->itmsurl = NULL; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
528 if (userinfo->itmsurl_encoding != NULL) |
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:
16318
diff
changeset
|
529 cur->itmsurl_encoding = g_strdup(userinfo->itmsurl_encoding); |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
530 else |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
531 cur->itmsurl_encoding = NULL; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
532 cur->itmsurl_len = userinfo->itmsurl_len; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
533 } |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
534 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
535 if (userinfo->away != NULL) { |
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:
16318
diff
changeset
|
536 g_free(cur->away); |
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:
16318
diff
changeset
|
537 g_free(cur->away_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
538 if (userinfo->away_len > 0) { |
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:
16318
diff
changeset
|
539 cur->away = (char *)g_malloc(userinfo->away_len); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
540 memcpy(cur->away, userinfo->away, userinfo->away_len); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
541 } else |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
542 cur->away = NULL; |
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:
16318
diff
changeset
|
543 cur->away_encoding = g_strdup(userinfo->away_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
544 cur->away_len = userinfo->away_len; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
545 |
21997
82297cc4bb47
Some changes intended to make oscar not emit so many
Mark Doliner <mark@kingant.net>
parents:
21996
diff
changeset
|
546 } else { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
547 /* |
21997
82297cc4bb47
Some changes intended to make oscar not emit so many
Mark Doliner <mark@kingant.net>
parents:
21996
diff
changeset
|
548 * We don't have an away message specified in this user_info |
82297cc4bb47
Some changes intended to make oscar not emit so many
Mark Doliner <mark@kingant.net>
parents:
21996
diff
changeset
|
549 * block, so clear any cached away message now. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
550 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
551 if (cur->away) { |
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:
16318
diff
changeset
|
552 g_free(cur->away); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
553 cur->away = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
554 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
555 if (cur->away_encoding) { |
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:
16318
diff
changeset
|
556 g_free(cur->away_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
557 cur->away_encoding = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
558 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
559 cur->away_len = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
560 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
561 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
562 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
563 aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *bn) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
564 aim_userinfo_t *cur = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
565 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
566 if (bn == NULL) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
567 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
568 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
569 cur = od->locate.userinfo; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
570 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
571 while (cur != NULL) { |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
572 if (oscar_util_name_compare(cur->bn, bn) == 0) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
573 return cur; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
574 cur = cur->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
575 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
576 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
577 return NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
578 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
579 |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
580 guint64 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
581 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
582 { |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
583 guint64 flags = 0; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
584 int offset; |
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 for (offset = 0; byte_stream_empty(bs) && (offset < len); offset += 0x10) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
587 guint8 *cap; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
588 int i, identified; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
589 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
590 cap = byte_stream_getraw(bs, 0x10); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
591 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
592 for (i = 0, identified = 0; !(aim_caps[i].flag & OSCAR_CAPABILITY_LAST); i++) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
593 if (memcmp(&aim_caps[i].data, cap, 0x10) == 0) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
594 flags |= aim_caps[i].flag; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
595 identified++; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
596 break; /* should only match once... */ |
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 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
599 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
600 if (!identified) |
15823 | 601 purple_debug_misc("oscar", "unknown capability: {%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n", |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
602 cap[0], cap[1], cap[2], cap[3], |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
603 cap[4], cap[5], |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
604 cap[6], cap[7], |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
605 cap[8], cap[9], |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
606 cap[10], cap[11], cap[12], cap[13], |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
607 cap[14], cap[15]); |
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:
16318
diff
changeset
|
608 g_free(cap); |
15374
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 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
611 return flags; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
612 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
613 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
614 static const char * |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
615 aim_receive_custom_icon(OscarData *od, ByteStream *bs, int len) |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
616 { |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
617 int offset; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
618 const char *result = NULL; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
619 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
620 for (offset = 0; byte_stream_empty(bs) && (offset < len); offset += 0x10) { |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
621 /* check wheather this capability is a custom user icon */ |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
622 guint8 *cap; |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
623 int i; |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
624 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
625 cap = byte_stream_getraw(bs, 0x10); |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
626 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
627 for (i = 0; icq_custom_icons[i].mood; i++) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
628 if (memcmp(&icq_custom_icons[i].data, cap, 0x10) == 0) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
629 purple_debug_misc("oscar", "Custom status icon: %s\n", icq_purple_moods[i].description); |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
630 result = icq_custom_icons[i].mood; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
631 break; /* should only match once... */ |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
632 } |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
633 } |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
634 g_free(cap); |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
635 } |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
636 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
637 return result; |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
638 } |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
639 |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
640 guint64 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
641 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
642 { |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
643 guint64 flags = 0; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
644 int offset; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
645 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
646 for (offset = 0; byte_stream_empty(bs) && (offset < len); offset += 0x02) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
647 guint8 *cap; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
648 int i, identified; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
649 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
650 cap = byte_stream_getraw(bs, 0x02); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
651 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
652 for (i = 0, identified = 0; !(aim_caps[i].flag & OSCAR_CAPABILITY_LAST); i++) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
653 if (memcmp(&aim_caps[i].data[2], cap, 0x02) == 0) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
654 flags |= aim_caps[i].flag; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
655 identified++; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
656 break; /* should only match once... */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
657 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
658 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
659 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
660 if (!identified) |
15823 | 661 purple_debug_misc("oscar", "unknown short capability: {%02x%02x}\n", cap[0], cap[1]); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
662 |
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:
16318
diff
changeset
|
663 g_free(cap); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
664 } |
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 return flags; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
667 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
668 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
669 int |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
670 byte_stream_putcaps(ByteStream *bs, guint64 caps) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
671 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
672 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
673 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
674 if (!bs) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
675 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
676 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
677 for (i = 0; byte_stream_empty(bs); i++) { |
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 if (aim_caps[i].flag == OSCAR_CAPABILITY_LAST) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
680 break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
681 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
682 if (caps & aim_caps[i].flag) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
683 byte_stream_putraw(bs, aim_caps[i].data, 0x10); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
684 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
685 } |
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 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
688 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
689 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
690 #ifdef LOG_UNKNOWN_TLV |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
691 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
692 dumptlv(OscarData *od, guint16 type, ByteStream *bs, guint8 len) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
693 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
694 int i; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
695 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
696 if (!od || !bs || !len) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
697 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
698 |
15823 | 699 purple_debug_misc("oscar", "userinfo: type =0x%04x\n", type); |
700 purple_debug_misc("oscar", "userinfo: length=0x%04x\n", len); | |
701 purple_debug_misc("oscar", "userinfo: value:\n"); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
702 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
703 for (i = 0; i < len; i++) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
704 if ((i % 8) == 0) |
15823 | 705 purple_debug_misc("oscar", "\nuserinfo: "); |
706 purple_debug_misc("oscar", "0x%2x ", byte_stream_get8(bs)); | |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
707 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
708 |
15823 | 709 purple_debug_misc("oscar", "\n"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
710 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
711 return; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
712 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
713 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
714 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
715 void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
716 aim_info_free(aim_userinfo_t *info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
717 { |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
718 g_free(info->bn); |
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:
16318
diff
changeset
|
719 g_free(info->iconcsum); |
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:
16318
diff
changeset
|
720 g_free(info->info); |
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:
16318
diff
changeset
|
721 g_free(info->info_encoding); |
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:
16318
diff
changeset
|
722 g_free(info->status); |
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:
16318
diff
changeset
|
723 g_free(info->status_encoding); |
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:
16318
diff
changeset
|
724 g_free(info->itmsurl); |
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:
16318
diff
changeset
|
725 g_free(info->itmsurl_encoding); |
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:
16318
diff
changeset
|
726 g_free(info->away); |
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:
16318
diff
changeset
|
727 g_free(info->away_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
728 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
729 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
730 static const struct { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
731 char *icqmood; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
732 const char *mood; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
733 } icqmoods[] = { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
734 {"icqmood0", "shopping"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
735 {"icqmood1", "bathing"}, |
29830
b92ae9c512ec
The first round of renaming icons to match the XEP-0107 names.
Richard Laager <rlaager@wiktel.com>
parents:
29829
diff
changeset
|
736 {"icqmood2", "sleepy"}, |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
737 {"icqmood3", "party"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
738 {"icqmood4", "beer"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
739 {"icqmood5", "thinking"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
740 {"icqmood6", "plate"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
741 {"icqmood7", "tv"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
742 {"icqmood8", "meeting"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
743 {"icqmood9", "coffee"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
744 {"icqmood10", "music"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
745 {"icqmood11", "suit"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
746 {"icqmood12", "cinema"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
747 {"icqmood13", "smile-big"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
748 {"icqmood14", "phone"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
749 {"icqmood15", "console"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
750 {"icqmood16", "studying"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
751 {"icqmood17", "sick"}, |
29830
b92ae9c512ec
The first round of renaming icons to match the XEP-0107 names.
Richard Laager <rlaager@wiktel.com>
parents:
29829
diff
changeset
|
752 {"icqmood18", "sleeping"}, |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
753 {"icqmood19", "surfing"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
754 {"icqmood20", "internet"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
755 {"icqmood21", "working"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
756 {"icqmood22", "typing"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
757 {"icqmood23", "angry"}, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
758 {NULL, 0} |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
759 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
760 }; |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
761 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
762 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
763 * AIM is fairly regular about providing user info. This is a generic |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
764 * routine to extract it in its standard form. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
765 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
766 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
767 aim_info_extract(OscarData *od, ByteStream *bs, aim_userinfo_t *outinfo) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
768 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
769 int curtlv, tlvcnt; |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
770 guint8 bnlen; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
771 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
772 if (!bs || !outinfo) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
773 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
774 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
775 /* Clear out old data first */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
776 memset(outinfo, 0x00, sizeof(aim_userinfo_t)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
777 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
778 /* |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
779 * Username. Stored as an unterminated string prepended with a |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
780 * byte containing its length. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
781 */ |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
782 bnlen = byte_stream_get8(bs); |
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
783 outinfo->bn = byte_stream_getstr(bs, bnlen); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
784 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
785 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
786 * Warning Level. Stored as an unsigned short. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
787 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
788 outinfo->warnlevel = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
789 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
790 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
791 * TLV Count. Unsigned short representing the number of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
792 * Type-Length-Value triples that follow. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
793 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
794 tlvcnt = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
795 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
796 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
797 * Parse out the Type-Length-Value triples as they're found. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
798 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
799 for (curtlv = 0; curtlv < tlvcnt; curtlv++) { |
19682
4a372246ca1e
Looks like I might have been wrong about the length being only 8 bits.
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
800 guint16 type, length; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
801 int endpos; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
802 int curpos; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
803 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
804 type = byte_stream_get16(bs); |
19682
4a372246ca1e
Looks like I might have been wrong about the length being only 8 bits.
Mark Doliner <mark@kingant.net>
parents:
19680
diff
changeset
|
805 length = byte_stream_get16(bs); |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
806 curpos = byte_stream_curpos(bs); |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
807 endpos = curpos + MIN(length, byte_stream_empty(bs)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
808 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
809 if (type == 0x0001) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
810 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
811 * User flags |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
812 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
813 * Specified as any of the following ORed together: |
28073
b5102d206f0c
Small comment improvement from Aman Gupta (tmm1)
Mark Doliner <mark@kingant.net>
parents:
26958
diff
changeset
|
814 * 0x0001 Unconfirmed account |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
815 * 0x0002 Unknown bit 2 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
816 * 0x0004 AOL Main Service user |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
817 * 0x0008 Unknown bit 4 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
818 * 0x0010 Free (AIM) user |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
819 * 0x0020 Away |
28073
b5102d206f0c
Small comment improvement from Aman Gupta (tmm1)
Mark Doliner <mark@kingant.net>
parents:
26958
diff
changeset
|
820 * 0x0040 ICQ user (AIM bit also set) |
b5102d206f0c
Small comment improvement from Aman Gupta (tmm1)
Mark Doliner <mark@kingant.net>
parents:
26958
diff
changeset
|
821 * 0x0080 Mobile device |
b5102d206f0c
Small comment improvement from Aman Gupta (tmm1)
Mark Doliner <mark@kingant.net>
parents:
26958
diff
changeset
|
822 * 0x0400 Bot (like ActiveBuddy) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
823 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
824 outinfo->flags = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
825 outinfo->present |= AIM_USERINFO_PRESENT_FLAGS; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
826 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
827 } else if (type == 0x0002) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
828 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
829 * Account creation time |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
830 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
831 * The time/date that the user originally registered for |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
832 * the service, stored in time_t format. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
833 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
834 * I'm not sure how this differs from type 5 ("member |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
835 * since"). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
836 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
837 * Note: This is the field formerly known as "member |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
838 * since". All these years and I finally found out |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
839 * that I got the name wrong. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
840 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
841 outinfo->createtime = byte_stream_get32(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
842 outinfo->present |= AIM_USERINFO_PRESENT_CREATETIME; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
843 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
844 } else if (type == 0x0003) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
845 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
846 * On-Since date |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
847 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
848 * The time/date that the user started their current |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
849 * session, stored in time_t format. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
850 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
851 outinfo->onlinesince = byte_stream_get32(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
852 outinfo->present |= AIM_USERINFO_PRESENT_ONLINESINCE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
853 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
854 } else if (type == 0x0004) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
855 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
856 * Idle time |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
857 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
858 * Number of minutes since the user actively used the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
859 * service. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
860 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
861 * Note that the client tells the server when to start |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
862 * counting idle times, so this may or may not be |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
863 * related to reality. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
864 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
865 outinfo->idletime = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
866 outinfo->present |= AIM_USERINFO_PRESENT_IDLE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
867 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
868 } else if (type == 0x0005) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
869 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
870 * Member since date |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
871 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
872 * The time/date that the user originally registered for |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
873 * the service, stored in time_t format. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
874 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
875 * This is sometimes sent instead of type 2 ("account |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
876 * creation time"), particularly in the self-info. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
877 * And particularly for ICQ? |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
878 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
879 outinfo->membersince = byte_stream_get32(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
880 outinfo->present |= AIM_USERINFO_PRESENT_MEMBERSINCE; |
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 } else if (type == 0x0006) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
883 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
884 * ICQ Online Status |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
885 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
886 * ICQ's Away/DND/etc "enriched" status. Some decoding |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
887 * of values done by Scott <darkagl@pcnet.com> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
888 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
889 byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
890 outinfo->icqinfo.status = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
891 outinfo->present |= AIM_USERINFO_PRESENT_ICQEXTSTATUS; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
892 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
893 } else if (type == 0x0008) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
894 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
895 * Client type, or some such. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
896 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
897 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
898 } else if (type == 0x000a) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
899 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
900 * ICQ User IP Address |
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 * Ahh, the joy of ICQ security. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
903 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
904 outinfo->icqinfo.ipaddr = byte_stream_get32(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
905 outinfo->present |= AIM_USERINFO_PRESENT_ICQIPADDR; |
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 } else if (type == 0x000c) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
908 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
909 * Random crap containing the IP address, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
910 * apparently a port number, and some Other Stuff. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
911 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
912 * Format is: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
913 * 4 bytes - Our IP address, 0xc0 a8 01 2b for 192.168.1.43 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
914 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
915 byte_stream_getrawbuf(bs, outinfo->icqinfo.crap, 0x25); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
916 outinfo->present |= AIM_USERINFO_PRESENT_ICQDATA; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
917 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
918 } else if (type == 0x000d) { |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
919 PurpleAccount *account = purple_connection_get_account(od->gc); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
920 const char *mood; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
921 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
922 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
923 * OSCAR Capability information |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
924 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
925 outinfo->capabilities |= aim_locate_getcaps(od, bs, length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
926 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
927 byte_stream_setpos(bs, curpos); |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
928 |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
929 mood = aim_receive_custom_icon(od, bs, length); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
930 if (mood) |
29854 | 931 purple_prpl_got_user_status(account, outinfo->bn, "mood", |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
932 PURPLE_MOOD_NAME, mood, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
933 NULL); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
934 else |
29854 | 935 purple_prpl_got_user_status_deactive(account, outinfo->bn, "mood"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
936 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
937 } else if (type == 0x000e) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
938 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
939 * AOL capability information |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
940 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
941 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
942 } else if ((type == 0x000f) || (type == 0x0010)) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
943 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
944 * Type = 0x000f: Session Length. (AIM) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
945 * Type = 0x0010: Session Length. (AOL) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
946 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
947 * The duration, in seconds, of the user's current |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
948 * session. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
949 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
950 * Which TLV type this comes in depends on the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
951 * service the user is using (AIM or AOL). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
952 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
953 outinfo->sessionlen = byte_stream_get32(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
954 outinfo->present |= AIM_USERINFO_PRESENT_SESSIONLEN; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
955 |
28590
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
956 } else if (type == 0x0014) { |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
957 /* |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
958 * My instance number. |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
959 */ |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
960 guint8 instance_number; |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
961 instance_number = byte_stream_get8(bs); |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
962 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
963 } else if (type == 0x0019) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
964 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
965 * OSCAR short capability information. A shortened |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
966 * form of the normal capabilities. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
967 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
968 outinfo->capabilities |= aim_locate_getcaps_short(od, bs, length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
969 outinfo->present |= AIM_USERINFO_PRESENT_CAPABILITIES; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
970 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
971 } else if (type == 0x001a) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
972 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
973 * Type = 0x001a |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
974 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
975 * AOL short capability information. A shortened |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
976 * form of the normal capabilities. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
977 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
978 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
979 } else if (type == 0x001b) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
980 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
981 * Encryption certification MD5 checksum. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
982 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
983 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
984 } else if (type == 0x001d) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
985 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
986 * Buddy icon information and status/available messages. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
987 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
988 * This almost seems like the AIM protocol guys gave |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
989 * the iChat guys a Type, and the iChat guys tried to |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
990 * cram as much cool shit into it as possible. Then |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
991 * the Windows AIM guys were like, "hey, that's |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
992 * pretty neat, let's copy those prawns." |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
993 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
994 * In that spirit, this can contain a custom message, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
995 * kind of like an away message, but you're not away |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
996 * (it's called an "available" message). Or it can |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
997 * contain information about the buddy icon the user |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
998 * has stored on the server. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
999 */ |
18617
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1000 guint16 type2; |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1001 guint8 number2, length2; |
18617
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1002 int endpos2; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1003 |
18616
c3c610e73fc0
I'm hoping this will fix a semi-random and semi-random infinite looping
Mark Doliner <mark@kingant.net>
parents:
18552
diff
changeset
|
1004 /* |
c3c610e73fc0
I'm hoping this will fix a semi-random and semi-random infinite looping
Mark Doliner <mark@kingant.net>
parents:
18552
diff
changeset
|
1005 * Continue looping as long as we're able to read type2, |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1006 * number2, and length2. |
18616
c3c610e73fc0
I'm hoping this will fix a semi-random and semi-random infinite looping
Mark Doliner <mark@kingant.net>
parents:
18552
diff
changeset
|
1007 */ |
c3c610e73fc0
I'm hoping this will fix a semi-random and semi-random infinite looping
Mark Doliner <mark@kingant.net>
parents:
18552
diff
changeset
|
1008 while (byte_stream_curpos(bs) + 4 <= endpos) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1009 type2 = byte_stream_get16(bs); |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1010 number2 = byte_stream_get8(bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1011 length2 = byte_stream_get8(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1012 |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1013 endpos2 = byte_stream_curpos(bs) + MIN(length2, byte_stream_empty(bs)); |
18617
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1014 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1015 switch (type2) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1016 case 0x0000: { /* This is an official buddy icon? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1017 /* This is always 5 bytes of "0x02 01 d2 04 72"? */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1018 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1019 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1020 case 0x0001: { /* A buddy icon checksum */ |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1021 if ((length2 > 0) && ((number2 == 0x00) || (number2 == 0x01))) { |
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:
16318
diff
changeset
|
1022 g_free(outinfo->iconcsum); |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1023 outinfo->iconcsumtype = number2; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1024 outinfo->iconcsum = byte_stream_getraw(bs, length2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1025 outinfo->iconcsumlen = length2; |
18630
ce3c8d30a200
Hopefully fix a hella sporadic infinite loop bug in ICQ (and maybe AIM).
Mark Doliner <mark@kingant.net>
parents:
18617
diff
changeset
|
1026 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1027 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1028 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1029 case 0x0002: { /* A status/available message */ |
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:
16318
diff
changeset
|
1030 g_free(outinfo->status); |
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:
16318
diff
changeset
|
1031 g_free(outinfo->status_encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1032 if (length2 >= 4) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1033 outinfo->status_len = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1034 outinfo->status = byte_stream_getstr(bs, outinfo->status_len); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1035 if (byte_stream_get16(bs) == 0x0001) { /* We have an encoding */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1036 byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1037 outinfo->status_encoding = byte_stream_getstr(bs, byte_stream_get16(bs)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1038 } else { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1039 /* No explicit encoding, client should use UTF-8 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1040 outinfo->status_encoding = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1041 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1042 } else { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1043 byte_stream_advance(bs, length2); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1044 outinfo->status_len = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1045 outinfo->status = g_strdup(""); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1046 outinfo->status_encoding = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1047 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1048 } break; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1049 |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1050 case 0x0009: { /* An iTunes Music Store link */ |
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:
16318
diff
changeset
|
1051 g_free(outinfo->itmsurl); |
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:
16318
diff
changeset
|
1052 g_free(outinfo->itmsurl_encoding); |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1053 if (length2 >= 4) { |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1054 outinfo->itmsurl_len = byte_stream_get16(bs); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1055 outinfo->itmsurl = byte_stream_getstr(bs, outinfo->itmsurl_len); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1056 if (byte_stream_get16(bs) == 0x0001) { |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1057 /* We have an encoding */ |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1058 byte_stream_get16(bs); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1059 outinfo->itmsurl_encoding = byte_stream_getstr(bs, byte_stream_get16(bs)); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1060 } else { |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1061 /* No explicit encoding, client should use UTF-8 */ |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1062 outinfo->itmsurl_encoding = NULL; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1063 } |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1064 } else { |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1065 byte_stream_advance(bs, length2); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1066 outinfo->itmsurl_len = 0; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1067 outinfo->itmsurl = g_strdup(""); |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1068 outinfo->itmsurl_encoding = NULL; |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1069 } |
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1070 } break; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1071 |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1072 case 0x000e: { /* ICQ mood */ |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1073 PurpleAccount *account = purple_connection_get_account(od->gc); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1074 char *icqmood; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1075 gint32 i; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1076 const char *mood = NULL; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1077 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1078 icqmood = byte_stream_getstr(bs, length2); |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1079 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1080 /* icqmood = "" means X-Status |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1081 * with no mood icon. */ |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1082 if (*icqmood) { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1083 for (i = 0; icqmoods[i].icqmood; i++) { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1084 if (!strcmp(icqmood, icqmoods[i].icqmood)) { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1085 mood = icqmoods[i].mood; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1086 break; /* should only match once... */ |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1087 } |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1088 } |
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1089 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1090 if (!mood) |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1091 purple_debug_warning("oscar", "Unknown icqmood: %s\n", icqmood); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1092 } |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1093 g_free(icqmood); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1094 |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1095 if (mood) |
29854 | 1096 purple_prpl_got_user_status(account, outinfo->bn, "mood", |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1097 PURPLE_MOOD_NAME, mood, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1098 NULL); |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1099 else |
29854 | 1100 purple_prpl_got_user_status_deactive(account, outinfo->bn, "mood"); |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1101 } break; |
18617
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1102 } |
16318
1560f28cb854
Add the iTunes Music Store url to the GaimPresence for buddies onyour
Mark Doliner <mark@kingant.net>
parents:
15823
diff
changeset
|
1103 |
18617
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1104 /* Save ourselves. */ |
f79b6bb6bb5f
Another stab at fixing that signon infinite loop
Mark Doliner <mark@kingant.net>
parents:
18616
diff
changeset
|
1105 byte_stream_setpos(bs, endpos2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1106 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1107 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1108 } else if (type == 0x001e) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1109 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1110 * Always four bytes, but it doesn't look like an int. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1111 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1112 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1113 } else if (type == 0x001f) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1114 /* |
28590
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1115 * Upper bytes of user flags. Can be any size |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1116 * |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1117 * Seen on a buddy using DeadAIM. Data was 4 bytes: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1118 * 0x00 00 00 10 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1119 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1120 |
28590
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1121 } else if (type == 0x0023) { |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1122 /* |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1123 * Last Buddy Feed update time, in seconds since the epoch. |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1124 */ |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1125 |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1126 } else if (type == 0x0026) { |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1127 /* |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1128 * Time that the profile was set, in seconds since the epoch. |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1129 */ |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1130 |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1131 } else if (type == 0x0027) { |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1132 /* |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1133 * Time that the away message was set, in seconds since the epoch. |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1134 */ |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1135 |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1136 } else if (type == 0x002a) { |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1137 /* |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1138 * Country code based on GeoIP data. |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1139 */ |
a0bff269046a
A little more detail from the AIM docs
Mark Doliner <mark@kingant.net>
parents:
28345
diff
changeset
|
1140 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1141 } else { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1142 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1143 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1144 * Reaching here indicates that either AOL has |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1145 * added yet another TLV for us to deal with, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1146 * or the parsing has gone Terribly Wrong. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1147 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1148 * Either way, inform the owner and attempt |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1149 * recovery. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1150 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1151 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1152 #ifdef LOG_UNKNOWN_TLV |
15823 | 1153 purple_debug_misc("oscar", "userinfo: **warning: unexpected TLV:\n"); |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1154 purple_debug_misc("oscar", "userinfo: bn =%s\n", outinfo->bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1155 dumptlv(od, type, bs, length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1156 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1157 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1158 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1159 /* Save ourselves. */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1160 byte_stream_setpos(bs, endpos); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1161 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1162 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1163 aim_locate_adduserinfo(od, outinfo); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1164 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1165 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1166 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1167 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1168 /* Apparently, this is never called. |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1169 * If you activate it, figure out a way to know what mood to pass to |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1170 * aim_tlvlist_add_caps() below. --rlaager */ |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1171 #if 0 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1172 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1173 * Inverse of aim_info_extract() |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1174 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1175 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1176 aim_putuserinfo(ByteStream *bs, aim_userinfo_t *info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1177 { |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1178 GSList *tlvlist = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1179 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1180 if (!bs || !info) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1181 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1182 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1183 byte_stream_put8(bs, strlen(info->bn)); |
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1184 byte_stream_putstr(bs, info->bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1185 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1186 byte_stream_put16(bs, info->warnlevel); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1187 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1188 if (info->present & AIM_USERINFO_PRESENT_FLAGS) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1189 aim_tlvlist_add_16(&tlvlist, 0x0001, info->flags); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1190 if (info->present & AIM_USERINFO_PRESENT_MEMBERSINCE) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1191 aim_tlvlist_add_32(&tlvlist, 0x0002, info->membersince); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1192 if (info->present & AIM_USERINFO_PRESENT_ONLINESINCE) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1193 aim_tlvlist_add_32(&tlvlist, 0x0003, info->onlinesince); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1194 if (info->present & AIM_USERINFO_PRESENT_IDLE) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1195 aim_tlvlist_add_16(&tlvlist, 0x0004, info->idletime); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1196 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1197 /* XXX - So, ICQ_OSCAR_SUPPORT is never defined anywhere... */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1198 #ifdef ICQ_OSCAR_SUPPORT |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1199 if (atoi(info->bn) != 0) { |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1200 if (info->present & AIM_USERINFO_PRESENT_ICQEXTSTATUS) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1201 aim_tlvlist_add_16(&tlvlist, 0x0006, info->icqinfo.status); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1202 if (info->present & AIM_USERINFO_PRESENT_ICQIPADDR) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1203 aim_tlvlist_add_32(&tlvlist, 0x000a, info->icqinfo.ipaddr); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1204 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1205 #endif |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1206 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1207 if (info->present & AIM_USERINFO_PRESENT_CAPABILITIES) { |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1208 aim_tlvlist_add_caps(&tlvlist, 0x000d, info->capabilities, NULL); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1209 } |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1210 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1211 if (info->present & AIM_USERINFO_PRESENT_SESSIONLEN) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1212 aim_tlvlist_add_32(&tlvlist, (guint16)((info->flags & AIM_FLAG_AOL) ? 0x0010 : 0x000f), info->sessionlen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1213 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1214 byte_stream_put16(bs, aim_tlvlist_count(tlvlist)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1215 aim_tlvlist_write(bs, &tlvlist); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1216 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1217 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1218 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1219 } |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1220 #endif |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1221 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1222 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1223 * Subtype 0x0001 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1224 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1225 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1226 error(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
|
1227 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1228 int ret = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1229 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1230 aim_snac_t *snac2; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1231 guint16 reason; |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1232 char *bn; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1233 |
30406
f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
Mark Doliner <mark@kingant.net>
parents:
30007
diff
changeset
|
1234 snac2 = aim_remsnac(od, snac->id); |
f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
Mark Doliner <mark@kingant.net>
parents:
30007
diff
changeset
|
1235 if (!snac2) { |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1236 purple_debug_misc("oscar", "locate error: received response from unknown request!\n"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1237 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1238 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1239 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1240 if ((snac2->family != SNAC_FAMILY_LOCATE) && (snac2->type != 0x0015)) { |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1241 purple_debug_misc("oscar", "locate error: received response from invalid request! %d\n", snac2->family); |
26825
f1b92f2ea41f
fixes one more potential leak of the same type
Ka-Hing Cheung <khc@hxbc.us>
parents:
25416
diff
changeset
|
1242 g_free(snac2->data); |
f1b92f2ea41f
fixes one more potential leak of the same type
Ka-Hing Cheung <khc@hxbc.us>
parents:
25416
diff
changeset
|
1243 g_free(snac2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1244 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1245 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1246 |
30406
f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
Mark Doliner <mark@kingant.net>
parents:
30007
diff
changeset
|
1247 bn = snac2->data; |
f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
Mark Doliner <mark@kingant.net>
parents:
30007
diff
changeset
|
1248 if (!bn) { |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1249 purple_debug_misc("oscar", "locate error: received response from request without a buddy name!\n"); |
26825
f1b92f2ea41f
fixes one more potential leak of the same type
Ka-Hing Cheung <khc@hxbc.us>
parents:
25416
diff
changeset
|
1250 g_free(snac2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1251 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1252 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1253 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1254 reason = byte_stream_get16(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1255 |
28345
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1256 /* Notify the user that we do not have info for this buddy */ |
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1257 if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) |
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1258 ret = userfunc(od, conn, frame, reason, bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1259 |
30406
f18b6eb0ed02
Cleanup, basically. Move the icbm snac error handling from oscar.c to
Mark Doliner <mark@kingant.net>
parents:
30007
diff
changeset
|
1260 g_free(snac2->data); |
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:
16318
diff
changeset
|
1261 g_free(snac2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1262 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1263 return ret; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1264 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1265 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1266 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1267 * Subtype 0x0002 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1268 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1269 * Request Location services rights. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1270 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1271 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1272 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1273 aim_locate_reqrights(OscarData *od) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1274 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1275 FlapConnection *conn; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1276 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1277 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1278 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1279 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1280 aim_genericreq_n_snacid(od, conn, SNAC_FAMILY_LOCATE, SNAC_SUBTYPE_LOCATE_REQRIGHTS); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1281 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1282 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1283 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1284 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1285 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1286 * Subtype 0x0003 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1287 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1288 * Normally contains: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1289 * t(0001) - short containing max profile length (value = 1024) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1290 * t(0002) - short - unknown (value = 16) [max MIME type length?] |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1291 * t(0003) - short - unknown (value = 10) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1292 * t(0004) - short - unknown (value = 2048) [ICQ only?] |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1293 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1294 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1295 rights(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
|
1296 { |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1297 GSList *tlvlist; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1298 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1299 int ret = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1300 guint16 maxsiglen = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1301 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1302 tlvlist = aim_tlvlist_read(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1303 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1304 if (aim_tlv_gettlv(tlvlist, 0x0001, 1)) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1305 maxsiglen = aim_tlv_get16(tlvlist, 0x0001, 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1306 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1307 if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1308 ret = userfunc(od, conn, frame, maxsiglen); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1309 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1310 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1311 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1312 return ret; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1313 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1314 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1315 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1316 * Subtype 0x0004 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1317 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1318 * Gives BOS your profile. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1319 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1320 * profile_encoding and awaymsg_encoding MUST be set if profile or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1321 * away are set, respectively, and their value may or may not be |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1322 * restricted to a few choices. I am currently aware of: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1323 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1324 * us-ascii Just that |
22424
7b4d39ffd563
Change OSCAR to use UTF-16 rather than UCS-2 conversions. Apparently
Ethan Blanton <elb@pidgin.im>
parents:
22126
diff
changeset
|
1325 * unicode-2-0 UTF-16BE |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1326 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1327 * profile_len and awaymsg_len MUST be set similarly, and they MUST |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1328 * be the length of their respective strings in bytes. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1329 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1330 * To get the previous behavior of awaymsg == "" un-setting the away |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1331 * message, set awaymsg non-NULL and awaymsg_len to 0 (this is the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1332 * obvious equivalent). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1333 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1334 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1335 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1336 aim_locate_setprofile(OscarData *od, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1337 const char *profile_encoding, const gchar *profile, const int profile_len, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1338 const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1339 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1340 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1341 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1342 aim_snacid_t snacid; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1343 GSList *tlvlist = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1344 char *encoding; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1345 static const char defencoding[] = {"text/aolrtf; charset=\"%s\""}; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1346 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1347 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1348 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1349 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1350 if (!profile && !awaymsg) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1351 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1352 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1353 if ((profile && profile_encoding == NULL) || (awaymsg && awaymsg_len && awaymsg_encoding == NULL)) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1354 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1355 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1356 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1357 /* Build the packet first to get real length */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1358 if (profile) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1359 /* no + 1 here because of %s */ |
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:
16318
diff
changeset
|
1360 encoding = g_malloc(strlen(defencoding) + strlen(profile_encoding)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1361 snprintf(encoding, strlen(defencoding) + strlen(profile_encoding), defencoding, profile_encoding); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1362 aim_tlvlist_add_str(&tlvlist, 0x0001, encoding); |
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1363 aim_tlvlist_add_raw(&tlvlist, 0x0002, profile_len, (const guchar *)profile); |
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:
16318
diff
changeset
|
1364 g_free(encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1365 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1366 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1367 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1368 * So here's how this works: |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1369 * - You are away when you have a non-zero-length type 4 TLV stored. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1370 * - You become unaway when you clear the TLV with a zero-length |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1371 * type 4 TLV. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1372 * - If you do not send the type 4 TLV, your status does not change |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1373 * (that is, if you were away, you'll remain away). |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1374 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1375 if (awaymsg) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1376 if (awaymsg_len) { |
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:
16318
diff
changeset
|
1377 encoding = g_malloc(strlen(defencoding) + strlen(awaymsg_encoding)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1378 snprintf(encoding, strlen(defencoding) + strlen(awaymsg_encoding), defencoding, awaymsg_encoding); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1379 aim_tlvlist_add_str(&tlvlist, 0x0003, encoding); |
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1380 aim_tlvlist_add_raw(&tlvlist, 0x0004, awaymsg_len, (const guchar *)awaymsg); |
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:
16318
diff
changeset
|
1381 g_free(encoding); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1382 } else |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1383 aim_tlvlist_add_noval(&tlvlist, 0x0004); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1384 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1385 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1386 byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1387 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1388 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1389 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1390 aim_tlvlist_write(&bs, &tlvlist); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1391 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1392 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1393 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1394 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1395 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1396 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1397 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1398 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1399 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1400 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1401 * Subtype 0x0004 - Set your client's capabilities. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1402 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1403 int |
30007
0d3145e6b1d6
Change the oscar capabilities variable to be a guint64 everywhere instead
Mark Doliner <mark@kingant.net>
parents:
29854
diff
changeset
|
1404 aim_locate_setcaps(OscarData *od, guint64 caps) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1405 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1406 FlapConnection *conn; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1407 PurpleAccount *account = purple_connection_get_account(od->gc); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1408 PurplePresence *presence = purple_account_get_presence(account); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1409 PurpleStatus *status = purple_presence_get_status(presence, "mood"); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1410 const char *mood = purple_status_get_attr_string(status, PURPLE_MOOD_NAME); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1411 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1412 aim_snacid_t snacid; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1413 GSList *tlvlist = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1414 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1415 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1416 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1417 |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1418 aim_tlvlist_add_caps(&tlvlist, 0x0005, caps, mood); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1419 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1420 byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1421 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1422 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1423 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1424 aim_tlvlist_write(&bs, &tlvlist); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1425 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1426 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1427 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0004, 0x0000, snacid, &bs); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1428 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1429 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1430 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1431 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1432 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1433 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1434 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1435 * Subtype 0x0005 - Request info of another AIM user. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1436 * |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1437 * @param bn The buddy name whose info you wish to request. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1438 * @param infotype The type of info you wish to request. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1439 * 0x0001 - Info/profile |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1440 * 0x0003 - Away message |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1441 * 0x0004 - Capabilities |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1442 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1443 int |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1444 aim_locate_getinfo(OscarData *od, const char *bn, guint16 infotype) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1445 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1446 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1447 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1448 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1449 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1450 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)) || !bn) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1451 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1452 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1453 byte_stream_new(&bs, 2+1+strlen(bn)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1454 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1455 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1456 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1457 byte_stream_put16(&bs, infotype); |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1458 byte_stream_put8(&bs, strlen(bn)); |
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1459 byte_stream_putstr(&bs, bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1460 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1461 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0005, 0x0000, snacid, &bs); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1462 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1463 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1464 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1465 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1466 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1467 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1468 /* Subtype 0x0006 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1469 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1470 userinfo(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
|
1471 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1472 int ret = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1473 aim_rxcallback_t userfunc; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1474 aim_userinfo_t *userinfo, *userinfo2; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1475 GSList *tlvlist; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1476 aim_tlv_t *tlv = NULL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1477 |
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:
16318
diff
changeset
|
1478 userinfo = (aim_userinfo_t *)g_malloc(sizeof(aim_userinfo_t)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1479 aim_info_extract(od, bs, userinfo); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1480 tlvlist = aim_tlvlist_read(bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1481 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1482 /* Profile will be 1 and 2 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1483 userinfo->info_encoding = aim_tlv_getstr(tlvlist, 0x0001, 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1484 if ((tlv = aim_tlv_gettlv(tlvlist, 0x0002, 1))) { |
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:
16318
diff
changeset
|
1485 userinfo->info = (char *)g_malloc(tlv->length); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1486 memcpy(userinfo->info, tlv->value, tlv->length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1487 userinfo->info_len = tlv->length; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1488 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1489 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1490 /* Away message will be 3 and 4 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1491 userinfo->away_encoding = aim_tlv_getstr(tlvlist, 0x0003, 1); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1492 if ((tlv = aim_tlv_gettlv(tlvlist, 0x0004, 1))) { |
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:
16318
diff
changeset
|
1493 userinfo->away = (char *)g_malloc(tlv->length); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1494 memcpy(userinfo->away, tlv->value, tlv->length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1495 userinfo->away_len = tlv->length; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1496 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1497 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1498 /* Caps will be 5 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1499 if ((tlv = aim_tlv_gettlv(tlvlist, 0x0005, 1))) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1500 ByteStream cbs; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1501 PurpleAccount *account = purple_connection_get_account(od->gc); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1502 const char *mood; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1503 |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1504 byte_stream_init(&cbs, tlv->value, tlv->length); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1505 userinfo->capabilities = aim_locate_getcaps(od, &cbs, tlv->length); |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1506 byte_stream_rewind(&cbs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1507 userinfo->present = AIM_USERINFO_PRESENT_CAPABILITIES; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1508 |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1509 mood = aim_receive_custom_icon(od, &cbs, tlv->length); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1510 if (mood) |
29854 | 1511 purple_prpl_got_user_status(account, userinfo->bn, "mood", |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1512 PURPLE_MOOD_NAME, mood, |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1513 NULL); |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1514 else |
29854 | 1515 purple_prpl_got_user_status_deactive(account, userinfo->bn, "mood"); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1516 } |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1517 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1518 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1519 aim_locate_adduserinfo(od, userinfo); |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1520 userinfo2 = aim_locate_finduserinfo(od, userinfo->bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1521 aim_info_free(userinfo); |
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:
16318
diff
changeset
|
1522 g_free(userinfo); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1523 |
28345
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1524 /* Show the info to the user */ |
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1525 if (userinfo2 != NULL && ((userfunc = aim_callhandler(od, snac->family, snac->subtype)))) |
de7bbdcb695b
Stop attempting to fetch oscar buddy info automatically for people on our
Mark Doliner <mark@kingant.net>
parents:
28073
diff
changeset
|
1526 ret = userfunc(od, conn, frame, userinfo2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1527 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1528 return ret; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1529 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1530 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1531 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1532 * Subtype 0x0009 - Set directory profile data. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1533 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1534 * This is not the same as aim_location_setprofile! |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1535 * privacy: 1 to allow searching, 0 to disallow. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1536 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1537 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1538 int aim_locate_setdirinfo(OscarData *od, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1539 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1540 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1541 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1542 aim_snacid_t snacid; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1543 GSList *tlvlist = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1544 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1545 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1546 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1547 |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1548 aim_tlvlist_add_16(&tlvlist, 0x000a, privacy); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1549 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1550 if (first) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1551 aim_tlvlist_add_str(&tlvlist, 0x0001, first); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1552 if (last) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1553 aim_tlvlist_add_str(&tlvlist, 0x0002, last); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1554 if (middle) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1555 aim_tlvlist_add_str(&tlvlist, 0x0003, middle); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1556 if (maiden) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1557 aim_tlvlist_add_str(&tlvlist, 0x0004, maiden); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1558 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1559 if (state) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1560 aim_tlvlist_add_str(&tlvlist, 0x0007, state); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1561 if (city) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1562 aim_tlvlist_add_str(&tlvlist, 0x0008, city); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1563 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1564 if (nickname) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1565 aim_tlvlist_add_str(&tlvlist, 0x000c, nickname); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1566 if (zip) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1567 aim_tlvlist_add_str(&tlvlist, 0x000d, zip); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1568 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1569 if (street) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1570 aim_tlvlist_add_str(&tlvlist, 0x0021, street); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1571 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1572 byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1573 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1574 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1575 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1576 aim_tlvlist_write(&bs, &tlvlist); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1577 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1578 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1579 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x0009, 0x0000, snacid, &bs); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1580 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1581 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1582 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1583 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1584 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1585 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1586 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1587 * Subtype 0x000b - Huh? What is this? |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1588 */ |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1589 int aim_locate_000b(OscarData *od, const char *bn) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1590 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1591 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1592 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1593 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1594 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1595 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1596 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1597 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)) || !bn) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1598 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1599 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1600 byte_stream_new(&bs, 1+strlen(bn)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1601 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1602 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1603 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1604 byte_stream_put8(&bs, strlen(bn)); |
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1605 byte_stream_putstr(&bs, bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1606 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1607 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000b, 0x0000, snacid, &bs); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1608 |
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1609 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1610 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1611 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1612 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1613 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1614 /* |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1615 * Subtype 0x000f |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1616 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1617 * XXX pass these in better |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1618 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1619 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1620 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1621 aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1622 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1623 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1624 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1625 aim_snacid_t snacid; |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1626 GSList *tlvlist = NULL; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1627 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1628 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE))) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1629 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1630 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1631 /* ?? privacy ?? */ |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1632 aim_tlvlist_add_16(&tlvlist, 0x000a, privacy); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1633 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1634 if (interest1) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1635 aim_tlvlist_add_str(&tlvlist, 0x0000b, interest1); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1636 if (interest2) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1637 aim_tlvlist_add_str(&tlvlist, 0x0000b, interest2); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1638 if (interest3) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1639 aim_tlvlist_add_str(&tlvlist, 0x0000b, interest3); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1640 if (interest4) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1641 aim_tlvlist_add_str(&tlvlist, 0x0000b, interest4); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1642 if (interest5) |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1643 aim_tlvlist_add_str(&tlvlist, 0x0000b, interest5); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1644 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1645 byte_stream_new(&bs, aim_tlvlist_size(tlvlist)); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1646 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1647 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, NULL, 0); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1648 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1649 aim_tlvlist_write(&bs, &tlvlist); |
17445
f80f7e1047be
Cleanup and simplification of some tlvlist stuff in the oscar protocol.
Mark Doliner <mark@kingant.net>
parents:
17235
diff
changeset
|
1650 aim_tlvlist_free(tlvlist); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1651 |
23315
9c0ee2491ed1
Replaced family_*'s magic numbers of FLAP families with the constants
Evan Schoenberg <evan.s@dreskin.net>
parents:
22829
diff
changeset
|
1652 flap_connection_send_snac(od, conn, SNAC_FAMILY_LOCATE, 0x000f, 0x0000, snacid, &bs); |
22829
ab2322195dab
Minor changes... mostly whitespace related.
Mark Doliner <mark@kingant.net>
parents:
22700
diff
changeset
|
1653 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1654 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1655 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1656 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1657 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1658 /* |
22604 | 1659 * Subtype 0x0015 - Request the info of a user using the short method. This is |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1660 * what iChat uses. It normally is VERY leniently rate limited. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1661 * |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1662 * @param bn The buddy name whose info you wish to request. |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1663 * @param flags The bitmask which specifies the type of info you wish to request. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1664 * 0x00000001 - Info/profile. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1665 * 0x00000002 - Away message. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1666 * 0x00000004 - Capabilities. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1667 * 0x00000008 - Certification. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1668 * @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
|
1669 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1670 int |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1671 aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1672 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1673 FlapConnection *conn; |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1674 ByteStream bs; |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1675 aim_snacid_t snacid; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1676 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1677 if (!od || !(conn = flap_connection_findbygroup(od, SNAC_FAMILY_LOCATE)) || !bn) |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1678 return -EINVAL; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1679 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1680 byte_stream_new(&bs, 4 + 1 + strlen(bn)); |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1681 byte_stream_put32(&bs, flags); |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1682 byte_stream_put8(&bs, strlen(bn)); |
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1683 byte_stream_putstr(&bs, bn); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1684 |
25416
6e1967b0f90b
Change "screen name" to "username" or "buddy name" in a whole bunch of
Mark Doliner <mark@kingant.net>
parents:
25415
diff
changeset
|
1685 snacid = aim_cachesnac(od, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, bn, strlen(bn)+1); |
23626
8c480872b620
Get rid of a few low priority "high priority" comments
Mark Doliner <mark@kingant.net>
parents:
23613
diff
changeset
|
1686 flap_connection_send_snac_with_priority(od, conn, SNAC_FAMILY_LOCATE, 0x0015, 0x0000, snacid, &bs, FALSE); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1687 |
22700
979a81468e19
All SNACs on FLAP channel 2 except in the auth family are now sent through
Evan Schoenberg <evan.s@dreskin.net>
parents:
22604
diff
changeset
|
1688 byte_stream_destroy(&bs); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1689 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1690 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1691 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1692 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1693 static int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1694 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
|
1695 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1696 if (snac->subtype == 0x0001) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1697 return error(od, conn, mod, frame, snac, bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1698 else if (snac->subtype == 0x0003) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1699 return rights(od, conn, mod, frame, snac, bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1700 else if (snac->subtype == 0x0006) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1701 return userinfo(od, conn, mod, frame, snac, bs); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1702 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1703 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1704 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1705 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1706 static void |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1707 locate_shutdown(OscarData *od, aim_module_t *mod) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1708 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1709 aim_userinfo_t *del; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1710 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1711 while (od->locate.userinfo) { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1712 del = od->locate.userinfo; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1713 od->locate.userinfo = od->locate.userinfo->next; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1714 aim_info_free(del); |
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:
16318
diff
changeset
|
1715 g_free(del); |
15374
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1716 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1717 } |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1718 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1719 int |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1720 locate_modfirst(OscarData *od, aim_module_t *mod) |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1721 { |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1722 mod->family = SNAC_FAMILY_LOCATE; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1723 mod->version = 0x0001; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1724 mod->toolid = 0x0110; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1725 mod->toolversion = 0x0629; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1726 mod->flags = 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1727 strncpy(mod->name, "locate", sizeof(mod->name)); |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1728 mod->snachandler = snachandler; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1729 mod->shutdown = locate_shutdown; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1730 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1731 return 0; |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1732 } |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1733 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1734 #if 0 //rlaager |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1735 const char* aim_get_custom_icon_mood(gint32 no) |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1736 { |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1737 if (no >= G_N_ELEMENTS(aim_custom_icons) || no < 1) |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1738 return NULL; |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1739 return aim_custom_icons[no].mood.mood; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1740 } |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1741 #endif |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1742 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1743 const char* |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1744 icq_get_custom_icon_description(const char *mood) |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1745 { |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1746 int i; |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1747 |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1748 if (!(mood && *mood)) |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1749 return NULL; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1750 |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1751 for (i = 0; icq_custom_icons[i].mood; i++) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1752 /* We check that description is not NULL to exclude |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1753 * duplicates, like the typing duplicate. */ |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1754 if (icq_purple_moods[i].description && |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1755 !strcmp(mood, icq_custom_icons[i].mood)) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1756 return icq_purple_moods[i].description; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1757 } |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1758 } |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1759 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1760 return NULL; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1761 } |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1762 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1763 guint8* |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1764 icq_get_custom_icon_data(const char *mood) |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1765 { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1766 int i; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1767 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1768 if (!(mood && *mood)) |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1769 return NULL; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1770 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1771 for (i = 0; icq_custom_icons[i].mood; i++) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1772 /* We check that description is not NULL to exclude |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1773 * duplicates, like the typing duplicate. */ |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1774 if (icq_purple_moods[i].description && |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1775 !strcmp(mood, icq_custom_icons[i].mood)) { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1776 return (guint8 *)icq_custom_icons[i].data; |
29829
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1777 } |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1778 } |
11cb7f2bb6e8
Add a PURPLE_STATUS_MOOD primitive and change ICQ to use it.
Richard Laager <rlaager@wiktel.com>
parents:
29823
diff
changeset
|
1779 return NULL; |
29812
365b90fa23cf
This patch comes from the combined work of contributors minstrel, NightFox,
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
23675
diff
changeset
|
1780 } |
29834
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1781 |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1782 PurpleMood* |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1783 icq_get_purple_moods(PurpleAccount *account) |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1784 { |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1785 return icq_purple_moods; |
1fb503adb2ae
Move the mood UI for ICQ into Pidgin. It still uses the new request API
Richard Laager <rlaager@wiktel.com>
parents:
29830
diff
changeset
|
1786 } |