Osso Addressbook Reference Manual |
---|
OssoABookAccountModelOssoABookAccountModel — A GtkTreeModel listing GalagoAccount objects. |
OssoABookAccountModel; enum OssoABookAccountModelColumn; OssoABookAccountModelTuple; OssoABookAccountModel* osso_abook_account_model_new (OssoABookAccountTypeFlags flags); OssoABookAccountTypeFlags osso_abook_account_model_get_flags (OssoABookAccountModel *model); gboolean osso_abook_account_model_get_iter (OssoABookAccountModel *model, OssoABookAccountModelTuple *tuple, GtkTreeIter *iter); OssoABookAccountModelTuple* osso_abook_account_model_tuple_new (EContact *contact, OssoABookAccount *account); OssoABookAccountModelTuple* osso_abook_account_model_tuple_ref (OssoABookAccountModelTuple *tuple); void osso_abook_account_model_tuple_unref (OssoABookAccountModelTuple *tuple); guint osso_abook_account_model_tuple_hash (OssoABookAccountModelTuple *tuple); gboolean osso_abook_account_model_tuple_equal (OssoABookAccountModelTuple *a, OssoABookAccountModelTuple *b);
OssoABookAccountModel implements GtkTreeModel, GtkTreeDragSource, GtkTreeDragDest and GtkTreeSortable.
The OssoABookAccountModel is a model that lists the GalagoAccount objects of accounts from EContact objects exposed by an EBookView, and their associated OssoABookAccountPresence objects.
typedef struct _OssoABookAccountModel OssoABookAccountModel;
There are no public fields in OssoABookAccountModel.
typedef enum { OSSO_ABOOK_ACCOUNT_MODEL_COL_CONTACT = 0, OSSO_ABOOK_ACCOUNT_MODEL_COL_PRESENCE = 1, OSSO_ABOOK_ACCOUNT_MODEL_COL_TUPLE = 2 } OssoABookAccountModelColumn;
The columns in an OssoABookAccountModel.
The data columns of the model. Data cell
data can be retreived using gtk_tree_model_get()
.
OSSO_ABOOK_ACCOUNT_MODEL_COL_CONTACT |
The contact column, containing an EContact |
OSSO_ABOOK_ACCOUNT_MODEL_COL_PRESENCE |
The presence column, containing an OssoABookAccountPresence |
OSSO_ABOOK_ACCOUNT_MODEL_COL_TUPLE |
The tuple column, containing an OssoABookAccountModelTuple |
typedef struct { EContact *contact; OssoABookAccount *account; int ref_count; } OssoABookAccountModelTuple;
Links an EContact to an OssoABookAccount.
EContact *contact ; |
EContact of the tuple. |
OssoABookAccount *account ; |
OssoABookAccount of the tuple. |
int ref_count ; |
Reference count of the tuple struct. |
OssoABookAccountModel* osso_abook_account_model_new (OssoABookAccountTypeFlags flags);
Creates a new OssoABookAccountModel object listing accounts of types
specified by flags
. Note that for any accounts to show up, the newly
created model should be bound to an EBookView using
osso_abook_tree_model_set_book_view()
.
flags : |
An OssoABookAccountTypeFlags bitmask specifying the type of accounts to be listed |
Returns : | A new OssoABookAccouthModel object. |
OssoABookAccountTypeFlags osso_abook_account_model_get_flags (OssoABookAccountModel *model);
Retrieves the OssoABookAccountTypeFlags bitmask indicating the type of accounts listed.
model : |
An OssoABookAccountModel |
Returns : | OssoABookAccountTypeFlags bitmask indicating the type of accounts listed. |
gboolean osso_abook_account_model_get_iter (OssoABookAccountModel *model, OssoABookAccountModelTuple *tuple, GtkTreeIter *iter);
Retreives the GtkTreeIter associated with tuple
, and stores it in iter
.
model : |
An OssoABookAccountModel |
tuple : |
An OssoABookAccountModelTuple |
iter : |
A GtkTreeIter. Can be NULL. |
Returns : | TRUE if tuple was included in model , FALSE otherwise.
|
OssoABookAccountModelTuple* osso_abook_account_model_tuple_new (EContact *contact, OssoABookAccount *account);
Allocate a new OssoABookAccountModelTuple object containing contact
and account
.
contact : |
An EContact |
account : |
An OssoABookAccount |
Returns : | A newly allocated OssoABookAccountModelTuple. |
OssoABookAccountModelTuple* osso_abook_account_model_tuple_ref (OssoABookAccountModelTuple *tuple);
Increase the ref count of tuple
.
tuple : |
An OssoABookAccountModelTuple |
Returns : | A reference to tuple , for use in embedding the command.
|
void osso_abook_account_model_tuple_unref (OssoABookAccountModelTuple *tuple);
Decrease the ref count of tuple
.
tuple : |
An OssoABookAccountModelTuple |
guint osso_abook_account_model_tuple_hash (OssoABookAccountModelTuple *tuple);
Converts tuple
to a hash value. It can be passed to g_hash_table_new()
as
the hash_func parameter, when using tuples as keys in a GHashTable.
tuple : |
An OssoABookAccountModelTuple |
Returns : | a hash value corresponding to the key. |
gboolean osso_abook_account_model_tuple_equal (OssoABookAccountModelTuple *a, OssoABookAccountModelTuple *b);
Compares two tuples and returns TRUE if they are equal. It can be passed to
g_hash_table_new()
as the key_equal_func parameter, when using tuples as
keys in a GHashTable.
a : |
An OssoABookAccountModelTuple |
b : |
An OssoABookAccountModelTuple |
Returns : | TRUE if the two keys match. |
<< List widgets | OssoABookAccountView >> |