EBookBackendSExp

EBookBackendSExp — A utility for comparing EContact objects or vcards with search expressions.

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── EBookBackendSExp

Includes

#include <libedata-book/libedata-book.h>

Description

This API is an all purpose utility for comparing EContact objects with search expressions generated by EBookQuery.

Functions

e_book_backend_sexp_new ()

EBookBackendSExp *
e_book_backend_sexp_new (const gchar *text);

Creates a new EBookBackendSExp from text .

Parameters

text

an s-expression to parse

 

Returns

a new EBookBackendSExp


e_book_backend_sexp_text ()

const gchar *
e_book_backend_sexp_text (EBookBackendSExp *sexp);

Retrieve the text expression for the given EBookBackendSExp object.

Parameters

sexp

an EBookBackendSExp

 

Returns

the text expression

Since: 3.8


e_book_backend_sexp_match_vcard ()

gboolean
e_book_backend_sexp_match_vcard (EBookBackendSExp *sexp,
                                 const gchar *vcard);

Checks if vcard matches sexp .

Parameters

sexp

an EBookBackendSExp

 

vcard

a vCard string

 

Returns

TRUE if the vCard matches, FALSE otherwise


e_book_backend_sexp_match_contact ()

gboolean
e_book_backend_sexp_match_contact (EBookBackendSExp *sexp,
                                   EContact *contact);

Checks if contact matches sexp .

Parameters

sexp

an EBookBackendSExp

 

contact

an EContact

 

Returns

TRUE if the contact matches, FALSE otherwise


e_book_backend_sexp_lock ()

void
e_book_backend_sexp_lock (EBookBackendSExp *sexp);

Locks the sexp . Other threads cannot use it until it's unlocked with e_book_backend_sexp_unlock().

Parameters

sexp

an EBookBackendSExp

 

Since: 3.34


e_book_backend_sexp_unlock ()

void
e_book_backend_sexp_unlock (EBookBackendSExp *sexp);

Unlocks the sexp , previously locked by e_book_backend_sexp_lock().

Parameters

sexp

an EBookBackendSExp

 

Since: 3.34


e_book_backend_sexp_util_phone_compare ()

gboolean
e_book_backend_sexp_util_phone_compare
                               (const gchar *phone_value,
                                const gchar *lookup_value,
                                EBookBackendSexpCompareKind compare_kind);

A utility function, which compares only numbers from the phone_value with lookup_value using compare_kind method.

Parameters

phone_value

a phone number to compare

 

lookup_value

a value to lookup for in the phone number

 

compare_kind

an EBookBackendSexpCompareKind

 

Returns

whether numbers from the phone_value match the lookup_value using the given compare_kind

Since: 3.50

Types and Values

struct EBookBackendSExp

struct EBookBackendSExp;

struct EBookBackendSExpClass

struct EBookBackendSExpClass {
};

enum EBookBackendSexpCompareKind

What compare function should be used when comparing two values.

Members

E_BOOK_BACKEND_SEXP_COMPARE_KIND_UNKNOWN

Unknown compare kind

 

E_BOOK_BACKEND_SEXP_COMPARE_KIND_BEGINS_WITH

Check whether a value begins with a string

 

E_BOOK_BACKEND_SEXP_COMPARE_KIND_ENDS_WITH

Check whether a value ends with a string

 

E_BOOK_BACKEND_SEXP_COMPARE_KIND_CONTAINS

Check whether a value contains a string

 

E_BOOK_BACKEND_SEXP_COMPARE_KIND_IS

Check whether a value exactly matches a string

 

Since: 3.50