|  |  |  | GUPnP A/V Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
GUPnPSearchCriteriaParser; enum GUPnPSearchCriteriaOp; GUPnPSearchCriteriaParser * gupnp_search_criteria_parser_new (void); gboolean gupnp_search_criteria_parser_parse_text (GUPnPSearchCriteriaParser *parser,const char *text,GError **error);
"begin-parens" :Run Last"conjunction" :Run Last"disjunction" :Run Last"end-parens" :Run Last"expression" :Run Last
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.
typedef enum {
        /* G_TYPE_STRING */
        GUPNP_SEARCH_CRITERIA_OP_EQ               = G_TOKEN_LAST + 1,
        GUPNP_SEARCH_CRITERIA_OP_NEQ              = G_TOKEN_LAST + 2,
        GUPNP_SEARCH_CRITERIA_OP_LESS             = G_TOKEN_LAST + 3,
        GUPNP_SEARCH_CRITERIA_OP_LEQ              = G_TOKEN_LAST + 4,
        GUPNP_SEARCH_CRITERIA_OP_GREATER          = G_TOKEN_LAST + 5,
        GUPNP_SEARCH_CRITERIA_OP_GEQ              = G_TOKEN_LAST + 6,
        GUPNP_SEARCH_CRITERIA_OP_CONTAINS         = G_TOKEN_LAST + 7,
        GUPNP_SEARCH_CRITERIA_OP_DOES_NOT_CONTAIN = G_TOKEN_LAST + 8,
        GUPNP_SEARCH_CRITERIA_OP_DERIVED_FROM     = G_TOKEN_LAST + 9,
        /* G_TYPE_BOOLEAN */
        GUPNP_SEARCH_CRITERIA_OP_EXISTS           = G_TOKEN_LAST + 10
} GUPnPSearchCriteriaOp;
The possible operators in SearchCriteria strings.
| '=' | |
| '!=' | |
| '<' | |
| '<=' | |
| '>' | |
| '>=' | |
| 'contains' | |
| 'doesNotContain' | |
| 'derivedFrom' | |
| 'exists' | 
GUPnPSearchCriteriaParser * gupnp_search_criteria_parser_new
                                                        (void);
| Returns : | A new GUPnPSearchCriteriaParser object. | 
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.
| 
 | A GUPnPSearchCriteriaParser | 
| 
 | The search criteria string to be parsed | 
| 
 | The location where to store the error information if any, or NULL | 
| Returns : | TRUE on success. | 
"begin-parens" signalvoid                user_function                      (GUPnPSearchCriteriaParser *parser,
                                                        gpointer                   user_data)      : Run Last
The ::begin_parens signal is emitted to mark the beginning of a parenthetical expression.
| 
 | The GUPnPSearchCriteriaParser that received the signal | 
| 
 | user data set when the signal handler was connected. | 
"conjunction" signalvoid                user_function                      (GUPnPSearchCriteriaParser *parser,
                                                        gpointer                   user_data)      : Run Last
The ::conjuction signal is emitted whenever a conjuction marker (and) is parsed.
| 
 | The GUPnPSearchCriteriaParser that received the signal | 
| 
 | user data set when the signal handler was connected. | 
"disjunction" signalvoid                user_function                      (GUPnPSearchCriteriaParser *parser,
                                                        gpointer                   user_data)      : Run Last
The ::disjuction signal is emitted whenever a disjuction marker (or&rpar is parsed.
| 
 | The GUPnPSearchCriteriaParser that received the signal | 
| 
 | user data set when the signal handler was connected. | 
"end-parens" signalvoid                user_function                      (GUPnPSearchCriteriaParser *parser,
                                                        gpointer                   user_data)      : Run Last
The ::end_parens signal is emitted to mark the end of a parenthetical expression.
| 
 | The GUPnPSearchCriteriaParser that received the signal | 
| 
 | user data set when the signal handler was connected. | 
"expression" signalgboolean            user_function                      (GUPnPSearchCriteriaParser *parser,
                                                        gchar                     *property,
                                                        GUPnPSearchCriteriaOp      op,
                                                        gchar                     *value,
                                                        gpointer                   error,
                                                        gpointer                   user_data)      : Run Last
The ::expression signal is emitted whenever an expression is parsed.
Set error and return FALSE if an error occurred.
| 
 | The GUPnPSearchCriteriaParser that received the signal | 
| 
 | The property | 
| 
 | The operator as GUPnPSearchCriteriaOp | 
| 
 | The value as string | 
| 
 | Place-holder for any possible errors from handler | 
| 
 | user data set when the signal handler was connected. |