changeset 25499:6df81f2760a2

- add an ipc function to set alias for myself.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Tue, 05 Jun 2007 16:04:04 +0000
parents e62ec4b475ff
children 24d035ad12cd
files libpurple/protocols/msn/msn.c
diffstat 1 files changed, 20 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c	Tue Jun 05 06:41:10 2007 +0000
+++ b/libpurple/protocols/msn/msn.c	Tue Jun 05 16:04:04 2007 +0000
@@ -150,7 +150,7 @@
 	msn_cmdproc_send(cmdproc, "REA", "%s %s",
 					 purple_account_get_username(account),
 					 alias);
-	//yaz
+	// propagate change on server side to local --yaz
 	purple_account_set_alias(account, entry); //oct16
 }
 
@@ -263,11 +263,21 @@
 					   gc);
 }
 
-// XXX should not use this function?? --yaz
 static void
-msn_set_friendly_name(PurpleConnection *gc, const char *name, const char *alias)
+msn_ipc_init(PurplePlugin *plugin)
 {
-	msn_act_id(gc, alias);
+	purple_plugin_ipc_register(plugin, "msn_set_friendly_name",
+				   PURPLE_CALLBACK(msn_act_id),
+				   purple_marshal_VOID__POINTER_POINTER,
+				   purple_value_new(PURPLE_TYPE_UNKNOWN),2,
+				   purple_value_new(PURPLE_TYPE_POINTER),
+				   purple_value_new(PURPLE_TYPE_POINTER));
+}
+
+static void
+msn_ipc_end(PurplePlugin *plugin)
+{
+	purple_plugin_ipc_unregister_all(plugin);
 }
 
 static void
@@ -1969,6 +1979,9 @@
 	msn_switchboard_init();
 	msn_sync_init();
 
+	// yaz
+	msn_ipc_init(plugin);
+
 	return TRUE;
 }
 
@@ -1978,6 +1991,9 @@
 	msn_switchboard_end();
 	msn_sync_end();
 
+	// yaz
+	msn_ipc_end(plugin);
+
 	return TRUE;
 }