soc.2010.detachablepurple: 48ccd0de: Reverted the gpointers to DBusGProxys. N...
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Thu Aug 12 00:37:04 EDT 2010
----------------------------------------------------------------------
Revision: 48ccd0de0771f8f3f1af4e6631692d9c432841bc
Parent: 6d1e4328e4fb0d31ba08823c2fecb0d7e9c62dbe
Author: gillux at soc.pidgin.im
Date: 08/11/10 19:52:24
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/48ccd0de0771f8f3f1af4e6631692d9c432841bc
Changelog:
Reverted the gpointers to DBusGProxys. Now it's properly surrouned by #ifdefs
and we added the dbus cflags everywhere, there is no reason to keep these
meaningless types. Also fixed purple_object_get_dbus_props()'s type warning.
Changes against parent 6d1e4328e4fb0d31ba08823c2fecb0d7e9c62dbe
patched libpurple/pobject.c
patched libpurple/pobject.h
-------------- next part --------------
============================================================
--- libpurple/pobject.c 6c4bbe15c337e084f5281cdae0f67bd583b5cdf5
+++ libpurple/pobject.c 38302660f3991b981d0a1a0475af2d9fa688f8c7
@@ -41,16 +41,12 @@ struct _PurpleObjectPrivate
* e.g. im.pidgin.purple.account.
*/
char* dbus_purple_interface;
- /* This is actually a DBusGProxy*, but we hold it as a pointer
- * to avoid to have to include dbus just *everywhere* beceause
- * of this definition. This proxy is for the related object interface,
- * which is set in the dbus_purple_interface field.
- */
- gpointer dbus_obj_proxy;
- /* This is a DBusGProxy* too, but this time for the dbus properties
- * interface org.freedesktop.DBus.Properties.
- */
- gpointer dbus_props_proxy;
+ /* This proxy is for the PurpleObject subclass object interface
+ * set in the dbus_purple_interface field. */
+ DBusGProxy *dbus_obj_proxy;
+ /* Another proxy, this time for the dbus properties
+ * interface org.freedesktop.DBus.Properties. */
+ DBusGProxy *dbus_props_proxy;
char* dbus_path;
};
@@ -304,7 +300,7 @@ purple_object_set_dbus_obj_interface(Pur
priv->dbus_purple_interface = g_strdup(interface);
}
-gpointer
+DBusGProxy *
purple_object_get_dbus_obj_proxy(PurpleObject *pobj)
{
PurpleObjectPrivate *priv;
@@ -314,7 +310,7 @@ purple_object_get_dbus_obj_proxy(PurpleO
return priv->dbus_obj_proxy;
}
-gpointer
+DBusGProxy *
purple_object_get_dbus_props_proxy(PurpleObject *pobj)
{
PurpleObjectPrivate *priv;
@@ -539,7 +535,7 @@ GPtrArray*
}
GPtrArray*
-purple_object_get_dbus_props(GType object_type, char *interface)
+purple_object_get_dbus_props(GType object_type, const char *interface)
{
GPtrArray *props_a;
char *props;
============================================================
--- libpurple/pobject.h 2d604aada43b7dce4d8537d044e215118476cc13
+++ libpurple/pobject.h fac160f0d1097e0f16383286a3e36118290499b3
@@ -71,18 +71,15 @@ gpointer purple_object_get_ui_data(Purpl
* the gobject properties. The proxy returned by this function is the one for
* the PurpleStuff object, such as im.pidgin.purple.account for PurpleAccount.
*
- * We use a gpointer here but we mean a DBusDProxy. It is to avoid to include
- * dbus everywhere pobject.h is included.
- *
* @param pobj The PurpleObject we want to get the DBusDProxy from.
* @return The DBusDProxy.
*/
-gpointer purple_object_get_dbus_obj_proxy(PurpleObject *pobj);
+DBusGProxy * purple_object_get_dbus_obj_proxy(PurpleObject *pobj);
/**
* The same for the org.freedesktop.DBus.Properties interface.
*/
-gpointer purple_object_get_dbus_props_proxy(PurpleObject *pobj);
+DBusGProxy * purple_object_get_dbus_props_proxy(PurpleObject *pobj);
/**
* Gets the dbus interface name we use for purple related methods and signals,
@@ -138,7 +135,7 @@ void purple_object_type_install_dbus_inf
*
* @return An array of strings, the properties names.
*/
-GPtrArray* purple_object_get_dbus_props(GType object_type, char *interface);
+GPtrArray* purple_object_get_dbus_props(GType object_type, const char *interface);
/**
* Gets the dbus path associated with this PurpleObject.
More information about the Commits
mailing list