changeset 30015:24b7fa9c0c8b

merge of '4f0c3aedc3b013ab2175e57b71bab92988e4f812' and 'fe4644296ed29ff3456121616137d3b6c04d9ee8'
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 19 Mar 2010 02:44:22 +0000
parents a7875e67ad9c (diff) 79c6f28e44ec (current diff)
children 97005a2e99d7
files
diffstat 7 files changed, 125 insertions(+), 126 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_locate.c	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/family_locate.c	Fri Mar 19 02:44:22 2010 +0000
@@ -577,10 +577,10 @@
 	return NULL;
 }
 
-guint32
+guint64
 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len)
 {
-	guint32 flags = 0;
+	guint64 flags = 0;
 	int offset;
 
 	for (offset = 0; byte_stream_empty(bs) && (offset < len); offset += 0x10) {
@@ -637,10 +637,10 @@
 	return result;
 }
 
-guint32
+guint64
 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len)
 {
-	guint32 flags = 0;
+	guint64 flags = 0;
 	int offset;
 
 	for (offset = 0; byte_stream_empty(bs) && (offset < len); offset += 0x02) {
@@ -667,7 +667,7 @@
 }
 
 int
-byte_stream_putcaps(ByteStream *bs, guint32 caps)
+byte_stream_putcaps(ByteStream *bs, guint64 caps)
 {
 	int i;
 
@@ -1400,7 +1400,7 @@
  * Subtype 0x0004 - Set your client's capabilities.
  */
 int
-aim_locate_setcaps(OscarData *od, guint32 caps)
+aim_locate_setcaps(OscarData *od, guint64 caps)
 {
 	FlapConnection *conn;
 	PurpleAccount *account = purple_connection_get_account(od->gc);
--- a/libpurple/protocols/oscar/msgcookie.c	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/msgcookie.c	Fri Mar 19 02:44:22 2010 +0000
@@ -179,7 +179,7 @@
 }
 
 /* XXX I hate switch */
-int aim_msgcookie_gettype(int type)
+int aim_msgcookie_gettype(guint64 type)
 {
 	/* XXX: hokey-assed. needs fixed. */
 	switch(type) {
--- a/libpurple/protocols/oscar/oscar.c	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Fri Mar 19 02:44:22 2010 +0000
@@ -71,9 +71,18 @@
 
 #define OSCAR_CONNECT_STEPS 6
 
-static OscarCapability purple_caps = (OSCAR_CAPABILITY_CHAT | OSCAR_CAPABILITY_BUDDYICON | OSCAR_CAPABILITY_DIRECTIM |
-									  OSCAR_CAPABILITY_SENDFILE | OSCAR_CAPABILITY_UNICODE | OSCAR_CAPABILITY_INTEROPERATE |
-									  OSCAR_CAPABILITY_SHORTCAPS | OSCAR_CAPABILITY_TYPING |  OSCAR_CAPABILITY_ICQSERVERRELAY | OSCAR_CAPABILITY_NEWCAPS | OSCAR_CAPABILITY_XTRAZ);
+static guint64 purple_caps =
+	OSCAR_CAPABILITY_CHAT
+		| OSCAR_CAPABILITY_BUDDYICON
+		| OSCAR_CAPABILITY_DIRECTIM
+		| OSCAR_CAPABILITY_SENDFILE
+		| OSCAR_CAPABILITY_UNICODE
+		| OSCAR_CAPABILITY_INTEROPERATE
+		| OSCAR_CAPABILITY_SHORTCAPS
+		| OSCAR_CAPABILITY_TYPING
+		| OSCAR_CAPABILITY_ICQSERVERRELAY
+		| OSCAR_CAPABILITY_NEWCAPS
+		| OSCAR_CAPABILITY_XTRAZ;
 
 static guint8 features_aim[] = {0x01, 0x01, 0x01, 0x02};
 static guint8 features_icq[] = {0x01, 0x06};
@@ -471,7 +480,7 @@
 		charsetstr1 = "UTF-8";
 		charsetstr2 = purple_account_get_string(account, "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING);
 	}
-	
+
 	purple_debug_info("oscar", "Parsing IM part, charset=0x%04hx, charsubset=0x%04hx, datalen=%" G_GSIZE_FORMAT ", choice1=%s, choice2=%s, choice3=%s\n",
 					  charset, charsubset, datalen, charsetstr1, charsetstr2, (charsetstr3 ? charsetstr3 : ""));
 
@@ -673,7 +682,7 @@
 	return g_string_free(cpy, FALSE);
 }
 
-static gchar *oscar_caps_to_string(OscarCapability caps)
+static gchar *oscar_caps_to_string(guint64 caps)
 {
 	GString *str;
 	const gchar *tmp;
@@ -2594,7 +2603,6 @@
 	PurpleAccount *account;
 	PurpleMessageFlags flags = 0;
 	char *message = NULL;
-	char *rtfmsg = NULL;
 
 	g_return_val_if_fail(od != NULL, 0);
 	g_return_val_if_fail(od->gc != NULL, 0);
@@ -2606,8 +2614,9 @@
 	if (args == NULL)
 		return 0;
 
-	purple_debug_misc("oscar", "Incoming rendezvous message of type %u, "
-			"user %s, status %hu\n", args->type, userinfo->bn, args->status);
+	purple_debug_misc("oscar", "Incoming rendezvous message of type %"
+			G_GUINT64_FORMAT ", user %s, status %hu\n",
+			args->type, userinfo->bn, args->status);
 
 	if (args->msg != NULL)
 	{
@@ -2624,20 +2633,6 @@
 		}
 	}
 
-	if (args->info.rtfmsg.rtfmsg != NULL)
-	{
-		if (args->encoding != NULL)
-		{
-			char *encoding = NULL;
-			encoding = oscar_encoding_extract(args->encoding);
-			rtfmsg = oscar_encoding_to_utf8(account, encoding, args->info.rtfmsg.rtfmsg,
-			                                 strlen(args->info.rtfmsg.rtfmsg));
-			g_free(encoding);
-		} else {
-			if (g_utf8_validate(args->info.rtfmsg.rtfmsg, strlen(args->info.rtfmsg.rtfmsg), NULL))
-				rtfmsg = g_strdup(args->info.rtfmsg.rtfmsg);
-		}
-	}
 	if (args->type & OSCAR_CAPABILITY_CHAT)
 	{
 		char *encoding, *utf8name, *tmp;
@@ -2725,30 +2720,35 @@
 	{
 		purple_debug_info("oscar", "Got an ICQ Server Relay message of "
 				"type %d\n", args->info.rtfmsg.msgtype);
-		purple_debug_info("oscar", "Sending X-Status Reply\n");
-
-		if(args->info.rtfmsg.msgtype == 26)
-			icq_relay_xstatus(od, userinfo->bn, args->cookie);
-		
-		if(args->info.rtfmsg.msgtype == 1)
+
+		if (args->info.rtfmsg.msgtype == 1)
 		{
-			if(rtfmsg)
+			if (args->info.rtfmsg.rtfmsg != NULL)
 			{
-				serv_got_im(gc, userinfo->bn, rtfmsg, flags,
-				            time(NULL));
+				char *rtfmsg = NULL;
+				if (args->encoding != NULL) {
+					char *encoding = oscar_encoding_extract(args->encoding);
+					rtfmsg = oscar_encoding_to_utf8(account, encoding,
+							args->info.rtfmsg.rtfmsg, strlen(args->info.rtfmsg.rtfmsg));
+					g_free(encoding);
+				} else {
+					if (g_utf8_validate(args->info.rtfmsg.rtfmsg, strlen(args->info.rtfmsg.rtfmsg), NULL))
+						rtfmsg = g_strdup(args->info.rtfmsg.rtfmsg);
+				}
+				if (rtfmsg) {
+					serv_got_im(gc, userinfo->bn, rtfmsg, flags, time(NULL));
+					g_free(rtfmsg);
+				}
 			}
-			else
-			{
-				serv_got_im(gc, userinfo->bn,
-				            args->info.rtfmsg.rtfmsg, flags,
-				            time(NULL));
-			}
-		}
+		} else if (args->info.rtfmsg.msgtype == 26)
+			purple_debug_info("oscar", "Sending X-Status Reply\n");
+			icq_relay_xstatus(od, userinfo->bn, args->cookie);
+
 	}
 	else
 	{
-		purple_debug_error("oscar", "Unknown request class %hu\n",
-				args->type);
+		purple_debug_error("oscar", "Unknown request class %"
+				G_GUINT64_FORMAT "\n", args->type);
 	}
 
 	g_free(message);
@@ -3331,9 +3331,9 @@
 			/* Split at (carriage return/newline)'s, then rejoin later with BRs between. */
 			statusmsg = oscar_icqstatus(state);
 			splitmsg = g_strsplit(msg, "\r\n", 0);
-			
+
 			user_info = purple_notify_user_info_new();
-				
+
 			purple_notify_user_info_add_pair(user_info, _("UIN"), who);
 			purple_notify_user_info_add_pair(user_info, _("Status"), statusmsg);
 			purple_notify_user_info_add_section_break(user_info);
@@ -4758,8 +4758,8 @@
 		img = purple_buddy_icons_find_account_icon(account);
 		if (img) {
 			gconstpointer data = purple_imgstore_get_data(img);
-			args.iconlen   = purple_imgstore_get_size(img);
-			args.iconsum   = aimutil_iconsum(data, args.iconlen);
+			args.iconlen = purple_imgstore_get_size(img);
+			args.iconsum = aimutil_iconsum(data, args.iconlen);
 			args.iconstamp = purple_buddy_icons_get_account_icon_timestamp(account);
 
 			if ((args.iconlen != bi->ico_me_len) || (args.iconsum != bi->ico_me_csum) || (args.iconstamp != bi->ico_me_time)) {
@@ -5368,7 +5368,7 @@
 	{ /* If not in server list then prune from local list */
 		GSList *cur, *next;
 		GSList *buddies = purple_find_buddies(account, NULL);
-		
+
 		/* Buddies */
 		cur = NULL;
 
@@ -5807,28 +5807,34 @@
 	return 1;
 }
 
-static int purple_ssi_authrequest(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...) {
+static int purple_ssi_authrequest(OscarData *od, FlapConnection *conn, FlapFrame *fr, ...)
+{
 	PurpleConnection *gc = od->gc;
 	va_list ap;
-	char *bn;
-	char *msg;
+	const char *bn;
+	const char *msg;
 	PurpleAccount *account = purple_connection_get_account(gc);
-	gchar *reason = NULL;
 	struct name_data *data;
 	PurpleBuddy *buddy;
 
 	va_start(ap, fr);
-	bn = va_arg(ap, char *);
-	msg = va_arg(ap, char *);
+	bn = va_arg(ap, const char *);
+	msg = va_arg(ap, const char *);
 	va_end(ap);
 
 	purple_debug_info("oscar",
-			   "ssi: received authorization request from %s\n", bn);
+			"ssi: received authorization request from %s\n", bn);
 
 	buddy = purple_find_buddy(account, bn);
 
-	if (msg != NULL)
-		reason = purple_plugin_oscar_decode_im_part(account, bn, AIM_CHARSET_LATIN_1, 0x0000, msg, strlen(msg));
+	if (!msg) {
+		purple_debug_warning("oscar", "Received auth request from %s with "
+				"empty message\n", bn);
+	} else if (!g_utf8_validate(msg, -1, NULL)) {
+		purple_debug_warning("oscar", "Received auth request from %s with "
+				"invalid UTF-8 message\n", bn);
+		msg = NULL;
+	}
 
 	data = g_new(struct name_data, 1);
 	data->gc = gc;
@@ -5837,9 +5843,8 @@
 
 	purple_account_request_authorization(account, bn, NULL,
 			(buddy ? purple_buddy_get_alias_only(buddy) : NULL),
-			reason, buddy != NULL, purple_auth_grant,
+			msg, buddy != NULL, purple_auth_grant,
 			purple_auth_dontgrant_msgprompt, data);
-	g_free(reason);
 
 	return 1;
 }
@@ -6389,7 +6394,7 @@
 				purple_value_new(PURPLE_TYPE_STRING), NULL);
 
 	status_types = g_list_prepend(status_types, type);
-	
+
 	type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE,
 									 OSCAR_STATUS_ID_EVIL,
 									 _("Evil"), TRUE, is_icq, FALSE,
@@ -6651,23 +6656,22 @@
 		 * window. Let the user know that we canceled the Direct IM. */
 		conv = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, name);
 		purple_conversation_write(conv, NULL, _("You closed the connection."),
-		                          PURPLE_MESSAGE_SYSTEM, time(NULL));
-	}
-}
-
-static void oscar_get_icqxstatusmsg (PurpleBlistNode *node, gpointer ignore)
+				PURPLE_MESSAGE_SYSTEM, time(NULL));
+	}
+}
+
+static void oscar_get_icqxstatusmsg(PurpleBlistNode *node, gpointer ignore)
 {
 	PurpleBuddy *buddy;
 	PurpleConnection *gc;
 	PurpleAccount *account;
-	
-	
+
 	g_return_if_fail(PURPLE_BLIST_NODE_IS_BUDDY(node));
 
 	buddy = (PurpleBuddy *)node;
 	gc = purple_account_get_connection(buddy->account);
 	account = purple_connection_get_account(gc);
-	purple_debug_info("oscar",   "Manual X-Status Get From %s to %s:\n", purple_buddy_get_name(buddy), account->username);
+	purple_debug_info("oscar", "Manual X-Status Get From %s to %s:\n", purple_buddy_get_name(buddy), account->username);
 
 	icq_im_xstatus_request(gc->proto_data, purple_buddy_get_name(buddy));
 }
