![]() |
![]() |
![]() |
libosso-rtcom-accounts Reference Manual | ![]() |
---|---|---|---|---|
RtcomAccountItem; RtcomAccountItem* rtcom_account_item_new (McAccount *account, RtcomAccountService *service); gboolean rtcom_account_item_store_settings (RtcomAccountItem *item, GError **error); gboolean rtcom_account_item_delete (RtcomAccountItem *item); McProfile* rtcom_account_item_get_mc_profile (RtcomAccountItem *item); const gchar* rtcom_account_item_get_unique_name (RtcomAccountItem *item); void rtcom_account_item_changed (RtcomAccountItem *item); void rtcom_account_item_name_change (RtcomAccountItem *item); void rtcom_account_item_enable (RtcomAccountItem *item, gboolean enable);
"name-changed" void user_function (RtcomAccountItem *account, gpointer user_data) : Run last / Action "store-settings" gboolean user_function (RtcomAccountItem *account, gpointer error, gpointer user_data) : Run last / Action
This is a subclass of the AccountItem class in libaccounts which implements
the account_item_set_enabled()
method and includes some functionality
commonly expected for McAccount editing.
Account plugins shouln't need to subclass this class, since it already
implements all required methods. Also, the only method that might be of use
in a plugin implementation is rtcom_account_item_get_mc_profile()
; all other
methods are already called by other objects in the library as needed.
RtcomAccountItem* rtcom_account_item_new (McAccount *account, RtcomAccountService *service);
Creates a RtcomAccountItem object providing the given service
. If account
is specified, it will be bound to the newly created object (this will be the
case when editing an existing account).
account : |
a McAccount, or NULL .
|
service : |
a RtcomAccountService. |
Returns : | the RtcomAccountItem created. |
gboolean rtcom_account_item_store_settings (RtcomAccountItem *item, GError **error);
Emits the RtcomAccountItem::store-settings signal.
item : |
the RtcomAccountItem. |
error : |
a GError, or NULL .
|
Returns : | TRUE if all signal handlers returned TRUE , FALSE otherwise; the
error , if not NULL , will be set by the signal handler which returned
FALSE .
|
gboolean rtcom_account_item_delete (RtcomAccountItem *item);
Deletes the McAccount associated to item
.
item : |
the RtcomAccountItem. |
Returns : | TRUE on success, FALSE otherwise.
|
McProfile* rtcom_account_item_get_mc_profile (RtcomAccountItem *item);
Gets the McProfile for this account item.
item : |
the RtcomAccountItem. |
Returns : | the McProfile, whose reference count is incremented. |
const gchar* rtcom_account_item_get_unique_name (RtcomAccountItem *item);
Gets the unique name for this account item.
item : |
the RtcomAccountItem. |
Returns : | the unique name, or NULL if no McAccount is bound to this item. |
void rtcom_account_item_changed (RtcomAccountItem *item);
Call this function to notify the item
that it should reload its data.
item : |
the RtcomAccountItem. |
void rtcom_account_item_name_change (RtcomAccountItem *item);
Call this function to notify the item
that the account has been modified in
such a way that the user has to confirm the last page again before exiting
editing. This happens usually when the username or the password have
changed.
item : |
the RtcomAccountItem. |
void rtcom_account_item_enable (RtcomAccountItem *item, gboolean enable);
Update the "enabled" property of the account.
item : |
the RtcomAccountItem. |
enable : |
a gboolean. |
void user_function (RtcomAccountItem *account, gpointer user_data) : Run last / Action
Emitted to signal to the UI that the account has been modified in such a way that the user has to confirm the last page again before exiting editing. This happens usually when the username or the password have changed.
account : |
The RtcomAccountItem. |
user_data : |
user data set when the signal handler was connected. |
gboolean user_function (RtcomAccountItem *account, gpointer error, gpointer user_data) : Run last / Action
Emitted to signal to the UI that it should store the configuration into
the McAccount.
If some error occurs, the handler should return FALSE
and store an error
in the error
parameter.
account : |
The RtcomAccountItem. |
error : |
Variable to receive an error. |
user_data : |
user data set when the signal handler was connected. |
Returns : | TRUE for success, of FALSE .
|