GMimeParam: GMime 2.6 Reference Manual

## GMimeParam GMimeParam — Content-Type and Content-Disposition parameters |

## Functions

GMimeParam * | g_mime_param_new ()
GMimeParam * | g_mime_param_new_from_string ()
void | g_mime_param_destroy ()
const GMimeParam * | g_mime_param_next ()
const char * | g_mime_param_get_name ()
const char * | g_mime_param_get_value ()
GMimeParam * | g_mime_param_append ()
GMimeParam * | g_mime_param_append_param ()
void | g_mime_param_write_to_string ()

## Types and Values

struct | GMimeParam

## Description

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

## Functions

### 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` .

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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` .

#### Parameters

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` .

#### Parameters

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` .

#### Parameters

param | MIME Param list |
fold | specifies whether or not to fold headers |
str | output string |

## Types and Values

### struct GMimeParam

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

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

#### Members

GMimeParam *`next`; | Pointer to the next param. |
char *`name`; | Parameter name. |
char *`value`; | Parameter value. |

## See Also

GMimeContentType