--- a/libpurple/protocols/oscar/oscar.h	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Fri Mar 19 02:44:22 2010 +0000
@@ -344,44 +344,39 @@
 	OSCAR_DISCONNECT_RETRYING /* peer connections only */
 } OscarDisconnectReason;
 
-typedef enum
-{
-	OSCAR_CAPABILITY_BUDDYICON            = 0x00000001,
-	OSCAR_CAPABILITY_TALK                 = 0x00000002,
-	OSCAR_CAPABILITY_DIRECTIM             = 0x00000004,
-	OSCAR_CAPABILITY_CHAT                 = 0x00000008,
-	OSCAR_CAPABILITY_GETFILE              = 0x00000010,
-	OSCAR_CAPABILITY_SENDFILE             = 0x00000020,
-	OSCAR_CAPABILITY_GAMES                = 0x00000040,
-	OSCAR_CAPABILITY_ADDINS               = 0x00000080,
-	OSCAR_CAPABILITY_SENDBUDDYLIST        = 0x00000100,
-	OSCAR_CAPABILITY_GAMES2               = 0x00000200,
-	OSCAR_CAPABILITY_ICQ_DIRECT           = 0x00000400,
-	OSCAR_CAPABILITY_APINFO               = 0x00000800,
-	OSCAR_CAPABILITY_ICQRTF               = 0x00001000,
-	OSCAR_CAPABILITY_EMPTY                = 0x00002000,
-	OSCAR_CAPABILITY_ICQSERVERRELAY       = 0x00004000,
-	OSCAR_CAPABILITY_UNICODEOLD           = 0x00008000,
-	OSCAR_CAPABILITY_TRILLIANCRYPT        = 0x00010000,
-	OSCAR_CAPABILITY_UNICODE              = 0x00020000,
-	OSCAR_CAPABILITY_INTEROPERATE         = 0x00040000,
-	OSCAR_CAPABILITY_SHORTCAPS            = 0x00080000,
-	OSCAR_CAPABILITY_HIPTOP               = 0x00100000,
-	OSCAR_CAPABILITY_SECUREIM             = 0x00200000,
-	OSCAR_CAPABILITY_SMS                  = 0x00400000,
-	OSCAR_CAPABILITY_VIDEO                = 0x00800000,
-	OSCAR_CAPABILITY_ICHATAV              = 0x01000000,
-	OSCAR_CAPABILITY_LIVEVIDEO            = 0x02000000,
-	OSCAR_CAPABILITY_CAMERA               = 0x04000000,
-	OSCAR_CAPABILITY_ICHAT_SCREENSHARE    = 0x08000000,
-	OSCAR_CAPABILITY_TYPING               = 0x10000000,
-	OSCAR_CAPABILITY_NEWCAPS              = 0x20000000,
-	OSCAR_CAPABILITY_XTRAZ                = 0x40000000,
-	OSCAR_CAPABILITY_GENERICUNKNOWN       = 0x80000000,
-#warning Fix OSCAR_CAPABILITY_LAST situation
-	// TODO: We're out of bits.  Rework things that depend on this or remove some capability. (Or, ensure this is a 64-bit type.)
-	OSCAR_CAPABILITY_LAST                 = 0x100000000	
-} OscarCapability;
+#define OSCAR_CAPABILITY_BUDDYICON             0x0000000000000001
+#define OSCAR_CAPABILITY_TALK                  0x0000000000000002
+#define OSCAR_CAPABILITY_DIRECTIM              0x0000000000000004
+#define OSCAR_CAPABILITY_CHAT                  0x0000000000000008
+#define OSCAR_CAPABILITY_GETFILE               0x0000000000000010
+#define OSCAR_CAPABILITY_SENDFILE              0x0000000000000020
+#define OSCAR_CAPABILITY_GAMES                 0x0000000000000040
+#define OSCAR_CAPABILITY_ADDINS                0x0000000000000080
+#define OSCAR_CAPABILITY_SENDBUDDYLIST         0x0000000000000100
+#define OSCAR_CAPABILITY_GAMES2                0x0000000000000200
+#define OSCAR_CAPABILITY_ICQ_DIRECT            0x0000000000000400
+#define OSCAR_CAPABILITY_APINFO                0x0000000000000800
+#define OSCAR_CAPABILITY_ICQRTF                0x0000000000001000
+#define OSCAR_CAPABILITY_EMPTY                 0x0000000000002000
+#define OSCAR_CAPABILITY_ICQSERVERRELAY        0x0000000000004000
+#define OSCAR_CAPABILITY_UNICODEOLD            0x0000000000008000
+#define OSCAR_CAPABILITY_TRILLIANCRYPT         0x0000000000010000
+#define OSCAR_CAPABILITY_UNICODE               0x0000000000020000
+#define OSCAR_CAPABILITY_INTEROPERATE          0x0000000000040000
+#define OSCAR_CAPABILITY_SHORTCAPS             0x0000000000080000
+#define OSCAR_CAPABILITY_HIPTOP                0x0000000000100000
+#define OSCAR_CAPABILITY_SECUREIM              0x0000000000200000
+#define OSCAR_CAPABILITY_SMS                   0x0000000000400000
+#define OSCAR_CAPABILITY_VIDEO                 0x0000000000800000
+#define OSCAR_CAPABILITY_ICHATAV               0x0000000001000000
+#define OSCAR_CAPABILITY_LIVEVIDEO             0x0000000002000000
+#define OSCAR_CAPABILITY_CAMERA                0x0000000004000000
+#define OSCAR_CAPABILITY_ICHAT_SCREENSHARE     0x0000000008000000
+#define OSCAR_CAPABILITY_TYPING                0x0000000010000000
+#define OSCAR_CAPABILITY_NEWCAPS               0x0000000020000000
+#define OSCAR_CAPABILITY_XTRAZ                 0x0000000040000000
+#define OSCAR_CAPABILITY_GENERICUNKNOWN        0x0000000080000000
+#define OSCAR_CAPABILITY_LAST                  0x0000000100000000
 
 /*
  * Byte Stream type. Sort of.
@@ -949,7 +944,7 @@
 {
 	guint16 status;
 	guchar cookie[8];
-	int type; /* One of the OSCAR_CAPABILITY_ constants */
+	guint64 type; /* One of the OSCAR_CAPABILITY_ constants */
 	const char *proxyip;
 	const char *clientip;
 	const char *verifiedip;
