Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo.h @ 26154:618d122af044
resolving conflict - merging im.pidgin.pidgin to im.pidgin.soc.2008.yahoo
author | Sulabh Mahajan <sulabh@soc.pidgin.im> |
---|---|
date | Wed, 12 Nov 2008 10:17:38 +0000 |
parents | bb5a6709d9b7 |
children | 3e788c0db3a6 |
comparison
equal
deleted
inserted
replaced
26153:1317a9ae66e8 | 26154:618d122af044 |
---|---|
28 #include "circbuffer.h" | 28 #include "circbuffer.h" |
29 #include "prpl.h" | 29 #include "prpl.h" |
30 | 30 |
31 #define YAHOO_PAGER_HOST "scs.msg.yahoo.com" | 31 #define YAHOO_PAGER_HOST "scs.msg.yahoo.com" |
32 #define YAHOO_PAGER_PORT 5050 | 32 #define YAHOO_PAGER_PORT 5050 |
33 #define YAHOO_PAGER_PORT_P2P 5101 | |
34 #define YAHOO_P2P_KEEPALIVE_SECS 300 | |
35 #define YAHOO_P2P_SERVER_TIMEOUT 10 | |
36 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/" | 33 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/" |
37 #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" |
38 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com" | 35 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com" |
39 #define YAHOO_XFER_PORT 80 | 36 #define YAHOO_XFER_PORT 80 |
40 #define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com" | 37 #define YAHOO_XFER_RELAY_HOST "relay.msg.yahoo.com" |
46 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp" | 43 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp" |
47 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/" | 44 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/" |
48 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/" | 45 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/" |
49 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp" | 46 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp" |
50 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp" | 47 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp" |
51 /* not sure, must test: */ | 48 /*not sure, must test:*/ |
52 #define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp" | 49 #define YAHOOJP_XFER_RELAY_HOST "relay.msg.yahoo.co.jp" |
53 #define YAHOOJP_XFER_RELAY_PORT 80 | 50 #define YAHOOJP_XFER_RELAY_PORT 80 |
54 #define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/" | 51 #define YAHOOJP_ROOMLIST_URL "http://insider.msg.yahoo.co.jp/ycontent/" |
55 #define YAHOOJP_ROOMLIST_LOCALE "ja" | 52 #define YAHOOJP_ROOMLIST_LOCALE "ja" |
56 | 53 |
57 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud" | 54 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud" |
58 | 55 |
59 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" | 56 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" |
60 | |
61 #define YAHOO_SMS_CARRIER_URL "http://lookup.msg.vip.mud.yahoo.com" | |
62 | 57 |
63 #define YAHOO_PICURL_SETTING "picture_url" | 58 #define YAHOO_PICURL_SETTING "picture_url" |
64 #define YAHOO_PICCKSUM_SETTING "picture_checksum" | 59 #define YAHOO_PICCKSUM_SETTING "picture_checksum" |
65 #define YAHOO_PICEXPIRE_SETTING "picture_expire" | 60 #define YAHOO_PICEXPIRE_SETTING "picture_expire" |
66 | 61 |
83 #define YAHOO_CLIENT_VERSION "8.1.0.421" | 78 #define YAHOO_CLIENT_VERSION "8.1.0.421" |
84 | 79 |
85 #define YAHOOJP_CLIENT_VERSION_ID "524223" | 80 #define YAHOOJP_CLIENT_VERSION_ID "524223" |
86 #define YAHOOJP_CLIENT_VERSION "7,0,1,1" | 81 #define YAHOOJP_CLIENT_VERSION "7,0,1,1" |
87 | 82 |
83 | |
88 /* Index into attention types list. */ | 84 /* Index into attention types list. */ |
89 #define YAHOO_BUZZ 0 | 85 #define YAHOO_BUZZ 0 |
90 | |
91 typedef enum { | |
92 YAHOO_PKT_TYPE_SERVER = 0, | |
93 YAHOO_PKT_TYPE_P2P | |
94 } yahoo_pkt_type; | |
95 | |
96 typedef enum { | |
97 YAHOO_P2P_WE_ARE_CLIENT =0, | |
98 YAHOO_P2P_WE_ARE_SERVER | |
99 } yahoo_p2p_connection_type; | |
100 | 86 |
101 enum yahoo_status { | 87 enum yahoo_status { |
102 YAHOO_STATUS_AVAILABLE = 0, | 88 YAHOO_STATUS_AVAILABLE = 0, |
103 YAHOO_STATUS_BRB, | 89 YAHOO_STATUS_BRB, |
104 YAHOO_STATUS_BUSY, | 90 YAHOO_STATUS_BUSY, |
123 GString *str; | 109 GString *str; |
124 char *filename; | 110 char *filename; |
125 int pos; | 111 int pos; |
126 int fd; | 112 int fd; |
127 guint watcher; | 113 guint watcher; |
128 }; | |
129 | |
130 struct yahoo_p2p_data { | |
131 PurpleConnection *gc; | |
132 char *host_ip; | |
133 char *host_username; | |
134 int val_13; | |
135 guint input_event; | |
136 gint source; | |
137 int session_id; | |
138 yahoo_p2p_connection_type connection_type; | |
139 }; | 114 }; |
140 | 115 |
141 struct _YchtConn; | 116 struct _YchtConn; |
142 | 117 |
143 struct yahoo_data { | 118 struct yahoo_data { |
191 /** | 166 /** |
192 * This linked list contains PurpleUtilFetchUrlData structs | 167 * This linked list contains PurpleUtilFetchUrlData structs |
193 * for when we lookup people profile or photo information. | 168 * for when we lookup people profile or photo information. |
194 */ | 169 */ |
195 GSList *url_datas; | 170 GSList *url_datas; |
196 GHashTable *xfer_peer_idstring_map;/* Hey, i dont know, but putting this HashTable next to friends gives a run time fault... */ | 171 GHashTable *xfer_peer_idstring_map;/*Hey, i dont know, but putting this HashTable next to friends gives a run time fault...*/ |
197 GSList *cookies;/* contains all cookies, including _y and _t */ | 172 GSList *cookies;/*contains all cookies, including _y and _t*/ |
198 | 173 |
199 /** | 174 /** |
200 * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting; | 175 * We may receive a list15 in multiple packets with no prior warning as to how many we'll be getting; |
201 * the server expects us to keep track of the group for which it is sending us contact names. | 176 * the server expects us to keep track of the group for which it is sending us contact names. |
202 */ | 177 */ |
203 char *current_list15_grp; | 178 char *current_list15_grp; |
204 GHashTable *peers; /* information about p2p data */ | 179 time_t last_ping; |
205 int yahoo_p2p_timer; | 180 time_t last_keepalive; |
206 int yahoo_local_p2p_server_fd; | |
207 int yahoo_p2p_server_watcher; | |
208 GHashTable *sms_carrier; /* sms carrier data */ | |
209 guint yahoo_p2p_server_timeout_handle; | |
210 }; | 181 }; |
211 | 182 |
212 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255) | 183 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255) |
213 | 184 |
214 /* sometimes i wish prpls could #include things from other prpls. then i could just | 185 /* sometimes i wish prpls could #include things from other prpls. then i could just |
233 void yahoo_init_colorht(void); | 204 void yahoo_init_colorht(void); |
234 void yahoo_dest_colorht(void); | 205 void yahoo_dest_colorht(void); |
235 char *yahoo_codes_to_html(const char *x); | 206 char *yahoo_codes_to_html(const char *x); |
236 char *yahoo_html_to_codes(const char *src); | 207 char *yahoo_html_to_codes(const char *src); |
237 | 208 |
209 gboolean | |
210 yahoo_account_use_http_proxy(PurpleConnection *conn); | |
211 | |
238 /** | 212 /** |
239 * Encode some text to send to the yahoo server. | 213 * Encode some text to send to the yahoo server. |
240 * | 214 * |
241 * @param gc The connection handle. | 215 * @param gc The connection handle. |
242 * @param str The null terminated utf8 string to encode. | 216 * @param str The null terminated utf8 string to encode. |
274 gchar* yahoo_get_cookies(PurpleConnection *gc); | 248 gchar* yahoo_get_cookies(PurpleConnection *gc); |
275 | 249 |
276 gboolean yahoo_send_attention(PurpleConnection *gc, const char *username, guint type); | 250 gboolean yahoo_send_attention(PurpleConnection *gc, const char *username, guint type); |
277 GList *yahoo_attention_types(PurpleAccount *account); | 251 GList *yahoo_attention_types(PurpleAccount *account); |
278 | 252 |
279 /* send p2p pkt containing our encoded ip, asking peer to connect to us */ | |
280 void yahoo_send_p2p_pkt(PurpleConnection *gc, const char *who, int val_13); | |
281 | |
282 #endif /* _YAHOO_H_ */ | 253 #endif /* _YAHOO_H_ */ |