SharingAccount

SharingAccount — Sharing account object is used to abstract Sharing accounts.

Synopsis

void                sharing_account_free                (SharingAccount *self);
gboolean            sharing_account_set_param           (const SharingAccount *self,
                                                         const gchar *key,
                                                         const gchar *value);
gchar*              sharing_account_get_param           (const SharingAccount *self,
                                                         const gchar *key);
#define             sharing_account_set_username        (self,value)
#define             sharing_account_get_username        (self)
#define             sharing_account_set_password        (self,value)
#define             sharing_account_get_password        (self)
gboolean            sharing_account_set_option_values   (const SharingAccount *self,
                                                         const gchar *key,
                                                         const GSList *values);

Description

SharingAccount is abstraction of sharing account.

Details

sharing_account_free ()

void                sharing_account_free                (SharingAccount *self);

Frees memory from list of SharingAccounts

self : SharingAccount to be freed

sharing_account_set_param ()

gboolean            sharing_account_set_param           (const SharingAccount *self,
                                                         const gchar *key,
                                                         const gchar *value);

Sets sharing account parameter value. Update old value if key exists.

self : Pointer to instance
key : Parameter key looked for
value : Parameter value to be set or NULL to unset
Returns : TRUE if self, key and value are != NULL and parameter was set, FALSE otherwise

sharing_account_get_param ()

gchar*              sharing_account_get_param           (const SharingAccount *self,
                                                         const gchar *key);

Get sharing account parameter value.

self : Pointer to instance
key : Parameter key looked for
Returns : Parameter value if self and key are != NULL and key is found or NULL otherwise. Remember to free memory with g_free()!

sharing_account_set_username()

#define             sharing_account_set_username(self,value)

Macro for setting the username to account.

self : Used SharingAccount.
value : Username to set.

sharing_account_get_username()

#define             sharing_account_get_username(self)

Macro for getting the username from account.

self : Used SharingAccount.
Returns : Username as gchar*.

sharing_account_set_password()

#define             sharing_account_set_password(self,value)

Macro for setting the password to account.

self : Used SharingAccount.
value : Password to set.

sharing_account_get_password()

#define             sharing_account_get_password(self)

Macro for getting the username from account.

Returns : Password as gchar*

sharing_account_set_option_values ()

gboolean            sharing_account_set_option_values   (const SharingAccount *self,
                                                         const gchar *key,
                                                         const GSList *values);

Set updatable option values under account

self : Pointer to SharingAccount object
key : Option key
values : Values stored. List of SharingServiceOptionValue objects.
Returns : TRUE if success