@@ -1077,7 +1072,7 @@
 	guint32 membersince; /* time_t */
 	guint32 onlinesince; /* time_t */
 	guint32 sessionlen;  /* in seconds */
-	guint32 capabilities;
+	guint64 capabilities;
 	struct {
 		guint32 status;
 		guint32 ipaddr;
@@ -1142,7 +1137,7 @@
 void aim_locate_dorequest(OscarData *od);
 
 /* 0x0002 */ int aim_locate_reqrights(OscarData *od);
-/* 0x0004 */ int aim_locate_setcaps(OscarData *od, guint32 caps);
+/* 0x0004 */ int aim_locate_setcaps(OscarData *od, guint64 caps);
 /* 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);
 /* 0x0005 */ int aim_locate_getinfo(OscarData *od, const char *, guint16);
 /* 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);
@@ -1150,8 +1145,8 @@
 /* 0x000f */ int aim_locate_setinterests(OscarData *od, const char *interest1, const char *interest2, const char *interest3, const char *interest4, const char *interest5, guint16 privacy);
 /* 0x0015 */ int aim_locate_getinfoshort(OscarData *od, const char *bn, guint32 flags);
 
-guint32 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len);
-guint32 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len);
+guint64 aim_locate_getcaps(OscarData *od, ByteStream *bs, int len);
+guint64 aim_locate_getcaps_short(OscarData *od, ByteStream *bs, int len);
 void aim_info_free(aim_userinfo_t *);
 int aim_info_extract(OscarData *od, ByteStream *bs, aim_userinfo_t *);
 int aim_putuserinfo(ByteStream *bs, aim_userinfo_t *info);
