![]() |
![]() |
![]() |
Osso Addressbook Reference Manual | ![]() |
---|---|---|---|---|
OssoABookRoster; OssoABookRoster* osso_abook_roster_new (const char *name, EBookView *book_view, const char *vcard_field); const char* osso_abook_roster_get_name (OssoABookRoster *roster); McAccount* osso_abook_roster_get_account (OssoABookRoster *roster); McProfile* osso_abook_roster_get_profile (OssoABookRoster *roster); const char* osso_abook_roster_get_vcard_field (OssoABookRoster *roster); OssoABookCapsFlags osso_abook_roster_get_capabilities (OssoABookRoster *roster); EBookView* osso_abook_roster_get_book_view (OssoABookRoster *roster); const char* osso_abook_roster_get_book_uri (OssoABookRoster *roster); EBook* osso_abook_roster_get_book (OssoABookRoster *roster); void osso_abook_roster_set_name_order (OssoABookRoster *roster, OssoABookNameOrder order); OssoABookNameOrder osso_abook_roster_get_name_order (OssoABookRoster *roster); gboolean osso_abook_roster_is_running (OssoABookRoster *roster); void osso_abook_roster_start (OssoABookRoster *roster); void osso_abook_roster_stop (OssoABookRoster *roster);
"account" gchar* : Read "book" EBook* : Read / Write / Construct Only "book-uri" gchar* : Read "book-view" EBookView* : Read / Write "name" gchar* : Read / Write / Construct Only "name-order" OssoABookNameOrder : Read / Write / Construct "running" gboolean : Read "vcard-field" gchar* : Read / Write / Construct Only
"contacts-added" : Run First "contacts-changed" : Run First "contacts-removed" : Run First "sequence-complete" : Run First "status-message" : Run First
An OssoABookRoster is a presence aware addressbook view simlar to EBookView. It differs from EBookView by yielding rich OssoABookContact instances, instead of EContact instances. Also it provides access to the McAccount providing the address book, when this roster is backed by some instant messaging account.
typedef struct _OssoABookRoster OssoABookRoster;
All the fields of this structure are private to the object's implementation and should never be accessed directly.
OssoABookRoster* osso_abook_roster_new (const char *name, EBookView *book_view, const char *vcard_field);
Creates a new OssoABookRoster. To ensure consistent reporting
e_book_view_start()
should not be called on the book_view
.
Call osso_abook_roster_start()
instead.
name : |
the name of the roster |
book_view : |
the EBookView behind the roster |
vcard_field : |
the vCard attribute name describing the roster |
Returns : | A newly allocated OssoABookRoster. |
const char* osso_abook_roster_get_name (OssoABookRoster *roster);
Retrieves the current value of the "name" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
McAccount* osso_abook_roster_get_account (OssoABookRoster *roster);
Retrieves the current value of the "account" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
McProfile* osso_abook_roster_get_profile (OssoABookRoster *roster);
Retrieves MissionControl profile associated with this roster
.
The returned object's reference count is incremented.
roster : |
a OssoABookRoster |
Returns : | The McProfile of this roster . Unref the object after usage.
|
const char* osso_abook_roster_get_vcard_field (OssoABookRoster *roster);
Retrieves the current value of the "vcard-field" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
OssoABookCapsFlags osso_abook_roster_get_capabilities (OssoABookRoster *roster);
Query static capabilities of the roster
as returned by
mc_profile_get_capabilities()
.
roster : |
a OssoABookRoster |
Returns : | The static capabilities of the roster .
|
EBookView* osso_abook_roster_get_book_view (OssoABookRoster *roster);
Retrieves the current value of the "book-view" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
const char* osso_abook_roster_get_book_uri (OssoABookRoster *roster);
Retrieves the current value of the "book-uri" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
EBook* osso_abook_roster_get_book (OssoABookRoster *roster);
Retrieves the current value of the "book" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
void osso_abook_roster_set_name_order (OssoABookRoster *roster, OssoABookNameOrder order);
Sets a new value for the "name-order" property
roster : |
a OssoABookRoster |
order : |
a name order |
OssoABookNameOrder osso_abook_roster_get_name_order (OssoABookRoster *roster);
Gets the current value for the "name-order" property
roster : |
a OssoABookRoster |
gboolean osso_abook_roster_is_running (OssoABookRoster *roster);
Retrieves the current value of the "running" property.
roster : |
a OssoABookRoster |
Returns : | The current value of the property. |
void osso_abook_roster_start (OssoABookRoster *roster);
Starts operation of the roster
. After calling this function a sequence of
"contacts-added" signals is emitted to report the initial
content of the underlying addressbook.
See also: osso_abook_roster_stop()
, "running".
Always use this function instead of e_book_view_start()
.
roster : |
a OssoABookRoster |
void osso_abook_roster_stop (OssoABookRoster *roster);
Stops operation of the roster
.
See also: osso_abook_roster_start()
, "running".
Always use this function instead of e_book_view_stop()
.
roster : |
a OssoABookRoster |
"account"
property"account" gchar* : Read
The Mission Control account of this roster.
Default value: NULL
"book-uri"
property"book-uri" gchar* : Read
The URI of the master address book.
Default value: NULL
"name"
property"name" gchar* : Read / Write / Construct Only
The name of this roster.
Default value: NULL
"name-order"
property"name-order" OssoABookNameOrder : Read / Write / Construct
The preferred order for contacts-added signals.
Default value: OSSO_ABOOK_NAME_ORDER_FIRST
"running"
property"running" gboolean : Read
Wether this roster is emitting events already.
Default value: FALSE
"contacts-added"
signalvoid user_function (OssoABookRoster *roster, gpointer contacts, gpointer user_data) : Run First
This signal is emitted when contacts are added to the underlying addressbook.
roster : |
a OssoABookRoster |
contacts : |
a NULL terminated OssoABookContact array
|
user_data : |
user data set when the signal handler was connected. |
"contacts-changed"
signalvoid user_function (OssoABookRoster *roster, gpointer contacts, gpointer user_data) : Run First
This signal is emitted when contacts of the underlying addressbook are changed.
roster : |
a OssoABookRoster |
contacts : |
a NULL terminated OssoABookContact array
|
user_data : |
user data set when the signal handler was connected. |
"contacts-removed"
signalvoid user_function (OssoABookRoster *roster, gpointer contacts, gpointer user_data) : Run First
This signal is emitted when contacts are removed from the underlying addressbook.
roster : |
a OssoABookRoster |
contacts : |
a NULL terminated OssoABookContact array
|
user_data : |
user data set when the signal handler was connected. |
"sequence-complete"
signalvoid user_function (OssoABookRoster *roster, guint status, gpointer user_data) : Run First
This signal is emitted when there are currently no more contacts to send. It is emitted once after the initial set of "contacts-added" signals, and after every future change.
roster : |
a OssoABookRoster |
status : |
an EBookViewStatus |
user_data : |
user data set when the signal handler was connected. |
"status-message"
signalvoid user_function (OssoABookRoster *roster, gchar *message, gpointer user_data) : Run First
This signal is emitted to report progress of the roster.
roster : |
a OssoABookRoster |
message : |
a progress message |
user_data : |
user data set when the signal handler was connected. |