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_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,
                                             EContact *contact,
                                             OssoABookPresence *presence);
void        osso_abook_group_emit_refilter_contact
                                            (OssoABookGroup *group,
                                             EContact *contact);
void        osso_abook_group_emit_refilter_presence
                                            (OssoABookGroup *group,
                                             OssoABookPresence *presence);
int         osso_abook_group_get_sort_weight
                                            (OssoABookGroup *group);
int         osso_abook_group_compare        (OssoABookGroup *a,
                                             OssoABookGroup *b);
gboolean    osso_abook_group_get_sensitive  (OssoABookGroup *group);


Object Hierarchy


  GObject
   +----OssoABookGroup
         +----OssoABookAllGroup
         +----OssoABookBlockedGroup
         +----OssoABookManualGroup
         +----OssoABookOnlineGroup
         +----OssoABookRecentGroup
         +----OssoABookServiceGroup

Properties


  "icon-name"            gchararray            : Read
  "name"                 gchararray            : Read / Write / Construct Only
  "sensitive"            gboolean              : Read
  "sort-weight"          gint                  : Read
  "visible"              gboolean              : Read

Signal Prototypes


"refilter-contact"
            void        user_function      (OssoABookGroup *ossoabookgroup,
                                            EContact *arg1,
                                            gpointer user_data);
"refilter-group"
            void        user_function      (OssoABookGroup *ossoabookgroup,
                                            gpointer user_data);
"refilter-presence"
            void        user_function      (OssoABookGroup *ossoabookgroup,
                                            OssoABookPresence *arg1,
                                            gpointer user_data);
"visibility-changed"
            void        user_function      (OssoABookGroup *ossoabookgroup,
                                            gboolean arg1,
                                            gpointer user_data);

Description

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

Details

OssoABookGroup

typedef struct _OssoABookGroup OssoABookGroup;

There are no public fields in OssoABookGroup.


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_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,
                                             EContact *contact,
                                             OssoABookPresence *presence);

Returns a boolean indicating whether this combination of contact and presence is included in group. Both objects need to be passed.

group : an OssoABookGroup
contact : an EContact whose inclusion is to be checked
presence : an OssoABookPresence whose inclusion is to be checked
Returns : TRUE if this combination of contact and presence is included in group, FALSE otherwise.

osso_abook_group_emit_refilter_contact ()

void        osso_abook_group_emit_refilter_contact
                                            (OssoABookGroup *group,
                                             EContact *contact);

Emits the "refilter-contact" signal, requesting contact to be refiltered by any containing filters.

group : an OssoABookGroup
contact : an EContact to be refiltered

osso_abook_group_emit_refilter_presence ()

void        osso_abook_group_emit_refilter_presence
                                            (OssoABookGroup *group,
                                             OssoABookPresence *presence);

Emits the "refilter-presence" signal, requesting presence to be refiltered by any containing filters.

group : an OssoABookGroup
presence : an OssoABookPresence to be refiltered

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_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_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.

Properties

The "icon-name" property

  "icon-name"            gchararray            : Read

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"                 gchararray            : Read / Write / Construct Only

The name of the group.

Default value: NULL


The "sensitive" property

  "sensitive"            gboolean              : Read

Whether the group is sensitive.

Default value: TRUE


The "sort-weight" property

  "sort-weight"          gint                  : Read

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

Default value: 0


The "visible" property

  "visible"              gboolean              : Read

Whether the group is visible.

Default value: TRUE

Signals

The "refilter-contact" signal

void        user_function                  (OssoABookGroup *ossoabookgroup,
                                            EContact *arg1,
                                            gpointer user_data);

The refilter-contact signal is emitted when arg1 has to be refiltered by any containing filters. This is used when arg1's membership to the group has changed, for example.

ossoabookgroup : the object which received the signal.
arg1 : The EContact object to be refiltered.
user_data : user data set when the signal handler was connected.

The "refilter-group" signal

void        user_function                  (OssoABookGroup *ossoabookgroup,
                                            gpointer user_data);

ossoabookgroup : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "refilter-presence" signal

void        user_function                  (OssoABookGroup *ossoabookgroup,
                                            OssoABookPresence *arg1,
                                            gpointer user_data);

The refilter-presence signal is emitted when arg1 has to be refiltered by any containing filters. This is used when arg1's membership to the group has changed, for example.

ossoabookgroup : the object which received the signal.
arg1 : The OssoABookPresence object to be refiltered.
user_data : user data set when the signal handler was connected.

The "visibility-changed" signal

void        user_function                  (OssoABookGroup *ossoabookgroup,
                                            gboolean arg1,
                                            gpointer user_data);

The visibility-changed signal is emitted when the group's visibility has changed. The containing widget should hide or show the group accordingly.

ossoabookgroup : the object which received the signal.
arg1 : TRUE if the group is visible, FALSE otherwise.
user_data : user data set when the signal handler was connected.

See Also

OssoABookAllGroup, OssoABookBlockedGroup, OssoABookManualGroup, OssoABookOnlineGroup, OssoABookRecentGroup, OssoABookGroupModel, OssoABookGroupView, OssoABookGroupSelector