<refentry id="GMimeContentDisposition">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeContentDisposition.top_of_page">GMimeContentDisposition</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeContentDisposition</refname>
<refpurpose>Content-Disposition fields</refpurpose>
</refnamediv>

<refsynopsisdiv id="GMimeContentDisposition.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>#define             <link linkend="GMIME-DISPOSITION-ATTACHMENT:CAPS">GMIME_DISPOSITION_ATTACHMENT</link>
#define             <link linkend="GMIME-DISPOSITION-INLINE:CAPS">GMIME_DISPOSITION_INLINE</link>
                    <link linkend="GMimeContentDisposition-struct">GMimeContentDisposition</link>;
<link linkend="GMimeContentDisposition"><returnvalue>GMimeContentDisposition</returnvalue></link> * <link linkend="g-mime-content-disposition-new">g_mime_content_disposition_new</link>
                                                        (<parameter><type>void</type></parameter>);
<link linkend="GMimeContentDisposition"><returnvalue>GMimeContentDisposition</returnvalue></link> * <link linkend="g-mime-content-disposition-new-from-string">g_mime_content_disposition_new_from_string</link>
                                                        (<parameter>const <link linkend="char"><type>char</type></link> *str</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-content-disposition-set-disposition">g_mime_content_disposition_set_disposition</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-content-disposition-get-disposition">g_mime_content_disposition_get_disposition</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>);
const <link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *  <link linkend="g-mime-content-disposition-get-params">g_mime_content_disposition_get_params</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-content-disposition-set-params">g_mime_content_disposition_set_params</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-content-disposition-set-parameter">g_mime_content_disposition_set_parameter</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *attribute</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-content-disposition-get-parameter">g_mime_content_disposition_get_parameter</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *attribute</parameter>);
<link linkend="char"><returnvalue>char</returnvalue></link> *              <link linkend="g-mime-content-disposition-to-string">g_mime_content_disposition_to_string</link>
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> fold</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeContentDisposition.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----GMimeContentDisposition
</synopsis>
</refsect1>

