OssoABookContactModel

OssoABookContactModel — A GtkTreeModel listing OssoABookContact objects.

Synopsis

                    OssoABookContactModel;
OssoABookContactModel* osso_abook_contact_model_new     (void);
gboolean            osso_abook_contact_model_is_default (OssoABookContactModel *model);
OssoABookContactModel* osso_abook_contact_model_get_default
                                                        (void);
OssoABookListStoreRow* osso_abook_contact_model_find_contact
                                                        (OssoABookContactModel *model,
                                                         const char *uid,
                                                         GtkTreeIter *iter);

Object Hierarchy

  GObject
   +----OssoABookListStore
         +----OssoABookContactModel

Implemented Interfaces

OssoABookContactModel implements GtkTreeModel, GtkTreeSortable and OssoABookRowModel.

Description

The OssoABookContactModel is a GtkTreeModel that lists the OssoABookContact objects exposed by an OssoABookAggregator.

This model can then be used with OssoABookContactView, OssoABookContactSelector, or custom GtkTreeView widgets.

Details

OssoABookContactModel

typedef struct _OssoABookContactModel OssoABookContactModel;

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


osso_abook_contact_model_new ()

OssoABookContactModel* osso_abook_contact_model_new     (void);

Creates a new OssoABookContactModel object. Note that for any contacts to show up, the newly created model should be bound to an EBookView using osso_abook_list_store_set_book_view().

Returns : A new OssoABookContactModel object.

osso_abook_contact_model_is_default ()

gboolean            osso_abook_contact_model_is_default (OssoABookContactModel *model);

Checks if model is the default contact model, without risking to instanciate the default model.

model : the OssoABookContactModel to inspect
Returns : TRUE when model is the default contact model.

osso_abook_contact_model_get_default ()

OssoABookContactModel* osso_abook_contact_model_get_default
                                                        (void);

Gets the default contact model. This model uses the default aggregator as its source of contacts.

See osso_abook_aggregator_get_default() for more information about the default aggregator.

Returns : the default contact model, owned by libosso-abook

osso_abook_contact_model_find_contact ()

OssoABookListStoreRow* osso_abook_contact_model_find_contact
                                                        (OssoABookContactModel *model,
                                                         const char *uid,
                                                         GtkTreeIter *iter);

Finds the OssoABookListStoreRow associated with the EContact which is identified by uid, or NULL if no such row is stored. When such a row is found and iter is not NULL it is initialized to point to the row returned.

model : An OssoABookContactModel
uid : The UID of an EContact
iter : A GtkTreeIter, or NULL
Returns : The OssoABookListStoreRow associated with uid, or NULL.

See Also

OssoABookContactView, OssoABookContactSelector, OssoABookPresence