<refentry id="GMimeGpgContext">
<refmeta>
<refentrytitle role="top_of_page" id="GMimeGpgContext.top_of_page">GMimeGpgContext</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>
  GMIME Library
</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GMimeGpgContext</refname>
<refpurpose>GnuPG crypto contexts</refpurpose>
</refnamediv>

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

<synopsis>                    <link linkend="GMimeGpgContext-struct">GMimeGpgContext</link>;
<link linkend="GMimeCryptoContext"><returnvalue>GMimeCryptoContext</returnvalue></link> * <link linkend="g-mime-gpg-context-new">g_mime_gpg_context_new</link>             (<parameter><link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link> request_passwd</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *path</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-gpg-context-get-always-trust">g_mime_gpg_context_get_always_trust</link> (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-gpg-context-set-always-trust">g_mime_gpg_context_set_always_trust</link> (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> always_trust</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-gpg-context-get-auto-key-retrieve">g_mime_gpg_context_get_auto_key_retrieve</link>
                                                        (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-gpg-context-set-auto-key-retrieve">g_mime_gpg_context_set_auto_key_retrieve</link>
                                                        (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> auto_key_retrieve</parameter>);
<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            <link linkend="g-mime-gpg-context-get-use-agent">g_mime_gpg_context_get_use_agent</link>    (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);
<link linkend="void"><returnvalue>void</returnvalue></link>                <link linkend="g-mime-gpg-context-set-use-agent">g_mime_gpg_context_set_use_agent</link>    (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> use_agent</parameter>);
</synopsis>
</refsynopsisdiv>
<refsect1 id="GMimeGpgContext.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GMimeCryptoContext">GMimeCryptoContext</link>
         +----GMimeGpgContext
</synopsis>
</refsect1>

<refsect1 id="GMimeGpgContext.description" role="desc">
<title role="desc.title">Description</title>
<para>
A <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> is a <link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link> that uses GnuPG to do
all of the encryption and digital signatures.
</para>
</refsect1>
<refsect1 id="GMimeGpgContext.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GMimeGpgContext-struct" role="struct">
<title>GMimeGpgContext</title>
<indexterm zone="GMimeGpgContext-struct"><primary>GMimeGpgContext</primary></indexterm>
<programlisting>typedef struct _GMimeGpgContext GMimeGpgContext;</programlisting>
<para>
A GnuPG crypto context.
</para><variablelist role="struct">
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-new" role="function">
<title>g_mime_gpg_context_new ()</title>
<indexterm zone="g-mime-gpg-context-new"><primary>g_mime_gpg_context_new</primary></indexterm>
<programlisting><link linkend="GMimeCryptoContext"><returnvalue>GMimeCryptoContext</returnvalue></link> * g_mime_gpg_context_new             (<parameter><link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link> request_passwd</parameter>,
                                                         <parameter>const <link linkend="char"><type>char</type></link> *path</parameter>);</programlisting>
<para>
Creates a new gpg crypto context object.
</para><variablelist role="params">
<varlistentry><term><parameter>request_passwd</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimePasswordRequestFunc"><type>GMimePasswordRequestFunc</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&#160;:</term>
<listitem><simpara>path to gpg binary
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> a new gpg crypto context object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-get-always-trust" role="function">
<title>g_mime_gpg_context_get_always_trust ()</title>
<indexterm zone="g-mime-gpg-context-get-always-trust"><primary>g_mime_gpg_context_get_always_trust</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_gpg_context_get_always_trust (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the always_trust flag on the gpg context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the always_trust flag on the gpg context.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-set-always-trust" role="function">
<title>g_mime_gpg_context_set_always_trust ()</title>
<indexterm zone="g-mime-gpg-context-set-always-trust"><primary>g_mime_gpg_context_set_always_trust</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_gpg_context_set_always_trust (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> always_trust</parameter>);</programlisting>
<para>
Sets the <parameter>always_trust</parameter> flag on the gpg context which is used for
encryption.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>always_trust</parameter>&#160;:</term>
<listitem><simpara>always trust flag
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-get-auto-key-retrieve" role="function">
<title>g_mime_gpg_context_get_auto_key_retrieve ()</title>
<indexterm zone="g-mime-gpg-context-get-auto-key-retrieve"><primary>g_mime_gpg_context_get_auto_key_retrieve</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_gpg_context_get_auto_key_retrieve
                                                        (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the <parameter>auto_key_retrieve</parameter> flag on the gpg context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <parameter>auto_key_retrieve</parameter> flag on the gpg context.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-set-auto-key-retrieve" role="function">
<title>g_mime_gpg_context_set_auto_key_retrieve ()</title>
<indexterm zone="g-mime-gpg-context-set-auto-key-retrieve"><primary>g_mime_gpg_context_set_auto_key_retrieve</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_gpg_context_set_auto_key_retrieve
                                                        (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> auto_key_retrieve</parameter>);</programlisting>
<para>
Sets the <parameter>auto_key_retrieve</parameter> flag on the gpg context which is used
for signature verification.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>auto_key_retrieve</parameter>&#160;:</term>
<listitem><simpara>auto-retrieve keys from a keys server
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-get-use-agent" role="function">
<title>g_mime_gpg_context_get_use_agent ()</title>
<indexterm zone="g-mime-gpg-context-get-use-agent"><primary>g_mime_gpg_context_get_use_agent</primary></indexterm>
<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>            g_mime_gpg_context_get_use_agent    (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>);</programlisting>
<para>
Gets the use_agent flag on the gpg context.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the use_agent flag on the gpg context, which indicates
that GnuPG should attempt to use gpg-agent for credentials.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="g-mime-gpg-context-set-use-agent" role="function">
<title>g_mime_gpg_context_set_use_agent ()</title>
<indexterm zone="g-mime-gpg-context-set-use-agent"><primary>g_mime_gpg_context_set_use_agent</primary></indexterm>
<programlisting><link linkend="void"><returnvalue>void</returnvalue></link>                g_mime_gpg_context_set_use_agent    (<parameter><link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link> *ctx</parameter>,
                                                         <parameter><link linkend="gboolean"><type>gboolean</type></link> use_agent</parameter>);</programlisting>
<para>
Sets the <parameter>use_agent</parameter> flag on the gpg context, which indicates that
GnuPG should attempt to use gpg-agent for credentials.
</para><variablelist role="params">
<varlistentry><term><parameter>ctx</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GMimeGpgContext"><type>GMimeGpgContext</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>use_agent</parameter>&#160;:</term>
<listitem><simpara>always trust flag
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>
<refsect1 id="GMimeGpgContext.see-also">
<title>See Also</title>
<link linkend="GMimeCryptoContext"><type>GMimeCryptoContext</type></link>
</refsect1>

</refentry>