@@ -1487,7 +1482,7 @@
 int aim_tlvlist_add_16(GSList **list, const guint16 type, const guint16 value);
 int aim_tlvlist_add_32(GSList **list, const guint16 type, const guint32 value);
 int aim_tlvlist_add_str(GSList **list, const guint16 type, const char *value);
-int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps, const char *mood);
+int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint64 caps, const char *mood);
 int aim_tlvlist_add_userinfo(GSList **list, guint16 type, aim_userinfo_t *userinfo);
 int aim_tlvlist_add_chatroom(GSList **list, guint16 type, guint16 exchange, const char *roomname, guint16 instance);
 int aim_tlvlist_add_frozentlvlist(GSList **list, guint16 type, GSList **tl);
@@ -1650,7 +1645,7 @@
 int byte_stream_putstr(ByteStream *bs, const char *str);
 int byte_stream_putbs(ByteStream *bs, ByteStream *srcbs, int len);
 int byte_stream_putuid(ByteStream *bs, OscarData *od);
-int byte_stream_putcaps(ByteStream *bs, guint32 caps);
+int byte_stream_putcaps(ByteStream *bs, guint64 caps);
 
 /**
  * Inserts a BART asset block into the given byte stream.  The flags
@@ -1710,7 +1705,7 @@
 IcbmCookie *aim_mkcookie(guint8 *, int, void *);
 IcbmCookie *aim_checkcookie(OscarData *, const unsigned char *, const int);
 int aim_freecookie(OscarData *od, IcbmCookie *cookie);
-int aim_msgcookie_gettype(int type);
+int aim_msgcookie_gettype(guint64 type);
 int aim_cookie_free(OscarData *od, IcbmCookie *cookie);
 
 int aim_chat_readroominfo(ByteStream *bs, struct aim_chat_roominfo *outinfo);
--- a/libpurple/protocols/oscar/peer.c	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/peer.c	Fri Mar 19 02:44:22 2010 +0000
@@ -69,7 +69,7 @@
 #endif
 
 PeerConnection *
-peer_connection_find_by_type(OscarData *od, const char *bn, OscarCapability type)
+peer_connection_find_by_type(OscarData *od, const char *bn, guint64 type)
 {
 	GSList *cur;
 	PeerConnection *conn;
@@ -104,7 +104,7 @@
 }
 
 PeerConnection *
-peer_connection_new(OscarData *od, OscarCapability type, const char *bn)
+peer_connection_new(OscarData *od, guint64 type, const char *bn)
 {
 	PeerConnection *conn;
 	PurpleAccount *account;
@@ -897,7 +897,7 @@
  * Initiate a peer connection with someone.
  */
 void
-peer_connection_propose(OscarData *od, OscarCapability type, const char *bn)
+peer_connection_propose(OscarData *od, guint64 type, const char *bn)
 {
 	PeerConnection *conn;
 
--- a/libpurple/protocols/oscar/peer.h	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/peer.h	Fri Mar 19 02:44:22 2010 +0000
@@ -136,7 +136,7 @@
 struct _PeerConnection
 {
 	OscarData *od;
-	OscarCapability type;
+	guint64 type;
 	char *bn;
 	guchar magic[4];
 	guchar cookie[8];
@@ -228,11 +228,11 @@
  * @param type The type of the peer connection.  One of
  *        OSCAR_CAPABILITY_DIRECTIM or OSCAR_CAPABILITY_SENDFILE.
  */
-PeerConnection *peer_connection_new(OscarData *od, OscarCapability type, const char *bn);
+PeerConnection *peer_connection_new(OscarData *od, guint64 type, const char *bn);
 
 void peer_connection_destroy(PeerConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
 void peer_connection_schedule_destroy(PeerConnection *conn, OscarDisconnectReason reason, const gchar *error_message);
-PeerConnection *peer_connection_find_by_type(OscarData *od, const char *bn, OscarCapability type);
+PeerConnection *peer_connection_find_by_type(OscarData *od, const char *bn, guint64 type);
 PeerConnection *peer_connection_find_by_cookie(OscarData *od, const char *bn, const guchar *cookie);
 
 void peer_connection_listen_cb(gpointer data, gint source, PurpleInputCondition cond);
@@ -241,7 +241,7 @@
 
 void peer_connection_trynext(PeerConnection *conn);
 void peer_connection_finalize_connection(PeerConnection *conn);
-void peer_connection_propose(OscarData *od, OscarCapability type, const char *bn);
+void peer_connection_propose(OscarData *od, guint64 type, const char *bn);
 void peer_connection_got_proposition(OscarData *od, const gchar *bn, const gchar *message, IcbmArgsCh2 *args);
 
 /*
--- a/libpurple/protocols/oscar/tlv.c	Thu Mar 18 21:23:07 2010 +0000
+++ b/libpurple/protocols/oscar/tlv.c	Fri Mar 19 02:44:22 2010 +0000
@@ -407,7 +407,7 @@
  * @param caps Bitfield of capability flags to send
  * @return The size of the value added.
  */
-int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint32 caps, const char *mood)
+int aim_tlvlist_add_caps(GSList **list, const guint16 type, const guint64 caps, const char *mood)
 {
 	guint8 buf[256]; /* TODO: Don't use a fixed length buffer */
 	ByteStream bs;