Changeset c8791f2 for protocols/yahoo/yahoo2_types.h
- Timestamp:
- 2010-07-24T13:29:48Z (14 years ago)
- Branches:
- master
- Children:
- 03f3828
- Parents:
- 938c305 (diff), c495217 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/yahoo/yahoo2_types.h
r938c305 rc8791f2 29 29 #endif 30 30 31 enum yahoo_status { 32 YAHOO_STATUS_DISCONNECTED = -1, 33 YAHOO_STATUS_AVAILABLE = 0, 34 YAHOO_STATUS_BRB, 35 YAHOO_STATUS_BUSY, 36 YAHOO_STATUS_NOTATHOME, 37 YAHOO_STATUS_NOTATDESK, 38 YAHOO_STATUS_NOTINOFFICE, 39 YAHOO_STATUS_ONPHONE, 40 YAHOO_STATUS_ONVACATION, 41 YAHOO_STATUS_OUTTOLUNCH, 42 YAHOO_STATUS_STEPPEDOUT, 43 YAHOO_STATUS_INVISIBLE = 12, 44 YAHOO_STATUS_CUSTOM = 99, 45 YAHOO_STATUS_IDLE = 999, 46 YAHOO_STATUS_WEBLOGIN = 0x5a55aa55, 47 YAHOO_STATUS_OFFLINE = 0x5a55aa56, /* don't ask */ 48 YAHOO_STATUS_NOTIFY = 0x16 /* TYPING */ 49 }; 50 #define YAHOO_STATUS_GAME 0x2 /* Games don't fit into the regular status model */ 51 52 enum yahoo_login_status { 53 YAHOO_LOGIN_OK = 0, 54 YAHOO_LOGIN_LOGOFF = 2, 55 YAHOO_LOGIN_UNAME = 3, 56 YAHOO_LOGIN_PASSWD = 13, 57 YAHOO_LOGIN_LOCK = 14, 58 YAHOO_LOGIN_DUPL = 99, 59 YAHOO_LOGIN_SOCK = -1, 60 }; 61 62 enum ypacket_status { 63 YPACKET_STATUS_DISCONNECTED = -1, 64 YPACKET_STATUS_DEFAULT = 0, 65 YPACKET_STATUS_SERVERACK = 1, 66 YPACKET_STATUS_GAME = 0x2, 67 YPACKET_STATUS_AWAY = 0x4, 68 YPACKET_STATUS_CONTINUED = 0x5, 69 YPACKET_STATUS_INVISIBLE = 12, 70 YPACKET_STATUS_NOTIFY = 0x16, /* TYPING */ 71 YPACKET_STATUS_WEBLOGIN = 0x5a55aa55, 72 YPACKET_STATUS_OFFLINE = 0x5a55aa56 73 }; 74 75 enum yahoo_error { 76 E_UNKNOWN = -1, 77 E_CONNECTION = -2, 78 E_SYSTEM = -3, 79 E_CUSTOM = 0, 80 81 /* responses from ignore buddy */ 82 E_IGNOREDUP = 2, 83 E_IGNORENONE = 3, 84 E_IGNORECONF = 12, 85 86 /* conference */ 87 E_CONFNOTAVAIL = 20 88 }; 89 90 enum yahoo_log_level { 91 YAHOO_LOG_NONE = 0, 92 YAHOO_LOG_FATAL, 93 YAHOO_LOG_ERR, 94 YAHOO_LOG_WARNING, 95 YAHOO_LOG_NOTICE, 96 YAHOO_LOG_INFO, 97 YAHOO_LOG_DEBUG 98 }; 31 enum yahoo_service { /* these are easier to see in hex */ 32 YAHOO_SERVICE_LOGON = 1, 33 YAHOO_SERVICE_LOGOFF, 34 YAHOO_SERVICE_ISAWAY, 35 YAHOO_SERVICE_ISBACK, 36 YAHOO_SERVICE_IDLE, /* 5 (placemarker) */ 37 YAHOO_SERVICE_MESSAGE, 38 YAHOO_SERVICE_IDACT, 39 YAHOO_SERVICE_IDDEACT, 40 YAHOO_SERVICE_MAILSTAT, 41 YAHOO_SERVICE_USERSTAT, /* 0xa */ 42 YAHOO_SERVICE_NEWMAIL, 43 YAHOO_SERVICE_CHATINVITE, 44 YAHOO_SERVICE_CALENDAR, 45 YAHOO_SERVICE_NEWPERSONALMAIL, 46 YAHOO_SERVICE_NEWCONTACT, 47 YAHOO_SERVICE_ADDIDENT, /* 0x10 */ 48 YAHOO_SERVICE_ADDIGNORE, 49 YAHOO_SERVICE_PING, 50 YAHOO_SERVICE_GOTGROUPRENAME, /* < 1, 36(old), 37(new) */ 51 YAHOO_SERVICE_SYSMESSAGE = 0x14, 52 YAHOO_SERVICE_SKINNAME = 0x15, 53 YAHOO_SERVICE_PASSTHROUGH2 = 0x16, 54 YAHOO_SERVICE_CONFINVITE = 0x18, 55 YAHOO_SERVICE_CONFLOGON, 56 YAHOO_SERVICE_CONFDECLINE, 57 YAHOO_SERVICE_CONFLOGOFF, 58 YAHOO_SERVICE_CONFADDINVITE, 59 YAHOO_SERVICE_CONFMSG, 60 YAHOO_SERVICE_CHATLOGON, 61 YAHOO_SERVICE_CHATLOGOFF, 62 YAHOO_SERVICE_CHATMSG = 0x20, 63 YAHOO_SERVICE_GAMELOGON = 0x28, 64 YAHOO_SERVICE_GAMELOGOFF, 65 YAHOO_SERVICE_GAMEMSG = 0x2a, 66 YAHOO_SERVICE_FILETRANSFER = 0x46, 67 YAHOO_SERVICE_VOICECHAT = 0x4A, 68 YAHOO_SERVICE_NOTIFY, 69 YAHOO_SERVICE_VERIFY, 70 YAHOO_SERVICE_P2PFILEXFER, 71 YAHOO_SERVICE_PEERTOPEER = 0x4F, /* Checks if P2P possible */ 72 YAHOO_SERVICE_WEBCAM, 73 YAHOO_SERVICE_AUTHRESP = 0x54, 74 YAHOO_SERVICE_LIST, 75 YAHOO_SERVICE_AUTH = 0x57, 76 YAHOO_SERVICE_AUTHBUDDY = 0x6d, 77 YAHOO_SERVICE_ADDBUDDY = 0x83, 78 YAHOO_SERVICE_REMBUDDY, 79 YAHOO_SERVICE_IGNORECONTACT, /* > 1, 7, 13 < 1, 66, 13, 0 */ 80 YAHOO_SERVICE_REJECTCONTACT, 81 YAHOO_SERVICE_GROUPRENAME = 0x89, /* > 1, 65(new), 66(0), 67(old) */ 82 YAHOO_SERVICE_Y7_PING = 0x8A, 83 YAHOO_SERVICE_CHATONLINE = 0x96, /* > 109(id), 1, 6(abcde) < 0,1 */ 84 YAHOO_SERVICE_CHATGOTO, 85 YAHOO_SERVICE_CHATJOIN, /* > 1 104-room 129-1600326591 62-2 */ 86 YAHOO_SERVICE_CHATLEAVE, 87 YAHOO_SERVICE_CHATEXIT = 0x9b, 88 YAHOO_SERVICE_CHATADDINVITE = 0x9d, 89 YAHOO_SERVICE_CHATLOGOUT = 0xa0, 90 YAHOO_SERVICE_CHATPING, 91 YAHOO_SERVICE_COMMENT = 0xa8, 92 YAHOO_SERVICE_GAME_INVITE = 0xb7, 93 YAHOO_SERVICE_STEALTH_PERM = 0xb9, 94 YAHOO_SERVICE_STEALTH_SESSION = 0xba, 95 YAHOO_SERVICE_AVATAR = 0xbc, 96 YAHOO_SERVICE_PICTURE_CHECKSUM = 0xbd, 97 YAHOO_SERVICE_PICTURE = 0xbe, 98 YAHOO_SERVICE_PICTURE_UPDATE = 0xc1, 99 YAHOO_SERVICE_PICTURE_UPLOAD = 0xc2, 100 YAHOO_SERVICE_YAB_UPDATE = 0xc4, 101 YAHOO_SERVICE_Y6_VISIBLE_TOGGLE = 0xc5, /* YMSG13, key 13: 2 = invisible, 1 = visible */ 102 YAHOO_SERVICE_Y6_STATUS_UPDATE = 0xc6, /* YMSG13 */ 103 YAHOO_SERVICE_PICTURE_STATUS = 0xc7, /* YMSG13, key 213: 0 = none, 1 = avatar, 2 = picture */ 104 YAHOO_SERVICE_VERIFY_ID_EXISTS = 0xc8, 105 YAHOO_SERVICE_AUDIBLE = 0xd0, 106 YAHOO_SERVICE_Y7_PHOTO_SHARING = 0xd2, 107 YAHOO_SERVICE_Y7_CONTACT_DETAILS = 0xd3, /* YMSG13 */ 108 YAHOO_SERVICE_Y7_CHAT_SESSION = 0xd4, 109 YAHOO_SERVICE_Y7_AUTHORIZATION = 0xd6, /* YMSG13 */ 110 YAHOO_SERVICE_Y7_FILETRANSFER = 0xdc, /* YMSG13 */ 111 YAHOO_SERVICE_Y7_FILETRANSFERINFO, /* YMSG13 */ 112 YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, /* YMSG13 */ 113 YAHOO_SERVICE_Y7_MINGLE = 0xe1, /* YMSG13 */ 114 YAHOO_SERVICE_Y7_CHANGE_GROUP = 0xe7, /* YMSG13 */ 115 YAHOO_SERVICE_MYSTERY = 0xef, /* Don't know what this is for */ 116 YAHOO_SERVICE_Y8_STATUS = 0xf0, /* YMSG15 */ 117 YAHOO_SERVICE_Y8_LIST = 0Xf1, /* YMSG15 */ 118 YAHOO_SERVICE_MESSAGE_CONFIRM = 0xfb, 119 YAHOO_SERVICE_WEBLOGIN = 0x0226, 120 YAHOO_SERVICE_SMS_MSG = 0x02ea 121 }; 122 123 enum yahoo_status { 124 YAHOO_STATUS_AVAILABLE = 0, 125 YAHOO_STATUS_BRB, 126 YAHOO_STATUS_BUSY, 127 YAHOO_STATUS_NOTATHOME, 128 YAHOO_STATUS_NOTATDESK, 129 YAHOO_STATUS_NOTINOFFICE, 130 YAHOO_STATUS_ONPHONE, 131 YAHOO_STATUS_ONVACATION, 132 YAHOO_STATUS_OUTTOLUNCH, 133 YAHOO_STATUS_STEPPEDOUT, 134 YAHOO_STATUS_INVISIBLE = 12, 135 YAHOO_STATUS_CUSTOM = 99, 136 YAHOO_STATUS_IDLE = 999, 137 YAHOO_STATUS_OFFLINE = 0x5a55aa56 /* don't ask */ 138 }; 139 140 enum ypacket_status { 141 YPACKET_STATUS_DISCONNECTED = -1, 142 YPACKET_STATUS_DEFAULT = 0, 143 YPACKET_STATUS_SERVERACK = 1, 144 YPACKET_STATUS_GAME = 0x2, 145 YPACKET_STATUS_AWAY = 0x4, 146 YPACKET_STATUS_CONTINUED = 0x5, 147 YPACKET_STATUS_INVISIBLE = 12, 148 YPACKET_STATUS_NOTIFY = 0x16, /* TYPING */ 149 YPACKET_STATUS_WEBLOGIN = 0x5a55aa55, 150 YPACKET_STATUS_OFFLINE = 0x5a55aa56 151 }; 152 153 #define YAHOO_STATUS_GAME 0x2 /* Games don't fit into the regular status model */ 154 155 enum yahoo_login_status { 156 YAHOO_LOGIN_OK = 0, 157 YAHOO_LOGIN_LOGOFF = 1, 158 YAHOO_LOGIN_UNAME = 3, 159 YAHOO_LOGIN_PASSWD = 13, 160 YAHOO_LOGIN_LOCK = 14, 161 YAHOO_LOGIN_DUPL = 99, 162 YAHOO_LOGIN_SOCK = -1, 163 YAHOO_LOGIN_UNKNOWN = 999 164 }; 165 166 enum yahoo_error { 167 E_UNKNOWN = -1, 168 E_CONNECTION = -2, 169 E_SYSTEM = -3, 170 E_CUSTOM = 0, 171 172 /* responses from ignore buddy */ 173 E_IGNOREDUP = 2, 174 E_IGNORENONE = 3, 175 E_IGNORECONF = 12, 176 177 /* conference */ 178 E_CONFNOTAVAIL = 20 179 }; 180 181 enum yahoo_log_level { 182 YAHOO_LOG_NONE = 0, 183 YAHOO_LOG_FATAL, 184 YAHOO_LOG_ERR, 185 YAHOO_LOG_WARNING, 186 YAHOO_LOG_NOTICE, 187 YAHOO_LOG_INFO, 188 YAHOO_LOG_DEBUG 189 }; 190 191 enum yahoo_file_transfer { 192 YAHOO_FILE_TRANSFER_INIT = 1, 193 YAHOO_FILE_TRANSFER_ACCEPT = 3, 194 YAHOO_FILE_TRANSFER_REJECT = 4, 195 YAHOO_FILE_TRANSFER_DONE = 5, 196 YAHOO_FILE_TRANSFER_RELAY, 197 YAHOO_FILE_TRANSFER_FAILED, 198 YAHOO_FILE_TRANSFER_UNKNOWN 199 }; 99 200 100 201 #define YAHOO_PROTO_VER 0x0010 … … 121 222 #define YAHOO_STYLE_URLOFF "\033[xlm" 122 223 123 enum yahoo_connection_type {124 YAHOO_CONNECTION_PAGER=0,125 YAHOO_CONNECTION_FT,126 YAHOO_CONNECTION_YAB,127 YAHOO_CONNECTION_WEBCAM_MASTER,128 YAHOO_CONNECTION_WEBCAM,129 YAHOO_CONNECTION_CHATCAT,130 YAHOO_CONNECTION_SEARCH,131 YAHOO_CONNECTION_AUTH,132 };133 134 enum yahoo_webcam_direction_type {135 YAHOO_WEBCAM_DOWNLOAD=0,136 137 };138 139 enum yahoo_stealth_visibility_type {140 YAHOO_STEALTH_DEFAULT = 0,141 142 143 };224 enum yahoo_connection_type { 225 YAHOO_CONNECTION_PAGER = 0, 226 YAHOO_CONNECTION_FT, 227 YAHOO_CONNECTION_YAB, 228 YAHOO_CONNECTION_WEBCAM_MASTER, 229 YAHOO_CONNECTION_WEBCAM, 230 YAHOO_CONNECTION_CHATCAT, 231 YAHOO_CONNECTION_SEARCH, 232 YAHOO_CONNECTION_AUTH 233 }; 234 235 enum yahoo_webcam_direction_type { 236 YAHOO_WEBCAM_DOWNLOAD = 0, 237 YAHOO_WEBCAM_UPLOAD 238 }; 239 240 enum yahoo_stealth_visibility_type { 241 YAHOO_STEALTH_DEFAULT = 0, 242 YAHOO_STEALTH_ONLINE, 243 YAHOO_STEALTH_PERM_OFFLINE 244 }; 144 245 145 246 /* chat member attribs */ 146 247 #define YAHOO_CHAT_MALE 0x8000 147 248 #define YAHOO_CHAT_FEMALE 0x10000 249 #define YAHOO_CHAT_FEMALE 0x10000 148 250 #define YAHOO_CHAT_DUNNO 0x400 149 251 #define YAHOO_CHAT_WEBCAM 0x10 150 252 151 enum yahoo_webcam_conn_type { Y_WCM_DIALUP, Y_WCM_DSL, Y_WCM_T1 }; 152 153 struct yahoo_webcam { 154 int direction; /* Uploading or downloading */ 155 int conn_type; /* 0=Dialup, 1=DSL/Cable, 2=T1/Lan */ 156 157 char *user; /* user we are viewing */ 158 char *server; /* webcam server to connect to */ 159 int port; /* webcam port to connect on */ 160 char *key; /* key to connect to the server with */ 161 char *description; /* webcam description */ 162 char *my_ip; /* own ip number */ 163 }; 164 165 struct yahoo_webcam_data { 166 unsigned int data_size; 167 unsigned int to_read; 168 unsigned int timestamp; 169 unsigned char packet_type; 170 }; 171 172 struct yahoo_data { 173 char *user; 174 char *password; 175 176 char *cookie_y; 177 char *cookie_t; 178 char *cookie_c; 179 char *login_cookie; 180 181 YList *buddies; 182 YList *ignore; 183 YList *identities; 184 char *login_id; 185 186 int current_status; 187 int initial_status; 188 int logged_in; 189 190 int session_id; 191 192 int client_id; 193 194 char *rawbuddylist; 195 char *ignorelist; 196 197 void *server_settings; 198 199 struct yahoo_process_status_entry *half_user; 200 }; 201 202 struct yab { 203 char *id; 204 char *fname; 205 char *lname; 206 char *nname; 207 char *email; 208 char *hphone; 209 char *wphone; 210 char *mphone; 211 int dbid; 212 }; 213 214 struct yahoo_buddy { 215 char *group; 216 char *id; 217 char *real_name; 218 struct yab *yab_entry; 219 }; 220 221 enum yahoo_search_type { 222 YAHOO_SEARCH_KEYWORD = 0, 223 YAHOO_SEARCH_YID, 224 YAHOO_SEARCH_NAME 225 }; 226 227 enum yahoo_search_gender { 228 YAHOO_GENDER_NONE = 0, 229 YAHOO_GENDER_MALE, 230 YAHOO_GENDER_FEMALE 231 }; 232 233 enum yahoo_search_agerange { 234 YAHOO_AGERANGE_NONE = 0 235 }; 236 237 struct yahoo_found_contact { 238 char *id; 239 char *gender; 240 char *location; 241 int age; 242 int online; 243 }; 253 enum yahoo_webcam_conn_type { Y_WCM_DIALUP, Y_WCM_DSL, Y_WCM_T1 }; 254 255 struct yahoo_webcam { 256 int direction; /* Uploading or downloading */ 257 int conn_type; /* 0=Dialup, 1=DSL/Cable, 2=T1/Lan */ 258 259 char *user; /* user we are viewing */ 260 char *server; /* webcam server to connect to */ 261 int port; /* webcam port to connect on */ 262 char *key; /* key to connect to the server with */ 263 char *description; /* webcam description */ 264 char *my_ip; /* own ip number */ 265 }; 266 267 struct yahoo_webcam_data { 268 unsigned int data_size; 269 unsigned int to_read; 270 unsigned int timestamp; 271 unsigned char packet_type; 272 }; 273 274 struct yahoo_data { 275 char *user; 276 char *password; 277 278 char *cookie_y; 279 char *cookie_t; 280 char *cookie_c; 281 char *cookie_b; 282 char *login_cookie; 283 char *crumb; 284 char *seed; 285 286 YList *buddies; 287 YList *ignore; 288 YList *identities; 289 char *login_id; 290 291 int current_status; 292 int initial_status; 293 int logged_in; 294 295 int session_id; 296 297 int client_id; 298 299 char *rawbuddylist; 300 char *ignorelist; 301 302 void *server_settings; 303 304 struct yahoo_process_status_entry *half_user; 305 }; 306 307 struct yab { 308 int yid; 309 char *id; 310 char *fname; 311 char *lname; 312 char *nname; 313 char *email; 314 char *hphone; 315 char *wphone; 316 char *mphone; 317 int dbid; 318 }; 319 320 struct yahoo_buddy { 321 char *group; 322 char *id; 323 char *real_name; 324 struct yab *yab_entry; 325 }; 326 327 enum yahoo_search_type { 328 YAHOO_SEARCH_KEYWORD = 0, 329 YAHOO_SEARCH_YID, 330 YAHOO_SEARCH_NAME 331 }; 332 333 enum yahoo_search_gender { 334 YAHOO_GENDER_NONE = 0, 335 YAHOO_GENDER_MALE, 336 YAHOO_GENDER_FEMALE 337 }; 338 339 enum yahoo_search_agerange { 340 YAHOO_AGERANGE_NONE = 0 341 }; 342 343 struct yahoo_found_contact { 344 char *id; 345 char *gender; 346 char *location; 347 int age; 348 int online; 349 }; 244 350 245 351 /* 246 352 * Function pointer to be passed to http get/post and send file 247 353 */ 248 typedef void (*yahoo_get_fd_callback)(int id, int fd, int error, void *data); 354 typedef void (*yahoo_get_fd_callback) (int id, void *fd, int error, 355 void *data); 249 356 250 357 /* 251 358 * Function pointer to be passed to yahoo_get_url_handle 252 359 */ 253 typedef void (*yahoo_get_url_handle_callback)(int id, int fd, int error,254 const char *filename, unsigned long size, void *data);255 256 257 struct yahoo_chat_member {258 char *id;259 intage;260 intattribs;261 char *alias;262 char *location;263 };264 265 struct yahoo_process_status_entry { 266 char *name; /* 7 name */267 int state; /* 10 state */268 int flags; /* 13 flags, bit 0 = pager, bit 1 = chat, bit 2 = game */269 int mobile; /* 60 mobile */270 char *msg; /* 19 custom status message */271 int away; /* 47 away (or invisible) */272 int buddy_session; /* 11 state */273 int f17; /* 17 in chat? then what about flags? */274 int idle; /* 137 seconds idle */275 int f138; /* 138 state */276 char *f184; /* 184 state */277 int f192; /* 192 state */278 int f10001; /* 10001 state */279 int f10002; /* 10002 state */280 int f198; /* 198 state */281 char *f197; /* 197 state */282 char *f205; /* 205 state */283 int f213; /* 213 state */284 };360 typedef void (*yahoo_get_url_handle_callback) (int id, void *fd, 361 int error, const char *filename, unsigned long size, 362 void *data); 363 364 struct yahoo_chat_member { 365 char *id; 366 int age; 367 int attribs; 368 char *alias; 369 char *location; 370 }; 371 372 struct yahoo_process_status_entry { 373 char *name; /* 7 name */ 374 int state; /* 10 state */ 375 int flags; /* 13 flags, bit 0 = pager, bit 1 = chat, bit 2 = game */ 376 int mobile; /* 60 mobile */ 377 char *msg; /* 19 custom status message */ 378 int away; /* 47 away (or invisible) */ 379 int buddy_session; /* 11 state */ 380 int f17; /* 17 in chat? then what about flags? */ 381 int idle; /* 137 seconds idle */ 382 int f138; /* 138 state */ 383 char *f184; /* 184 state */ 384 int f192; /* 192 state */ 385 int f10001; /* 10001 state */ 386 int f10002; /* 10002 state */ 387 int f198; /* 198 state */ 388 char *f197; /* 197 state */ 389 char *f205; /* 205 state */ 390 int f213; /* 213 state */ 391 }; 285 392 286 393 #ifdef __cplusplus 287 394 } 288 395 #endif 289 290 396 #endif
Note: See TracChangeset
for help on using the changeset viewer.