annotate libpurple/protocols/yahoo/yahoo.h @ 26920:c9ac5cc1e46c

Fix a crash when <NICKNAME/> is present in a vcard, but has no data. Fixes MacinEnterprise's crash on Adium#12053 (unrelated to the rest of the ticket).
author Paul Aurich <paul@darkrain42.org>
date Wed, 20 May 2009 15:59:04 +0000
parents 6ddb4932772a
children 3fd5f2bccd68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file yahoo.h The Yahoo! protocol plugin
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
4 * purple
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * This program 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
16 * 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
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * GNU General Public License for more details.
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 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
19681
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19554
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 #ifndef _YAHOO_H_
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
26 #define _YAHOO_H_
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 #include "circbuffer.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
29 #include "prpl.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 #define YAHOO_PAGER_HOST "scs.msg.yahoo.com"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 #define YAHOO_PAGER_PORT 5050
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
33 #define YAHOO_PAGER_PORT_P2P 5101
26825
53d4b3a1c80f Whitespace, syntatic sugar, move the URLs to yahoo.h, and escape the token-fetching URL parameters.
Paul Aurich <paul@darkrain42.org>
parents: 26824
diff changeset
34 #define YAHOO_LOGIN_URL "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%s"
53d4b3a1c80f Whitespace, syntatic sugar, move the URLs to yahoo.h, and escape the token-fetching URL parameters.
Paul Aurich <paul@darkrain42.org>
parents: 26824
diff changeset
35 #define YAHOO_TOKEN_URL "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%s&passwd=%s&chal=%s"
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
36 #define YAHOO_P2P_KEEPALIVE_SECS 300
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
37 #define YAHOO_P2P_SERVER_TIMEOUT 10
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/"
26892
aa341c72f29f Open a logged in Yahoo Mail instead of the login screen when possible.
Luke Bratch <l_bratch@yahoo.co.uk>
parents: 26162
diff changeset
39 #define YAHOO_MAIL_URL "http://rd.yahoo.com/messenger/client/?http://mail.yahoo.com/"
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 #define YAHOO_XFER_PORT 80
22018
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
42 #define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com"
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
43 #define YAHOO_XFER_RELAY_PORT 80
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 #define YAHOO_ROOMLIST_LOCALE "us"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46 /* really we should get the list of servers from
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 http://update.messenger.yahoo.co.jp/servers.html */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp"
26825
53d4b3a1c80f Whitespace, syntatic sugar, move the URLs to yahoo.h, and escape the token-fetching URL parameters.
Paul Aurich <paul@darkrain42.org>
parents: 26824
diff changeset
49 #define YAHOOJP_TOKEN_URL "https://login.yahoo.co.jp/config/pwtoken_get?src=ymsgr&ts=&login=%s&passwd=%s&chal=%s"
53d4b3a1c80f Whitespace, syntatic sugar, move the URLs to yahoo.h, and escape the token-fetching URL parameters.
Paul Aurich <paul@darkrain42.org>
parents: 26824
diff changeset
50 #define YAHOOJP_LOGIN_URL "https://login.yahoo.co.jp/config/pwtoken_login?src=ymsgr&ts=&token=%s"
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
51 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp"
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
55 /* not sure, must test: */
22271
cc5b2a145652 Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22238
diff changeset
56 #define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp"
22018
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
57 #define YAHOOJP_XFER_RELAY_PORT 80
22091
02fc6697f38c From what little I could see, it appears that for Yahoo Japan there is only
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22018
diff changeset
58 #define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/"
02fc6697f38c From what little I could see, it appears that for Yahoo Japan there is only
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22018
diff changeset
59 #define YAHOOJP_ROOMLIST_LOCALE "ja"
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
61 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
62
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
63 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
65 #define YAHOO_SMS_CARRIER_URL "http://lookup.msg.vip.mud.yahoo.com"
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
66
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 #define YAHOO_PICURL_SETTING "picture_url"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 #define YAHOO_PICCKSUM_SETTING "picture_checksum"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 #define YAHOO_PICEXPIRE_SETTING "picture_expire"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 #define YAHOO_STATUS_TYPE_OFFLINE "offline"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 #define YAHOO_STATUS_TYPE_AVAILABLE "available"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73 #define YAHOO_STATUS_TYPE_BRB "brb"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 #define YAHOO_STATUS_TYPE_BUSY "busy"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 #define YAHOO_STATUS_TYPE_NOTATHOME "notathome"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 #define YAHOO_STATUS_TYPE_NOTATDESK "notatdesk"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 #define YAHOO_STATUS_TYPE_NOTINOFFICE "notinoffice"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 #define YAHOO_STATUS_TYPE_ONPHONE "onphone"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 #define YAHOO_STATUS_TYPE_ONVACATION "onvacation"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 #define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 #define YAHOO_STATUS_TYPE_AWAY "away"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
83 #define YAHOO_STATUS_TYPE_INVISIBLE "invisible"
15524
2193394fd427 Yahoo mobile status
Sean Egan <seanegan@gmail.com>
parents: 15373
diff changeset
84 #define YAHOO_STATUS_TYPE_MOBILE "mobile"
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85
26822
885320258863 Yahoo version 16 login. ---yet to do: prevent password from being displayed in debug logs---
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26162
diff changeset
86 #define YAHOO_CLIENT_VERSION_ID "4194239"
885320258863 Yahoo version 16 login. ---yet to do: prevent password from being displayed in debug logs---
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26162
diff changeset
87 #define YAHOO_CLIENT_VERSION "9.0.0.2152"
22271
cc5b2a145652 Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22238
diff changeset
88
26824
644606f508e6 Support logging into Yahoo! Japan with protocol 16. It seems not to care
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 26822
diff changeset
89 #define YAHOOJP_CLIENT_VERSION_ID "4194239"
644606f508e6 Support logging into Yahoo! Japan with protocol 16. It seems not to care
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 26822
diff changeset
90 #define YAHOOJP_CLIENT_VERSION "9.0.0.2152"
22271
cc5b2a145652 Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22238
diff changeset
91
26827
fac90dbe196d Various minor cleanups. The majority of this is the #define for the useragent.
Paul Aurich <paul@darkrain42.org>
parents: 26826
diff changeset
92 #define YAHOO_CLIENT_USERAGENT "Mozilla/4.0 (compatible; MSIE 5.5)"
fac90dbe196d Various minor cleanups. The majority of this is the #define for the useragent.
Paul Aurich <paul@darkrain42.org>
parents: 26826
diff changeset
93
19464
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
94 /* Index into attention types list. */
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
95 #define YAHOO_BUZZ 0
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
96
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
97 typedef enum {
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
98 YAHOO_PKT_TYPE_SERVER = 0,
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
99 YAHOO_PKT_TYPE_P2P
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
100 } yahoo_pkt_type;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
101
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
102 typedef enum {
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
103 YAHOO_P2P_WE_ARE_CLIENT =0,
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
104 YAHOO_P2P_WE_ARE_SERVER
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
105 } yahoo_p2p_connection_type;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
106
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 enum yahoo_status {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 YAHOO_STATUS_AVAILABLE = 0,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 YAHOO_STATUS_BRB,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 YAHOO_STATUS_BUSY,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 YAHOO_STATUS_NOTATHOME,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112 YAHOO_STATUS_NOTATDESK,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 YAHOO_STATUS_NOTINOFFICE,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 YAHOO_STATUS_ONPHONE,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 YAHOO_STATUS_ONVACATION,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 YAHOO_STATUS_OUTTOLUNCH,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 YAHOO_STATUS_STEPPEDOUT,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 YAHOO_STATUS_INVISIBLE = 12,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 YAHOO_STATUS_CUSTOM = 99,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 YAHOO_STATUS_IDLE = 999,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 YAHOO_STATUS_WEBLOGIN = 0x5a55aa55,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122 YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */
22018
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
123 YAHOO_STATUS_TYPING = 0x16,
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
124 YAHOO_STATUS_DISCONNECTED = 0xffffffff /* in ymsg 15. doesnt mean the normal sense of 'disconnected' */
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
125 };
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 struct yahoo_buddy_icon_upload_data {
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
128 PurpleConnection *gc;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 GString *str;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 char *filename;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131 int pos;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 int fd;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
133 guint watcher;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
134 };
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
136 struct yahoo_p2p_data {
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
137 PurpleConnection *gc;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
138 char *host_ip;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
139 char *host_username;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
140 int val_13;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
141 guint input_event;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
142 gint source;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
143 int session_id;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
144 yahoo_p2p_connection_type connection_type;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
145 };
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
146
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 struct _YchtConn;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 struct yahoo_data {
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
150 PurpleConnection *gc;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 int fd;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 guchar *rxqueue;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153 int rxlen;
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
154 PurpleCircBuffer *txbuf;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 guint txhandler;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
156 GHashTable *friends;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
157
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
158 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
159 * This is used to keep track of the IMVironment chosen
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
160 * by people you talk to. We don't do very much with
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
161 * this right now... but at least now if the remote user
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
162 * selects an IMVironment we won't reset it back to the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
163 * default of nothing.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
164 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
165 GHashTable *imvironments;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
166
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
167 int current_status;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
168 gboolean logged_in;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
169 GString *tmp_serv_blist, *tmp_serv_ilist, *tmp_serv_plist;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
170 GSList *confs;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171 unsigned int conf_id; /* just a counter */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
172 gboolean chat_online;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173 gboolean in_chat;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
174 char *chat_name;
19554
c07a9c6f0263 Fix yahoo chats again for their new super-duper-ultra-mega secure captcha stuff. "/join chat" still doesn't work, you need to use the roomlist because they now require the chat id to be set (the native client also has this problem). Fixes #2860.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 19464
diff changeset
175 char *pending_chat_room;
c07a9c6f0263 Fix yahoo chats again for their new super-duper-ultra-mega secure captcha stuff. "/join chat" still doesn't work, you need to use the roomlist because they now require the chat id to be set (the native client also has this problem). Fixes #2860.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 19464
diff changeset
176 char *pending_chat_id;
c07a9c6f0263 Fix yahoo chats again for their new super-duper-ultra-mega secure captcha stuff. "/join chat" still doesn't work, you need to use the roomlist because they now require the chat id to be set (the native client also has this problem). Fixes #2860.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 19464
diff changeset
177 char *pending_chat_topic;
c07a9c6f0263 Fix yahoo chats again for their new super-duper-ultra-mega secure captcha stuff. "/join chat" still doesn't work, you need to use the roomlist because they now require the chat id to be set (the native client also has this problem). Fixes #2860.
Daniel Atallah <daniel.atallah@gmail.com>
parents: 19464
diff changeset
178 char *pending_chat_goto;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 char *auth;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 gsize auth_written;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 char *cookie_y;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 char *cookie_t;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
183 int session_id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
184 gboolean jp;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 gboolean wm; /* connected w/ web messenger method */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
186 /* picture aka buddy icon stuff */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
187 char *picture_url;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 int picture_checksum;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
190 /* ew. we have to check the icon before we connect,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
191 * but can't upload it til we're connected. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
192 struct yahoo_buddy_icon_upload_data *picture_upload_todo;
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
193 PurpleProxyConnectData *buddy_icon_connect_data;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
194
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
195 struct _YchtConn *ycht;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
196
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
197 /**
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
198 * This linked list contains PurpleUtilFetchUrlData structs
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
199 * for when we lookup people profile or photo information.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
200 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 GSList *url_datas;
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
202 GHashTable *xfer_peer_idstring_map;/* Hey, i dont know, but putting this HashTable next to friends gives a run time fault... */
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
203 GSList *cookies;/* contains all cookies, including _y and _t */
22416
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
204
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
205 /**
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
206 * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting;
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
207 * the server expects us to keep track of the group for which it is sending us contact names.
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
208 */
0c098ebe9f16 Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evan.s@dreskin.net>
parents: 22271
diff changeset
209 char *current_list15_grp;
24171
b5210bb72273 Only send a yahoo ping once an hour. The server doesn't like it when send it
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23986
diff changeset
210 time_t last_ping;
b5210bb72273 Only send a yahoo ping once an hour. The server doesn't like it when send it
Daniel Atallah <daniel.atallah@gmail.com>
parents: 23986
diff changeset
211 time_t last_keepalive;
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
212 GHashTable *peers; /* information about p2p data */
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
213 int yahoo_p2p_timer;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
214 int yahoo_local_p2p_server_fd;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
215 int yahoo_p2p_server_watcher;
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
216 GHashTable *sms_carrier; /* sms carrier data */
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
217 guint yahoo_p2p_server_timeout_handle;
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
218 };
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 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
221
24400
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
222 /*
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
223 * Current Maximum Length for Instant Messages
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
224 *
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
225 * This was found by experiment.
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
226 *
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
227 * The YMSG protocol allows a message of up to 948 bytes, but the official client
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
228 * limits to 800 characters. According to experiments I conducted, it seems that
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
229 * the discrepancy is to allow some leeway for messages with mixed single- and
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
230 * multi-byte characters, as I was able to send messages of 840 and 932 bytes
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
231 * by using some multibyte characters (some random Chinese or Japanese characters,
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
232 * to be precise). - rekkanoryo
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
233 */
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
234 #define YAHOO_MAX_MESSAGE_LENGTH_BYTES 948
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
235 #define YAHOO_MAX_MESSAGE_LENGTH_CHARS 800
9e0458c98b4c This was originally a patch from Brian Geppert that corrected the 'silently
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 24171
diff changeset
236
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
237 /* sometimes i wish prpls could #include things from other prpls. then i could just
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
238 * use the routines from libfaim and not have to admit to knowing how they work. */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
239 #define yahoo_put16(buf, data) ( \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
240 (*(buf) = (unsigned char)((data)>>8)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
241 (*((buf)+1) = (unsigned char)(data)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
242 2)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
243 #define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
244 #define yahoo_put32(buf, data) ( \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
245 (*((buf)) = (unsigned char)((data)>>24)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
246 (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
247 (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
248 (*((buf)+3) = (unsigned char)(data)&0xff), \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
249 4)
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
250 #define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
251 (((*((buf)+1))<<16)&0x00ff0000) + \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
252 (((*((buf)+2))<< 8)&0x0000ff00) + \
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
253 (((*((buf)+3) )&0x000000ff)))
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
254
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
255 /* util.c */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
256 void yahoo_init_colorht(void);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
257 void yahoo_dest_colorht(void);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
258 char *yahoo_codes_to_html(const char *x);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
259 char *yahoo_html_to_codes(const char *src);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
260
23986
18a1f0fe5f40 Do a better job of detecting if the yahoo account is connecting through a HTTP
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22689
diff changeset
261 gboolean
18a1f0fe5f40 Do a better job of detecting if the yahoo account is connecting through a HTTP
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22689
diff changeset
262 yahoo_account_use_http_proxy(PurpleConnection *conn);
18a1f0fe5f40 Do a better job of detecting if the yahoo account is connecting through a HTTP
Daniel Atallah <daniel.atallah@gmail.com>
parents: 22689
diff changeset
263
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
264 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
265 * Encode some text to send to the yahoo server.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
266 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
267 * @param gc The connection handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
268 * @param str The null terminated utf8 string to encode.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
269 * @param utf8 If not @c NULL, whether utf8 is okay or not.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
270 * Even if it is okay, we may not use it. If we
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
271 * used it, we set this to @c TRUE, else to
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
272 * @c FALSE. If @c NULL, false is assumed, and
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
273 * it is not dereferenced.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
274 * @return The g_malloced string in the appropriate encoding.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
275 */
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
276 char *yahoo_string_encode(PurpleConnection *gc, const char *str, gboolean *utf8);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
277
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
278 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
279 * Decode some text received from the server.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
280 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
281 * @param gc The gc handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
282 * @param str The null terminated string to decode.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
283 * @param utf8 Did the server tell us it was supposed to be utf8?
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
284 * @return The decoded, utf-8 string, which must be g_free()'d.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
285 */
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
286 char *yahoo_string_decode(PurpleConnection *gc, const char *str, gboolean utf8);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
287
22123
840e7e1b6dac disapproval of revision '947ccb889812585e6d53eac13fc12734d8481e33'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22121
diff changeset
288 char *yahoo_convert_to_numeric(const char *str);
840e7e1b6dac disapproval of revision '947ccb889812585e6d53eac13fc12734d8481e33'
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 22121
diff changeset
289
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
290 /* previously-static functions, now needed for yahoo_profile.c */
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
291 void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
292
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
293 /* yahoo_profile.c */
15822
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15524
diff changeset
294 void yahoo_get_info(PurpleConnection *gc, const char *name);
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
295
22018
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
296 /* needed for xfer, thought theyd be useful for other enhancements later on
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
297 Returns list of cookies stored in yahoo_data formatted as a single null terminated string
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
298 returned value must be g_freed
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
299 */
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
300 gchar* yahoo_get_cookies(PurpleConnection *gc);
118046227581 This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan <madthanu@gmail.com>
parents: 22017
diff changeset
301
19464
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
302 gboolean yahoo_send_attention(PurpleConnection *gc, const char *username, guint type);
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
303 GList *yahoo_attention_types(PurpleAccount *account);
ca45543c11a3 Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeffrey Connelly <jaconnel@calpoly.edu>
parents: 16386
diff changeset
304
26156
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
305 /* send p2p pkt containing our encoded ip, asking peer to connect to us */
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
306 void yahoo_send_p2p_pkt(PurpleConnection *gc, const char *who, int val_13);
3e788c0db3a6 resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@soc.pidgin.im>
parents: 26154
diff changeset
307
15373
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
308 #endif /* _YAHOO_H_ */