aboutsummaryrefslogtreecommitdiff
path: root/src/mm-bearer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-bearer.c')
-rw-r--r--src/mm-bearer.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/mm-bearer.c b/src/mm-bearer.c
index 7f92677b..4a7e7b49 100644
--- a/src/mm-bearer.c
+++ b/src/mm-bearer.c
@@ -68,12 +68,28 @@ struct _MMBearerPrivate {
/*****************************************************************************/
+static void
+bearer_expose_properties (MMBearer *self)
+{
+ MMBearerProperties *properties;
+ GVariant *dictionary;
+
+ properties = MM_BEARER_GET_CLASS (self)->expose_properties (self);
+ dictionary = mm_bearer_properties_get_dictionary (properties);
+ mm_gdbus_bearer_set_properties (MM_GDBUS_BEARER (self), dictionary);
+ g_variant_unref (dictionary);
+ g_object_unref (properties);
+}
+
void
mm_bearer_export (MMBearer *self)
{
static guint id = 0;
gchar *path;
+ /* Expose properties before exporting */
+ bearer_expose_properties (self);
+
path = g_strdup_printf (MM_DBUS_BEARER_PREFIX "/%d", id++);
g_object_set (self,
MM_BEARER_PATH, path,
@@ -637,21 +653,6 @@ mm_bearer_cmp_properties (MMBearer *self,
/*****************************************************************************/
-void
-mm_bearer_expose_properties (MMBearer *bearer,
- MMBearerProperties *properties)
-{
- GVariant *dictionary;
-
- /* Keep the whole list of properties in the interface */
- dictionary = mm_bearer_properties_get_dictionary (properties);
- mm_gdbus_bearer_set_properties (MM_GDBUS_BEARER (bearer),
- dictionary);
- g_variant_unref (dictionary);
-}
-
-/*****************************************************************************/
-
static void
set_property (GObject *object,
guint prop_id,