mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2025-01-05 19:15:32 +00:00
account-provider: Add debugging in the public functions
This commit is contained in:
parent
a888ac54b1
commit
80ec7d8a35
3 changed files with 35 additions and 0 deletions
|
@ -62,6 +62,8 @@ calls_account_provider_add_account (CallsAccountProvider *self,
|
||||||
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
||||||
g_return_val_if_fail (iface->add_account != NULL, FALSE);
|
g_return_val_if_fail (iface->add_account != NULL, FALSE);
|
||||||
|
|
||||||
|
g_debug ("Trying to add account for %s", calls_credentials_get_name (credentials));
|
||||||
|
|
||||||
return iface->add_account (self, credentials);
|
return iface->add_account (self, credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,6 +87,8 @@ calls_account_provider_remove_account (CallsAccountProvider *self,
|
||||||
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
||||||
g_return_val_if_fail (iface->remove_account != NULL, FALSE);
|
g_return_val_if_fail (iface->remove_account != NULL, FALSE);
|
||||||
|
|
||||||
|
g_debug ("Trying to remove account from %s", calls_credentials_get_name (credentials));
|
||||||
|
|
||||||
return iface->remove_account (self, credentials);
|
return iface->remove_account (self, credentials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,5 +110,7 @@ calls_account_provider_get_account (CallsAccountProvider *self,
|
||||||
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
iface = CALLS_ACCOUNT_PROVIDER_GET_IFACE (self);
|
||||||
g_return_val_if_fail (iface->get_account != NULL, NULL);
|
g_return_val_if_fail (iface->get_account != NULL, NULL);
|
||||||
|
|
||||||
|
g_debug ("Trying to get account from %s", calls_credentials_get_name (credentials));
|
||||||
|
|
||||||
return iface->get_account (self, credentials);
|
return iface->get_account (self, credentials);
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,3 +389,29 @@ calls_credentials_update_from_keyfile (CallsCredentials *self,
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
calls_credentials_get_name (CallsCredentials *self)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (CALLS_IS_CREDENTIALS (self), NULL);
|
||||||
|
|
||||||
|
return self->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
calls_credentials_set_name (CallsCredentials *self,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
g_return_if_fail (CALLS_IS_CREDENTIALS (self));
|
||||||
|
|
||||||
|
if (!name)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (g_strcmp0 (name, self->name) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
g_free (self->name);
|
||||||
|
self->name = g_strdup (name);
|
||||||
|
|
||||||
|
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_NAME]);
|
||||||
|
}
|
||||||
|
|
|
@ -37,6 +37,9 @@ CallsCredentials *calls_credentials_new ();
|
||||||
gboolean calls_credentials_update_from_keyfile (CallsCredentials *self,
|
gboolean calls_credentials_update_from_keyfile (CallsCredentials *self,
|
||||||
GKeyFile *key_file,
|
GKeyFile *key_file,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
void calls_credentials_set_name (CallsCredentials *self,
|
||||||
|
const char *name);
|
||||||
|
const char *calls_credentials_get_name (CallsCredentials *self);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue