OssoABookMcAccountModel

OssoABookMcAccountModel — A GtkTreeModel storing Mission Control accounts.

Synopsis

enum                OssoABookMcAccountModelColumn;
                    OssoABookMcAccountModel;
OssoABookMcAccountModel* osso_abook_mc_account_model_new
                                                        (void);
const char*         osso_abook_mc_account_model_get_account_protocol
                                                        (OssoABookMcAccountModel *model);
void                osso_abook_mc_account_model_set_account_protocol
                                                        (OssoABookMcAccountModel *model,
                                                         const char *protocol);
OssoABookCapsFlags  osso_abook_mc_account_model_get_required_capabilities
                                                        (OssoABookMcAccountModel *model);
void                osso_abook_mc_account_model_set_required_capabilities
                                                        (OssoABookMcAccountModel *model,
                                                         OssoABookCapsFlags caps);
GList*              osso_abook_mc_account_model_get_allowed_accounts
                                                        (OssoABookMcAccountModel *model);
void                osso_abook_mc_account_model_set_allowed_accounts
                                                        (OssoABookMcAccountModel *model,
                                                         GList *accounts);
gboolean            osso_abook_mc_account_model_get_iter
                                                        (OssoABookMcAccountModel *model,
                                                         McAccount *account,
                                                         GtkTreeIter *iter);

Object Hierarchy

  GObject
   +----GtkListStore
         +----OssoABookMcAccountModel

Implemented Interfaces

OssoABookMcAccountModel implements GtkTreeModel, GtkBuildable, GtkTreeSortable, GtkTreeDragSource and GtkTreeDragDest.

Properties

  "account-protocol"         gchar*                : Read / Write / Construct
  "allowed-accounts"         gpointer              : Read / Write / Construct
  "required-capabilities"    OssoABookCapsFlags    : Read / Write / Construct

Description

The OssoABookMcAccountModel collects McAccount instances for display in GtkTreeView widgets.

Details

enum OssoABookMcAccountModelColumn

typedef enum {
        OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_ACCOUNT,
        OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_PROTOCOL_AND_UID,
        OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_ICON_NAME,
} OssoABookMcAccountModelColumn;

The columns indicies for OssoABookMcAccountModel.

OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_ACCOUNT a McAccount
OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_PROTOCOL_AND_UID
OSSO_ABOOK_MC_ACCOUNT_MODEL_COL_ICON_NAME

OssoABookMcAccountModel

typedef struct _OssoABookMcAccountModel OssoABookMcAccountModel;

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


osso_abook_mc_account_model_new ()

OssoABookMcAccountModel* osso_abook_mc_account_model_new
                                                        (void);

Creates a new OssoABookMcAccountModel object.

Returns : A new OssoABookMcAccountModel object.

osso_abook_mc_account_model_get_account_protocol ()

const char*         osso_abook_mc_account_model_get_account_protocol
                                                        (OssoABookMcAccountModel *model);

Retrieves the name of the protocol that the model is being filtered by.

model : An OssoABookMcAccountModel
Returns : The name of the protocol that the model is being filtered by.

osso_abook_mc_account_model_set_account_protocol ()

void                osso_abook_mc_account_model_set_account_protocol
                                                        (OssoABookMcAccountModel *model,
                                                         const char *protocol);

Sets the the protocol that the model is being filtered by.


osso_abook_mc_account_model_get_required_capabilities ()

OssoABookCapsFlags  osso_abook_mc_account_model_get_required_capabilities
                                                        (OssoABookMcAccountModel *model);

Retrieves the account capabilities that the model is being filtered by.

model : An OssoABookMcAccountModel
Returns : The OssoABookCapsFlags that the model is being filtered by.

osso_abook_mc_account_model_set_required_capabilities ()

void                osso_abook_mc_account_model_set_required_capabilities
                                                        (OssoABookMcAccountModel *model,
                                                         OssoABookCapsFlags caps);

Sets the account capabilities that the model is being filtered by.

model : An OssoABookMcAccountModel
caps : OssoABookCapsFlags to set the filter to

osso_abook_mc_account_model_get_allowed_accounts ()

GList*              osso_abook_mc_account_model_get_allowed_accounts
                                                        (OssoABookMcAccountModel *model);

Retrieves the list of allowed accounts that the model is being filtered by. This list is owned by the model and it and its elements must not be freed.

model : An OssoABookMcAccountModel
Returns : A GList of the McAccounts that the model is being filtered by.

osso_abook_mc_account_model_set_allowed_accounts ()

void                osso_abook_mc_account_model_set_allowed_accounts
                                                        (OssoABookMcAccountModel *model,
                                                         GList *accounts);

Sets the list of allowed accounts that the model is being filtered by. The model copies accounts (but not the elements, of course), so you must free the list after calling this function.

model : An OssoABookMcAccountModel
accounts : A GList of McAccounts to filter the model by.

osso_abook_mc_account_model_get_iter ()

gboolean            osso_abook_mc_account_model_get_iter
                                                        (OssoABookMcAccountModel *model,
                                                         McAccount *account,
                                                         GtkTreeIter *iter);

Retrieves the GtkTreeIter associated with account, and stores it in iter.

model : An OssoABookMcAccountModel
account : An McAccount
iter : A GtkTreeIter. Can be NULL.
Returns : TRUE if account was included in model, FALSE otherwise.

Property Details

The "account-protocol" property

  "account-protocol"         gchar*                : Read / Write / Construct

Accepted account protocol (NULL for all protocols).

Default value: NULL


The "allowed-accounts" property

  "allowed-accounts"         gpointer              : Read / Write / Construct

Accounts which may appear in the model (if all additional filters allow them).


The "required-capabilities" property

  "required-capabilities"    OssoABookCapsFlags    : Read / Write / Construct

Account capabilities required an account to appear.

See Also

EBookView