LibSharing Manual | ||||
---|---|---|---|---|
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);
SharingAccount contains user-defined information, including a username and password, as well as optional extra parameters.
void sharing_account_free (SharingAccount *self);
Frees memory from the list of SharingAccounts.
self : |
the SharingAccount to free |
gboolean sharing_account_set_param (const SharingAccount *self, const gchar *key, const gchar *value);
Set a parameter value of a SharingAccount, and update the old value if the key already exists.
self : |
a SharingAccount |
key : |
the parameter |
value : |
the parameter value to be set, or NULL to unset
|
Returns : | TRUE if self, key and value are != NULL and the parameter was
successfully set, FALSE otherwise
|
gchar* sharing_account_get_param (const SharingAccount *self, const gchar *key);
Get a parameter value of a SharingAccount.
self : |
a SharingAccount |
key : |
the parameter |
Returns : | a newly-allocated parameter value, if self and key are != NULL and
the key is found, or NULL otherwise. The string must be freed with g_free()
when it is no longer needed.
|
#define sharing_account_set_username(self,value)
Macro for setting the username to account.
self : |
Used SharingAccount. |
value : |
Username to set. |
#define sharing_account_get_username(self)
Macro for getting the username from account.
self : |
Used SharingAccount. |
Returns : | Username as gchar*. |
#define sharing_account_set_password(self,value)
Macro for setting the password to account.
self : |
Used SharingAccount. |
value : |
Password to set. |
#define sharing_account_get_password(self)
Macro for getting the username from account.
Returns : | Password as gchar* |
gboolean sharing_account_set_option_values (const SharingAccount *self, const gchar *key, const GSList *values);
Set updatable option values of a SharingAccount.
self : |
a SharingAccount |
key : |
a parameter |
values : |
a GSList of SharingServiceOptionValue to be stored |
Returns : | TRUE on success, FALSE otherwise
|