diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-04-30 15:18:44 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2009-05-05 12:17:57 +0100 |
commit | 5861c235fe526fd9c45a59fe24c0c02d0feb185a (patch) | |
tree | fd8c05a2ab8078222ba5ef9a0e38b67764e94265 | |
parent | bd2340b2b440853170832e34f70943490c9306a5 (diff) |
McdAccountManager: pass properties around internally
-rw-r--r-- | src/mcd-account-manager-creation.c | 3 | ||||
-rw-r--r-- | src/mcd-account-manager-priv.h | 2 | ||||
-rw-r--r-- | src/mcd-account-manager.c | 11 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/mcd-account-manager-creation.c b/src/mcd-account-manager-creation.c index 55b0c336..9d65b278 100644 --- a/src/mcd-account-manager-creation.c +++ b/src/mcd-account-manager-creation.c @@ -121,7 +121,8 @@ account_manager_create_account (McSvcAccountManagerInterfaceCreation *self, cd->context = context; _mcd_account_manager_create_account (MCD_ACCOUNT_MANAGER (self), manager, protocol, display_name, - parameters, create_account_cb, cd, + parameters, properties, + create_account_cb, cd, (GDestroyNotify)mcd_creation_data_free); } diff --git a/src/mcd-account-manager-priv.h b/src/mcd-account-manager-priv.h index e4f6203f..80465d84 100644 --- a/src/mcd-account-manager-priv.h +++ b/src/mcd-account-manager-priv.h @@ -42,7 +42,7 @@ typedef void (*McdGetAccountCb) (McdAccountManager *account_manager, G_GNUC_INTERNAL void _mcd_account_manager_create_account (McdAccountManager *account_manager, const gchar *manager, const gchar *protocol, - const gchar *display_name, GHashTable *params, + const gchar *display_name, GHashTable *params, GHashTable *properties, McdGetAccountCb callback, gpointer user_data, GDestroyNotify destroy); G_GNUC_INTERNAL diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c index 6096a23d..19cd065e 100644 --- a/src/mcd-account-manager.c +++ b/src/mcd-account-manager.c @@ -99,6 +99,7 @@ typedef struct { McdAccountManager *account_manager; GHashTable *parameters; + GHashTable *properties; McdGetAccountCb callback; gpointer user_data; GDestroyNotify destroy; @@ -312,6 +313,12 @@ static void mcd_create_account_data_free (McdCreateAccountData *cad) { g_hash_table_unref (cad->parameters); + + if (cad->properties != NULL) + { + g_hash_table_unref (cad->properties); + } + g_slice_free (McdCreateAccountData, cad); } @@ -407,6 +414,7 @@ _mcd_account_manager_create_account (McdAccountManager *account_manager, const gchar *protocol, const gchar *display_name, GHashTable *params, + GHashTable *properties, McdGetAccountCb callback, gpointer user_data, GDestroyNotify destroy) @@ -449,6 +457,7 @@ _mcd_account_manager_create_account (McdAccountManager *account_manager, cad = g_slice_new (McdCreateAccountData); cad->account_manager = account_manager; cad->parameters = g_hash_table_ref (params); + cad->properties = (properties ? g_hash_table_ref (properties) : NULL); cad->callback = callback; cad->user_data = user_data; cad->destroy = destroy; @@ -490,7 +499,7 @@ account_manager_create_account (McSvcAccountManager *self, { _mcd_account_manager_create_account (MCD_ACCOUNT_MANAGER (self), manager, protocol, display_name, - parameters, + parameters, NULL, create_account_cb, context, NULL); } |