<refentry id="gmime-gmime">
<refmeta>
<refentrytitle role="top_of_page" id="gmime-gmime.top_of_page">gmime</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gmime</refname>
<refpurpose>Initialization, shutdown and version-check routines</refpurpose>
</refnamediv>

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

<synopsis>#define             <link linkend="GMIME-MAJOR-VERSION:CAPS">GMIME_MAJOR_VERSION</link>
#define             <link linkend="GMIME-MICRO-VERSION:CAPS">GMIME_MICRO_VERSION</link>
#define             <link linkend="GMIME-MINOR-VERSION:CAPS">GMIME_MINOR_VERSION</link>
#define             <link linkend="GMIME-BINARY-AGE:CAPS">GMIME_BINARY_AGE</link>
#define             <link linkend="GMIME-INTERFACE-AGE:CAPS">GMIME_INTERFACE_AGE</link>
#define             <link linkend="GMIME-CHECK-VERSION:CAPS">GMIME_CHECK_VERSION</link>                 (major,
                                                         minor,
                                                         micro)
#define             <link linkend="GMIME-ENABLE-RFC2047-WORKAROUNDS:CAPS">GMIME_ENABLE_RFC2047_WORKAROUNDS</link>
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-init">g_mime_init</link>                         (<parameter><link linkend="guint32"><type>guint32</type></link> flags</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-shutdown">g_mime_shutdown</link>                     (<parameter><type>void</type></parameter>);
extern              const guint <link linkend="gmime-major-version">gmime_major_version</link>;
extern              const guint <link linkend="gmime-minor-version">gmime_minor_version</link>;
extern              const guint <link linkend="gmime-micro-version">gmime_micro_version</link>;
extern              const guint <link linkend="gmime-binary-age">gmime_binary_age</link>;
extern              const guint <link linkend="gmime-interface-age">gmime_interface_age</link>;
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-check-version">g_mime_check_version</link>                (<parameter><link linkend="guint"><type>guint</type></link> major</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> minor</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> micro</parameter>);
</synopsis>
</refsynopsisdiv>

