OssoABookContactFilter

OssoABookContactFilter — Contact filtering interface.

Synopsis

enum                OssoABookContactFilterFlags;
                    OssoABookContactFilter;
                    OssoABookContactFilterIface;
gboolean            osso_abook_contact_filter_accept    (OssoABookContactFilter *filter,
                                                         const char *uid,
                                                         OssoABookContact *contact);
OssoABookContactFilterFlags osso_abook_contact_filter_get_flags
                                                        (OssoABookContactFilter *filter);

Object Hierarchy

  GInterface
   +----OssoABookContactFilter

Prerequisites

OssoABookContactFilter requires GObject.

Known Implementations

OssoABookContactFilter is implemented by OssoABookContactSubscriptions.

Signals

  "contact-filter-changed"                         : Run First

Description

OssoABookContactFilter can be used to choose which contacts an OssoABookAggregator announces.

Details

enum OssoABookContactFilterFlags

typedef enum {
        OSSO_ABOOK_CONTACT_FILTER_ONLY_READS_UID = (1 << 0),
} OssoABookContactFilterFlags;

OssoABookContactFilter

typedef struct _OssoABookContactFilter OssoABookContactFilter;

Dummy type for the OssoABookAvatar interface.


OssoABookContactFilterIface

typedef struct {
        gboolean                    (* accept)                 (OssoABookContactFilter *filter,
                                                                const char             *uid,
                                                                OssoABookContact       *contact);
        OssoABookContactFilterFlags (* get_flags)              (OssoABookContactFilter *filter);

        void                        (* contact_filter_changed) (OssoABookContactFilter *filter);
} OssoABookContactFilterIface;

Virtual methods of the OssoABookContactFilter interface.

accept () virtual method for osso_abook_contact_filter_accept()
get_flags () capabilities of the filter
contact_filter_changed () virtual method for OssoABookContactFilter::contact-filter-changed

osso_abook_contact_filter_accept ()

gboolean            osso_abook_contact_filter_accept    (OssoABookContactFilter *filter,
                                                         const char *uid,
                                                         OssoABookContact *contact);

Checks if the contact descibed by uid and contact is accepted by this filter. In cases where no OssoABookContact instance is known yet, NULL can be passed for contact.

filter : a OssoABookContactFilter
uid : the UID to validate
contact : the contact to validate, or NULL
Returns : TRUE when the filter accepts this contact, and FALSE when it rejects the contact.

osso_abook_contact_filter_get_flags ()

OssoABookContactFilterFlags osso_abook_contact_filter_get_flags
                                                        (OssoABookContactFilter *filter);

Describes capabilities and behaviour of this filter.

filter : a OssoABookContactFilter
Returns : The OssoABookContactFilterFlags for this filter.

Signal Details

The "contact-filter-changed" signal

void                user_function                      (OssoABookContactFilter *filter,
                                                        gpointer                user_data)      : Run First

This signal is emitted when the contact filter changes its configuration and should be re-applied.

filter : a OssoABookContactFilter
user_data : user data set when the signal handler was connected.