comparison libpurple/protocols/oscar/oscar.h @ 30007:0d3145e6b1d6

Change the oscar capabilities variable to be a guint64 everywhere instead of an enum, which can be 32 bits
author Mark Doliner <mark@kingant.net>
date Thu, 18 Mar 2010 04:53:49 +0000
parents 44165d2f71d6
children 59f4012b2b94
comparison
equal deleted inserted replaced
30006:ffc1f997cb91 30007:0d3145e6b1d6
342 OSCAR_DISCONNECT_INVALID_DATA, 342 OSCAR_DISCONNECT_INVALID_DATA,
343 OSCAR_DISCONNECT_COULD_NOT_CONNECT, 343 OSCAR_DISCONNECT_COULD_NOT_CONNECT,
344 OSCAR_DISCONNECT_RETRYING /* peer connections only */ 344 OSCAR_DISCONNECT_RETRYING /* peer connections only */
345 } OscarDisconnectReason; 345 } OscarDisconnectReason;
346 346
347 typedef enum 347 #define OSCAR_CAPABILITY_BUDDYICON 0x0000000000000001
348 { 348 #define OSCAR_CAPABILITY_TALK 0x0000000000000002
349 OSCAR_CAPABILITY_BUDDYICON = 0x00000001, 349 #define OSCAR_CAPABILITY_DIRECTIM 0x0000000000000004
350 OSCAR_CAPABILITY_TALK = 0x00000002, 350 #define OSCAR_CAPABILITY_CHAT 0x0000000000000008
351 OSCAR_CAPABILITY_DIRECTIM = 0x00000004, 351 #define OSCAR_CAPABILITY_GETFILE 0x0000000000000010
352 OSCAR_CAPABILITY_CHAT = 0x00000008, 352 #define OSCAR_CAPABILITY_SENDFILE 0x0000000000000020
353 OSCAR_CAPABILITY_GETFILE = 0x00000010, 353 #define OSCAR_CAPABILITY_GAMES 0x0000000000000040
354 OSCAR_CAPABILITY_SENDFILE = 0x00000020, 354 #define OSCAR_CAPABILITY_ADDINS 0x0000000000000080
355 OSCAR_CAPABILITY_GAMES = 0x00000040, 355 #define OSCAR_CAPABILITY_SENDBUDDYLIST 0x0000000000000100
356 OSCAR_CAPABILITY_ADDINS = 0x00000080, 356 #define OSCAR_CAPABILITY_GAMES2 0x0000000000000200
357 OSCAR_CAPABILITY_SENDBUDDYLIST = 0x00000100, 357 #define OSCAR_CAPABILITY_ICQ_DIRECT 0x0000000000000400
358 OSCAR_CAPABILITY_GAMES2 = 0x00000200, 358 #define OSCAR_CAPABILITY_APINFO 0x0000000000000800
359 OSCAR_CAPABILITY_ICQ_DIRECT = 0x00000400, 359 #define OSCAR_CAPABILITY_ICQRTF 0x0000000000001000
360 OSCAR_CAPABILITY_APINFO = 0x00000800, 360 #define OSCAR_CAPABILITY_EMPTY 0x0000000000002000
361 OSCAR_CAPABILITY_ICQRTF = 0x00001000, 361 #define OSCAR_CAPABILITY_ICQSERVERRELAY 0x0000000000004000
362 OSCAR_CAPABILITY_EMPTY = 0x00002000, 362 #define OSCAR_CAPABILITY_UNICODEOLD 0x0000000000008000
363 OSCAR_CAPABILITY_ICQSERVERRELAY = 0x00004000, 363 #define OSCAR_CAPABILITY_TRILLIANCRYPT 0x0000000000010000
364 OSCAR_CAPABILITY_UNICODEOLD = 0x00008000, 364 #define OSCAR_CAPABILITY_UNICODE 0x0000000000020000
365 OSCAR_CAPABILITY_TRILLIANCRYPT = 0x00010000, 365 #define OSCAR_CAPABILITY_INTEROPERATE 0x0000000000040000
366 OSCAR_CAPABILITY_UNICODE = 0x00020000, 366 #define OSCAR_CAPABILITY_SHORTCAPS 0x0000000000080000
367 OSCAR_CAPABILITY_INTEROPERATE = 0x00040000, 367 #define OSCAR_CAPABILITY_HIPTOP 0x0000000000100000
368 OSCAR_CAPABILITY_SHORTCAPS = 0x00080000, 368 #define OSCAR_CAPABILITY_SECUREIM 0x0000000000200000
369 OSCAR_CAPABILITY_HIPTOP = 0x00100000, 369 #define OSCAR_CAPABILITY_SMS 0x0000000000400000
370 OSCAR_CAPABILITY_SECUREIM = 0x00200000, 370 #define OSCAR_CAPABILITY_VIDEO 0x0000000000800000
371 OSCAR_CAPABILITY_SMS = 0x00400000, 371 #define OSCAR_CAPABILITY_ICHATAV 0x0000000001000000
372 OSCAR_CAPABILITY_VIDEO = 0x00800000, 372 #define OSCAR_CAPABILITY_LIVEVIDEO 0x0000000002000000
373 OSCAR_CAPABILITY_ICHATAV = 0x01000000, 373 #define OSCAR_CAPABILITY_CAMERA 0x0000000004000000
374 OSCAR_CAPABILITY_LIVEVIDEO = 0x02000000, 374 #define OSCAR_CAPABILITY_ICHAT_SCREENSHARE 0x0000000008000000
375 OSCAR_CAPABILITY_CAMERA = 0x04000000, 375 #define OSCAR_CAPABILITY_TYPING 0x0000000010000000
376 OSCAR_CAPABILITY_ICHAT_SCREENSHARE = 0x08000000, 376 #define OSCAR_CAPABILITY_NEWCAPS 0x0000000020000000
377 OSCAR_CAPABILITY_TYPING = 0x10000000, 377 #define OSCAR_CAPABILITY_XTRAZ 0x0000000040000000
378 OSCAR_CAPABILITY_NEWCAPS = 0x20000000, 378 #define OSCAR_CAPABILITY_GENERICUNKNOWN 0x0000000080000000
379 OSCAR_CAPABILITY_XTRAZ = 0x40000000, 379 #define OSCAR_CAPABILITY_LAST 0x0000000100000000
380 OSCAR_CAPABILITY_GENERICUNKNOWN = 0x80000000,
381 #warning Fix OSCAR_CAPABILITY_LAST situation
382 // TODO: We're out of bits. Rework things that depend on this or remove some capability. (Or, ensure this is a 64-bit type.)
383 OSCAR_CAPABILITY_LAST = 0x100000000
384 } OscarCapability;
385 380
386 /* 381 /*
387 * Byte Stream type. Sort of. 382 * Byte Stream type. Sort of.
388 * 383 *
389 * Use of this type serves a couple purposes: 384 * Use of this type serves a couple purposes:
1075 guint16 flags; 1070 guint16 flags;
1076 guint32 createtime; /* time_t */ 1071 guint32 createtime; /* time_t */
1077 guint32 membersince; /* time_t */ 1072 guint32 membersince; /* time_t */
1078 guint32 onlinesince; /* time_t */ 1073 guint32 onlinesince; /* time_t */
1079 guint32 sessionlen; /* in seconds */ 1074 guint32 sessionlen; /* in seconds */
1080 guint32 capabilities; 1075 guint64 capabilities;
1081 struct { 1076 struct {
1082 guint32 status; 1077 guint32 status;
1083 guint32 ipaddr; 1078 guint32 ipaddr;
1084 guint8 crap[0x25]; /* until we figure it out... */ 1079 guint8 crap[0x25]; /* until we figure it out... */
1085 } icqinfo; 1080 } icqinfo;
1140 1135
1141 aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *bn); 1136 aim_userinfo_t *aim_locate_finduserinfo(OscarData *od, const char *bn);
1142 void aim_locate_dorequest(OscarData *od); 1137 void aim_locate_dorequest(OscarData *od);
1143 1138
1144 /* 0x0002 */ int aim_locate_reqrights(OscarData *od); 1139 /* 0x0002 */ int aim_locate_reqrights(OscarData *od);
1145 /* 0x0004 */ int aim_locate_setcaps(OscarData *od, guint32 caps); 1140 /* 0x0004 */ int aim_locate_setcaps(OscarData *od, guint64 caps);
1146 /* 0x0004 */ int aim_locate_setprofile(OscarData *od, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len); 1141 /* 0x0004 */ int aim_locate_setprofile(OscarData *od, const char *profile_encoding, const gchar *profile, const int profile_len, const char *awaymsg_encoding, const gchar *awaymsg, const int awaymsg_len);
1147 /* 0x0005 */ int aim_locate_getinfo(OscarData *od, const char *, guint16); 1142 /* 0x0005 */ int aim_locate_getinfo(OscarData *od, const char *, guint16);
1148 /* 0x0009 */ int aim_locate_setdirinfo(OscarData *od, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy); 1143 /* 0x0009 */ int aim_locate_setdirinfo(OscarData *od, const char *first, const char *middle, const char *last, const char *maiden, const char *nickname, const char *street, const char *city, const char *state, const char *zip, int country, guint16 privacy);
1149 /* 0x000b */ int aim_locate_000b(OscarData *od, const char *bn); 1144 /* 0x000b */ int aim_locate_000b(OscarData *od, const char *bn);
1150 /* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy); 1145 /* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy);
1151 /* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags); 1146 /* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags);
1152 1147
1153 guint32 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len); 1148 guint64 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len);
1154 guint32 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len); 1149 guint64 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len);
1155 void aim_info_free(aim_userinfo_t *); 1150 void aim_info_free(aim_userinfo_t *);
1156 int aim_info_extract(OscarData *od, ByteStream *bs, aim_userinfo_t *); 1151 int aim_info_extract(OscarData *od, ByteStream *bs, aim_userinfo_t *);
1157 int aim_putuserinfo(ByteStream *bs, aim_userinfo_t *info); 1152 int aim_putuserinfo(ByteStream *bs, aim_userinfo_t *info);
1158 PurpleMood* icq_get_purple_moods(PurpleAccount *account); 1153 PurpleMood* icq_get_purple_moods(PurpleAccount *account);
1159 const char* icq_get_custom_icon_description(const char *mood); 1154 const char* icq_get_custom_icon_description(const char *mood);
1485 int aim_tlvlist_add_noval(GSList **list, const guint16 type); 1480 int aim_tlvlist_add_noval(GSList **list, const guint16 type);
1486 int aim_tlvlist_add_8(GSList **list, const guint16 type, const guint8 value); 1481 int aim_tlvlist_add_8(GSList **list, const guint16 type, const guint8 value);
1487 int aim_tlvlist_add_16(GSList **list, const guint16 type, const guint16 value); 1482 int aim_tlvlist_add_16(GSList **list, const guint16 type, const guint16 value);
1488 int aim_tlvlist_add_32(GSList **list, const guint16 type, const guint32 value); 1483 int aim_tlvlist_add_32(GSList **list, const guint16 type, const guint32 value);
1489 int aim_tlvlist_add_str(GSList **list, const guint16 type, const char *value); 1484 int aim_tlvlist_add_str(GSList **list, const guint16 type, const char *value);
1490 int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps, const char *mood); 1485 int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint64 caps, const char *mood);
1491 int aim_tlvlist_add_userinfo(GSList **list, guint16 type, aim_userinfo_t *userinfo); 1486 int aim_tlvlist_add_userinfo(GSList **list, guint16 type, aim_userinfo_t *userinfo);
1492 int aim_tlvlist_add_chatroom(GSList **list, guint16 type, guint16 exchange, const char *roomname, guint16 instance); 1487 int aim_tlvlist_add_chatroom(GSList **list, guint16 type, guint16 exchange, const char *roomname, guint16 instance);
1493 int aim_tlvlist_add_frozentlvlist(GSList **list, guint16 type, GSList **tl); 1488 int aim_tlvlist_add_frozentlvlist(GSList **list, guint16 type, GSList **tl);
1494 1489
1495 int aim_tlvlist_replace_raw(GSList **list, const guint16 type, const guint16 lenth, const guint8 *value); 1490 int aim_tlvlist_replace_raw(GSList **list, const guint16 type, const guint16 lenth, const guint8 *value);
1648 int byte_stream_putle32(ByteStream *bs, guint32 v); 1643 int byte_stream_putle32(ByteStream *bs, guint32 v);
1649 int byte_stream_putraw(ByteStream *bs, const guint8 *v, int len); 1644 int byte_stream_putraw(ByteStream *bs, const guint8 *v, int len);
1650 int byte_stream_putstr(ByteStream *bs, const char *str); 1645 int byte_stream_putstr(ByteStream *bs, const char *str);
1651 int byte_stream_putbs(ByteStream *bs, ByteStream *srcbs, int len); 1646 int byte_stream_putbs(ByteStream *bs, ByteStream *srcbs, int len);
1652 int byte_stream_putuid(ByteStream *bs, OscarData *od); 1647 int byte_stream_putuid(ByteStream *bs, OscarData *od);
1653 int byte_stream_putcaps(ByteStream *bs, guint32 caps); 1648 int byte_stream_putcaps(ByteStream *bs, guint64 caps);
1654 1649
1655 /** 1650 /**
1656 * Inserts a BART asset block into the given byte stream. The flags 1651 * Inserts a BART asset block into the given byte stream. The flags
1657 * and length are set appropriately based on the value of data. 1652 * and length are set appropriately based on the value of data.
1658 */ 1653 */