telepathy-mission-control: mcd_account_property_changed: rename to mcd_account_altered_by_plugin

Simon McVittie smcv at kemper.freedesktop.org
Thu Oct 4 08:19:47 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: bf70a86c39902ccf4fdad8aec1be1bbcc661d148
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=bf70a86c39902ccf4fdad8aec1be1bbcc661d148

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Sep  5 14:23:01 2012 +0100

mcd_account_property_changed: rename to mcd_account_altered_by_plugin

The parameter is either "param-" + a parameter, or a setting. It's
not necessarily a property name!

Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>

---

 src/mcd-account-manager.c |    8 ++++----
 src/mcd-account.c         |   19 ++++++++++++-------
 src/mcd-account.h         |    2 +-
 3 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c
index e7b2161..0cc0b6d 100644
--- a/src/mcd-account-manager.c
+++ b/src/mcd-account-manager.c
@@ -124,7 +124,7 @@ typedef struct
 typedef struct
 {
     McdAccount *account;
-    gchar *property;
+    gchar *key;
 } McdAlterAccountData;
 
 enum
@@ -226,11 +226,11 @@ async_altered_one_manager_cb (McdManager *cm,
 
     /* this triggers the final parameter check which results in dbus signals *
      * being fired and (potentially) the account going online automatically  */
-    mcd_account_property_changed (altered->account, altered->property);
+    mcd_account_altered_by_plugin (altered->account, altered->key);
 
     g_object_unref (cm);
     g_object_unref (altered->account);
-    g_free (altered->property);
+    g_free (altered->key);
     g_slice_free (McdAlterAccountData, altered);
 }
 
@@ -267,7 +267,7 @@ altered_one_cb (GObject *storage,
 
         g_object_ref (cm);
         altered->account = g_object_ref (account);
-        altered->property = g_strdup (key);
+        altered->key = g_strdup (key);
 
         mcd_manager_call_when_ready (cm, async_altered_one_manager_cb, altered);
     }
diff --git a/src/mcd-account.c b/src/mcd-account.c
index b1ff071..e6e85a4 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -2242,18 +2242,23 @@ account_remove (TpSvcAccount *svc, DBusGMethodInvocation *context)
     mcd_account_delete (self, account_remove_delete_cb, data);
 }
 
-/* tell the account that one of its properties has changed behind its back:  *
- * (as opposed to an external change triggered by DBus, for example) - This  *
- * typically occurs because an internal component (such as a storage plugin) *
- * wishes to notify us that something has changed.
- * This will trigger an update when the callback receives the new value     */
+/*
+ * @account: the account
+ * @name: a setting name, or "param-" + a parameter name
+ *
+ * Tell the account that one of its settings or parameters has changed
+ * behind its back (as opposed to an external change triggered by DBus,
+ * for example). This occurs when a storage plugin wishes to notify us
+ * that something has changed. This will trigger an update when the
+ * callback receives the new value. */
 void
-mcd_account_property_changed (McdAccount *account, const gchar *name)
+mcd_account_altered_by_plugin (McdAccount *account,
+                               const gchar *name)
 {
     /* parameters are handled en bloc, reinvoke self with bloc key: */
     if (g_str_has_prefix (name, "param-"))
     {
-        mcd_account_property_changed (account, "Parameters");
+        mcd_account_altered_by_plugin (account, "Parameters");
     }
     else
     {
diff --git a/src/mcd-account.h b/src/mcd-account.h
index 458287e..a213b91 100644
--- a/src/mcd-account.h
+++ b/src/mcd-account.h
@@ -127,7 +127,7 @@ gboolean mcd_account_check_request (McdAccount *account, GHashTable *request,
 gboolean mcd_account_parameter_is_secret (McdAccount *self,
                                               const gchar *name);
 
-void mcd_account_property_changed (McdAccount *account, const gchar *name);
+void mcd_account_altered_by_plugin (McdAccount *account, const gchar *name);
 
 gchar * mcd_account_dup_display_name (McdAccount *self);
 



More information about the telepathy-commits mailing list