Mercurial > pidgin.yaz
comparison src/protocols/yahoo/yahoo.h @ 7651:580bd39219a2
[gaim-migrate @ 8295]
Tim Ringenbach (marv_sf) " Because Sean asked nicely." implemented yahoo
file transfer for the masses. of this second version of the patch, he adds:
"Here's a new diff, that adds a right click send file menu
like oscar, and should still compile without those new
callbacks that got reverted."
i'm using (and perhaps abusing) the permission to commit yahoo patches from
him that i obtained in previous releases :-)
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 29 Nov 2003 03:30:01 +0000 |
parents | 67f9b43c402a |
children | ee32e030c9be |
comparison
equal
deleted
inserted
replaced
7650:6db061321ec4 | 7651:580bd39219a2 |
---|---|
22 | 22 |
23 #ifndef _YAHOO_H_ | 23 #ifndef _YAHOO_H_ |
24 #define _YAHOO_H_ | 24 #define _YAHOO_H_ |
25 | 25 |
26 #include "prpl.h" | 26 #include "prpl.h" |
27 | |
28 #define YAHOO_XFER_HOST "filetransfer.msg.yahoo.com" | |
29 #define YAHOO_XFER_PORT 80 | |
27 | 30 |
28 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" | 31 #define WEBMESSENGER_URL "http://login.yahoo.com/config/login?.src=pg" |
29 | 32 |
30 enum yahoo_service { /* these are easier to see in hex */ | 33 enum yahoo_service { /* these are easier to see in hex */ |
31 YAHOO_SERVICE_LOGON = 1, | 34 YAHOO_SERVICE_LOGON = 1, |
120 unsigned int conf_id; /* just a counter */ | 123 unsigned int conf_id; /* just a counter */ |
121 gboolean chat_online; | 124 gboolean chat_online; |
122 gboolean in_chat; | 125 gboolean in_chat; |
123 char *chat_name; | 126 char *chat_name; |
124 char *auth; | 127 char *auth; |
128 char *cookie_y; | |
129 char *cookie_t; | |
130 int session_id; | |
125 }; | 131 }; |
126 | 132 |
127 struct yahoo_pair { | 133 struct yahoo_pair { |
128 int key; | 134 int key; |
129 char *value; | 135 char *value; |
145 gboolean sms; | 151 gboolean sms; |
146 }; | 152 }; |
147 | 153 |
148 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (48) | 154 #define YAHOO_MAX_STATUS_MESSAGE_LENGTH (48) |
149 | 155 |
156 #ifdef YAHOO_WEBMESSENGER | |
157 #define YAHOO_PROTO_VER 0x0065 | |
158 #else | |
159 #define YAHOO_PROTO_VER 0x000b | |
160 #endif | |
161 | |
162 #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) | |
163 | |
164 /* sometimes i wish prpls could #include things from other prpls. then i could just | |
165 * use the routines from libfaim and not have to admit to knowing how they work. */ | |
166 #define yahoo_put16(buf, data) ( \ | |
167 (*(buf) = (unsigned char)((data)>>8)&0xff), \ | |
168 (*((buf)+1) = (unsigned char)(data)&0xff), \ | |
169 2) | |
170 #define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff)) | |
171 #define yahoo_put32(buf, data) ( \ | |
172 (*((buf)) = (unsigned char)((data)>>24)&0xff), \ | |
173 (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \ | |
174 (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \ | |
175 (*((buf)+3) = (unsigned char)(data)&0xff), \ | |
176 4) | |
177 #define yahoo_get32(buf) ((((*(buf))<<24)&0xff000000) + \ | |
178 (((*((buf)+1))<<16)&0x00ff0000) + \ | |
179 (((*((buf)+2))<< 8)&0x0000ff00) + \ | |
180 (((*((buf)+3) )&0x000000ff))) | |
181 | |
182 | |
150 struct yahoo_packet *yahoo_packet_new(enum yahoo_service service, enum yahoo_status status, int id); | 183 struct yahoo_packet *yahoo_packet_new(enum yahoo_service service, enum yahoo_status status, int id); |
151 void yahoo_packet_hash(struct yahoo_packet *pkt, int key, const char *value); | 184 void yahoo_packet_hash(struct yahoo_packet *pkt, int key, const char *value); |
152 int yahoo_send_packet(struct yahoo_data *yd, struct yahoo_packet *pkt); | 185 int yahoo_send_packet(struct yahoo_data *yd, struct yahoo_packet *pkt); |
186 void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data); | |
187 int yahoo_packet_length(struct yahoo_packet *pkt); | |
153 void yahoo_packet_free(struct yahoo_packet *pkt); | 188 void yahoo_packet_free(struct yahoo_packet *pkt); |
154 | 189 |
155 /* util.c */ | 190 /* util.c */ |
156 void yahoo_init_colorht(); | 191 void yahoo_init_colorht(); |
157 void yahoo_dest_colorht(); | 192 void yahoo_dest_colorht(); |