GMimeGpgContext

## GMimeGpgContext GMimeGpgContext — GnuPG crypto contexts |

## Synopsis

    struct              GMimeGpgContext;
    GMimeCryptoContext * g_mime_gpg_context_new             (GMimePasswordRequestFunc request_passwd,
                                                             const char *path);
    gboolean            g_mime_gpg_context_get_always_trust (GMimeGpgContext *ctx);
    void                g_mime_gpg_context_set_always_trust (GMimeGpgContext *ctx,
                                                             gboolean always_trust);
    gboolean            g_mime_gpg_context_get_auto_key_retrieve
                                                            (GMimeGpgContext *ctx);
    void                g_mime_gpg_context_set_auto_key_retrieve
                                                            (GMimeGpgContext *ctx,
                                                             gboolean auto_key_retrieve);
    gboolean            g_mime_gpg_context_get_use_agent    (GMimeGpgContext *ctx);
    void                g_mime_gpg_context_set_use_agent    (GMimeGpgContext *ctx,
                                                             gboolean use_agent);

## Object Hierarchy

      GObject
       +----GMimeCryptoContext
             +----GMimeGpgContext

## Description

A GMimeGpgContext is a GMimeCryptoContext that uses GnuPG to do all of the encryption and digital signatures.

## Details

### struct GMimeGpgContext

    struct GMimeGpgContext;

A GnuPG crypto context.

### g_mime_gpg_context_new ()

    GMimeCryptoContext * g_mime_gpg_context_new             (GMimePasswordRequestFunc request_passwd,
                                                             const char *path);

Creates a new gpg crypto context object.

`request_passwd` : | a GMimePasswordRequestFunc
`path` : | path to gpg binary
Returns : | a new gpg crypto context object. [transfer full]

### g_mime_gpg_context_get_always_trust ()

    gboolean            g_mime_gpg_context_get_always_trust (GMimeGpgContext *ctx);

Gets the always_trust flag on the gpg context.

`ctx` : | a GMimeGpgContext
Returns : | the always_trust flag on the gpg context.

### g_mime_gpg_context_set_always_trust ()

    void                g_mime_gpg_context_set_always_trust (GMimeGpgContext *ctx,
                                                             gboolean always_trust);

Sets the `always_trust` flag on the gpg context which is used for encryption.

`ctx` : | a GMimeGpgContext
`always_trust` : | always trust flag

### g_mime_gpg_context_get_auto_key_retrieve ()

    gboolean            g_mime_gpg_context_get_auto_key_retrieve
                                                            (GMimeGpgContext *ctx);

Gets the `auto_key_retrieve` flag on the gpg context.

`ctx` : | a GMimeGpgContext
Returns : | the `auto_key_retrieve` flag on the gpg context.

### g_mime_gpg_context_set_auto_key_retrieve ()

    void                g_mime_gpg_context_set_auto_key_retrieve
                                                            (GMimeGpgContext *ctx,
                                                             gboolean auto_key_retrieve);

Sets the `auto_key_retrieve` flag on the gpg context which is used for signature verification.

`ctx` : | a GMimeGpgContext
`auto_key_retrieve` : | auto-retrieve keys from a keys server

### g_mime_gpg_context_get_use_agent ()

    gboolean            g_mime_gpg_context_get_use_agent    (GMimeGpgContext *ctx);

Gets the use_agent flag on the gpg context.

`ctx` : | a GMimeGpgContext
Returns : | the use_agent flag on the gpg context, which indicates that GnuPG should attempt to use gpg-agent for credentials.

### g_mime_gpg_context_set_use_agent ()

    void                g_mime_gpg_context_set_use_agent    (GMimeGpgContext *ctx,
                                                             gboolean use_agent);

Sets the `use_agent` flag on the gpg context, which indicates that GnuPG should attempt to use gpg-agent for credentials.

`ctx` : | a GMimeGpgContext
`use_agent` : | always trust flag

## See Also

GMimeCryptoContext