OssoABookRosterManager

OssoABookRosterManager — Manage OssoABookRoster instances for each McAccount.

Synopsis

                    OssoABookRosterManager;
                    OssoABookRosterManagerIface;
void                osso_abook_roster_manager_start     (OssoABookRosterManager *manager);
void                osso_abook_roster_manager_stop      (OssoABookRosterManager *manager);
gboolean            osso_abook_roster_manager_is_running
                                                        (OssoABookRosterManager *manager);
GList*              osso_abook_roster_manager_list_rosters
                                                        (OssoABookRosterManager *manager);
OssoABookRoster*    osso_abook_roster_manager_get_roster
                                                        (OssoABookRosterManager *manager,
                                                         const char *account_name);
OssoABookRosterManager* osso_abook_roster_manager_get_default
                                                        (void);

Object Hierarchy

  GInterface
   +----OssoABookRosterManager

Prerequisites

OssoABookRosterManager requires OssoABookWaitable and GObject.

Known Implementations

OssoABookRosterManager is implemented by OssoABookAccountManager.

Properties

  "running"                  gboolean              : Read

Signals

  "roster-created"                                 : Run Last
  "roster-removed"                                 : Run Last

Description

The OssoABookRosterManager creates a OssoABookRoster for each Mission Control account. This allows easy access on each account's contact list.

Details

OssoABookRosterManager

typedef struct _OssoABookRosterManager OssoABookRosterManager;

Dummy type for the OssoABookRosterManager interface.


OssoABookRosterManagerIface

typedef struct {
        void     (* roster_created) (OssoABookRosterManager *manager,
                                     OssoABookRoster        *roster);

        void     (* roster_removed) (OssoABookRosterManager *manager,
                                     OssoABookRoster        *roster);

        void     (* start)          (OssoABookRosterManager *manager);
        void     (* stop)           (OssoABookRosterManager *manager);

        GList *  (* list_rosters)   (OssoABookRosterManager *manager);

        OssoABookRoster *
                 (* get_roster)     (OssoABookRosterManager *manager,
                                     const char             *account_name);
} OssoABookRosterManagerIface;

Virtual methods of the OssoABookRosterManager interface.

roster_created () virtual method for "roster-created"
roster_removed () virtual method for "roster-removed"
start () virtual method for osso_abook_roster_manager_start()
stop () virtual method for osso_abook_roster_manager_stop()
list_rosters () virtual method for osso_abook_roster_manager_list_rosters()
get_roster () virtual method for osso_abook_roster_manager_get_roster()

osso_abook_roster_manager_start ()

void                osso_abook_roster_manager_start     (OssoABookRosterManager *manager);

Starts operation of the manager. After calling this function a sequence of "roster-created" signals is emitted to report the initial state of the OssoABookRosterManager.

See also: osso_abook_roster_manager_stop(), "running".

manager : a OssoABookRosterManager

osso_abook_roster_manager_stop ()

void                osso_abook_roster_manager_stop      (OssoABookRosterManager *manager);

Stops operation of the manager.

See also: osso_abook_roster_manager_start(), "running".

manager : a OssoABookRosterManager

osso_abook_roster_manager_is_running ()

gboolean            osso_abook_roster_manager_is_running
                                                        (OssoABookRosterManager *manager);

Retrieves the current value of the "running" property.

manager : a OssoABookRosterManager
Returns : The current value of the property.

osso_abook_roster_manager_list_rosters ()

GList*              osso_abook_roster_manager_list_rosters
                                                        (OssoABookRosterManager *manager);

Lists the currently known rosters.

manager : a OssoABookRosterManager, or NULL to use the default manager
Returns : A OssoABookRoster list. The list elements are owned by manager and must not be freed. The list itself must be freed with g_list_free() after usage.

osso_abook_roster_manager_get_roster ()

OssoABookRoster*    osso_abook_roster_manager_get_roster
                                                        (OssoABookRosterManager *manager,
                                                         const char *account_name);

Gets the roster for the account named account_name

manager : a OssoABookRosterManager
account_name : the name of an account
Returns : a roster owned by manager

osso_abook_roster_manager_get_default ()

OssoABookRosterManager* osso_abook_roster_manager_get_default
                                                        (void);

Retrieve the default OssoABookRosterManager.

Returns : The default OssoABookRosterManager. This object is owned by the library and must not be unreferenced.

Property Details

The "running" property

  "running"                  gboolean              : Read

Checks if the roster manager is running.

Default value: FALSE

Signal Details

The "roster-created" signal

void                user_function                      (OssoABookRosterManager *manager,
                                                        OssoABookRoster        *roster,
                                                        gpointer                user_data)      : Run Last

This signal is emitted when a new roster appeared.

manager : a OssoABookRosterManager
roster : the new OssoABookRosterManager
user_data : user data set when the signal handler was connected.

The "roster-removed" signal

void                user_function                      (OssoABookRosterManager *manager,
                                                        OssoABookRoster        *roster,
                                                        gpointer                user_data)      : Run Last

This signal is emitted when a new roster disappeared.

manager : a OssoABookRosterManager
roster : the new OssoABookRosterManager
user_data : user data set when the signal handler was connected.

See Also

EBookView