FolksQuery 3 FOLKS Library
FolksQuery A contact query.

## Functions

guint | folks_query_is_match ()
gchar ** | folks_query_get_match_fields ()

## Types and Values

#define | FOLKS_TYPE_QUERY
struct | FolksQuery
struct | FolksQueryClass

## Description

If any properties of the query change such that matches may change, the "notify" signal will be emitted, potentially without a detail string. Views which are using this query should re-evaluate their matches on receiving this signal.

See also: FolksSearchView

## Functions

### folks_query_is_match ()

    guint
    folks_query_is_match (FolksQuery *self,
                          FolksIndividual *individual);

Determines whether a given FolksIndividual matches this query.

This returns a match strength, which is on an arbitrary scale which is not part of libfolks’ public API. These strengths should not be stored by user applications, or examined numerically — they should only be used for pairwise strength comparisons.

This function is intended to be used in the FolksSearchView implementation only. Use "individuals" to retrieve search results.

#### Parameters

self | the FolksQuery instance |
individual | . an FolksIndividual to match against . | [in]

#### Returns

a positive integer if the individual matches this query, or zero if they do not match; higher numbers indicate a better match

Since: 0.11.0

folks_query_is_match

### folks_query_get_match_fields ()

    gchar **
    folks_query_get_match_fields (FolksQuery *self,
                                  gint *result_length1);

Get and return the current value of the "match-fields" property.

The names of the fields to match within

The names of valid fields are available via ``folks_persona_store_detail_key()``.

The ordering of the fields determines the order they are checked for matches, which can have performance implications (these should ideally be ordered from most- to least-likely to match).

Also note that more fields (particularly rarely-matched fields) will negatively impact performance, so only include important fields.

Default value is `FOLKS_QUERY_MATCH_FIELDS_NAMES`.

#### Parameters

self | the FolksQuery instance to query |

#### Returns

the value of the "match-fields" property

Since: 0.11.0

folks_query_get_match_fields

## Types and Values

### FOLKS_TYPE_QUERY

    #define FOLKS_TYPE_QUERY (folks_query_get_type ())

The type for FolksQuery.

FOLKS_TYPE_QUERY

### struct FolksQuery

    struct FolksQuery {
    	GObject parent_instance;
    	FolksQueryPrivate * priv;
    };

A contact query.

If any properties of the query change such that matches may change, the "notify" signal will be emitted, potentially without a detail string. Views which are using this query should re-evaluate their matches on receiving this signal.

See also: FolksSearchView

Since: 0.11.0

FolksQuery

### struct FolksQueryClass

    struct FolksQueryClass {
    	GObjectClass parent_class;
    	guint (*is_match) (FolksQuery* self, FolksIndividual* individual);
    	gchar** (*get_match_fields) (FolksQuery* self, gint* result_length1);
    	void (*set_match_fields) (FolksQuery* self, gchar** value, gint value_length1);
    };

The class structure for `FOLKS_TYPE_QUERY`. All the fields in this structure are private and should never be accessed directly.

#### Members

is_match () | virtual method called by ``folks_query_is_match()`` |
get_match_fields () | getter method for the abstract property "match-fields" |
set_match_fields () |  |

FolksQueryClass