diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-08-29 11:18:11 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-09-07 14:29:47 +0100 |
commit | 362ef681dbaea571ccfccc3dbe06f2218780d217 (patch) | |
tree | f02b499ade09f546310e0b2682f6d05934ac7250 | |
parent | d14283c0220d24772372128d534e8e230a3b2088 (diff) | |
download | telepathy-mission-control-362ef681dbaea571ccfccc3dbe06f2218780d217.tar.gz |
mcd-dbusprop: remove support for filtering property setting through an ACL
This provided an asynchronous API for getting and setting properties,
which nothing actually calls into, and nothing in MC supports setting
properties asynchronously anyway. Into the bin it goes!
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54633
-rw-r--r-- | src/mcd-dbusprop.c | 106 | ||||
-rw-r--r-- | src/mcd-dbusprop.h | 28 |
2 files changed, 0 insertions, 134 deletions
diff --git a/src/mcd-dbusprop.c b/src/mcd-dbusprop.c index e48927d0..01307f66 100644 --- a/src/mcd-dbusprop.c +++ b/src/mcd-dbusprop.c @@ -32,9 +32,6 @@ #include "mcd-dbusprop.h" #include "mcd-debug.h" -#include "mission-control-plugins/mission-control-plugins.h" -#include "mission-control-plugins/implementation.h" - #define MCD_INTERFACES_QUARK get_interfaces_quark() static GQuark @@ -188,25 +185,6 @@ mcd_dbusprop_set_property (TpSvcDBusProperties *self, } void -dbusprop_acl_set (TpSvcDBusProperties *self, - const gchar *interface, - const gchar *property, - const GValue *value, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params) -{ - gchar *name = g_strdup_printf ("%s.%s", interface, property); - gboolean ok = mcp_dbus_acl_authorised (dbus, context, - DBUS_ACL_TYPE_SET_PROPERTY, - name, params); - g_free (name); - - if (ok) - dbusprop_set (self, interface, property, value, context); -} - -void dbusprop_set (TpSvcDBusProperties *self, const gchar *interface_name, const gchar *property_name, @@ -253,25 +231,6 @@ mcd_dbusprop_get_property (TpSvcDBusProperties *self, } void -dbusprop_acl_get (TpSvcDBusProperties *self, - const gchar *interface, - const gchar *property, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params) -{ - gchar *name = g_strdup_printf ("%s.%s", interface, property); - gboolean ok = mcp_dbus_acl_authorised (dbus, context, - DBUS_ACL_TYPE_GET_PROPERTY, - name, params); - g_free (name); - - if (ok) - dbusprop_get (self, interface, property, context); -} - - -void dbusprop_get (TpSvcDBusProperties *self, const gchar *interface_name, const gchar *property_name, @@ -339,24 +298,6 @@ get_all_iter (GetAllData *data) } } -void -dbusprop_acl_get_all (TpSvcDBusProperties *self, - const gchar *interface, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params) -{ - gchar *name = g_strdup_printf ("%s.*", interface); - gboolean ok = mcp_dbus_acl_authorised (dbus, context, - DBUS_ACL_TYPE_GET_PROPERTY, - name, params); - - g_free (name); - - if (ok) - dbusprop_get_all (self, interface, context); -} - typedef struct { TpSvcDBusProperties *tp_svc_props; @@ -364,53 +305,6 @@ typedef struct gchar *property; } DBusPropAsyncData; -static void -dbusprop_acl_get_all_async_complete (DBusGMethodInvocation *context, - gpointer data) -{ - DBusPropAsyncData *ad = data; - - dbusprop_get_all (ad->tp_svc_props, ad->interface, context); -} - -static void -dbusprop_acl_get_all_async_cleanup (gpointer data) -{ - DBusPropAsyncData *ad = data; - - g_object_unref (ad->tp_svc_props); - g_free (ad->interface); - g_free (ad->property); - g_slice_free (DBusPropAsyncData, data); -} - -void -dbusprop_acl_get_all_async_start (TpSvcDBusProperties *self, - const gchar *interface, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params) -{ - DBusPropAsyncData *data = g_slice_new0 (DBusPropAsyncData); - gchar *name = g_strdup_printf ("%s.*", interface); - - data->tp_svc_props = g_object_ref (self); - data->interface = g_strdup (interface); - data->property = NULL; - - mcp_dbus_acl_authorised_async (dbus, - context, - DBUS_ACL_TYPE_GET_PROPERTY, - name, - params, - dbusprop_acl_get_all_async_complete, - data, - dbusprop_acl_get_all_async_cleanup); - - g_free (name); -} - - void dbusprop_get_all (TpSvcDBusProperties *self, const gchar *interface_name, diff --git a/src/mcd-dbusprop.h b/src/mcd-dbusprop.h index fbac31bb..fa5091c2 100644 --- a/src/mcd-dbusprop.h +++ b/src/mcd-dbusprop.h @@ -119,34 +119,6 @@ gboolean mcd_dbusprop_get_property (TpSvcDBusProperties *self, GValue *value, GError **error); -void dbusprop_acl_set (TpSvcDBusProperties *self, - const gchar *interface, - const gchar *property, - const GValue *value, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params); - -void dbusprop_acl_get (TpSvcDBusProperties *self, - const gchar *interface, - const gchar *property, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable * params); - -void dbusprop_acl_get_all (TpSvcDBusProperties *self, - const gchar *interface, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params); - -void -dbusprop_acl_get_all_async_start (TpSvcDBusProperties *self, - const gchar *interface, - DBusGMethodInvocation *context, - TpDBusDaemon *dbus, - GHashTable *params); - void dbusprop_set (TpSvcDBusProperties *self, const gchar *interface_name, const gchar *property_name, |