Top |
Functions
RestParams * | rest_params_new () |
void | rest_params_free () |
void | rest_params_add () |
RestParam * | rest_params_get () |
void | rest_params_remove () |
gboolean | rest_params_are_strings () |
GHashTable * | rest_params_as_string_hash_table () |
void | rest_params_iter_init () |
gboolean | rest_params_iter_next () |
Functions
rest_params_free ()
void
rest_params_free (RestParams *params
);
Destroy the RestParams and the RestParam objects that it contains.
rest_params_add ()
void rest_params_add (RestParams *params
,RestParam *param
);
Add param
to params
.
rest_params_get ()
RestParam * rest_params_get (RestParams *params
,const char *name
);
Return the RestParam called name
, or NULL
if it doesn't exist.
rest_params_remove ()
void rest_params_remove (RestParams *params
,const char *name
);
Remove the RestParam called name
.
rest_params_are_strings ()
gboolean
rest_params_are_strings (RestParams *params
);
Checks if the parameters are all simple strings (have a content type of "text/plain").
rest_params_as_string_hash_table ()
GHashTable *
rest_params_as_string_hash_table (RestParams *params
);
Create a new GHashTable which contains the name and value of all string (content type of text/plain) parameters.
The values are owned by the RestParams, so don't destroy the RestParams before the hash table.
rest_params_iter_init ()
void rest_params_iter_init (RestParamsIter *iter
,RestParams *params
);
Initialize a parameter iterator over params
. Modifying params
after calling
this function invalidates the returned iterator.
1 2 3 4 5 6 7 8 |
RestParamsIter iter; const char *name; RestParam *param; rest_params_iter_init (&iter, params); while (rest_params_iter_next (&iter, &name, ¶m)) { /* do something with name and param */ } |
rest_params_iter_next ()
gboolean rest_params_iter_next (RestParamsIter *iter
,const char **name
,RestParam **param
);
Advances iter
and retrieves the name and/or parameter that are now pointed
at as a result of this advancement. If FALSE is returned, name
and param
are not set and the iterator becomes invalid.