<refsect1 id="GMimeContentDisposition.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> represents the pre-parsed contents of a
Content-Disposition header field.
</para>
</refsect1>
<refsect1 id="GMimeContentDisposition.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMIME-DISPOSITION-ATTACHMENT:CAPS" role="macro">
<title>GMIME_DISPOSITION_ATTACHMENT</title>
<indexterm zone="GMIME-DISPOSITION-ATTACHMENT:CAPS"><primary>GMIME_DISPOSITION_ATTACHMENT</primary></indexterm>
<programlisting>#define GMIME_DISPOSITION_ATTACHMENT "attachment"
</programlisting>
<para>
Standard attachment disposition.
</para></refsect2>
<refsect2 id="GMIME-DISPOSITION-INLINE:CAPS" role="macro">
<title>GMIME_DISPOSITION_INLINE</title>
<indexterm zone="GMIME-DISPOSITION-INLINE:CAPS"><primary>GMIME_DISPOSITION_INLINE</primary></indexterm>
<programlisting>#define GMIME_DISPOSITION_INLINE     "inline"
</programlisting>
<para>
Standard inline disposition.
</para></refsect2>
<refsect2 id="GMimeContentDisposition-struct" role="struct">
<title>GMimeContentDisposition</title>
<indexterm zone="GMimeContentDisposition-struct"><primary>GMimeContentDisposition</primary></indexterm>
<programlisting>typedef struct _GMimeContentDisposition GMimeContentDisposition;</programlisting>
<para>
A data structure representing a Content-Disposition.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-new" role="function">
<title>g_mime_content_disposition_new ()</title>
<indexterm zone="g-mime-content-disposition-new"><primary>g_mime_content_disposition_new</primary></indexterm>
<programlisting><link linkend="GMimeContentDisposition"><returnvalue>GMimeContentDisposition</returnvalue></link> * g_mime_content_disposition_new
                                                        (<parameter><type>void</type></parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-new-from-string" role="function">
<title>g_mime_content_disposition_new_from_string ()</title>
<indexterm zone="g-mime-content-disposition-new-from-string"><primary>g_mime_content_disposition_new_from_string</primary></indexterm>
<programlisting><link linkend="GMimeContentDisposition"><returnvalue>GMimeContentDisposition</returnvalue></link> * g_mime_content_disposition_new_from_string
                                                        (<parameter>const <link linkend="char"><type>char</type></link> *str</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object.
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara>Content-Disposition field value or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-set-disposition" role="function">
<title>g_mime_content_disposition_set_disposition ()</title>
<indexterm zone="g-mime-content-disposition-set-disposition"><primary>g_mime_content_disposition_set_disposition</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_content_disposition_set_disposition
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);</programlisting>
<para>
Sets the disposition to <parameter>value</parameter> which may be one of
<link linkend="GMIME-DISPOSITION-ATTACHMENT:CAPS"><type>GMIME_DISPOSITION_ATTACHMENT</type></link> or <link linkend="GMIME-DISPOSITION-INLINE:CAPS"><type>GMIME_DISPOSITION_INLINE</type></link> or, by
your choice, any other string which would indicate how the MIME
part should be displayed by the MUA.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>disposition value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-get-disposition" role="function">
<title>g_mime_content_disposition_get_disposition ()</title>
<indexterm zone="g-mime-content-disposition-get-disposition"><primary>g_mime_content_disposition_get_disposition</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_content_disposition_get_disposition
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>);</programlisting>
<para>
Gets the disposition or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the disposition string which is probably one of
<link linkend="GMIME-DISPOSITION-ATTACHMENT:CAPS"><type>GMIME_DISPOSITION_ATTACHMENT</type></link> or <link linkend="GMIME-DISPOSITION-INLINE:CAPS"><type>GMIME_DISPOSITION_INLINE</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-get-params" role="function">
<title>g_mime_content_disposition_get_params ()</title>
<indexterm zone="g-mime-content-disposition-get-params"><primary>g_mime_content_disposition_get_params</primary></indexterm>
<programlisting>const <link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *  g_mime_content_disposition_get_params
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>);</programlisting>
<para>
Gets the Content-Disposition parameter list.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the list of <link linkend="GMimeParam"><type>GMimeParam</type></link>'s set on <parameter>disposition</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-set-params" role="function">
<title>g_mime_content_disposition_set_params ()</title>
<indexterm zone="g-mime-content-disposition-set-params"><primary>g_mime_content_disposition_set_params</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_content_disposition_set_params
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>);</programlisting>
<para>
Sets the Content-Disposition's parameter list.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>params</parameter>&#160;:</term>
<listitem><simpara>a list of <link linkend="GMimeParam"><type>GMimeParam</type></link> objects
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-set-parameter" role="function">
<title>g_mime_content_disposition_set_parameter ()</title>
<indexterm zone="g-mime-content-disposition-set-parameter"><primary>g_mime_content_disposition_set_parameter</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_content_disposition_set_parameter
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *attribute</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);</programlisting>
<para>
Sets a parameter on the Content-Disposition.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara>parameter name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>parameter value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-get-parameter" role="function">
<title>g_mime_content_disposition_get_parameter ()</title>
<indexterm zone="g-mime-content-disposition-get-parameter"><primary>g_mime_content_disposition_get_parameter</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_content_disposition_get_parameter
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *attribute</parameter>);</programlisting>
<para>
Gets the value of the parameter <parameter>attribute</parameter>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> on fail.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attribute</parameter>&#160;:</term>
<listitem><simpara>parameter name
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the value of the parameter of name <parameter>attribute</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-content-disposition-to-string" role="function">
<title>g_mime_content_disposition_to_string ()</title>
<indexterm zone="g-mime-content-disposition-to-string"><primary>g_mime_content_disposition_to_string</primary></indexterm>
<programlisting><link linkend="char"><returnvalue>char</returnvalue></link> *              g_mime_content_disposition_to_string
                                                        (<parameter><link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> *disposition</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> fold</parameter>);</programlisting>
<para>
Allocates a string buffer containing the Content-Disposition header
represented by the disposition object <parameter>disposition</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>disposition</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeContentDisposition"><type>GMimeContentDisposition</type></link> object
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fold</parameter>&#160;:</term>
<listitem><simpara>fold header if needed
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a string containing the disposition header
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
