GUPnPSearchCriteriaParser

GUPnPSearchCriteriaParser — A/V search criteria parser

Functions

Signals

Types and Values

Object Hierarchy

    GEnum
    ╰── GUPnPSearchCriteriaOp
    GObject
    ╰── GUPnPSearchCriteriaParser

Description

GUPnPSearchCriteriaParser parses ContentDirectory search criteria strings.

Note that no signals will be emitted if a wildcard is specified, and that the user is responsible for ensuring precedence of conjunction over disjunction.

Functions

gupnp_search_criteria_parser_new ()

GUPnPSearchCriteriaParser *
gupnp_search_criteria_parser_new (void);

Returns

A new GUPnPSearchCriteriaParser object.


gupnp_search_criteria_parser_parse_text ()

gboolean
gupnp_search_criteria_parser_parse_text
                               (GUPnPSearchCriteriaParser *parser,
                                const char *text,
                                GError **error);

Parses text , emitting the various defined signals on the way. If an error occured error will be set.

Parameters

parser

A GUPnPSearchCriteriaParser

 

text

The search criteria string to be parsed

 

error

The location where to store the error information if any, or NULL

 

Returns

TRUE on success.

Types and Values

GUPnPSearchCriteriaParser

typedef struct _GUPnPSearchCriteriaParser GUPnPSearchCriteriaParser;

enum GUPnPSearchCriteriaOp

The possible operators in SearchCriteria strings.

Members

GUPNP_SEARCH_CRITERIA_OP_EQ

'='

 

GUPNP_SEARCH_CRITERIA_OP_NEQ

'!='

 

GUPNP_SEARCH_CRITERIA_OP_LESS

'<'

 

GUPNP_SEARCH_CRITERIA_OP_LEQ

'<='

 

GUPNP_SEARCH_CRITERIA_OP_GREATER

'>'

 

GUPNP_SEARCH_CRITERIA_OP_GEQ

'>='

 

GUPNP_SEARCH_CRITERIA_OP_CONTAINS

'contains'

 

GUPNP_SEARCH_CRITERIA_OP_DOES_NOT_CONTAIN

'doesNotContain'

 

GUPNP_SEARCH_CRITERIA_OP_DERIVED_FROM

'derivedFrom'

 

GUPNP_SEARCH_CRITERIA_OP_EXISTS

'exists'

 

Signal Details

The “begin-parens” signal

void
user_function (GUPnPSearchCriteriaParser *parser,
               gpointer                   user_data)

The ::begin_parens signal is emitted to mark the beginning of a parenthetical expression.

Parameters

parser

The GUPnPSearchCriteriaParser that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “conjunction” signal

void
user_function (GUPnPSearchCriteriaParser *parser,
               gpointer                   user_data)

The ::conjuction signal is emitted whenever a conjuction marker (and) is parsed.

Parameters

parser

The GUPnPSearchCriteriaParser that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “disjunction” signal

void
user_function (GUPnPSearchCriteriaParser *parser,
               gpointer                   user_data)

The ::disjuction signal is emitted whenever a disjuction marker (or&rpar is parsed.

Parameters

parser

The GUPnPSearchCriteriaParser that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “end-parens” signal

void
user_function (GUPnPSearchCriteriaParser *parser,
               gpointer                   user_data)

The ::end_parens signal is emitted to mark the end of a parenthetical expression.

Parameters

parser

The GUPnPSearchCriteriaParser that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “expression” signal

gboolean
user_function (GUPnPSearchCriteriaParser *parser,
               gchar                     *property,
               GUPnPSearchCriteriaOp      op,
               gchar                     *value,
               gpointer                   error,
               gpointer                   user_data)

The ::expression signal is emitted whenever an expression is parsed. Set error and return FALSE if an error occurred.

Parameters

parser

The GUPnPSearchCriteriaParser that received the signal

 

property

The property

 

op

The operator as GUPnPSearchCriteriaOp

 

value

The value as string

 

error

Place-holder for any possible errors from handler

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last