/srv/mercurial-server/detachablepurple: c979bd9204a1: Dropped al...
Gilles Bedel
gillux at cpw.pidgin.im
Fri Jun 15 22:01:51 EDT 2012
Changeset: c979bd9204a1e33a3173d3c80763cdb2a8616736
Author: Gilles Bedel <gillux at cpw.pidgin.im>
Date: 2012-05-29 16:05 +0000
Branch: cpw.gillux.detachablepurple
URL: http://hg.pidgin.im/srv/mercurial-server/detachablepurple/rev/c979bd9204a1
Description:
Dropped all the remainings of the glib-dbus era code.
Goodbye, glib-dbus! I will not miss you.
diffstat:
libpurple/account.c | 3 -
libpurple/core.h | 8 -
libpurple/dbus-maybe.h | 24 ----
libpurple/dbus-purple.h | 17 --
libpurple/dbus-server.c | 24 ----
libpurple/dbus-server.h | 13 --
libpurple/dbus/account.c | 4 +-
libpurple/dbus/buddy.c | 1 -
libpurple/dbus/callback.c | 5 -
libpurple/dbus/chat.c | 1 -
libpurple/dbus/connection.c | 1 -
libpurple/dbus/constructor.c | 8 +-
libpurple/dbus/contact.c | 1 -
libpurple/dbus/group.c | 1 -
libpurple/marshallers.list | 10 -
libpurple/pobject.c | 257 +------------------------------------------
libpurple/pobject.h | 74 ------------
17 files changed, 5 insertions(+), 447 deletions(-)
diffs (truncated from 729 to 300 lines):
diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -988,9 +988,6 @@
/* Handle remote mode case */
if (purple_core_is_remote_mode())
return purple_account_connect_RPC(account);
- /* Handle mirror mode case */
- if (purple_core_is_mirror_mode())
- return;
purple_debug_info("account", "Connecting to account %s.\n", username);
diff --git a/libpurple/core.h b/libpurple/core.h
--- a/libpurple/core.h
+++ b/libpurple/core.h
@@ -84,10 +84,6 @@
* PURPLE_RUN_DAEMON_MODE: used in detachable session context, for the daemon
* instance, which wraps libpurple and communicate with several UI clients
* through DBus.
- * PURPLE_RUN_MIRROR_MODE: a special mode used in detachable sessions context
- * by the UI clients. It is used to handle "mirror" objects, to temporarly
- * and locally set a property without triggering any of the usual hooks
- * not desired in remote mode.
* PURPLE_RUN_REMOTE_MODE: used in detachable session context, for UI client
* instance, which makes its libpurple to connects to the daemon a forward
* calls and events.
@@ -96,7 +92,6 @@
PURPLE_RUN_NORMAL_MODE,
PURPLE_RUN_DAEMON_MODE,
PURPLE_RUN_REMOTE_MODE,
- PURPLE_RUN_MIRROR_MODE,
PURPLE_RUN_MODE_LAST
};
@@ -114,14 +109,11 @@
(purple_core_get_running_mode() == PURPLE_RUN_DAEMON_MODE)
# define purple_core_is_normal_mode() \
(purple_core_get_running_mode() == PURPLE_RUN_NORMAL_MODE)
-# define purple_core_is_mirror_mode() \
- (purple_core_get_running_mode() == PURPLE_RUN_MIRROR_MODE)
#else /* !HAVE_DBUS */
# define purple_core_is_remote_mode() (FALSE)
# define purple_core_is_daemon_mode() (FALSE)
# define purple_core_is_normal_mode() (TRUE )
-# define purple_core_is_mirror_mode() (FALSE)
#endif
/**
diff --git a/libpurple/dbus-maybe.h b/libpurple/dbus-maybe.h
--- a/libpurple/dbus-maybe.h
+++ b/libpurple/dbus-maybe.h
@@ -16,26 +16,6 @@
#include "dbus-server.h"
#include "debug.h"
-#define PURPLE_RPC_FAILED(func, error) \
-G_STMT_START { \
- purple_debug_error("dbus", "Failed to remotely call %s: %s\n", \
- #func, error->message); \
- g_error_free(error); \
-} G_STMT_END
-
-#define PURPLE_DBUS_REMOTELY_SET_PROP(account, set_func, gtype, name, var) \
-G_STMT_START { \
- GValue prop = {0, }; \
- if (purple_core_is_remote_mode()) { \
- g_value_init(&prop, gtype); \
- set_func(&prop, var); \
- if (!purple_dbus_remotely_set_obj_prop(PURPLE_OBJECT(account), \
- name, &prop)) \
- return; \
- g_value_unset(&prop); \
- } \
-} G_STMT_END
-
/* this provides a type check */
#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
type *typed_ptr = ptr; \
@@ -49,10 +29,6 @@
if (ptr) {} \
}
-#define PURPLE_RPC_FAILED(func, error)
-
-#define PURPLE_DBUS_REMOTELY_SET_PROP(account, set_func, gtype, name, var)
-
#define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
#define DBUS_EXPORT
diff --git a/libpurple/dbus-purple.h b/libpurple/dbus-purple.h
--- a/libpurple/dbus-purple.h
+++ b/libpurple/dbus-purple.h
@@ -29,22 +29,5 @@
#define DBUS_INTERFACE_PURPLE "im.pidgin.purple.PurpleInterface"
#define DBUS_PURPLE_SERVICE "im.pidgin.purple"
-#define DBUS_ACCOUNT_INTERFACE "im.pidgin.purple.account"
-
-#define DBUS_BLIST_INTERFACE "im.pidgin.purple.blist"
-
-#define DBUS_BUDDY_INTERFACE "im.pidgin.purple.buddy"
-
-#define DBUS_CHAT_INTERFACE "im.pidgin.purple.chat"
-
-#define DBUS_CONNECTION_INTERFACE "im.pidgin.purple.connection"
-
-#define DBUS_CONTACT_INTERFACE "im.pidgin.purple.contact"
-
-#define DBUS_GROUP_INTERFACE "im.pidgin.purple.group"
-
-#define DBUS_CONSTRUCTOR_INTERFACE "im.pidgin.purple.constructor"
-
-#define DBUS_CALLBACK_INTERFACE "im.pidgin.purple.callback"
#endif /* _DBUS_PURPLE_H_ */
diff --git a/libpurple/dbus-server.c b/libpurple/dbus-server.c
--- a/libpurple/dbus-server.c
+++ b/libpurple/dbus-server.c
@@ -49,7 +49,6 @@
#include "dbus-bindings.h"
#include "debug.h"
#include "core.h"
-#include "marshallers.h"
#include "savedstatuses.h"
#include "smiley.h"
#include "util.h"
@@ -435,29 +434,6 @@
return NULL;
}
-gboolean
-purple_dbus_remotely_set_obj_prop(PurpleObject* pobj, const char* prop_name,
- GValue* prop_value)
-{
- DBusGProxy *proxy;
- GError *error = NULL;
-
- proxy = purple_object_get_dbus_props_proxy(pobj);
- if (!dbus_g_proxy_call(proxy, "Set", &error,
- /* input parameters */
- G_TYPE_STRING, purple_object_get_dbus_obj_interface(pobj),
- G_TYPE_STRING, prop_name,
- G_TYPE_VALUE, prop_value,
- G_TYPE_INVALID,
- /* output parameters */
- G_TYPE_INVALID)) {
- purple_debug_error("dbus", "Failed to remotely set the `%s' property of the dbus object %s: %s\n", prop_name, purple_object_get_dbus_path(pobj), error->message);
- return FALSE;
- } else {
- return TRUE;
- }
-}
-
gchar*
purple_dbus_sanitize_dbus_path(const gchar *str)
{
diff --git a/libpurple/dbus-server.h b/libpurple/dbus-server.h
--- a/libpurple/dbus-server.h
+++ b/libpurple/dbus-server.h
@@ -206,19 +206,6 @@
void purple_dbus_uninit(void);
/**
- * A convenience function that remotely sets the given property of
- * a remote gobject.
- *
- * @param pobj The PURPLE_OBJECT(PurpleStuff) object you want to alter.
- * @param prop_name The property name.
- * @param prop_value The value you want to set.
- *
- * @return TRUE if the property as been succesfully set. FALSE if not, and in
- * this case an error message have been printed.
- */
-gboolean purple_dbus_remotely_set_obj_prop(PurpleObject* pobj, const char* prop_name, GValue* prop_value);
-
-/**
* Sanitize a given string so that it can be used as a valid dbus path.
* The dbus spec says it have to consist of [A-Za-z0-9_/] chars.
* http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
diff --git a/libpurple/dbus/account.c b/libpurple/dbus/account.c
--- a/libpurple/dbus/account.c
+++ b/libpurple/dbus/account.c
@@ -21,11 +21,11 @@
#include "internal.h"
#include "account.h"
+#include "core.h"
#include "dbus/account.h"
#include "dbus/callback.h"
#include "dbus/constructor.h"
-#include "dbus-maybe.h"
-#include "marshallers.h"
+#include "dbus-server.h"
#include "nullmarshaller.h"
/* move this, later */
diff --git a/libpurple/dbus/buddy.c b/libpurple/dbus/buddy.c
--- a/libpurple/dbus/buddy.c
+++ b/libpurple/dbus/buddy.c
@@ -24,7 +24,6 @@
#include "dbus/constructor.h"
#include "dbus/buddy.h"
#include "dbus/buddy.xml.h"
-#include "dbus-purple.h"
#include "dbus-server.h"
#include "pobject.h"
diff --git a/libpurple/dbus/callback.c b/libpurple/dbus/callback.c
--- a/libpurple/dbus/callback.c
+++ b/libpurple/dbus/callback.c
@@ -19,17 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
-#include <gobject/gvaluecollector.h> /* G_VALUE_COLLECT macro */
-
#include "internal.h"
#include "core.h"
#include "dbus/callback.h"
#include "dbus/callback.xml.h"
-#include "dbus-maybe.h"
-#include "dbus-purple.h"
#include "dbus-server.h"
#include "debug.h"
-#include "marshallers.h"
/**
* PurpleDBusCallback, a singleteon class that aims to run handle application
diff --git a/libpurple/dbus/chat.c b/libpurple/dbus/chat.c
--- a/libpurple/dbus/chat.c
+++ b/libpurple/dbus/chat.c
@@ -25,7 +25,6 @@
#include "dbus/chat.h"
#include "dbus/chat.xml.h"
#include "dbus/constructor.h"
-#include "dbus-purple.h"
#include "dbus-server.h"
#include "pobject.h"
diff --git a/libpurple/dbus/connection.c b/libpurple/dbus/connection.c
--- a/libpurple/dbus/connection.c
+++ b/libpurple/dbus/connection.c
@@ -25,7 +25,6 @@
#include "dbus/connection.xml.h"
#include "dbus/constructor.h"
#include "dbus-server.h"
-#include "dbus-purple.h"
#include "pobject.h"
#define DBUS_CONNECTION_BASEPATH "/im/pidgin/purple/connection"
diff --git a/libpurple/dbus/constructor.c b/libpurple/dbus/constructor.c
--- a/libpurple/dbus/constructor.c
+++ b/libpurple/dbus/constructor.c
@@ -19,21 +19,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
-#include <dbus/dbus-glib-bindings.h>
-
-/* Hack to allow purple_connection_new() in connection.h */
-#define _PURPLE_CONNECTION_C_
-
#include "internal.h"
#include "account.h"
#include "accountlist.h"
#include "connection.h"
+#include "core.h"
#include "dbus/constructor.h"
#include "dbus/constructor.xml.h"
-#include "dbus-maybe.h"
#include "dbus-server.h"
#include "debug.h"
-#include "marshallers.h"
#include "glib-2.30.h" /* g_dbus_gvariant_to_gvalue() */
diff --git a/libpurple/dbus/contact.c b/libpurple/dbus/contact.c
--- a/libpurple/dbus/contact.c
+++ b/libpurple/dbus/contact.c
@@ -24,7 +24,6 @@
#include "dbus/constructor.h"
#include "dbus/contact.h"
#include "dbus/contact.xml.h"
-#include "dbus-purple.h"
#include "dbus-server.h"
#include "pobject.h"
diff --git a/libpurple/dbus/group.c b/libpurple/dbus/group.c
--- a/libpurple/dbus/group.c
+++ b/libpurple/dbus/group.c
@@ -24,7 +24,6 @@
#include "dbus/constructor.h"
#include "dbus/group.h"
#include "dbus/group.xml.h"
-#include "dbus-purple.h"
#include "dbus-server.h"
#include "pobject.h"
More information about the Commits
mailing list