changeset 6787:faa491042c66

[gaim-migrate @ 7326] the add_buddy prpl op now takes a group. It's horribly inconsistent with the rest. This stuff all needs to be updated. Maybe I'll replace it in 0.70cvs. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 07 Sep 2003 23:47:00 +0000
parents 8efafdc38718
children c1995194e3d1
files src/conversation.c src/dialogs.c src/protocols/gg/gg.c src/protocols/irc/irc.c src/protocols/jabber/jabber.c src/protocols/msn/msn.c src/protocols/msn/user.h src/protocols/napster/napster.c src/protocols/oscar/oscar.c src/protocols/toc/toc.c src/protocols/trepia/trepia.c src/protocols/yahoo/yahoo.c src/protocols/zephyr/zephyr.c src/prpl.h src/server.c src/server.h
diffstat 16 files changed, 25 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/src/conversation.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/conversation.c	Sun Sep 07 23:47:00 2003 +0000
@@ -297,7 +297,7 @@
 
 					while ((c = strchr(filename, '/')) != NULL)
 						filename = c + 1;
-					
+
 					g_snprintf(imgtag, sizeof(imgtag),
 							   "<IMG SRC=\"file://%s\" ID=\"%d\" "
 							   "DATASIZE=\"%d\">",
--- a/src/dialogs.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/dialogs.c	Sun Sep 07 23:47:00 2003 +0000
@@ -849,7 +849,7 @@
 		}
 		b = gaim_buddy_new(a->gc->account, who, whoalias);
 		gaim_blist_add_buddy(b, NULL, g, NULL);
-		serv_add_buddy(a->gc, who);
+		serv_add_buddy(a->gc, who, g);
 
 		if (c != NULL)
 			gaim_conversation_update(c, GAIM_CONV_UPDATE_ADD);
--- a/src/protocols/gg/gg.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/gg/gg.c	Sun Sep 07 23:47:00 2003 +0000
@@ -1,9 +1,9 @@
 /*
  * gaim - Gadu-Gadu Protocol Plugin
- * $Id: gg.c 7221 2003-09-02 03:41:10Z faceprint $
+ * $Id: gg.c 7326 2003-09-07 23:47:00Z chipx86 $
  *
  * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -582,7 +582,7 @@
 	return 1;
 }
 
-static void agg_add_buddy(GaimConnection *gc, const char *who)
+static void agg_add_buddy(GaimConnection *gc, const char *who, GaimGroup *group)
 {
 	struct agg_data *gd = (struct agg_data *)gc->proto_data;
 	if (invalid_uin(who))
--- a/src/protocols/irc/irc.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/irc/irc.c	Sun Sep 07 23:47:00 2003 +0000
@@ -289,7 +289,7 @@
 	irc_cmd_away(irc, "away", NULL, args);
 }
 
-static void irc_add_buddy(GaimConnection *gc, const char *who)
+static void irc_add_buddy(GaimConnection *gc, const char *who, GaimGroup *group)
 {
 	struct irc_conn *irc = (struct irc_conn *)gc->proto_data;
 	struct irc_buddy *ib = g_new0(struct irc_buddy, 1);
--- a/src/protocols/jabber/jabber.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/jabber/jabber.c	Sun Sep 07 23:47:00 2003 +0000
@@ -2760,7 +2760,7 @@
 		}
 }
 
-static void jabber_add_buddy(GaimConnection *gc, const char *name)
+static void jabber_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group)
 {
 	xmlnode x;
 	char *realwho;
--- a/src/protocols/msn/msn.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/msn/msn.c	Sun Sep 07 23:47:00 2003 +0000
@@ -639,7 +639,7 @@
 }
 
 static void
-msn_add_buddy(GaimConnection *gc, const char *name)
+msn_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group)
 {
 	MsnSession *session = gc->proto_data;
 	char *who;
--- a/src/protocols/msn/user.h	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/msn/user.h	Sun Sep 07 23:47:00 2003 +0000
@@ -26,6 +26,7 @@
 typedef struct _MsnUsers MsnUsers;
 
 #include "session.h"
+#include "msnobject.h"
 
 /**
  * A user.
@@ -51,6 +52,8 @@
 
 	size_t ref_count;       /**< The reference count.       */
 
+	MsnObject *msnobj;      /**< The user's MSN Object.     */
+
 	GHashTable *clientcaps; /**< The client's capabilities. */
 };
 
--- a/src/protocols/napster/napster.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/napster/napster.c	Sun Sep 07 23:47:00 2003 +0000
@@ -144,7 +144,7 @@
 }
 
 /* 207 - MSG_CLIENT_ADD_HOTLIST */
-static void nap_add_buddy(GaimConnection *gc, const char *name)
+static void nap_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group)
 {
 	nap_write_packet(gc, 207, "%s", name);
 }
--- a/src/protocols/oscar/oscar.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/oscar/oscar.c	Sun Sep 07 23:47:00 2003 +0000
@@ -4633,7 +4633,7 @@
 		aim_usersearch_address(od->sess, od->conn, email);
 }
 
