OssoABookRoster

OssoABookRoster — Presence aware addressbook view.

Synopsis

                    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);

Object Hierarchy

  GObject
   +----OssoABookRoster
         +----OssoABookAggregator

Implemented Interfaces

OssoABookRoster implements OssoABookWaitable.

Properties

  "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

Signals

  "contacts-added"                                 : Run First
  "contacts-changed"                               : Run First / Has Details
  "contacts-removed"                               : Run First
  "sequence-complete"                              : Run First
  "status-message"                                 : Run First

Description

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.

Details

OssoABookRoster

typedef struct _OssoABookRoster OssoABookRoster;

All the fields of this structure are private to the object's implementation and should never be accessed directly.


osso_abook_roster_new ()

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.

osso_abook_roster_get_name ()

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.

osso_abook_roster_get_account ()

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.

osso_abook_roster_get_profile ()

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.

osso_abook_roster_get_vcard_field ()

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.

osso_abook_roster_get_capabilities ()

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.

osso_abook_roster_get_book_view ()

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.

osso_abook_roster_get_book_uri ()

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.

osso_abook_roster_get_book ()

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.

osso_abook_roster_set_name_order ()

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

osso_abook_roster_get_name_order ()

OssoABookNameOrder  osso_abook_roster_get_name_order    (OssoABookRoster *roster);

Gets the current value for the "name-order" property

roster : a OssoABookRoster

osso_abook_roster_is_running ()

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.

osso_abook_roster_start ()

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".

Note

Always use this function instead of e_book_view_start().

roster : a OssoABookRoster

osso_abook_roster_stop ()

void                osso_abook_roster_stop              (OssoABookRoster *roster);

Stops operation of the roster.

See also: osso_abook_roster_start(), "running".

Note

Always use this function instead of e_book_view_stop().

roster : a OssoABookRoster

Property Details

The "account" property

  "account"                  gchar*                : Read

The Mission Control account of this roster.

Default value: NULL


The "book" property

  "book"                     EBook*                : Read / Write / Construct Only

The master address book.


The "book-uri" property

  "book-uri"                 gchar*                : Read

The URI of the master address book.

Default value: NULL


The "book-view" property

  "book-view"                EBookView*            : Read / Write

The master address book view.


The "name" property

  "name"                     gchar*                : Read / Write / Construct Only

The name of this roster.

Default value: NULL


The "name-order" property

  "name-order"               OssoABookNameOrder    : Read / Write / Construct

The preferred order for contacts-added signals.

Default value: OSSO_ABOOK_NAME_ORDER_FIRST


The "running" property

  "running"                  gboolean              : Read

Wether this roster is emitting events already.

Default value: FALSE


The "vcard-field" property

  "vcard-field"              gchar*                : Read / Write / Construct Only

Name of the vCard field associated with this roster.

Default value: NULL

Signal Details

The "contacts-added" signal

void                user_function                      (OssoABookRoster *roster,
                                                        gpointer         contacts,
                                                        gpointer         user_data)      : Run First

This signal is emitted when contacts are added to the underlying addressbook.

Note

The virtual method of this signal is run first, last and on cleanup!
roster : a OssoABookRoster
contacts : a NULL terminated OssoABookContact array
user_data : user data set when the signal handler was connected.

The "contacts-changed" signal

void                user_function                      (OssoABookRoster *roster,
                                                        gpointer         contacts,
                                                        gpointer         user_data)      : Run First / Has Details

This signal is emitted when contacts of the underlying addressbook are changed.

The signal detail gives information upon where the change happend. Currently supported details are "master" and "roster".

Note

The virtual method of this signal is run first, last and on cleanup!
roster : a OssoABookRoster
contacts : a NULL terminated OssoABookContact array
user_data : user data set when the signal handler was connected.

The "contacts-removed" signal

void                user_function                      (OssoABookRoster *roster,
                                                        gpointer         contacts,
                                                        gpointer         user_data)      : Run First

This signal is emitted when contacts are removed from the underlying addressbook.

Note

The virtual method of this signal is run first, last and on cleanup!
roster : a OssoABookRoster
contacts : a NULL terminated OssoABookContact array
user_data : user data set when the signal handler was connected.

The "sequence-complete" signal

void                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.

Note

The virtual method of this signal is run first, last and on cleanup!
roster : a OssoABookRoster
status : an EBookViewStatus
user_data : user data set when the signal handler was connected.

The "status-message" signal

void                user_function                      (OssoABookRoster *roster,
                                                        gchar           *message,
                                                        gpointer         user_data)      : Run First

This signal is emitted to report progress of the roster.

Note

The virtual method of this signal is run first, last and on cleanup!
roster : a OssoABookRoster
message : a progress message
user_data : user data set when the signal handler was connected.

See Also

EBookView