Wed, 12 Nov 2008 10:23:13 +0000
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
| 6513 | 1 | /** |
| 2 | * @file yahoo.h The Yahoo! protocol plugin | |
| 3 | * | |
| 15884 | 4 | * purple |
| 6513 | 5 | * |
| 15884 | 6 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 8 | * source distribution. | |
| 6513 | 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify | |
| 11 | * it under the terms of the GNU General Public License as published by | |
| 12 | * the Free Software Foundation; either version 2 of the License, or | |
| 13 | * (at your option) any later version. | |
| 14 | * | |
| 15 | * This program is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19716
diff
changeset
|
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 6513 | 23 | */ |
| 24 | ||
| 25 | #ifndef _YAHOO_H_ | |
| 26 | #define _YAHOO_H_ | |
| 27 | ||
|
14013
86dac5633bd9
[gaim-migrate @ 16496]
Mark Doliner <markdoliner@pidgin.im>
parents:
13851
diff
changeset
|
28 | #include "circbuffer.h" |
| 6784 | 29 | #include "prpl.h" |
| 30 | ||
| 7883 | 31 | #define YAHOO_PAGER_HOST "scs.msg.yahoo.com" |
| 7827 | 32 | #define YAHOO_PAGER_PORT 5050 |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
33 | #define YAHOO_PAGER_PORT_P2P 5101 |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
34 | #define YAHOO_P2P_KEEPALIVE_SECS 300 |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
35 | #define YAHOO_P2P_SERVER_TIMEOUT 10 |
| 7827 | 36 | #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/" |
|
13689
70b7618b1916
[gaim-migrate @ 16090]
Richard Laager <rlaager@pidgin.im>
parents:
13201
diff
changeset
|
37 | #define YAHOO_MAIL_URL "https://login.yahoo.com/config/login?.src=ym" |
| 7651 | 38 | #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com" |
| 39 | #define YAHOO_XFER_PORT 80 | |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
40 | #define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com" |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
41 | #define YAHOO_XFER_RELAY_PORT 80 |
| 8113 | 42 | #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/" |
|
11160
c216000381d7
[gaim-migrate @ 13248]
Daniel Atallah <datallah@pidgin.im>
parents:
11046
diff
changeset
|
43 | #define YAHOO_ROOMLIST_LOCALE "us" |
| 9164 | 44 | /* really we should get the list of servers from |
| 45 | http://update.messenger.yahoo.co.jp/servers.html */ | |
| 46 | #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp" | |
| 9221 | 47 | #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/" |
| 48 | #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/" | |
| 9164 | 49 | #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp" |
| 50 | #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp" | |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
51 | /* not sure, must test: */ |
|
22401
5fe1761a4a15
Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22366
diff
changeset
|
52 | #define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp" |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
53 | #define YAHOOJP_XFER_RELAY_PORT 80 |
|
22220
e1ef8feb6199
From what little I could see, it appears that for Yahoo Japan there is only
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22202
diff
changeset
|
54 | #define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/" |
|
e1ef8feb6199
From what little I could see, it appears that for Yahoo Japan there is only
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22202
diff
changeset
|
55 | #define YAHOOJP_ROOMLIST_LOCALE "ja" |
| 9164 | 56 | |
|
12798
f8d553043aee
[gaim-migrate @ 15145]
Peter Lawler <pidgin@bleeter.id.au>
parents:
12323
diff
changeset
|
57 | #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud" |
|
f8d553043aee
[gaim-migrate @ 15145]
Peter Lawler <pidgin@bleeter.id.au>
parents:
12323
diff
changeset
|
58 | |
| 7134 | 59 | #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" |
| 60 | ||
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
61 | #define YAHOO_SMS_CARRIER_URL "http://lookup.msg.vip.mud.yahoo.com" |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
62 | |
| 9306 | 63 | #define YAHOO_PICURL_SETTING "picture_url" |
| 64 | #define YAHOO_PICCKSUM_SETTING "picture_checksum" | |
| 65 | #define YAHOO_PICEXPIRE_SETTING "picture_expire" | |
| 66 | ||
| 10373 | 67 | #define YAHOO_STATUS_TYPE_OFFLINE "offline" |
| 68 | #define YAHOO_STATUS_TYPE_AVAILABLE "available" | |
| 69 | #define YAHOO_STATUS_TYPE_BRB "brb" | |
| 70 | #define YAHOO_STATUS_TYPE_BUSY "busy" | |
| 71 | #define YAHOO_STATUS_TYPE_NOTATHOME "notathome" | |
| 72 | #define YAHOO_STATUS_TYPE_NOTATDESK "notatdesk" | |
| 73 | #define YAHOO_STATUS_TYPE_NOTINOFFICE "notinoffice" | |
| 74 | #define YAHOO_STATUS_TYPE_ONPHONE "onphone" | |
| 75 | #define YAHOO_STATUS_TYPE_ONVACATION "onvacation" | |
| 76 | #define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch" | |
| 77 | #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout" | |
| 78 | #define YAHOO_STATUS_TYPE_AWAY "away" | |
| 79 | #define YAHOO_STATUS_TYPE_INVISIBLE "invisible" | |
| 15589 | 80 | #define YAHOO_STATUS_TYPE_MOBILE "mobile" |
| 10373 | 81 | |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
82 | #define YAHOO_CLIENT_VERSION_ID "2097087" |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
83 | #define YAHOO_CLIENT_VERSION "8.1.0.421" |
|
22401
5fe1761a4a15
Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22366
diff
changeset
|
84 | |
|
22832
a0a5f754cc95
It appears that Yahoo! Japan has disabled protocol 0x0c and now require 0x0f.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22552
diff
changeset
|
85 | #define YAHOOJP_CLIENT_VERSION_ID "524223" |
|
a0a5f754cc95
It appears that Yahoo! Japan has disabled protocol 0x0c and now require 0x0f.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22552
diff
changeset
|
86 | #define YAHOOJP_CLIENT_VERSION "7,0,1,1" |
|
22401
5fe1761a4a15
Simplified version of the newest patch on #4533 to not try Yahoo protocol
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22366
diff
changeset
|
87 | |
|
19642
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
88 | /* Index into attention types list. */ |
|
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
89 | #define YAHOO_BUZZ 0 |
|
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
90 | |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
91 | typedef enum { |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
92 | YAHOO_PKT_TYPE_SERVER = 0, |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
93 | YAHOO_PKT_TYPE_P2P |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
94 | } yahoo_pkt_type; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
95 | |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
96 | typedef enum { |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
97 | YAHOO_P2P_WE_ARE_CLIENT =0, |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
98 | YAHOO_P2P_WE_ARE_SERVER |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
99 | } yahoo_p2p_connection_type; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
100 | |
| 6729 | 101 | enum yahoo_status { |
| 102 | YAHOO_STATUS_AVAILABLE = 0, | |
| 103 | YAHOO_STATUS_BRB, | |
| 104 | YAHOO_STATUS_BUSY, | |
| 105 | YAHOO_STATUS_NOTATHOME, | |
| 106 | YAHOO_STATUS_NOTATDESK, | |
| 107 | YAHOO_STATUS_NOTINOFFICE, | |
| 108 | YAHOO_STATUS_ONPHONE, | |
| 109 | YAHOO_STATUS_ONVACATION, | |
| 110 | YAHOO_STATUS_OUTTOLUNCH, | |
| 111 | YAHOO_STATUS_STEPPEDOUT, | |
| 112 | YAHOO_STATUS_INVISIBLE = 12, | |
| 113 | YAHOO_STATUS_CUSTOM = 99, | |
| 114 | YAHOO_STATUS_IDLE = 999, | |
| 7134 | 115 | YAHOO_STATUS_WEBLOGIN = 0x5a55aa55, |
| 6729 | 116 | YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */ |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
117 | YAHOO_STATUS_TYPING = 0x16, |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
118 | YAHOO_STATUS_DISCONNECTED = 0xffffffff /* in ymsg 15. doesnt mean the normal sense of 'disconnected' */ |
| 6729 | 119 | }; |
| 120 | ||
| 9306 | 121 | struct yahoo_buddy_icon_upload_data { |
| 15884 | 122 | PurpleConnection *gc; |
| 9306 | 123 | GString *str; |
| 124 | char *filename; | |
| 125 | int pos; | |
| 126 | int fd; | |
| 127 | guint watcher; | |
| 128 | }; | |
| 129 | ||
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
130 | struct yahoo_p2p_data { |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
131 | PurpleConnection *gc; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
132 | char *host_ip; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
133 | char *host_username; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
134 | int val_13; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
135 | guint input_event; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
136 | gint source; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
137 | int session_id; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
138 | yahoo_p2p_connection_type connection_type; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
139 | }; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
140 | |
| 9376 | 141 | struct _YchtConn; |
| 142 | ||
| 6729 | 143 | struct yahoo_data { |
| 15884 | 144 | PurpleConnection *gc; |
| 6729 | 145 | int fd; |
| 146 | guchar *rxqueue; | |
| 147 | int rxlen; | |
| 15884 | 148 | PurpleCircBuffer *txbuf; |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12970
diff
changeset
|
149 | guint txhandler; |
| 6784 | 150 | GHashTable *friends; |
|
13851
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
151 | |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
152 | /** |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
153 | * This is used to keep track of the IMVironment chosen |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
154 | * by people you talk to. We don't do very much with |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
155 | * this right now... but at least now if the remote user |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
156 | * selects an IMVironment we won't reset it back to the |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
157 | * default of nothing. |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
158 | */ |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
159 | GHashTable *imvironments; |
|
27bc39ea07f8
[gaim-migrate @ 16306]
Mark Doliner <markdoliner@pidgin.im>
parents:
13689
diff
changeset
|
160 | |
| 6729 | 161 | int current_status; |
| 162 | gboolean logged_in; | |
|
12203
a8ac8491df3a
[gaim-migrate @ 14505]
Peter Lawler <pidgin@bleeter.id.au>
parents:
11970
diff
changeset
|
163 | GString *tmp_serv_blist, *tmp_serv_ilist, *tmp_serv_plist; |
| 6729 | 164 | GSList *confs; |
| 165 | unsigned int conf_id; /* just a counter */ | |
| 166 | gboolean chat_online; | |
| 167 | gboolean in_chat; | |
| 168 | char *chat_name; | |
|
19716
3f161bed09f6
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 <datallah@pidgin.im>
parents:
19642
diff
changeset
|
169 | char *pending_chat_room; |
|
3f161bed09f6
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 <datallah@pidgin.im>
parents:
19642
diff
changeset
|
170 | char *pending_chat_id; |
|
3f161bed09f6
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 <datallah@pidgin.im>
parents:
19642
diff
changeset
|
171 | char *pending_chat_topic; |
|
3f161bed09f6
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 <datallah@pidgin.im>
parents:
19642
diff
changeset
|
172 | char *pending_chat_goto; |
| 7134 | 173 | char *auth; |
|
13201
8c224ef70efa
[gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents:
12970
diff
changeset
|
174 | gsize auth_written; |
| 7651 | 175 | char *cookie_y; |
| 176 | char *cookie_t; | |
| 177 | int session_id; | |
| 9164 | 178 | gboolean jp; |
|
10989
ea41b63cfea5
[gaim-migrate @ 12827]
Daniel Atallah <datallah@pidgin.im>
parents:
10937
diff
changeset
|
179 | gboolean wm; /* connected w/ web messenger method */ |
| 9306 | 180 | /* picture aka buddy icon stuff */ |
| 181 | char *picture_url; | |
| 182 | int picture_checksum; | |
| 183 | ||
| 184 | /* ew. we have to check the icon before we connect, | |
| 185 | * but can't upload it til we're connected. */ | |
| 186 | struct yahoo_buddy_icon_upload_data *picture_upload_todo; | |
| 15884 | 187 | PurpleProxyConnectData *buddy_icon_connect_data; |
| 9376 | 188 | |
| 189 | struct _YchtConn *ycht; | |
|
14416
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
190 | |
|
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
191 | /** |
| 15884 | 192 | * This linked list contains PurpleUtilFetchUrlData structs |
|
14416
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
193 | * for when we lookup people profile or photo information. |
|
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
194 | */ |
|
c95ffd983a39
[gaim-migrate @ 17060]
Mark Doliner <markdoliner@pidgin.im>
parents:
14254
diff
changeset
|
195 | GSList *url_datas; |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
196 | GHashTable *xfer_peer_idstring_map;/* Hey, i dont know, but putting this HashTable next to friends gives a run time fault... */ |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
197 | GSList *cookies;/* contains all cookies, including _y and _t */ |
|
22552
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
198 | |
|
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
199 | /** |
|
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
200 | * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting; |
|
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
201 | * the server expects us to keep track of the group for which it is sending us contact names. |
|
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
202 | */ |
|
21bcf7de74f1
Fixed bug in which Yahoo contacts were erroneously considered to be blocked,
Evan Schoenberg <evands@pidgin.im>
parents:
22401
diff
changeset
|
203 | char *current_list15_grp; |
|
26360
9af4fa4d22cf
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26358
diff
changeset
|
204 | time_t last_ping; |
|
9af4fa4d22cf
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26358
diff
changeset
|
205 | time_t last_keepalive; |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
206 | GHashTable *peers; /* information about p2p data */ |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
207 | int yahoo_p2p_timer; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
208 | int yahoo_local_p2p_server_fd; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
209 | int yahoo_p2p_server_watcher; |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
210 | GHashTable *sms_carrier; /* sms carrier data */ |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
211 | guint yahoo_p2p_server_timeout_handle; |
| 6729 | 212 | }; |
| 213 | ||
| 9603 | 214 | #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255) |
| 6847 | 215 | |
| 7651 | 216 | /* sometimes i wish prpls could #include things from other prpls. then i could just |
| 217 | * use the routines from libfaim and not have to admit to knowing how they work. */ | |
| 218 | #define yahoo_put16(buf, data) ( \ | |
| 219 | (*(buf) = (unsigned char)((data)>>8)&0xff), \ | |
| 220 | (*((buf)+1) = (unsigned char)(data)&0xff), \ | |
| 221 | 2) | |
| 222 | #define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff)) | |
| 223 | #define yahoo_put32(buf, data) ( \ | |
| 224 | (*((buf)) = (unsigned char)((data)>>24)&0xff), \ | |
| 225 | (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \ | |
| 226 | (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \ | |
| 227 | (*((buf)+3) = (unsigned char)(data)&0xff), \ | |
| 228 | 4) | |
| 229 | #define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \ | |
| 230 | (((*((buf)+1))<<16)&0x00ff0000) + \ | |
| 231 | (((*((buf)+2))<< 8)&0x0000ff00) + \ | |
| 232 | (((*((buf)+3) )&0x000000ff))) | |
| 233 | ||
| 6729 | 234 | /* util.c */ |
|
12323
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
12203
diff
changeset
|
235 | void yahoo_init_colorht(void); |
|
f52908fb23b0
[gaim-migrate @ 14627]
Richard Laager <rlaager@pidgin.im>
parents:
12203
diff
changeset
|
236 | void yahoo_dest_colorht(void); |
| 6629 | 237 | char *yahoo_codes_to_html(const char *x); |
| 238 | char *yahoo_html_to_codes(const char *src); | |
| 6513 | 239 | |
|
26360
9af4fa4d22cf
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26358
diff
changeset
|
240 | gboolean |
|
9af4fa4d22cf
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26358
diff
changeset
|
241 | yahoo_account_use_http_proxy(PurpleConnection *conn); |
|
9af4fa4d22cf
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26358
diff
changeset
|
242 | |
| 7827 | 243 | /** |
| 244 | * Encode some text to send to the yahoo server. | |
| 245 | * | |
| 246 | * @param gc The connection handle. | |
| 247 | * @param str The null terminated utf8 string to encode. | |
| 248 | * @param utf8 If not @c NULL, whether utf8 is okay or not. | |
| 249 | * Even if it is okay, we may not use it. If we | |
| 250 | * used it, we set this to @c TRUE, else to | |
| 251 | * @c FALSE. If @c NULL, false is assumed, and | |
| 252 | * it is not dereferenced. | |
| 253 | * @return The g_malloced string in the appropriate encoding. | |
| 254 | */ | |
| 15884 | 255 | char *yahoo_string_encode(PurpleConnection *gc, const char *str, gboolean *utf8); |
| 7827 | 256 | |
| 257 | /** | |
| 258 | * Decode some text received from the server. | |
| 259 | * | |
| 260 | * @param gc The gc handle. | |
| 261 | * @param str The null terminated string to decode. | |
| 262 | * @param utf8 Did the server tell us it was supposed to be utf8? | |
| 263 | * @return The decoded, utf-8 string, which must be g_free()'d. | |
| 264 | */ | |
| 15884 | 265 | char *yahoo_string_decode(PurpleConnection *gc, const char *str, gboolean utf8); |
| 7827 | 266 | |
|
22259
bc9fcfd10196
disapproval of revision 'db9b3bc9d4427a6a03d1c25aac5215bf0f8e05ec'
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22248
diff
changeset
|
267 | char *yahoo_convert_to_numeric(const char *str); |
|
bc9fcfd10196
disapproval of revision 'db9b3bc9d4427a6a03d1c25aac5215bf0f8e05ec'
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
22248
diff
changeset
|
268 | |
| 9220 | 269 | /* previously-static functions, now needed for yahoo_profile.c */ |
| 15884 | 270 | void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full); |
| 9220 | 271 | |
| 9161 | 272 | /* yahoo_profile.c */ |
| 15884 | 273 | void yahoo_get_info(PurpleConnection *gc, const char *name); |
| 9161 | 274 | |
|
22202
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
275 | /* needed for xfer, thought theyd be useful for other enhancements later on |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
276 | Returns list of cookies stored in yahoo_data formatted as a single null terminated string |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
277 | returned value must be g_freed |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
278 | */ |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
279 | gchar* yahoo_get_cookies(PurpleConnection *gc); |
|
e42ab2e3eba1
This patch from Thanumalayan S. implements Yahoo protocol version 15 file
Thanumalayan Sankaranarayanan <madthanu@gmail.com>
parents:
22201
diff
changeset
|
280 | |
|
19642
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
281 | gboolean yahoo_send_attention(PurpleConnection *gc, const char *username, guint type); |
|
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
282 | GList *yahoo_attention_types(PurpleAccount *account); |
|
f27b0a59548e
Change Yahoo prpl to use attention API in libpurple. Previous behavior can
Jeff Connelly <jeff2@soc.pidgin.im>
parents:
16534
diff
changeset
|
283 | |
|
26362
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
284 | /* send p2p pkt containing our encoded ip, asking peer to connect to us */ |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
285 | void yahoo_send_p2p_pkt(PurpleConnection *gc, const char *who, int val_13); |
|
de9cf498a73a
resolved conflict -- merged im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
Sulabh Mahajan <sulabh@pidgin.im>
parents:
26360
diff
changeset
|
286 | |
| 6513 | 287 | #endif /* _YAHOO_H_ */ |