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

## Functions

const char * | g_mime_param_get_name ()
const char * | g_mime_param_get_value ()
void | g_mime_param_set_value ()
const char * | g_mime_param_get_charset ()
void | g_mime_param_set_charset ()
const char * | g_mime_param_get_lang ()
void | g_mime_param_set_lang ()
GMimeParamEncodingMethod | g_mime_param_get_encoding_method ()
void | g_mime_param_set_encoding_method ()
GMimeParamList * | g_mime_param_list_new ()
GMimeParamList * | g_mime_param_list_parse ()
void | g_mime_param_list_clear ()
int | g_mime_param_list_length ()
void | g_mime_param_list_set_parameter ()
GMimeParam * | g_mime_param_list_get_parameter ()
GMimeParam * | g_mime_param_list_get_parameter_at ()
gboolean | g_mime_param_list_remove ()
gboolean | g_mime_param_list_remove_at ()
void | g_mime_param_list_encode ()

## Types and Values

struct | GMimeParam
struct | GMimeParamList

## Object Hierarchy

        GObject
        ├── GMimeParam
        ╰── GMimeParamList

## 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_get_name ()

    const char *
    g_mime_param_get_name (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 (GMimeParam *param);

Gets the value of the parameter.

#### Parameters

param | a GMimeParam |

#### Returns

the value of the parameter.

### g_mime_param_set_value ()

    void
    g_mime_param_set_value (GMimeParam *param,
                            const char *value);

Sets the parameter value to `value` .

#### Parameters

param | a GMimeParam |
value | the new parameter value |

### g_mime_param_get_charset ()

    const char *
    g_mime_param_get_charset (GMimeParam *param);

Gets the charset used for encoding the parameter.

#### Parameters

param | a GMimeParam |

#### Returns

the charset used for encoding the parameter.

### g_mime_param_set_charset ()

    void
    g_mime_param_set_charset (GMimeParam *param,
                              const char *charset);

Sets the parameter charset used for encoding the value.

#### Parameters

param | a GMimeParam |
charset | the charset or `NULL` to use the default |

### g_mime_param_get_lang ()

    const char *
    g_mime_param_get_lang (GMimeParam *param);

Gets the language specifier used for encoding the parameter.

#### Parameters

param | a GMimeParam |

#### Returns

the language specifier used for encoding the parameter.

### g_mime_param_set_lang ()

    void
    g_mime_param_set_lang (GMimeParam *param,
                           const char *lang);

Sets the parameter language specifier used for encoding the value.

#### Parameters

param | a GMimeParam |
lang | the language specifier |

### g_mime_param_get_encoding_method ()

    GMimeParamEncodingMethod
    g_mime_param_get_encoding_method (GMimeParam *param);

Gets the encoding method used for encoding the parameter.

#### Parameters

param | a GMimeParam |

#### Returns

the encoding method used for encoding the parameter.

### g_mime_param_set_encoding_method ()

    void
    g_mime_param_set_encoding_method (GMimeParam *param,
                                      GMimeParamEncodingMethod method);

Sets the encoding method used for encoding the value.

#### Parameters

param | a GMimeParam |
method | a GMimeParamEncodingMethod |

### g_mime_param_list_new ()

    GMimeParamList *
    g_mime_param_list_new (void);

Creates a new Content-Type or Content-Disposition parameter list.

#### Returns

a new GMimeParamList.

### g_mime_param_list_parse ()

    GMimeParamList *
    g_mime_param_list_parse (GMimeParserOptions *options,
                             const char *str);

Parses the input string into a parameter list.

#### Parameters

options | a GMimeParserOptions or `NULL` |
str | a string to parse |

#### Returns

a new GMimeParamList.

[transfer full]

### g_mime_param_list_clear ()

    void
    g_mime_param_list_clear (GMimeParamList *list);

Clears the list of parameters.

#### Parameters

list | a GMimeParamList |

### g_mime_param_list_length ()

    int
    g_mime_param_list_length (GMimeParamList *list);

Gets the length of the list.

#### Parameters

list | a GMimeParamList |

#### Returns

the number of GMimeParam items in the list.

### g_mime_param_list_set_parameter ()

    void
    g_mime_param_list_set_parameter (GMimeParamList *list,
                                     const char *name,
                                     const char *value);

Sets the specified parameter to `value` .

#### Parameters

list | a GMimeParamList |
name | The name of the parameter |
value | The parameter value |

### g_mime_param_list_get_parameter ()

    GMimeParam *
    g_mime_param_list_get_parameter (GMimeParamList *list,
                                     const char *name);

Gets the GMimeParam with the given `name` .

#### Parameters

list | list: a GMimeParamList |
name | the name of the parameter |

#### Returns

the requested GMimeParam.

[transfer none]

### g_mime_param_list_get_parameter_at ()

    GMimeParam *
    g_mime_param_list_get_parameter_at (GMimeParamList *list,
                                        int index);

Gets the GMimeParam at the specified `index` .

#### Parameters

list | a GMimeParamList |
index | the index of the requested parameter |

#### Returns

the GMimeParam at the specified index.

[transfer none]

### g_mime_param_list_remove ()

    gboolean
    g_mime_param_list_remove (GMimeParamList *list,
                              const char *name);

Removes a parameter from the GMimeParamList.

#### Parameters

list | a GMimeParamList |
name | the name of the parameter |

#### Returns

`TRUE` if the specified parameter was removed or `FALSE` otherwise.

### g_mime_param_list_remove_at ()

    gboolean
    g_mime_param_list_remove_at (GMimeParamList *list,
                                 int index);

Removes a GMimeParam from the GMimeParamList at the specified index.

#### Parameters

list | a GMimeParamList |
index | index of the param to remove |

#### Returns

`TRUE` if a GMimeParam was removed or `FALSE` otherwise.

### g_mime_param_list_encode ()

    void
    g_mime_param_list_encode (GMimeParamList *list,
                              GMimeFormatOptions *options,
                              gboolean fold,
                              GString *str);

Encodes the parameter list into `str` , folding lines if required.

#### Parameters

list | a GMimeParamList |
options | a GMimeFormatOptions or `NULL`. | [nullable]
fold | `TRUE` if the parameter list should be folded; otherwise, `FALSE` |
str | the output string buffer. | [out]

## Types and Values

### struct GMimeParam

    struct GMimeParam;

A parameter name/value pair as used in the Content-Type and Content-Disposition headers.

#### Members

### struct GMimeParamList

    struct GMimeParamList;

A list of Content-Type or Content-Disposition parameters.

## See Also

GMimeContentType