<refsect1 id="gmime-gmime.description" role="desc">
<title role="desc.title">Description</title>
<para>
Initialization, shutdown, and version-check functions.
</para>
</refsect1>
<refsect1 id="gmime-gmime.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMIME-MAJOR-VERSION:CAPS" role="macro">
<title>GMIME_MAJOR_VERSION</title>
<indexterm zone="GMIME-MAJOR-VERSION:CAPS"><primary>GMIME_MAJOR_VERSION</primary></indexterm>
<programlisting>#define GMIME_MAJOR_VERSION (2)
</programlisting>
<para>
GMime's major version.
</para></refsect2>
<refsect2 id="GMIME-MICRO-VERSION:CAPS" role="macro">
<title>GMIME_MICRO_VERSION</title>
<indexterm zone="GMIME-MICRO-VERSION:CAPS"><primary>GMIME_MICRO_VERSION</primary></indexterm>
<programlisting>#define GMIME_MICRO_VERSION (8)
</programlisting>
<para>
GMime's micro version.
</para></refsect2>
<refsect2 id="GMIME-MINOR-VERSION:CAPS" role="macro">
<title>GMIME_MINOR_VERSION</title>
<indexterm zone="GMIME-MINOR-VERSION:CAPS"><primary>GMIME_MINOR_VERSION</primary></indexterm>
<programlisting>#define GMIME_MINOR_VERSION (5)
</programlisting>
<para>
GMime's minor version.
</para></refsect2>
<refsect2 id="GMIME-BINARY-AGE:CAPS" role="macro">
<title>GMIME_BINARY_AGE</title>
<indexterm zone="GMIME-BINARY-AGE:CAPS"><primary>GMIME_BINARY_AGE</primary></indexterm>
<programlisting>#define GMIME_BINARY_AGE    (508)
</programlisting>
<para>
GMime's binary age.
</para></refsect2>
<refsect2 id="GMIME-INTERFACE-AGE:CAPS" role="macro">
<title>GMIME_INTERFACE_AGE</title>
<indexterm zone="GMIME-INTERFACE-AGE:CAPS"><primary>GMIME_INTERFACE_AGE</primary></indexterm>
<programlisting>#define GMIME_INTERFACE_AGE (0)
</programlisting>
<para>
GMime's interface age.
</para></refsect2>
<refsect2 id="GMIME-CHECK-VERSION:CAPS" role="macro">
<title>GMIME_CHECK_VERSION()</title>
<indexterm zone="GMIME-CHECK-VERSION:CAPS"><primary>GMIME_CHECK_VERSION</primary></indexterm>
<programlisting>#define             GMIME_CHECK_VERSION(major,minor,micro)</programlisting>
<para>
Check whether a GMime version equal to or greater than
<parameter>major</parameter>.<parameter>minor</parameter>.<parameter>micro</parameter> is present.
</para><variablelist role="params">
<varlistentry><term><parameter>major</parameter>&#160;:</term>
<listitem><simpara>Minimum major version
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>minor</parameter>&#160;:</term>
<listitem><simpara>Minimum minor version
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>micro</parameter>&#160;:</term>
<listitem><simpara>Minimum micro version
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GMIME-ENABLE-RFC2047-WORKAROUNDS:CAPS" role="macro">
<title>GMIME_ENABLE_RFC2047_WORKAROUNDS</title>
<indexterm zone="GMIME-ENABLE-RFC2047-WORKAROUNDS:CAPS"><primary>GMIME_ENABLE_RFC2047_WORKAROUNDS</primary></indexterm>
<programlisting>#define GMIME_ENABLE_RFC2047_WORKAROUNDS  (1 &lt;&lt; 0)
</programlisting>
<para>
Initialization flag to enable workarounds for badly formed rfc2047
encoded-words.
</para></refsect2>
<refsect2 id="g-mime-init" role="function">
<title>g_mime_init ()</title>
<indexterm zone="g-mime-init"><primary>g_mime_init</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_init                         (<parameter><link linkend="guint32"><type>guint32</type></link> flags</parameter>);</programlisting>
<para>
Initializes GMime.
</para>
<para>
Note: Calls <link linkend="g-mime-charset-map-init"><function>g_mime_charset_map_init()</function></link> and <link linkend="g-mime-iconv-init"><function>g_mime_iconv_init()</function></link> as
well.
</para><variablelist role="params">
<varlistentry><term><parameter>flags</parameter>&#160;:</term>
<listitem><simpara>initialization flags
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-shutdown" role="function">
<title>g_mime_shutdown ()</title>
<indexterm zone="g-mime-shutdown"><primary>g_mime_shutdown</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_shutdown                     (<parameter><type>void</type></parameter>);</programlisting>
<para>
Frees internally allocated tables created in <link linkend="g-mime-init"><function>g_mime_init()</function></link>. Also
calls <link linkend="g-mime-charset-map-shutdown"><function>g_mime_charset_map_shutdown()</function></link> and <link linkend="g-mime-iconv-shutdown"><function>g_mime_iconv_shutdown()</function></link>.
</para></refsect2>
<refsect2 id="gmime-major-version" role="variable">
<title>gmime_major_version</title>
<indexterm zone="gmime-major-version"><primary>gmime_major_version</primary></indexterm>
<programlisting>extern const guint gmime_major_version;
</programlisting>
<para>
GMime's major version.
</para></refsect2>
<refsect2 id="gmime-minor-version" role="variable">
<title>gmime_minor_version</title>
<indexterm zone="gmime-minor-version"><primary>gmime_minor_version</primary></indexterm>
<programlisting>extern const guint gmime_minor_version;
</programlisting>
<para>
GMime's minor version.
</para></refsect2>
<refsect2 id="gmime-micro-version" role="variable">
<title>gmime_micro_version</title>
<indexterm zone="gmime-micro-version"><primary>gmime_micro_version</primary></indexterm>
<programlisting>extern const guint gmime_micro_version;
</programlisting>
<para>
GMime's micro version.
</para></refsect2>
<refsect2 id="gmime-binary-age" role="variable">
<title>gmime_binary_age</title>
<indexterm zone="gmime-binary-age"><primary>gmime_binary_age</primary></indexterm>
<programlisting>extern const guint gmime_binary_age;
</programlisting>
<para>
GMime's binary age.
</para></refsect2>
<refsect2 id="gmime-interface-age" role="variable">
<title>gmime_interface_age</title>
<indexterm zone="gmime-interface-age"><primary>gmime_interface_age</primary></indexterm>
<programlisting>extern const guint gmime_interface_age;
</programlisting>
<para>
GMime's interface age.
</para></refsect2>
<refsect2 id="g-mime-check-version" role="function">
<title>g_mime_check_version ()</title>
<indexterm zone="g-mime-check-version"><primary>g_mime_check_version</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_check_version                (<parameter><link linkend="guint"><type>guint</type></link> major</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> minor</parameter>,
                                                         <parameter><link linkend="guint"><type>guint</type></link> micro</parameter>);</programlisting>
<para>
Checks that the GMime library version meets the requirements of the
required version.
</para><variablelist role="params">
<varlistentry><term><parameter>major</parameter>&#160;:</term>
<listitem><simpara>Minimum major version
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>minor</parameter>&#160;:</term>
<listitem><simpara>Minimum minor version
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>micro</parameter>&#160;:</term>
<listitem><simpara>Minimum micro version
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the requirement is met or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>

</refentry>
