soc.2010.detachablepurple: 13f6b5fb: Removed the finally useless dbus path pa...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Sun Aug 8 11:14:02 EDT 2010


----------------------------------------------------------------------
Revision: 13f6b5fbc6649b6505aeffa0ba32368b71d7b6bd
Parent:   d784e7736b27d02ad23a9b516d4a76f6fbc61e8f
Author:   gillux at soc.pidgin.im
Date:     08/06/10 13:42:47
Branch:   im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/13f6b5fbc6649b6505aeffa0ba32368b71d7b6bd

Changelog: 

Removed the finally useless dbus path parameter in the GetAllAccounts dbus
method.

Changes against parent d784e7736b27d02ad23a9b516d4a76f6fbc61e8f

  patched  libpurple/dbus/constructor.c
  patched  libpurple/dbus/constructor.h
  patched  libpurple/dbus/constructor.xml

-------------- next part --------------
============================================================
--- libpurple/dbus/constructor.c	34190cc7e90de964a43559ba12b5af26eb3b07c1
+++ libpurple/dbus/constructor.c	c02fd0e6ac2212614c75bad8700712737eb2d1cd
@@ -223,9 +223,8 @@ pack_accounts_cb(PurpleAccount *acc, GPt
 
 	/* Setup the DBus struct, with our extracted data */
 	ok = dbus_g_type_struct_set(&acc_props,
-				0, purple_object_get_dbus_path(PURPLE_OBJECT(acc)),
-				1, purple_account_get_protocol_id(acc),
-				2, props_pack,
+				0, purple_account_get_protocol_id(acc),
+				1, props_pack,
 				G_MAXUINT);
 	g_ptr_array_foreach(props_pack, (GFunc)g_value_array_free, NULL);
 	g_ptr_array_free(props_pack, TRUE);
@@ -252,7 +251,6 @@ DBUS_purple_constructor_get_all_accounts
 	 * defined in dbus-constructor.h, is something like :
 	 * GPtrArray *account = [
 	 *     struct {
-	 *         char      *dbus_path_name;
 	 *         char      *protocol_id; // Needed to properly g_object_new()
 	 *         GPtrArray *properties [
 	 *             struct {
@@ -364,7 +362,6 @@ load_accounts_cb(GValueArray* box)
 {
 	GValue val = {0, };
 	PurpleAccount *acc;
-	char *path_name;
 	char *protocol_id;
 	GPtrArray *prop_array;
 	GValue *username;
@@ -374,7 +371,7 @@ load_accounts_cb(GValueArray* box)
 	g_value_init(&val, DBUS_STRUCT_ACCOUNT);
 	g_value_set_boxed(&val, box);
 	dbus_g_type_struct_get(&val,
-		0, &path_name, 1, &protocol_id, 2, &prop_array, G_MAXUINT);
+		0, &protocol_id, 1, &prop_array, G_MAXUINT);
 
 	/* First get the username, it is needed to construct the account */
 	username = get_prop_by_name(prop_array, "username");
@@ -394,7 +391,6 @@ load_accounts_cb(GValueArray* box)
 	g_ptr_array_foreach(prop_array, (GFunc)load_account_prop_cb, acc);
 	purple_core_set_running_mode(mode);
 
-	g_free(path_name);
 	g_free(protocol_id);
 	g_value_unset(username);
 	g_ptr_array_free(prop_array, TRUE);
============================================================
--- libpurple/dbus/constructor.h	4d9344627244424f33b1cd5817c180392904b8c7
+++ libpurple/dbus/constructor.h	00ebc68d459b52bf971f3e66ee5f6df3ad215ead
@@ -54,8 +54,7 @@ typedef struct {
 #define DBUS_STRUCT_ACCOUNT \
 ( \
 	dbus_g_type_get_struct("GValueArray", \
-		DBUS_TYPE_G_OBJECT_PATH, G_TYPE_STRING, DBUS_COLLECTION_PROPS, \
-		G_TYPE_INVALID) \
+		G_TYPE_STRING, DBUS_COLLECTION_PROPS, G_TYPE_INVALID) \
 )
 
 G_BEGIN_DECLS
============================================================
--- libpurple/dbus/constructor.xml	b6b15368478836425c43e628b0241f992e6022cd
+++ libpurple/dbus/constructor.xml	89633f956f700cee79554af90843fcbcc5802810
@@ -8,7 +8,7 @@
 			<arg type="s" name="protocol_id" direction="in" />
 		</method>
 		<method name="GetAllAccounts">
-			<arg type="a(osa(sv))" name="accounts" direction="out" />
+			<arg type="a(sa(sv))" name="accounts" direction="out" />
 		</method>
 
 		<signal name="PurpleConnectionCreated">


More information about the Commits mailing list