annotate src/protocols/yahoo/yahoo.h @ 12798:09d4ea834370

[gaim-migrate @ 15145] SF Patch #1389870 from Bleeter, building on work in SF Patch #1114194 from Alex Badea "Following on from #1114194, where I thought that sending audibles is a little twitty because we can't see what's going on, I also noted that it would be nice if we could display the URL wheree the audible swf file lived. The example URL provided only supported US locales, which also needed addressing. I've tested this patch with the Taiwain audible, named within the patch, by confirming that the URL pattern match actually works. Whether it actually works when sent from a Taiwanese YIM native client, I have no idea. It looks like it should. Just to re-iterate: This patch displays the the received audible's URL and text only, not the audible swf file itself, nor does it send anything." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 09 Jan 2006 22:28:17 +0000
parents fc464a0abccc
children 82e918444965
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6513
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
1 /**
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
2 * @file yahoo.h The Yahoo! protocol plugin
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
3 *
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
4 * gaim
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
5 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8045
diff changeset
6 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8045
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 8045
diff changeset
8 * source distribution.
6513
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
9 *
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
13 * (at your option) any later version.
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
14 *
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
18 * GNU General Public License for more details.
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
19 *
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
23 */
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
24
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
25 #ifndef _YAHOO_H_
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
26 #define _YAHOO_H_
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
27
6784
ea3707dde7a3 [gaim-migrate @ 7323]
Luke Schierer <lschiere@pidgin.im>
parents: 6729
diff changeset
28 #include "prpl.h"
ea3707dde7a3 [gaim-migrate @ 7323]
Luke Schierer <lschiere@pidgin.im>
parents: 6729
diff changeset
29
7883
30ed1fc892aa [gaim-migrate @ 8537]
Luke Schierer <lschiere@pidgin.im>
parents: 7827
diff changeset
30 #define YAHOO_PAGER_HOST "scs.msg.yahoo.com"
7827
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
31 #define YAHOO_PAGER_PORT 5050
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
32 #define YAHOO_PROFILE_URL "http://profiles.yahoo.com/"
11046
c0421a7cba03 [gaim-migrate @ 12962]
Richard Laager <rlaager@wiktel.com>
parents: 11043
diff changeset
33 #define YAHOO_MAIL_URL "https://mail.yahoo.com/"
7651
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
34 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com"
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
35 #define YAHOO_XFER_PORT 80
8113
d60272410bd5 [gaim-migrate @ 8817]
Nathan Walp <nwalp@pidgin.im>
parents: 8046
diff changeset
36 #define YAHOO_ROOMLIST_URL "http://insider.msg.yahoo.com/ycontent/"
11160
3adcad067e5f [gaim-migrate @ 13248]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 11046
diff changeset
37 #define YAHOO_ROOMLIST_LOCALE "us"
9164
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
38 /* really we should get the list of servers from
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
39 http://update.messenger.yahoo.co.jp/servers.html */
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
40 #define YAHOOJP_PAGER_HOST "cs.yahoo.co.jp"
9221
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9220
diff changeset
41 #define YAHOOJP_PROFILE_URL "http://profiles.yahoo.co.jp/"
8054855f2bb9 [gaim-migrate @ 10017]
Tim Ringenbach <marv@pidgin.im>
parents: 9220
diff changeset
42 #define YAHOOJP_MAIL_URL "http://mail.yahoo.co.jp/"
9164
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
43 #define YAHOOJP_XFER_HOST "filetransfer.msg.yahoo.co.jp"
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
44 #define YAHOOJP_WEBCAM_HOST "wc.yahoo.co.jp"
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
45
12798
09d4ea834370 [gaim-migrate @ 15145]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
46 #define YAHOO_AUDIBLE_URL "http://us.dl1.yimg.com/download.yahoo.com/dl/aud"
09d4ea834370 [gaim-migrate @ 15145]
Richard Laager <rlaager@wiktel.com>
parents: 12323
diff changeset
47
7134
67f9b43c402a [gaim-migrate @ 7701]
Sean Egan <seanegan@gmail.com>
parents: 6895
diff changeset
48 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg"
67f9b43c402a [gaim-migrate @ 7701]
Sean Egan <seanegan@gmail.com>
parents: 6895
diff changeset
49
9306
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
50 #define YAHOO_ICON_CHECKSUM_KEY "icon_checksum"
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
51 #define YAHOO_PICURL_SETTING "picture_url"
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
52 #define YAHOO_PICCKSUM_SETTING "picture_checksum"
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
53 #define YAHOO_PICEXPIRE_SETTING "picture_expire"
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
54
10373
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
55 #define YAHOO_STATUS_TYPE_OFFLINE "offline"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
56 #define YAHOO_STATUS_TYPE_AVAILABLE "available"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
57 #define YAHOO_STATUS_TYPE_BRB "brb"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
58 #define YAHOO_STATUS_TYPE_BUSY "busy"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
59 #define YAHOO_STATUS_TYPE_NOTATHOME "notathome"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
60 #define YAHOO_STATUS_TYPE_NOTATDESK "notatdesk"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
61 #define YAHOO_STATUS_TYPE_NOTINOFFICE "notinoffice"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
62 #define YAHOO_STATUS_TYPE_ONPHONE "onphone"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
63 #define YAHOO_STATUS_TYPE_ONVACATION "onvacation"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
64 #define YAHOO_STATUS_TYPE_OUTTOLUNCH "outtolunch"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
65 #define YAHOO_STATUS_TYPE_STEPPEDOUT "steppedout"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
66 #define YAHOO_STATUS_TYPE_AWAY "away"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
67 #define YAHOO_STATUS_TYPE_INVISIBLE "invisible"
35068a87b59d [gaim-migrate @ 11598]
Tim Ringenbach <marv@pidgin.im>
parents: 10360
diff changeset
68
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
69 enum yahoo_status {
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
70 YAHOO_STATUS_AVAILABLE = 0,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
71 YAHOO_STATUS_BRB,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
72 YAHOO_STATUS_BUSY,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
73 YAHOO_STATUS_NOTATHOME,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
74 YAHOO_STATUS_NOTATDESK,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
75 YAHOO_STATUS_NOTINOFFICE,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
76 YAHOO_STATUS_ONPHONE,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
77 YAHOO_STATUS_ONVACATION,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
78 YAHOO_STATUS_OUTTOLUNCH,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
79 YAHOO_STATUS_STEPPEDOUT,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
80 YAHOO_STATUS_INVISIBLE = 12,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
81 YAHOO_STATUS_CUSTOM = 99,
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
82 YAHOO_STATUS_IDLE = 999,
7134
67f9b43c402a [gaim-migrate @ 7701]
Sean Egan <seanegan@gmail.com>
parents: 6895
diff changeset
83 YAHOO_STATUS_WEBLOGIN = 0x5a55aa55,
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
84 YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
85 YAHOO_STATUS_TYPING = 0x16
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
86 };
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
87
9306
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
88 struct yahoo_buddy_icon_upload_data {
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
89 GaimConnection *gc;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
90 GString *str;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
91 char *filename;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
92 int pos;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
93 int fd;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
94 guint watcher;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
95 };
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
96
9376
3aa848ccf986 [gaim-migrate @ 10184]
Tim Ringenbach <marv@pidgin.im>
parents: 9371
diff changeset
97 struct _YchtConn;
3aa848ccf986 [gaim-migrate @ 10184]
Tim Ringenbach <marv@pidgin.im>
parents: 9371
diff changeset
98
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
99 struct yahoo_data {
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
100 int fd;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
101 guchar *rxqueue;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
102 int rxlen;
6784
ea3707dde7a3 [gaim-migrate @ 7323]
Luke Schierer <lschiere@pidgin.im>
parents: 6729
diff changeset
103 GHashTable *friends;
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
104 int current_status;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
105 gboolean logged_in;
12203
0aeda1869b32 [gaim-migrate @ 14505]
Luke Schierer <lschiere@pidgin.im>
parents: 11970
diff changeset
106 GString *tmp_serv_blist, *tmp_serv_ilist, *tmp_serv_plist;
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
107 GSList *confs;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
108 unsigned int conf_id; /* just a counter */
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
109 gboolean chat_online;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
110 gboolean in_chat;
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
111 char *chat_name;
7134
67f9b43c402a [gaim-migrate @ 7701]
Sean Egan <seanegan@gmail.com>
parents: 6895
diff changeset
112 char *auth;
7651
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
113 char *cookie_y;
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
114 char *cookie_t;
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
115 int session_id;
9164
76125b842b23 [gaim-migrate @ 9949]
Tim Ringenbach <marv@pidgin.im>
parents: 9161
diff changeset
116 gboolean jp;
10989
b4919e8c634c [gaim-migrate @ 12827]
Daniel Atallah <daniel.atallah@gmail.com>
parents: 10937
diff changeset
117 gboolean wm; /* connected w/ web messenger method */
9306
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
118 /* picture aka buddy icon stuff */
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
119 char *picture_url;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
120 int picture_checksum;
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
121
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
122 /* ew. we have to check the icon before we connect,
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
123 * but can't upload it til we're connected. */
04a3e9e869ee [gaim-migrate @ 10114]
Tim Ringenbach <marv@pidgin.im>
parents: 9292
diff changeset
124 struct yahoo_buddy_icon_upload_data *picture_upload_todo;
9376
3aa848ccf986 [gaim-migrate @ 10184]
Tim Ringenbach <marv@pidgin.im>
parents: 9371
diff changeset
125
3aa848ccf986 [gaim-migrate @ 10184]
Tim Ringenbach <marv@pidgin.im>
parents: 9371
diff changeset
126 struct _YchtConn *ycht;
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
127 };
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
128
9603
10939dc36eac [gaim-migrate @ 10446]
Tim Ringenbach <marv@pidgin.im>
parents: 9409
diff changeset
129 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (255)
6847
7de1b559cbbb [gaim-migrate @ 7392]
Luke Schierer <lschiere@pidgin.im>
parents: 6784
diff changeset
130
7651
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
131 /* sometimes i wish prpls could #include things from other prpls. then i could just
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
132 * use the routines from libfaim and not have to admit to knowing how they work. */
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
133 #define yahoo_put16(buf, data) ( \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
134 (*(buf) = (unsigned char)((data)>>8)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
135 (*((buf)+1) = (unsigned char)(data)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
136 2)
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
137 #define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
138 #define yahoo_put32(buf, data) ( \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
139 (*((buf)) = (unsigned char)((data)>>24)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
140 (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
141 (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
142 (*((buf)+3) = (unsigned char)(data)&0xff), \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
143 4)
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
144 #define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
145 (((*((buf)+1))<<16)&0x00ff0000) + \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
146 (((*((buf)+2))<< 8)&0x0000ff00) + \
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
147 (((*((buf)+3) )&0x000000ff)))
580bd39219a2 [gaim-migrate @ 8295]
Luke Schierer <lschiere@pidgin.im>
parents: 7134
diff changeset
148
6729
7b878ee8f064 [gaim-migrate @ 7256]
Luke Schierer <lschiere@pidgin.im>
parents: 6629
diff changeset
149 /* util.c */
12323
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12203
diff changeset
150 void yahoo_init_colorht(void);
fc464a0abccc [gaim-migrate @ 14627]
Richard Laager <rlaager@wiktel.com>
parents: 12203
diff changeset
151 void yahoo_dest_colorht(void);
6629
bdc448cf4cb6 [gaim-migrate @ 7153]
Luke Schierer <lschiere@pidgin.im>
parents: 6513
diff changeset
152 char *yahoo_codes_to_html(const char *x);
bdc448cf4cb6 [gaim-migrate @ 7153]
Luke Schierer <lschiere@pidgin.im>
parents: 6513
diff changeset
153 char *yahoo_html_to_codes(const char *src);
6513
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
154
7827
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
155 /**
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
156 * Encode some text to send to the yahoo server.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
157 *
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
158 * @param gc The connection handle.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
159 * @param str The null terminated utf8 string to encode.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
160 * @param utf8 If not @c NULL, whether utf8 is okay or not.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
161 * Even if it is okay, we may not use it. If we
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
162 * used it, we set this to @c TRUE, else to
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
163 * @c FALSE. If @c NULL, false is assumed, and
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
164 * it is not dereferenced.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
165 * @return The g_malloced string in the appropriate encoding.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
166 */
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
167 char *yahoo_string_encode(GaimConnection *gc, const char *str, gboolean *utf8);
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
168
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
169 /**
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
170 * Decode some text received from the server.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
171 *
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
172 * @param gc The gc handle.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
173 * @param str The null terminated string to decode.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
174 * @param utf8 Did the server tell us it was supposed to be utf8?
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
175 * @return The decoded, utf-8 string, which must be g_free()'d.
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
176 */
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
177 char *yahoo_string_decode(GaimConnection *gc, const char *str, gboolean utf8);
ee32e030c9be [gaim-migrate @ 8479]
Ethan Blanton <elb@pidgin.im>
parents: 7651
diff changeset
178
9220
f0488214826f [gaim-migrate @ 10016]
Tim Ringenbach <marv@pidgin.im>
parents: 9164
diff changeset
179 /* previously-static functions, now needed for yahoo_profile.c */
f0488214826f [gaim-migrate @ 10016]
Tim Ringenbach <marv@pidgin.im>
parents: 9164
diff changeset
180 char *yahoo_tooltip_text(GaimBuddy *b);
f0488214826f [gaim-migrate @ 10016]
Tim Ringenbach <marv@pidgin.im>
parents: 9164
diff changeset
181
9161
c3fa2ad099a2 [gaim-migrate @ 9946]
Tim Ringenbach <marv@pidgin.im>
parents: 9062
diff changeset
182 /* yahoo_profile.c */
c3fa2ad099a2 [gaim-migrate @ 9946]
Tim Ringenbach <marv@pidgin.im>
parents: 9062
diff changeset
183 void yahoo_get_info(GaimConnection *gc, const char *name);
c3fa2ad099a2 [gaim-migrate @ 9946]
Tim Ringenbach <marv@pidgin.im>
parents: 9062
diff changeset
184
10937
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
185 /**
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
186 * Check to see whether the sender is permitted to send
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
187 *
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
188 * @param gc The gc handle.
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
189 * @param who The sender of the packet to check
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
190 */
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
191 gboolean yahoo_privacy_check
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
192 (GaimConnection *gc, const char *who);
ca3e0882d377 [gaim-migrate @ 12721]
Mark Doliner <mark@kingant.net>
parents: 10392
diff changeset
193
6513
63c449a1022f [gaim-migrate @ 7030]
Luke Schierer <lschiere@pidgin.im>
parents:
diff changeset
194 #endif /* _YAHOO_H_ */