GMimeParam

GMimeParam — Content-Type and Content-Disposition parameters

Synopsis

                    GMimeParam;
GMimeParam*         g_mime_param_new                    (const char *name,
                                                         const char *value);
GMimeParam*         g_mime_param_new_from_string        (const char *str);
void                g_mime_param_destroy                (GMimeParam *param);
const GMimeParam*   g_mime_param_next                   (const GMimeParam *param);
const char*         g_mime_param_get_name               (const GMimeParam *param);
const char*         g_mime_param_get_value              (const GMimeParam *param);
GMimeParam*         g_mime_param_append                 (GMimeParam *params,
                                                         const char *name,
                                                         const char *value);
GMimeParam*         g_mime_param_append_param           (GMimeParam *params,
                                                         GMimeParam *param);
void                g_mime_param_write_to_string        (const GMimeParam *param,
                                                         gboolean fold,
                                                         GString *str);

Description

A GMimeParam is a parameter name/value pair as found on MIME header fields such as Content-Type and Content-Disposition.

Details

GMimeParam

typedef struct {
	GMimeParam *next;
	char *name;
	char *value;
} GMimeParam;

A parameter name/value pair as used for some Content header fields.

GMimeParam *next;

Pointer to the next param.

char *name;

Parameter name.

char *value;

Parameter value.

g_mime_param_new ()

GMimeParam*         g_mime_param_new                    (const char *name,
                                                         const char *value);

Creates a new GMimeParam node with name name and value value.

name :

parameter name

value :

parameter value

Returns :

a new paramter structure.

g_mime_param_new_from_string ()

GMimeParam*         g_mime_param_new_from_string        (const char *str);

Creates a parameter list based on the input string.

str :

input string

Returns :

a GMimeParam structure based on string.

g_mime_param_destroy ()

void                g_mime_param_destroy                (GMimeParam *param);

Releases all memory used by this mime param back to the Operating System.

param :

Mime param list to destroy

g_mime_param_next ()

const GMimeParam*   g_mime_param_next                   (const GMimeParam *param);

Gets the next GMimeParam node in the list.

param :

a GMimeParam node

Returns :

the next GMimeParam node in the list.

g_mime_param_get_name ()

const char*         g_mime_param_get_name               (const GMimeParam *param);

Gets the name of the parameter.

param :

a GMimeParam

Returns :

the name of the parameter.

g_mime_param_get_value ()

const char*         g_mime_param_get_value              (const GMimeParam *param);

Gets the value of the parameter.

param :

a GMimeParam

Returns :

the value of the parameter.

g_mime_param_append ()

GMimeParam*         g_mime_param_append                 (GMimeParam *params,
                                                         const char *name,
                                                         const char *value);

Appends a new parameter with name name and value value to the parameter list params.

params :

param list

name :

new param name

value :

new param value

Returns :

a param list with the new param of name name and value value appended to the list of params params.

g_mime_param_append_param ()

GMimeParam*         g_mime_param_append_param           (GMimeParam *params,
                                                         GMimeParam *param);

Appends param to the param list params.

params :

param list

param :

param to append

Returns :

a param list with the new param param appended to the list of params params.

g_mime_param_write_to_string ()

void                g_mime_param_write_to_string        (const GMimeParam *param,
                                                         gboolean fold,
                                                         GString *str);

Assumes the output string contains only the Content-* header and it's immediate value.

Writes the params out to the string string.

param :

MIME Param list

fold :

specifies whether or not to fold headers

str :

output string

See Also

GMimeContentType