Osso Addressbook Reference Manual | ||||
---|---|---|---|---|
OssoABookAccountManager; OssoABookAccountManager* osso_abook_account_manager_get_default (void); OssoABookAccountManager* osso_abook_account_manager_new (void); TpDBusDaemon* osso_abook_account_manager_get_dbus_daemon (OssoABookAccountManager *manager); TpConnectionPresenceType osso_abook_account_manager_get_presence (OssoABookAccountManager *manager); void osso_abook_account_manager_set_active_accounts_only (OssoABookAccountManager *manager, gboolean setting); gboolean osso_abook_account_manager_is_active_accounts_only (OssoABookAccountManager *manager); void osso_abook_account_manager_set_allowed_accounts (OssoABookAccountManager *manager, GList *accounts); GList* osso_abook_account_manager_get_allowed_accounts (OssoABookAccountManager *manager); void osso_abook_account_manager_set_allowed_capabilities (OssoABookAccountManager *manager, OssoABookCapsFlags caps); OssoABookCapsFlags osso_abook_account_manager_get_allowed_capabilities (OssoABookAccountManager *manager); void osso_abook_account_manager_set_required_capabilities (OssoABookAccountManager *manager, OssoABookCapsFlags caps); OssoABookCapsFlags osso_abook_account_manager_get_required_capabilities (OssoABookAccountManager *manager); void osso_abook_account_manager_set_account_protocol (OssoABookAccountManager *manager, const char *protocol); const char* osso_abook_account_manager_get_account_protocol (OssoABookAccountManager *manager); McAccount* osso_abook_account_manager_lookup_by_name (OssoABookAccountManager *manager, const char *name); McAccount* osso_abook_account_manager_lookup_by_vcard_field (OssoABookAccountManager *manager, const char *vcard_field, const char *vcard_value); const GList* osso_abook_account_manager_get_primary_vcard_fields (OssoABookAccountManager *manager); gboolean osso_abook_account_manager_has_primary_vcard_field (OssoABookAccountManager *manager, const char *vcard_field); const GList* osso_abook_account_manager_get_secondary_vcard_fields (OssoABookAccountManager *manager); gboolean osso_abook_account_manager_has_secondary_vcard_field (OssoABookAccountManager *manager, const char *vcard_field); const char* osso_abook_account_manager_get_vcard_field (OssoABookAccountManager *manager, const char *account_name); GList* osso_abook_account_manager_list_profiles (OssoABookAccountManager *manager, const gchar *attr_name, gboolean no_roster_only); void osso_abook_account_manager_call_when_ready (OssoABookAccountManager *manager, OssoABookAccountManagerReadyCallbackcallback , gpointer user_data, GDestroyNotify destroy); void osso_abook_account_manager_wait_until_ready (OssoABookAccountManager *manager, GMainContext *context, GError **error);
OssoABookAccountManager implements OssoABookWaitable and OssoABookRosterManager.
"account-protocol" gchar* : Read / Write / Construct "active-accounts-only" gboolean : Read / Write / Construct "allowed-accounts" gpointer : Read / Write / Construct "allowed-capabilities" OssoABookCapsFlags : Read / Write / Construct "presence" guint : Read "required-capabilities" OssoABookCapsFlags : Read / Write / Construct
"account-changed" : Run First / Has Details "account-created" : Run First "account-removed" : Run Last
The OssoABookAccountManager watches creation, removal and state changes of Mission Control accounts, and provides convenient access to the current set of Mission Control accounts.
It tries to fill the gaps libmcclient leaves.
See also: McAccount
typedef struct _OssoABookAccountManager OssoABookAccountManager;
All the fields of this structure are private to the object's implementation and should never be accessed directly.
OssoABookAccountManager* osso_abook_account_manager_get_default (void);
Retrieve the default OssoABookAccountManager.
Returns : | The default OssoABookAccountManager. This object is owned by the library and must not be unreferenced. |
OssoABookAccountManager* osso_abook_account_manager_new (void);
Creates a new OssoABookAccountManager instance.
Returns : | A newly allocated OssoABookAccountManager. |
TpDBusDaemon* osso_abook_account_manager_get_dbus_daemon (OssoABookAccountManager *manager);
Retrieves the TpDBusDaemon object used when this OssoABookAccountManager communicates with Telepathy or Mission Control.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | The TpDBusDaemon of this object. |
TpConnectionPresenceType osso_abook_account_manager_get_presence (OssoABookAccountManager *manager);
Queries the current value of the "presence" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | Current property value. |
void osso_abook_account_manager_set_active_accounts_only (OssoABookAccountManager *manager, gboolean setting);
Changes the current value of the "active-accounts-only" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
setting : |
the new property value |
gboolean osso_abook_account_manager_is_active_accounts_only (OssoABookAccountManager *manager);
Queries the current value of the "active-accounts-only" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | Current property value. |
void osso_abook_account_manager_set_allowed_accounts (OssoABookAccountManager *manager, GList *accounts);
Sets the value of the "allowed-accounts" property, which is the list of allowed accounts that the manager is being filtered by.
The manager copies accounts
(but not the elements, of course),
so you must free the list after calling this function.
model : |
An OssoABookAccountManager |
accounts : |
A GList of McAccounts to filter the model by. |
GList* osso_abook_account_manager_get_allowed_accounts (OssoABookAccountManager *manager);
Retrieves the current value of the "allowed-accounts" property, which is the list of allowed accounts that the manager is being filtered by.
This list is owned by the manager and it and its elements must not be freed.
model : |
An OssoABookAccountManager |
Returns : | A GList of the McAccounts that the model is being filtered by. |
void osso_abook_account_manager_set_allowed_capabilities (OssoABookAccountManager *manager, OssoABookCapsFlags caps);
Changes the current value of the "allowed-capabilities" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
caps : |
the new property value |
OssoABookCapsFlags osso_abook_account_manager_get_allowed_capabilities (OssoABookAccountManager *manager);
Queries the current value of the "allowed-capabilities" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | Current property value. |
void osso_abook_account_manager_set_required_capabilities (OssoABookAccountManager *manager, OssoABookCapsFlags caps);
Changes the current value of the "required-capabilities" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
caps : |
the new property value |
OssoABookCapsFlags osso_abook_account_manager_get_required_capabilities (OssoABookAccountManager *manager);
Queries the current value of the "required-capabilities" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | Current property value. |
void osso_abook_account_manager_set_account_protocol (OssoABookAccountManager *manager, const char *protocol);
Changes the current value of the "account-protocol" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
protocol : |
the new property value, in the same format as the vCard field name (eg, "X-JABBER" for raw XMPP). |
const char* osso_abook_account_manager_get_account_protocol (OssoABookAccountManager *manager);
Queries the current value of the "account-protocol" property.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | Current property value (NULL for all protocols). |
McAccount* osso_abook_account_manager_lookup_by_name (OssoABookAccountManager *manager, const char *name);
Finds the McAccount with the given unique name
.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
name : |
the unique McAccount name |
Returns : | The requested McAccount,
or NULL when no such account is known.
|
McAccount* osso_abook_account_manager_lookup_by_vcard_field (OssoABookAccountManager *manager, const char *vcard_field, const char *vcard_value);
Finds the McAccount which can be used to contact the communication handle
described by vcard_field
and vcard_value
.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
vcard_field : |
the name of the vCard attribute |
vcard_value : |
the value of the vCard attribute |
Returns : | The requested McAccount,
or NULL when no such account is known.
|
const GList* osso_abook_account_manager_get_primary_vcard_fields (OssoABookAccountManager *manager);
Lists the vCard fields for all preferred communication method supported by the currently known Mission Control accounts.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | The list of vCard attribute names. The list is owned by the object and must not be freed. |
gboolean osso_abook_account_manager_has_primary_vcard_field (OssoABookAccountManager *manager, const char *vcard_field);
Checks if there is a Mission Control account
which prefers the communication method described by vcard_field
.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
vcard_field : |
the vCard attribute name for some communication method |
Returns : | TRUE if there is such an McAccount, and FALSE otherwise.
|
const GList* osso_abook_account_manager_get_secondary_vcard_fields (OssoABookAccountManager *manager);
Lists the vCard fields for all additional communication methods currently known Mission Control accounts.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
Returns : | The list of vCard attribute names. The list is owned by the object and must not be freed. |
gboolean osso_abook_account_manager_has_secondary_vcard_field (OssoABookAccountManager *manager, const char *vcard_field);
Checks if there is a Mission Control account which also supports the
communication method described by vcard_field
.
manager : |
a OssoABookAccountManager, or NULL for the default instance
|
vcard_field : |
the vCard attribute name for some communication method |
Returns : | TRUE if there is such an McAccount, and FALSE otherwise.
|
const char* osso_abook_account_manager_get_vcard_field (OssoABookAccountManager *manager, const char *account_name);
GList* osso_abook_account_manager_list_profiles (OssoABookAccountManager *manager, const gchar *attr_name, gboolean no_roster_only);
void osso_abook_account_manager_call_when_ready (OssoABookAccountManager *manager, OssoABookAccountManagerReadyCallbackcallback , gpointer user_data, GDestroyNotify destroy);
void osso_abook_account_manager_wait_until_ready (OssoABookAccountManager *manager, GMainContext *context, GError **error);
"account-protocol"
property"account-protocol" gchar* : Read / Write / Construct
Accepted account protocol (NULL for all protocols).
Default value: NULL
"active-accounts-only"
property"active-accounts-only" gboolean : Read / Write / Construct
Don't report accounts which are disabled.
Default value: TRUE
"allowed-accounts"
property"allowed-accounts" gpointer : Read / Write / Construct
Accounts which may appear in the model (if all additional filters allow them).
"allowed-capabilities"
property"allowed-capabilities" OssoABookCapsFlags : Read / Write / Construct
Set of of accepted account capabilities.
Default value: OSSO_ABOOK_CAPS_EMAIL|OSSO_ABOOK_CAPS_CHAT|OSSO_ABOOK_CAPS_CHAT_ADDITIONAL|OSSO_ABOOK_CAPS_VOICE|OSSO_ABOOK_CAPS_VOICE_ADDITIONAL|OSSO_ABOOK_CAPS_VIDEO|OSSO_ABOOK_CAPS_PHONE|OSSO_ABOOK_CAPS_ADDRESSBOOK
"presence"
property"presence" guint : Read
Current presence status of this session.
Default value: 0
"required-capabilities"
property"required-capabilities" OssoABookCapsFlags : Read / Write / Construct
Set of of required account capabilities.
"account-changed"
signalvoid user_function (OssoABookAccountManager *manager, McAccount *account, guint property, GValue *value, gpointer user_data) : Run First / Has Details
This signal is emitted when some account property changes.
manager : |
a OssoABookAccountManager |
account : |
the McAccount which changed |
property : |
the GQuark for the changed property's name |
value : |
the new value of the property |
user_data : |
user data set when the signal handler was connected. |
"account-created"
signalvoid user_function (OssoABookAccountManager *manager, McAccount *account, gpointer user_data) : Run First
This signal is emitted when a account is added to Mission Control.
manager : |
a OssoABookAccountManager |
account : |
the new McAccount |
user_data : |
user data set when the signal handler was connected. |
"account-removed"
signalvoid user_function (OssoABookAccountManager *manager, McAccount *account, gpointer user_data) : Run Last
This signal is emitted when a account is removed from Mission Control.
manager : |
a OssoABookAccountManager |
account : |
the removed McAccount |
user_data : |
user data set when the signal handler was connected. |