<refentry id="gmime-GMimeParam">
<refmeta>
<refentrytitle role="top_of_page" id="gmime-GMimeParam.top_of_page">GMimeParam</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeParam</refname>
<refpurpose>Content-Type and Content-Disposition parameters</refpurpose>
</refnamediv>

<refsynopsisdiv id="gmime-GMimeParam.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>                    <link linkend="GMimeParam">GMimeParam</link>;
<link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        <link linkend="g-mime-param-new">g_mime_param_new</link>                    (<parameter>const <link linkend="char"><type>char</type></link> *name</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);
<link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        <link linkend="g-mime-param-new-from-string">g_mime_param_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-param-destroy">g_mime_param_destroy</link>                (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);
const <link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *  <link linkend="g-mime-param-next">g_mime_param_next</link>                   (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-param-get-name">g_mime_param_get_name</link>               (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);
const <link linkend="char"><returnvalue>char</returnvalue></link> *        <link linkend="g-mime-param-get-value">g_mime_param_get_value</link>              (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);
<link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        <link linkend="g-mime-param-append">g_mime_param_append</link>                 (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);
<link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        <link linkend="g-mime-param-append-param">g_mime_param_append_param</link>           (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>,
                                                         <parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-param-write-to-string">g_mime_param_write_to_string</link>        (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> fold</parameter>,
                                                         <parameter><link linkend="GString"><type>GString</type></link> *str</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gmime-GMimeParam.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeParam"><type>GMimeParam</type></link> is a parameter name/value pair as found on MIME
header fields such as Content-Type and Content-Disposition.
</para>
</refsect1>
<refsect1 id="gmime-GMimeParam.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeParam" role="struct">
<title>GMimeParam</title>
<indexterm zone="GMimeParam"><primary>GMimeParam</primary></indexterm>
<programlisting>typedef struct {
	GMimeParam *next;
	char *name;
	char *value;
} GMimeParam;
</programlisting>
<para>
A parameter name/value pair as used for some Content header fields.
</para><variablelist role="struct">
<varlistentry><term><link linkend="GMimeParam"><type>GMimeParam</type></link>&#160;*<structfield id="GMimeParam.next">next</structfield>;</term>
<listitem><simpara>Pointer to the next param.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeParam.name">name</structfield>;</term>
<listitem><simpara>Parameter name.
</simpara></listitem>
</varlistentry>
<varlistentry><term><link linkend="char"><type>char</type></link>&#160;*<structfield id="GMimeParam.value">value</structfield>;</term>
<listitem><simpara>Parameter value.
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-new" role="function">
<title>g_mime_param_new ()</title>
<indexterm zone="g-mime-param-new"><primary>g_mime_param_new</primary></indexterm>
<programlisting><link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        g_mime_param_new                    (<parameter>const <link linkend="char"><type>char</type></link> *name</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);</programlisting>
<para>
Creates a new <link linkend="GMimeParam"><type>GMimeParam</type></link> node with name <parameter>name</parameter> and value <parameter>value</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>parameter name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>parameter value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new paramter structure.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-new-from-string" role="function">
<title>g_mime_param_new_from_string ()</title>
<indexterm zone="g-mime-param-new-from-string"><primary>g_mime_param_new_from_string</primary></indexterm>
<programlisting><link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        g_mime_param_new_from_string        (<parameter>const <link linkend="char"><type>char</type></link> *str</parameter>);</programlisting>
<para>
Creates a parameter list based on the input string.
</para><variablelist role="params">
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara>input string
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a <link linkend="GMimeParam"><type>GMimeParam</type></link> structure based on <parameter>string</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-destroy" role="function">
<title>g_mime_param_destroy ()</title>
<indexterm zone="g-mime-param-destroy"><primary>g_mime_param_destroy</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_param_destroy                (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);</programlisting>
<para>
Releases all memory used by this mime param back to the Operating
System.
</para><variablelist role="params">
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>Mime param list to destroy
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-next" role="function">
<title>g_mime_param_next ()</title>
<indexterm zone="g-mime-param-next"><primary>g_mime_param_next</primary></indexterm>
<programlisting>const <link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *  g_mime_param_next                   (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);</programlisting>
<para>
Gets the next <link linkend="GMimeParam"><type>GMimeParam</type></link> node in the list.
</para><variablelist role="params">
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeParam"><type>GMimeParam</type></link> node
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the next <link linkend="GMimeParam"><type>GMimeParam</type></link> node in the list.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-get-name" role="function">
<title>g_mime_param_get_name ()</title>
<indexterm zone="g-mime-param-get-name"><primary>g_mime_param_get_name</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_param_get_name               (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);</programlisting>
<para>
Gets the name of the parameter.
</para><variablelist role="params">
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeParam"><type>GMimeParam</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the name of the parameter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-get-value" role="function">
<title>g_mime_param_get_value ()</title>
<indexterm zone="g-mime-param-get-value"><primary>g_mime_param_get_value</primary></indexterm>
<programlisting>const <link linkend="char"><returnvalue>char</returnvalue></link> *        g_mime_param_get_value              (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);</programlisting>
<para>
Gets the value of the parameter.
</para><variablelist role="params">
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeParam"><type>GMimeParam</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the value of the parameter.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-append" role="function">
<title>g_mime_param_append ()</title>
<indexterm zone="g-mime-param-append"><primary>g_mime_param_append</primary></indexterm>
<programlisting><link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        g_mime_param_append                 (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *name</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *value</parameter>);</programlisting>
<para>
Appends a new parameter with name <parameter>name</parameter> and value <parameter>value</parameter> to the
parameter list <parameter>params</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>params</parameter>&#160;:</term>
<listitem><simpara>param list
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&#160;:</term>
<listitem><simpara>new param name
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara>new param value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a param list with the new param of name <parameter>name</parameter> and value
<parameter>value</parameter> appended to the list of params <parameter>params</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-append-param" role="function">
<title>g_mime_param_append_param ()</title>
<indexterm zone="g-mime-param-append-param"><primary>g_mime_param_append_param</primary></indexterm>
<programlisting><link linkend="GMimeParam"><returnvalue>GMimeParam</returnvalue></link> *        g_mime_param_append_param           (<parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *params</parameter>,
                                                         <parameter><link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>);</programlisting>
<para>
Appends <parameter>param</parameter> to the param list <parameter>params</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>params</parameter>&#160;:</term>
<listitem><simpara>param list
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>param to append
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a param list with the new param <parameter>param</parameter> appended to the list
of params <parameter>params</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-param-write-to-string" role="function">
<title>g_mime_param_write_to_string ()</title>
<indexterm zone="g-mime-param-write-to-string"><primary>g_mime_param_write_to_string</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_param_write_to_string        (<parameter>const <link linkend="GMimeParam"><type>GMimeParam</type></link> *param</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> fold</parameter>,
                                                         <parameter><link linkend="GString"><type>GString</type></link> *str</parameter>);</programlisting>
<para>
Assumes the output string contains only the Content-* header and
it's immediate value.
</para>
<para>
Writes the params out to the string <parameter>string</parameter>.
</para><variablelist role="params">
<varlistentry><term><parameter>param</parameter>&#160;:</term>
<listitem><simpara>MIME Param list
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fold</parameter>&#160;:</term>
<listitem><simpara>specifies whether or not to fold headers
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>str</parameter>&#160;:</term>
<listitem><simpara>output string
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="gmime-GMimeParam.see-also">
<title>See Also</title>
<link linkend="GMimeContentType"><type>GMimeContentType</type></link>
</refsect1>

</refentry>
