comparison libpurple/protocols/yahoo/yahoo.h @ 22018:118046227581

This patch from Thanumalayan S. implements Yahoo protocol version 15 file transfer support. Currently sending multiple files from an official Yahoo client is treated as multiple individual transfers that must be accepted separately. This also changes things so that we identify as Yahoo Messenger version 8.0 (previously we were identifying as 6.0 or not at all). committer: John Bailey <rekkanoryo@rekkanoryo.org>
author Thanumalayan <madthanu@gmail.com>
date Sun, 06 Jan 2008 19:45:03 +0000
parents 97d530d11cc0
children 02fc6697f38c
comparison
equal deleted inserted replaced
22017:97d530d11cc0 22018:118046227581
32 #define YAHOO_PAGER_PORT 5050 32 #define YAHOO_PAGER_PORT 5050
33 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/" 33 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/"
34 #define YAHOO_MAIL_URL "https://login.yahoo.com/config/login?.src=ym" 34 #define YAHOO_MAIL_URL "https://login.yahoo.com/config/login?.src=ym"
35 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com" 35 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com"
36 #define YAHOO_XFER_PORT 80 36 #define YAHOO_XFER_PORT 80
37 #define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com"
38 #define YAHOO_XFER_RELAY_PORT 80
37 #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/" 39 #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/"
38 #define YAHOO_ROOMLIST_LOCALE "us" 40 #define YAHOO_ROOMLIST_LOCALE "us"
39 /* really we should get the list of servers from 41 /* really we should get the list of servers from
40 http://update.messenger.yahoo.co.jp/servers.html */ 42 http://update.messenger.yahoo.co.jp/servers.html */
41 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp" 43 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp"
42 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/" 44 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/"
43 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/" 45 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/"
44 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp" 46 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp"
45 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp" 47 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp"
48 /*not sure, must test:*/
49 #define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.com"
50 #define YAHOOJP_XFER_RELAY_PORT 80
46 51
47 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud" 52 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud"
48 53
49 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" 54 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg"
50 55
64 #define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch" 69 #define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch"
65 #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout" 70 #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout"
66 #define YAHOO_STATUS_TYPE_AWAY "away" 71 #define YAHOO_STATUS_TYPE_AWAY "away"
67 #define YAHOO_STATUS_TYPE_INVISIBLE "invisible" 72 #define YAHOO_STATUS_TYPE_INVISIBLE "invisible"
68 #define YAHOO_STATUS_TYPE_MOBILE "mobile" 73 #define YAHOO_STATUS_TYPE_MOBILE "mobile"
74
75 #define YAHOO_CLIENT_VERSION_ID "2097087"
76 #define YAHOO_CLIENT_VERSION "8.1.0.421"
69 77
70 /* Index into attention types list. */ 78 /* Index into attention types list. */
71 #define YAHOO_BUZZ 0 79 #define YAHOO_BUZZ 0
72 80
73 enum yahoo_status { 81 enum yahoo_status {
84 YAHOO_STATUS_INVISIBLE = 12, 92 YAHOO_STATUS_INVISIBLE = 12,
85 YAHOO_STATUS_CUSTOM = 99, 93 YAHOO_STATUS_CUSTOM = 99,
86 YAHOO_STATUS_IDLE = 999, 94 YAHOO_STATUS_IDLE = 999,
87 YAHOO_STATUS_WEBLOGIN = 0x5a55aa55, 95 YAHOO_STATUS_WEBLOGIN = 0x5a55aa55,
88 YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */ 96 YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */
89 YAHOO_STATUS_TYPING = 0x16 97 YAHOO_STATUS_TYPING = 0x16,
98 YAHOO_STATUS_DISCONNECTED = 0xffffffff /* in ymsg 15. doesnt mean the normal sense of 'disconnected' */
90 }; 99 };
91 100
92 struct yahoo_buddy_icon_upload_data { 101 struct yahoo_buddy_icon_upload_data {
93 PurpleConnection *gc; 102 PurpleConnection *gc;
94 GString *str; 103 GString *str;
151 /** 160 /**
152 * This linked list contains PurpleUtilFetchUrlData structs 161 * This linked list contains PurpleUtilFetchUrlData structs
153 * for when we lookup people profile or photo information. 162 * for when we lookup people profile or photo information.
154 */ 163 */
155 GSList *url_datas; 164 GSList *url_datas;
165 GHashTable *xfer_peer_idstring_map;/*Hey, i dont know, but putting this HashTable next to friends gives a run time fault...*/
166 GSList *cookies;/*contains all cookies, including _y and _t*/
156 }; 167 };
157 168
158 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255) 169 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255)
159 170
160 /* sometimes i wish prpls could #include things from other prpls. then i could just 171 /* sometimes i wish prpls could #include things from other prpls. then i could just
209 void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full); 220 void yahoo_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
210 221
211 /* yahoo_profile.c */ 222 /* yahoo_profile.c */
212 void yahoo_get_info(PurpleConnection *gc, const char *name); 223 void yahoo_get_info(PurpleConnection *gc, const char *name);
213 224
225 /* needed for xfer, thought theyd be useful for other enhancements later on
226 Returns list of cookies stored in yahoo_data formatted as a single null terminated string
227 returned value must be g_freed
228 */
229 gchar* yahoo_get_cookies(PurpleConnection *gc);
230
214 /** 231 /**
215 * Check to see whether the sender is permitted to send 232 * Check to see whether the sender is permitted to send
216 * 233 *
217 * @param gc The gc handle. 234 * @param gc The gc handle.
218 * @param who The sender of the packet to check 235 * @param who The sender of the packet to check