[rhythmbox] audioscrobbler: add getters for RBAudioscrobblerAccount properties
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] audioscrobbler: add getters for RBAudioscrobblerAccount properties
- Date: Tue, 21 Sep 2010 10:48:55 +0000 (UTC)
commit 8404c7d999d14187fd4fc20d38bac44ec7bbff9a
Author: Jamie Nicol <jamie thenicols net>
Date: Tue Jun 15 16:12:21 2010 +0100
audioscrobbler: add getters for RBAudioscrobblerAccount properties
plugins/audioscrobbler/rb-audioscrobbler-account.c | 24 +++++++++++++++++--
plugins/audioscrobbler/rb-audioscrobbler-account.h | 4 +++
2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-account.c b/plugins/audioscrobbler/rb-audioscrobbler-account.c
index fd5b130..91f2825 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-account.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-account.c
@@ -252,13 +252,13 @@ rb_audioscrobbler_account_get_property (GObject *object,
switch (prop_id) {
case PROP_USERNAME:
- g_value_set_string (value, account->priv->username);
+ g_value_set_string (value, rb_audioscrobbler_account_get_username (account));
break;
case PROP_SESSION_KEY:
- g_value_set_string (value, account->priv->session_key);
+ g_value_set_string (value, rb_audioscrobbler_account_get_session_key (account));
break;
case PROP_LOGIN_STATUS:
- g_value_set_enum (value, account->priv->login_status);
+ g_value_set_enum (value, rb_audioscrobbler_account_get_login_status (account));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -283,6 +283,24 @@ rb_audioscrobbler_account_set_property (GObject *object,
}
}
+const char *
+rb_audioscrobbler_account_get_username (RBAudioscrobblerAccount *account)
+{
+ return account->priv->username;
+}
+
+const char *
+rb_audioscrobbler_account_get_session_key (RBAudioscrobblerAccount *account)
+{
+ return account->priv->session_key;
+}
+
+RBAudioscrobblerAccountLoginStatus
+rb_audioscrobbler_account_get_login_status (RBAudioscrobblerAccount *account)
+{
+ return account->priv->login_status;
+}
+
static gchar *
mkmd5 (char *string)
{
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-account.h b/plugins/audioscrobbler/rb-audioscrobbler-account.h
index 64cab79..8e49dac 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-account.h
+++ b/plugins/audioscrobbler/rb-audioscrobbler-account.h
@@ -75,6 +75,10 @@ GType rb_audioscrobbler_account_get_type (void);
RBAudioscrobblerAccount * rb_audioscrobbler_account_new (RBAudioscrobblerService *service);
+const char * rb_audioscrobbler_account_get_username (RBAudioscrobblerAccount *account);
+const char * rb_audioscrobbler_account_get_session_key (RBAudioscrobblerAccount *account);
+RBAudioscrobblerAccountLoginStatus rb_audioscrobbler_account_get_login_status (RBAudioscrobblerAccount *account);
+
void rb_audioscrobbler_account_authenticate (RBAudioscrobblerAccount *account);
void rb_audioscrobbler_account_logout (RBAudioscrobblerAccount *account);
void rb_audioscrobbler_account_notify_of_auth_error (RBAudioscrobblerAccount *account);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]