-static void oscar_add_buddy(GaimConnection *gc, const char *name) {
+static void oscar_add_buddy(GaimConnection *gc, const char *name, GaimGroup *g) {
 	struct oscar_data *od = (struct oscar_data *)gc->proto_data;
 #ifdef NOSSI
 	aim_add_buddy(od->sess, od->conn, name);
--- a/src/protocols/toc/toc.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/toc/toc.c	Sun Sep 07 23:47:00 2003 +0000
@@ -1167,7 +1167,7 @@
 	sflap_send(g, buf, -1, TYPE_DATA);
 }
 
-static void toc_add_buddy(GaimConnection *g, const char *name)
+static void toc_add_buddy(GaimConnection *g, const char *name, GaimGroup *group)
 {
 	char buf[BUF_LEN * 2];
 	g_snprintf(buf, sizeof(buf), "toc_add_buddy %s", normalize(name));
--- a/src/protocols/trepia/trepia.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/trepia/trepia.c	Sun Sep 07 23:47:00 2003 +0000
@@ -1213,7 +1213,7 @@
 }
 
 static void
-trepia_add_buddy(GaimConnection *gc, const char *name)
+trepia_add_buddy(GaimConnection *gc, const char *name, GaimGroup *group)
 {
 }
 
--- a/src/protocols/yahoo/yahoo.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/yahoo/yahoo.c	Sun Sep 07 23:47:00 2003 +0000
@@ -1702,7 +1702,7 @@
 	yahoo_packet_free(pkt);
 }
 
-static void yahoo_add_buddy(GaimConnection *gc, const char *who)
+static void yahoo_add_buddy(GaimConnection *gc, const char *who, GaimGroup *foo)
 {
 	struct yahoo_data *yd = (struct yahoo_data *)gc->proto_data;
 	struct yahoo_packet *pkt;
--- a/src/protocols/zephyr/zephyr.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/protocols/zephyr/zephyr.c	Sun Sep 07 23:47:00 2003 +0000
@@ -746,7 +746,7 @@
 	z_call(ZClosePort());
 }
 
-static void zephyr_add_buddy(GaimConnection *gc, const char *buddy) { }
+static void zephyr_add_buddy(GaimConnection *gc, const char *buddy, GaimGroup *group) { }
 static void zephyr_remove_buddy(GaimConnection *gc, const char *buddy, const char *group) { }
 
 static int zephyr_chat_send(GaimConnection *gc, int id, const char *im)
--- a/src/prpl.h	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/prpl.h	Sun Sep 07 23:47:00 2003 +0000
@@ -260,7 +260,7 @@
 	void (*set_idle)(GaimConnection *, int idletime);
 	void (*change_passwd)(GaimConnection *, const char *old_pass,
 						  const char *new_pass);
-	void (*add_buddy)(GaimConnection *, const char *name);
+	void (*add_buddy)(GaimConnection *, const char *name, GaimGroup *group);
 	void (*add_buddies)(GaimConnection *, GList *buddies);
 	void (*remove_buddy)(GaimConnection *, const char *name,
 						const char *group);
--- a/src/server.c	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/server.c	Sun Sep 07 23:47:00 2003 +0000
@@ -157,7 +157,8 @@
 
 	if (prpl_info->options & OPT_PROTO_CORRECT_TIME)
 		serv_add_buddy(gc,
-				gaim_account_get_username(gaim_connection_get_account(gc)));
+				gaim_account_get_username(gaim_connection_get_account(gc)),
+				NULL);
 
 	update_keepalive(gc, TRUE);
 }
@@ -448,7 +449,7 @@
 		prpl_info->change_passwd(g, orig, new);
 }
 
-void serv_add_buddy(GaimConnection *g, const char *name)
+void serv_add_buddy(GaimConnection *g, const char *name, GaimGroup *group)
 {
 	GaimPluginProtocolInfo *prpl_info = NULL;
 
@@ -456,7 +457,7 @@
 		prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl);
 
 	if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->add_buddy)
-		prpl_info->add_buddy(g, name);
+		prpl_info->add_buddy(g, name, group);
 }
 
 void serv_add_buddies(GaimConnection *g, GList *buddies)
@@ -471,7 +472,7 @@
 			prpl_info->add_buddies(g, buddies);
 		else if (prpl_info->add_buddy) {
 			while (buddies) {
-				prpl_info->add_buddy(g, buddies->data);
+				prpl_info->add_buddy(g, buddies->data, NULL);
 				buddies = buddies->next;
 			}
 		}
--- a/src/server.h	Sun Sep 07 22:35:00 2003 +0000
+++ b/src/server.h	Sun Sep 07 23:47:00 2003 +0000
@@ -5,7 +5,7 @@
  * gaim
  *
  * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -48,7 +48,7 @@
 void serv_set_away_all(const char *);
 int  serv_send_typing(GaimConnection *, const char *, int);
 void serv_change_passwd(GaimConnection *, const char *, const char *);
-void serv_add_buddy(GaimConnection *, const char *);
+void serv_add_buddy(GaimConnection *, const char *, GaimGroup *);
 void serv_add_buddies(GaimConnection *, GList *);
 void serv_remove_buddy(GaimConnection *, const char *, const char *);
 void serv_remove_buddies(GaimConnection *, GList *, const char *);