soc.2010.detachablepurple: ec4a4481: Wrapped purple_account_connect() for dbu...
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Fri Jul 16 23:55:41 EDT 2010
----------------------------------------------------------------------
Revision: ec4a4481a9aac4127b9c8203d5616fb9de1e92a0
Parent: 7339cdfc38658e912e72513e6b5905db98a81f81
Author: gillux at soc.pidgin.im
Date: 07/16/10 23:49:59
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/ec4a4481a9aac4127b9c8203d5616fb9de1e92a0
Changelog:
Wrapped purple_account_connect() for dbus.
Changes against parent 7339cdfc38658e912e72513e6b5905db98a81f81
patched libpurple/account-dbus.c
patched libpurple/account-dbus.h
patched libpurple/account.c
patched libpurple/dbus-prototypes/account.xml
-------------- next part --------------
============================================================
--- libpurple/account.c e42249583617eba2538c5a0179eb3e723c72c683
+++ libpurple/account.c aaeb655bdcc95594823a482e8de276e3c060fa14
@@ -999,6 +999,10 @@ purple_account_connect(PurpleAccount *ac
return;
}
+ /* Handle remote mode case */
+ if (purple_core_is_remote_mode())
+ return purple_account_connect_RPC(account);
+
purple_debug_info("account", "Connecting to account %s.\n", username);
prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
============================================================
--- libpurple/account-dbus.c 1164ccc31c15c0800b299eb5438c975ab3c49cb5
+++ libpurple/account-dbus.c 5bf39b1aaad4807bc86c10e2105b5bf52c7b9109
@@ -5,6 +5,7 @@
#include "internal.h"
#include "account.h"
#include "account-dbus.h"
+#include "dbus-account-client.h"
#include "dbus-constructor-client.h"
#include "dbus-maybe.h"
@@ -51,3 +52,21 @@ purple_account_new_RPC(const char *usern
return account;
}
+
+void
+purple_account_connect_RPC(PurpleAccount* account)
+{
+ DBusGProxy* proxy;
+ GError *error = NULL;
+
+ proxy = purple_object_get_dbus_obj_proxy(PURPLE_OBJECT(account));
+ if (!im_pidgin_purple_account_connect(proxy, &error))
+ PURPLE_RPC_FAILED(purple_account_connect, error);
+}
+
+gboolean
+DBUS_purple_account_connect(PurpleAccount *account, GError** error)
+{
+ purple_account_connect(account);
+ return TRUE;
+}
============================================================
--- libpurple/account-dbus.h 72d07e3bbebbe67a058d4591e5b02988ba8f4212
+++ libpurple/account-dbus.h c6fa1bdbfe23cf1bae620bc3b25cf638dca97d08
@@ -6,8 +6,19 @@ PurpleAccount* purple_account_new_RPC(co
*/
PurpleAccount* purple_account_new_RPC(const char *username, const char *protocol_id);
+/**
+ * Client side purple_account_connect() wrapper.
+ */
+void purple_account_connect_RPC(PurpleAccount* account);
+
+/**
+ * Server side purple_account_connect() wrapper.
+ */
+gboolean DBUS_purple_account_connect(PurpleAccount *account, GError** error);
+
#else /* !HAVE_DBUS */
#define purple_account_new_RPC(username, protocol_id) (NULL)
+#define purple_account_connect_RPC(account) ((void)0)
#endif /* HAVE_DBUS */
============================================================
--- libpurple/dbus-prototypes/account.xml a8f123b30abd47eb859e9354bbf5264076c65a22
+++ libpurple/dbus-prototypes/account.xml 4a4a315f59542cb0bde564c1cd87c07ac432247e
@@ -9,5 +9,7 @@
<property type="s" name="buddy-icon-path" access="readwrite" />
<property type="b" name="remember-password" access="readwrite" />
<property type="b" name="check-mail" access="readwrite" />
+
+ <method name="Connect" />
</interface>
</node>
More information about the Commits
mailing list