OssoABookGroup

OssoABookGroup — Representation of a group.

Synopsis

                    OssoABookGroup;
const char*         osso_abook_group_get_name           (OssoABookGroup *group);
const char*         osso_abook_group_get_display_name   (OssoABookGroup *group);
const char*         osso_abook_group_get_display_title  (OssoABookGroup *group);
const char*         osso_abook_group_get_icon_name      (OssoABookGroup *group);
GtkWidget*          osso_abook_group_get_empty_widget   (OssoABookGroup *group);
gboolean            osso_abook_group_is_visible         (OssoABookGroup *group);
gboolean            osso_abook_group_includes_contact   (OssoABookGroup *group,
                                                         OssoABookContact *contact);
int                 osso_abook_group_get_sort_weight    (OssoABookGroup *group);
gboolean            osso_abook_group_get_sensitive      (OssoABookGroup *group);
OssoABookListStoreCompareFunc osso_abook_group_get_sort_func
                                                        (OssoABookGroup *group);
int                 osso_abook_group_compare            (OssoABookGroup *a,
                                                         OssoABookGroup *b);
OssoABookListStore* osso_abook_group_get_model          (OssoABookGroup *group);

Object Hierarchy

  GObject
   +----OssoABookGroup
         +----OssoABookAllGroup
         +----OssoABookServiceGroup
         +----OssoABookRecentGroup
         +----OssoABookProfileGroup

Properties

  "display-title"            gchar*                : Read
  "icon-name"                gchar*                : Read / Write
  "name"                     gchar*                : Read / Write / Construct Only
  "sensitive"                gboolean              : Read / Write
  "sort-weight"              gint                  : Read / Write
  "visible"                  gboolean              : Read / Write

Signals

  "refilter-contact"                               : Run Last
  "refilter-group"                                 : Run Last

Description

OssoABookGroup is an object that represents a group in the osso-addressbook API.

Details

OssoABookGroup

typedef struct _OssoABookGroup OssoABookGroup;

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


osso_abook_group_get_name ()

const char*         osso_abook_group_get_name           (OssoABookGroup *group);

Retrieves the name of group. Use osso_abook_group_get_display_name() to get the translated name for display.

group : an OssoABookGroup
Returns : The name of group. This string is owned by libosso-abook and should not be freed.

osso_abook_group_get_display_name ()

const char*         osso_abook_group_get_display_name   (OssoABookGroup *group);

Retrieves the name of group, translated for the current locale.

group : an OssoABookGroup
Returns : The translated name of group. This string is owned by libosso-abook and should not be freed.

osso_abook_group_get_display_title ()

const char*         osso_abook_group_get_display_title  (OssoABookGroup *group);

Retrieves the window title for group, translated for the current locale.

group : an OssoABookGroup
Returns : The translated display title of group. This string is owned by libosso-abook and should not be freed.

osso_abook_group_get_icon_name ()

const char*         osso_abook_group_get_icon_name      (OssoABookGroup *group);

Retrieves the icon name associated with group. The icon name can be used to look up the appropiate icon to represent group.

group : an OssoABookGroup
Returns : The icon name associated with group. This string is owned by libosso-abook and should not be freed.

osso_abook_group_get_empty_widget ()

GtkWidget*          osso_abook_group_get_empty_widget   (OssoABookGroup *group);

Retrieves the widget to display when group is empty.

group : an OssoABookGroup
Returns : The empty widget of group.

osso_abook_group_is_visible ()

gboolean            osso_abook_group_is_visible         (OssoABookGroup *group);

Returns a boolean indicating whether group is requested to be shown or not.

group : an OssoABookGroup
Returns : TRUE if group is requested to be shown, FALSE otherwise.

osso_abook_group_includes_contact ()

gboolean            osso_abook_group_includes_contact   (OssoABookGroup *group,
                                                         OssoABookContact *contact);

Returns a boolean indicating whether this contact is included in group.

group : an OssoABookGroup
contact : an OssoABookContact whose inclusion is to be checked
Returns : TRUE if this contact is included in group, FALSE otherwise.

osso_abook_group_get_sort_weight ()

int                 osso_abook_group_get_sort_weight    (OssoABookGroup *group);

Returns the sort weight of group. Groups are sorted by first comparing the sort weights, and then collating the names. A lower sort weight indicates a higher sorting priority.

group : an OssoABookGroup
Returns : An integer indicating the sort weight of group.

osso_abook_group_get_sensitive ()

gboolean            osso_abook_group_get_sensitive      (OssoABookGroup *group);

Returns the sensitivity of group.

group : an OssoABookGroup
Returns : TRUE if the group is sensitive, FALSE if not.

osso_abook_group_get_sort_func ()

OssoABookListStoreCompareFunc osso_abook_group_get_sort_func
                                                        (OssoABookGroup *group);

Returns a function the can be used to sort the OssoABookListStore that displays group. See also osso_abook_list_store_set_sort_key().

group : an OssoABookGroup
Returns : an GtkTreeIterCompareFunc or NULL

osso_abook_group_compare ()

int                 osso_abook_group_compare            (OssoABookGroup *a,
                                                         OssoABookGroup *b);

Compares group a to group b, first comparing the sort weights, and then collating the names. A lower sort weight indicates a higher sorting priority.

a : an OssoABookGroup
b : an OssoABookGroup
Returns : < 0 if group a compares before group b, 0 if they compare equal, > 0 if group a compares after group b.

osso_abook_group_get_model ()

OssoABookListStore* osso_abook_group_get_model          (OssoABookGroup *group);

Retrieves the OssoABookListStore storing the contacts of this group.

group : a OssoABookGroup
Returns : A OssoABookListStore instance.

Property Details

The "display-title" property

  "display-title"            gchar*                : Read

The display title of the group.

Default value: NULL


The "icon-name" property

  "icon-name"                gchar*                : Read / Write

The icon name of the group. The icon name can be used to look up the appropiate icon to represent the group.

Default value: NULL


The "name" property

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

The name of the group.

Default value: NULL


The "sensitive" property

  "sensitive"                gboolean              : Read / Write

Whether the group is sensitive.

Default value: TRUE


The "sort-weight" property

  "sort-weight"              gint                  : Read / Write

Sort weight of the group. A lower value results in a higher sorting priority.

Default value: 0


The "visible" property

  "visible"                  gboolean              : Read / Write

Whether the group is visible.

Default value: TRUE

Signal Details

The "refilter-contact" signal

void                user_function                      (OssoABookGroup   *group,
                                                        OssoABookContact *contact,
                                                        gpointer          user_data)      : Run Last

This signal is emitted when a contact was changed and the group has to be filtered again.

group : a OssoABookGroup
contact : the changed OssoABookContact
user_data : user data set when the signal handler was connected.

The "refilter-group" signal

void                user_function                      (OssoABookGroup *group,
                                                        gpointer        user_data)      : Run Last

This signal is emitted when the group was modified and has to be filtered again.

group : a OssoABookGroup
user_data : user data set when the signal handler was connected.