![]() |
![]() |
![]() |
libaccounts-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
AgManagerClass; AgManagerPrivate; AgManager; typedef AgAccountId; AgManager * ag_manager_new (void
); AgManager * ag_manager_new_for_service_type (const gchar *service_type
); GList * ag_manager_list (AgManager *manager
); GList * ag_manager_list_by_service_type (AgManager *manager
,const gchar *service_type
); void ag_manager_list_free (GList *list
); AgAccount * ag_manager_get_account (AgManager *manager
,AgAccountId account_id
); AgAccount * ag_manager_load_account (AgManager *manager
,AgAccountId account_id
,GError **error
); AgAccount * ag_manager_create_account (AgManager *manager
,const gchar *provider_name
); AgService * ag_manager_get_service (AgManager *manager
,const gchar *service_name
); GList * ag_manager_list_services (AgManager *manager
); GList * ag_manager_list_services_by_type (AgManager *manager
,const gchar *service_type
); GList * ag_manager_list_enabled (AgManager *manager
); GList * ag_manager_list_enabled_by_service_type (AgManager *manager
,const gchar *service_type
); const gchar * ag_manager_get_service_type (AgManager *manager
); AgProvider * ag_manager_get_provider (AgManager *manager
,const gchar *provider_name
); GList * ag_manager_list_providers (AgManager *manager
); void ag_manager_set_db_timeout (AgManager *manager
,guint timeout_ms
); guint ag_manager_get_db_timeout (AgManager *manager
); void ag_manager_set_abort_on_db_timeout (AgManager *manager
,gboolean abort
); gboolean ag_manager_get_abort_on_db_timeout (AgManager *manager
); AgServiceType * ag_manager_load_service_type (AgManager *manager
,const gchar *service_type
);
"account-created" : Run Last "account-deleted" : Run Last "account-updated" : Run Last "enabled-event" : Run Last
typedef struct { GObjectClass parent_class; void (*account_deleted) (AgManager *manager, AgAccountId id); void (*_ag_reserved2) (void); void (*_ag_reserved3) (void); void (*_ag_reserved4) (void); void (*_ag_reserved5) (void); void (*_ag_reserved6) (void); void (*_ag_reserved7) (void); } AgManagerClass;
AgManager * ag_manager_new_for_service_type (const gchar *service_type
);
|
the name of a service type |
Returns : |
an instance of an AgManager with specified service type. |
GList * ag_manager_list (AgManager *manager
);
Lists the accounts. If the AgManager is created with specified service_type it will return only the accounts supporting this service_type.
|
the AgManager. |
Returns : |
a GList of AgAccountId representing the accounts. Must
be free'd with ag_manager_list_free() .
|
GList * ag_manager_list_by_service_type (AgManager *manager
,const gchar *service_type
);
Lists the accounts supporting the given service type.
|
the AgManager. |
|
|
Returns : |
a GList of AgAccountId representing the accounts. Must
be free'd with ag_manager_list_free() .
|
void ag_manager_list_free (GList *list
);
Frees the memory taken by a GList allocated by AgManager.
|
a GList returned from some AgManager method. |
AgAccount * ag_manager_get_account (AgManager *manager
,AgAccountId account_id
);
Instantiates the object representing the account identified by
account_id
.
|
the AgManager. |
|
the AgAccountId of the account. |
Returns : |
an AgAccount, on which the client must call g_object_unref()
when it's done with it, or NULL if an error occurs.
|
AgAccount * ag_manager_load_account (AgManager *manager
,AgAccountId account_id
,GError **error
);
Instantiates the object representing the account identified by
account_id
.
|
the AgManager. |
|
the AgAccountId of the account. |
|
pointer to a GError, or NULL .
|
Returns : |
an AgAccount, on which the client must call g_object_unref()
when it's done with it, or NULL if an error occurs.
|
AgAccount * ag_manager_create_account (AgManager *manager
,const gchar *provider_name
);
Create a new account. The account is not stored in the database until
ag_account_store()
has successfully returned; the id
field in the
AgAccount structure is also not meant to be valid till the account has been
stored.
AgService * ag_manager_get_service (AgManager *manager
,const gchar *service_name
);
Loads the service identified by service_name
.
|
the AgManager. |
|
the name of the service. |
Returns : |
an AgService, which must be then free'd with ag_service_unref() .
|
GList * ag_manager_list_services (AgManager *manager
);
Gets a list of all the installed services. If the AgManager is created with specified service_type it will return only the installed services supporting this service_type.
|
the AgManager. |
Returns : |
a list of AgService, which must be then free'd with
ag_service_list_free() .
|
GList * ag_manager_list_services_by_type (AgManager *manager
,const gchar *service_type
);
Gets a list of all the installed services of type service_type
.
|
the AgManager. |
|
the type of the service. |
Returns : |
a list of AgService, which must be then free'd with
ag_service_list_free() .
|
GList * ag_manager_list_enabled (AgManager *manager
);
Lists the enabled accounts.
|
the AgManager. |
Returns : |
a GList of the enabled AgAccountId representing the accounts. Must
be free'd with ag_manager_list_free() .
|
GList * ag_manager_list_enabled_by_service_type (AgManager *manager
,const gchar *service_type
);
Lists the enabled accounts supporting the given service type.
|
the AgManager. |
|
|
Returns : |
a GList of the enabled AgAccountId representing the accounts. Must
be free'd with ag_manager_list_free() .
|
const gchar * ag_manager_get_service_type (AgManager *manager
);
|
|
Returns : |
AgProvider * ag_manager_get_provider (AgManager *manager
,const gchar *provider_name
);
Loads the provider identified by provider_name
.
|
the AgManager. |
|
the name of the provider. |
Returns : |
an AgProvider, which must be then free'd with ag_provider_unref() .
|
GList * ag_manager_list_providers (AgManager *manager
);
Gets a list of all the installed providers.
|
the AgManager. |
Returns : |
a list of AgProvider, which must be then free'd with
ag_provider_list_free() .
|
void ag_manager_set_db_timeout (AgManager *manager
,guint timeout_ms
);
Sets the timeout for database operations. This tells the library how long it is allowed to block while waiting for a locked DB to become accessible. Higher values mean a higher chance of successful reads, but also mean that the execution might be blocked for a longer time. The default is 5 seconds.
|
the AgManager. |
|
the new timeout, in milliseconds. |
guint ag_manager_get_db_timeout (AgManager *manager
);
|
the AgManager. |
Returns : |
the timeout (in milliseconds) for database operations. |
void ag_manager_set_abort_on_db_timeout (AgManager *manager
,gboolean abort
);
Tells libaccounts whether it should make the client application abort when
a timeout error occurs. The default is FALSE
.
|
the AgManager. |
|
whether to abort when a DB timeout occurs. |
gboolean ag_manager_get_abort_on_db_timeout (AgManager *manager
);
|
the AgManager. |
Returns : |
whether the library will abort when a timeout error occurs. |
AgServiceType * ag_manager_load_service_type (AgManager *manager
,const gchar *service_type
);
Instantiate the service type service_type
.
|
the AgManager. |
|
the name of the service type. |
Returns : |
an AgServiceType, which must be then free'd with
ag_service_type_unref() .
|
"account-created"
signalvoid user_function (AgManager *manager, guint account_id, gpointer user_data) : Run Last
Emitted when a new account has been created; note that the account must
have been stored in the database: the signal is not emitted just in
response to ag_manager_create_account()
.
|
the AgManager. |
|
the AgAccountId of the account that has been created. |
|
user data set when the signal handler was connected. |
"account-deleted"
signalvoid user_function (AgManager *manager, guint account_id, gpointer user_data) : Run Last
Emitted when an account has been deleted. This signal is redundant with AgAccount::deleted, but it's convenient to provide full change notification to AgManager.
|
the AgManager. |
|
the AgAccountId of the account that has been deleted. |
|
user data set when the signal handler was connected. |
"account-updated"
signalvoid user_function (AgManager *manager, guint account_id, gpointer user_data) : Run Last
Emitted when particular service of an account has been updated. This signal is redundant with AgAccount::deleted, but it's convenient to provide full change notification to AgManager.
|
the AgManager. |
|
the AgAccountId of the account that has been update. |
|
user data set when the signal handler was connected. |
"enabled-event"
signalvoid user_function (AgManager *agmanager, guint arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |