## GMimeContentDisposition GMimeContentDisposition — Content-Disposition fields |

## Synopsis

    #define             GMIME_DISPOSITION_ATTACHMENT
    #define             GMIME_DISPOSITION_INLINE
    struct              GMimeContentDisposition;
    GMimeContentDisposition * g_mime_content_disposition_new
                                                            (void);
    GMimeContentDisposition * g_mime_content_disposition_new_from_string
                                                            (const char *str);
    void                g_mime_content_disposition_set_disposition
                                                            (GMimeContentDisposition *disposition,
                                                             const char *value);
    const char *        g_mime_content_disposition_get_disposition
                                                            (GMimeContentDisposition *disposition);
    const GMimeParam *  g_mime_content_disposition_get_params
                                                            (GMimeContentDisposition *disposition);
    void                g_mime_content_disposition_set_params
                                                            (GMimeContentDisposition *disposition,
                                                             GMimeParam *params);
    void                g_mime_content_disposition_set_parameter
                                                            (GMimeContentDisposition *disposition,
                                                             const char *attribute,
                                                             const char *value);
    const char *        g_mime_content_disposition_get_parameter
                                                            (GMimeContentDisposition *disposition,
                                                             const char *attribute);
    char *              g_mime_content_disposition_to_string
                                                            (GMimeContentDisposition *disposition,
                                                             gboolean fold);

## Object Hierarchy

      GObject
       +----GMimeContentDisposition

## Description

A GMimeContentDisposition represents the pre-parsed contents of a Content-Disposition header field.

## Details

### GMIME_DISPOSITION_ATTACHMENT

    #define GMIME_DISPOSITION_ATTACHMENT "attachment"

Standard attachment disposition.

### GMIME_DISPOSITION_INLINE

    #define GMIME_DISPOSITION_INLINE     "inline"

Standard inline disposition.

### struct GMimeContentDisposition

    struct GMimeContentDisposition;

A data structure representing a Content-Disposition.

### g_mime_content_disposition_new ()

    GMimeContentDisposition * g_mime_content_disposition_new
                                                            (void);

Creates a new GMimeContentDisposition object.

Returns : | a new GMimeContentDisposition object.

### g_mime_content_disposition_new_from_string ()

    GMimeContentDisposition * g_mime_content_disposition_new_from_string
                                                            (const char *str);

Creates a new GMimeContentDisposition object.

`str` : | Content-Disposition field value or `NULL`
Returns : | a new GMimeContentDisposition object.

### g_mime_content_disposition_set_disposition ()

    void                g_mime_content_disposition_set_disposition
                                                            (GMimeContentDisposition *disposition,
                                                             const char *value);

Sets the disposition to `value` which may be one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE or, by your choice, any other string which would indicate how the MIME part should be displayed by the MUA.

`disposition` : | a GMimeContentDisposition object
`value` : | disposition value

### g_mime_content_disposition_get_disposition ()

    const char *        g_mime_content_disposition_get_disposition
                                                            (GMimeContentDisposition *disposition);

Gets the disposition or `NULL` on fail.

`disposition` : | a GMimeContentDisposition object
Returns : | the disposition string which is probably one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE.

### g_mime_content_disposition_get_params ()

    const GMimeParam *  g_mime_content_disposition_get_params
                                                            (GMimeContentDisposition *disposition);

Gets the Content-Disposition parameter list.

`disposition` : | a GMimeContentDisposition object
Returns : | the list of GMimeParam's set on `disposition`.

### g_mime_content_disposition_set_params ()

    void                g_mime_content_disposition_set_params
                                                            (GMimeContentDisposition *disposition,
                                                             GMimeParam *params);

Sets the Content-Disposition's parameter list.

`disposition` : | a GMimeContentDisposition object
`params` : | a list of GMimeParam objects

### g_mime_content_disposition_set_parameter ()

    void                g_mime_content_disposition_set_parameter
                                                            (GMimeContentDisposition *disposition,
                                                             const char *attribute,
                                                             const char *value);

Sets a parameter on the Content-Disposition.

Note: The `name` should be in US-ASCII while the `value` should be in UTF-8.

`disposition` : | a GMimeContentDisposition object
`value` : | parameter value

### g_mime_content_disposition_get_parameter ()

    const char *        g_mime_content_disposition_get_parameter
                                                            (GMimeContentDisposition *disposition,
                                                             const char *attribute);

Gets the parameter value specified by `name` if it's available.

`disposition` : | a GMimeContentDisposition object
Returns : | the value of the requested parameter or `NULL` if the parameter is not set. If the parameter is set, the returned string will be in UTF-8.

### g_mime_content_disposition_to_string ()

    char *              g_mime_content_disposition_to_string
                                                            (GMimeContentDisposition *disposition,
                                                             gboolean fold);

Allocates a string buffer containing the Content-Disposition header represented by the disposition object `disposition`.

`disposition` : | a GMimeContentDisposition object
`fold` : | fold header if needed
Returns : | a string containing the disposition header