summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2008-05-08 09:25:35 +0000
committerAlberto Mardegan <mardy@users.sourceforge.net>2008-05-08 09:25:35 +0000
commit93403343be58ddac792b2c0be0a7e4178bfb3e98 (patch)
treedf6b0538021fc809845598816f75104c22c9c763 /src
parentdd1e4ed57188543b35e15c0967be73df99386c69 (diff)
Give access to some account properties.
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@383 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
Diffstat (limited to 'src')
-rw-r--r--src/mcd-account.c36
-rw-r--r--src/mcd-account.h8
2 files changed, 44 insertions, 0 deletions
diff --git a/src/mcd-account.c b/src/mcd-account.c
index e2e5ba13..4e72c5a8 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -1471,6 +1471,21 @@ mcd_account_is_valid (McdAccount *account)
return priv->valid;
}
+/**
+ * mcd_account_is_enabled:
+ * @account: the #McdAccount.
+ *
+ * Checks if the account is enabled:
+ *
+ * Returns: %TRUE if the account is enabled, false otherwise.
+ */
+gboolean
+mcd_account_is_enabled (McdAccount *account)
+{
+ McdAccountPrivate *priv = MCD_ACCOUNT_PRIV (account);
+ return priv->enabled;
+}
+
const gchar *
mcd_account_get_unique_name (McdAccount *account)
{
@@ -1711,6 +1726,27 @@ mcd_account_get_current_presence (McdAccount *account,
*message = priv->curr_presence_message;
}
+gboolean
+mcd_account_get_connect_automatically (McdAccount *account)
+{
+ McdAccountPrivate *priv = MCD_ACCOUNT_PRIV (account);
+ return priv->connect_automatically;
+}
+
+/* TODO: remove when the relative members will become public */
+void
+mcd_account_get_automatic_presence (McdAccount *account,
+ TpConnectionPresenceType *presence,
+ const gchar **status,
+ const gchar **message)
+{
+ McdAccountPrivate *priv = account->priv;
+
+ *presence = priv->auto_presence_type;
+ *status = priv->auto_presence_status;
+ *message = priv->auto_presence_message;
+}
+
/* TODO: remove when the relative members will become public */
const gchar *
mcd_account_get_manager_name (McdAccount *account)
diff --git a/src/mcd-account.h b/src/mcd-account.h
index 4d11312e..4dad9816 100644
--- a/src/mcd-account.h
+++ b/src/mcd-account.h
@@ -69,6 +69,8 @@ GKeyFile *mcd_account_get_keyfile (McdAccount *account);
gboolean mcd_account_is_valid (McdAccount *account);
gboolean mcd_account_check_validity (McdAccount *account);
+gboolean mcd_account_is_enabled (McdAccount *account);
+
const gchar *mcd_account_get_manager_name (McdAccount *account);
const gchar *mcd_account_get_protocol_name (McdAccount *account);
@@ -93,6 +95,12 @@ void mcd_account_get_requested_presence (McdAccount *account,
const gchar **status,
const gchar **message);
+gboolean mcd_account_get_connect_automatically (McdAccount *account);
+void mcd_account_get_automatic_presence (McdAccount *account,
+ TpConnectionPresenceType *presence,
+ const gchar **status,
+ const gchar **message);
+
void mcd_account_set_normalized_name (McdAccount *account, const gchar *name);
gchar *mcd_account_get_normalized_name (McdAccount *account);