libannodex  0.7.3
anx_params.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 Commonwealth Scientific and Industrial Research
3  Organisation (CSIRO) Australia
4 
5  Redistribution and use in source and binary forms, with or without
6  modification, are permitted provided that the following conditions
7  are met:
8 
9  - Redistributions of source code must retain the above copyright
10  notice, this list of conditions and the following disclaimer.
11 
12  - Redistributions in binary form must reproduce the above copyright
13  notice, this list of conditions and the following disclaimer in the
14  documentation and/or other materials provided with the distribution.
15 
16  - Neither the name of CSIRO Australia nor the names of its
17  contributors may be used to endorse or promote products derived from
18  this software without specific prior written permission.
19 
20  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ORGANISATION OR
24  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 
33 #ifndef __ANX_PARAMS_H__
34 #define __ANX_PARAMS_H__
35 
58 typedef void AnxParams;
59 
63 typedef enum {
69 
77 
85 
94 
103 AnxParams * anx_params_new_parse (char * input, AnxParamStyle style);
104 
119 int anx_params_snprint (char * buf, size_t n, AnxParams * params,
120  AnxParamStyle style);
121 
129 char * anx_params_get (AnxParams * params, char * name);
130 
140 AnxParams * anx_params_replace (AnxParams * params, char * name, char * value);
141 
151 AnxParams * anx_params_append (AnxParams * params, char * name, char * value);
152 
159 AnxParams * anx_params_remove (AnxParams * params, char * name);
160 
170 
178 
184 AnxParams * anx_params_free (AnxParams * params);
185 
186 #endif /* __ANX_PARAMS_H__ */
anx_params_get
char * anx_params_get(AnxParams *params, char *name)
Retrieve a parameter from an AnxParams object.
ANX_PARAMS_QUERY
@ ANX_PARAMS_QUERY
URI query format, eg.
Definition: anx_params.h:68
anx_params_new_parse
AnxParams * anx_params_new_parse(char *input, AnxParamStyle style)
Create a new AnxParms object by parsing text input of a given format.
AnxParams
void AnxParams
A set of parameters.
Definition: anx_params.h:58
anx_params_remove
AnxParams * anx_params_remove(AnxParams *params, char *name)
Remove a parameter from an AnxParams object.
ANX_PARAMS_PARAMTAGS
@ ANX_PARAMS_PARAMTAGS
CMML param tag format, eg.
Definition: anx_params.h:92
anx_params_snprint
int anx_params_snprint(char *buf, size_t n, AnxParams *params, AnxParamStyle style)
Print an AnxParms object with a given formatting style.
anx_params_free
AnxParams * anx_params_free(AnxParams *params)
Free an AnxParams object.
ANX_PARAMS_METATAGS
@ ANX_PARAMS_METATAGS
XHTML/CMML meta tag format, eg.
Definition: anx_params.h:84
anx_params_replace
AnxParams * anx_params_replace(AnxParams *params, char *name, char *value)
Add a parameter to an AnxParams object.
ANX_PARAMS_HEADERS
@ ANX_PARAMS_HEADERS
SMTP/HTTP/AnxData header format, eg.
Definition: anx_params.h:76
AnxParamStyle
AnxParamStyle
Formatting styles for parsing and printing AnxParams objects.
Definition: anx_params.h:63
anx_params_clone
AnxParams * anx_params_clone(AnxParams *params)
Create a new AnxParams object by cloning an existing one.
anx_params_append
AnxParams * anx_params_append(AnxParams *params, char *name, char *value)
Add a parameter to an AnxParams object.
anx_params_merge
AnxParams * anx_params_merge(AnxParams *dest, AnxParams *src)
Merge two AnxParams objects.