Mercurial > pidgin
annotate src/protocols/yahoo/yahoo_packet.h @ 11202:ff4884029708
[gaim-migrate @ 13330]
Some compile warning fixes. It's very possible the perl warnings
were caused by some of my changes to the core last week
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Mon, 08 Aug 2005 02:21:57 +0000 |
| parents | 5d103f550f6a |
| children | f4e58e94ced3 |
| rev | line source |
|---|---|
| 10392 | 1 /** |
| 2 * @file yahoo_packet.h The Yahoo! protocol plugin | |
| 3 * | |
| 4 * gaim | |
| 5 * | |
| 6 * Gaim is the legal property of its developers, whose names are too numerous | |
| 7 * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 8 * source distribution. | |
| 9 * | |
| 10 * This program is free software; you can redistribute it and/or modify | |
| 11 * it under the terms of the GNU General Public License as published by | |
| 12 * the Free Software Foundation; either version 2 of the License, or | |
| 13 * (at your option) any later version. | |
| 14 * | |
| 15 * This program is distributed in the hope that it will be useful, | |
| 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 * GNU General Public License for more details. | |
| 19 * | |
| 20 * You should have received a copy of the GNU General Public License | |
| 21 * along with this program; if not, write to the Free Software | |
| 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 23 */ | |
| 24 | |
| 25 #ifndef _YAHOO_PACKET_H_ | |
| 26 #define _YAHOO_PACKET_H_ | |
| 27 | |
| 28 enum yahoo_service { /* these are easier to see in hex */ | |
| 29 YAHOO_SERVICE_LOGON = 1, | |
| 30 YAHOO_SERVICE_LOGOFF, | |
| 31 YAHOO_SERVICE_ISAWAY, | |
| 32 YAHOO_SERVICE_ISBACK, | |
| 33 YAHOO_SERVICE_IDLE, /* 5 (placemarker) */ | |
| 34 YAHOO_SERVICE_MESSAGE, | |
| 35 YAHOO_SERVICE_IDACT, | |
| 36 YAHOO_SERVICE_IDDEACT, | |
| 37 YAHOO_SERVICE_MAILSTAT, | |
| 38 YAHOO_SERVICE_USERSTAT, /* 0xa */ | |
| 39 YAHOO_SERVICE_NEWMAIL, | |
| 40 YAHOO_SERVICE_CHATINVITE, | |
| 41 YAHOO_SERVICE_CALENDAR, | |
| 42 YAHOO_SERVICE_NEWPERSONALMAIL, | |
| 43 YAHOO_SERVICE_NEWCONTACT, | |
| 44 YAHOO_SERVICE_ADDIDENT, /* 0x10 */ | |
| 45 YAHOO_SERVICE_ADDIGNORE, | |
| 46 YAHOO_SERVICE_PING, | |
| 47 YAHOO_SERVICE_GOTGROUPRENAME, | |
| 48 YAHOO_SERVICE_SYSMESSAGE = 0x14, | |
| 49 YAHOO_SERVICE_SKINNAME = 0x15, | |
| 50 YAHOO_SERVICE_PASSTHROUGH2 = 0x16, | |
| 51 YAHOO_SERVICE_CONFINVITE = 0x18, | |
| 52 YAHOO_SERVICE_CONFLOGON, | |
| 53 YAHOO_SERVICE_CONFDECLINE, | |
| 54 YAHOO_SERVICE_CONFLOGOFF, | |
| 55 YAHOO_SERVICE_CONFADDINVITE, | |
| 56 YAHOO_SERVICE_CONFMSG, | |
| 57 YAHOO_SERVICE_CHATLOGON, | |
| 58 YAHOO_SERVICE_CHATLOGOFF, | |
| 59 YAHOO_SERVICE_CHATMSG = 0x20, | |
| 60 YAHOO_SERVICE_GAMELOGON = 0x28, | |
| 61 YAHOO_SERVICE_GAMELOGOFF, | |
| 62 YAHOO_SERVICE_GAMEMSG = 0x2a, | |
| 63 YAHOO_SERVICE_FILETRANSFER = 0x46, | |
| 64 YAHOO_SERVICE_VOICECHAT = 0x4A, | |
| 65 YAHOO_SERVICE_NOTIFY = 0x4B, | |
| 66 YAHOO_SERVICE_VERIFY, | |
| 67 YAHOO_SERVICE_P2PFILEXFER, | |
|
11180
5d103f550f6a
[gaim-migrate @ 13291]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10989
diff
changeset
|
68 YAHOO_SERVICE_PEERTOPEER = 0x4F, |
| 10392 | 69 YAHOO_SERVICE_WEBCAM, |
| 70 YAHOO_SERVICE_AUTHRESP = 0x54, | |
| 71 YAHOO_SERVICE_LIST = 0x55, | |
| 72 YAHOO_SERVICE_AUTH = 0x57, | |
| 73 YAHOO_SERVICE_ADDBUDDY = 0x83, | |
| 74 YAHOO_SERVICE_REMBUDDY = 0x84, | |
| 75 YAHOO_SERVICE_IGNORECONTACT, /* > 1, 7, 13 < 1, 66, 13, 0*/ | |
| 76 YAHOO_SERVICE_REJECTCONTACT, | |
| 77 YAHOO_SERVICE_GROUPRENAME = 0x89, /* > 1, 65(new), 66(0), 67(old) */ | |
| 78 /* YAHOO_SERVICE_??? = 0x8A, */ | |
| 79 YAHOO_SERVICE_CHATONLINE = 0x96, /* > 109(id), 1, 6(abcde) < 0,1*/ | |
| 80 YAHOO_SERVICE_CHATGOTO, | |
| 81 YAHOO_SERVICE_CHATJOIN, /* > 1 104-room 129-1600326591 62-2 */ | |
| 82 YAHOO_SERVICE_CHATLEAVE, | |
| 83 YAHOO_SERVICE_CHATEXIT = 0x9b, | |
| 84 YAHOO_SERVICE_CHATADDINVITE = 0x9d, | |
| 85 YAHOO_SERVICE_CHATLOGOUT = 0xa0, | |
| 86 YAHOO_SERVICE_CHATPING, | |
| 87 YAHOO_SERVICE_COMMENT = 0xa8, | |
|
10989
b4919e8c634c
[gaim-migrate @ 12827]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10394
diff
changeset
|
88 YAHOO_SERVICE_STEALTH_PERM = 0xb9, |
|
b4919e8c634c
[gaim-migrate @ 12827]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
10394
diff
changeset
|
89 YAHOO_SERVICE_STEALTH_SESSION = 0xba, |
| 10392 | 90 YAHOO_SERVICE_AVATAR = 0xbc, |
| 91 YAHOO_SERVICE_PICTURE_CHECKSUM = 0xbd, | |
| 92 YAHOO_SERVICE_PICTURE = 0xbe, | |
| 93 YAHOO_SERVICE_PICTURE_UPDATE = 0xc1, | |
| 94 YAHOO_SERVICE_PICTURE_UPLOAD = 0xc2, | |
| 95 YAHOO_SERVICE_Y6_VISIBLE_TOGGLE = 0xc5, | |
| 96 YAHOO_SERVICE_Y6_STATUS_UPDATE = 0xc6, | |
| 97 YAHOO_SERVICE_AVATAR_UPDATE = 0xc7, | |
| 98 YAHOO_SERVICE_VERIFY_ID_EXISTS = 0xc8, | |
| 99 YAHOO_SERVICE_AUDIBLE = 0xd0, | |
| 100 YAHOO_SERVICE_WEBLOGIN = 0x0226, | |
| 101 YAHOO_SERVICE_SMS_MSG = 0x02ea | |
| 102 }; | |
| 103 | |
| 104 struct yahoo_pair { | |
| 105 int key; | |
| 106 char *value; | |
| 107 }; | |
| 108 | |
| 109 struct yahoo_packet { | |
| 110 guint16 service; | |
| 111 guint32 status; | |
| 112 guint32 id; | |
| 113 GSList *hash; | |
| 114 }; | |
| 115 | |
| 116 #define YAHOO_WEBMESSENGER_PROTO_VER 0x0065 | |
| 117 #define YAHOO_PROTO_VER 0x000c | |
| 118 | |
| 119 #define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) | |
| 120 | |
| 121 | |
| 122 struct yahoo_packet *yahoo_packet_new(enum yahoo_service service, | |
| 123 enum yahoo_status status, int id); | |
| 10394 | 124 void yahoo_packet_hash(struct yahoo_packet *pkt, const char *fmt, ...); |
| 125 void yahoo_packet_hash_str(struct yahoo_packet *pkt, int key, const char *value); | |
| 126 void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value); | |
| 10392 | 127 int yahoo_packet_send(struct yahoo_packet *pkt, struct yahoo_data *yd); |
| 128 int yahoo_packet_send_and_free(struct yahoo_packet *pkt, struct yahoo_data *yd); | |
| 129 int yahoo_packet_send_special(struct yahoo_packet *pkt, int fd, int pad); | |
| 130 void yahoo_packet_read(struct yahoo_packet *pkt, guchar *data, int len); | |
| 131 void yahoo_packet_write(struct yahoo_packet *pkt, guchar *data); | |
| 132 void yahoo_packet_dump(guchar *data, int len); | |
| 133 int yahoo_packet_length(struct yahoo_packet *pkt); | |
| 134 void yahoo_packet_free(struct yahoo_packet *pkt); | |
| 135 | |
| 136 #endif /* _YAHOO_PACKET_H_ */ |
