Enums

Details

class GMime.AddressType(value)

Bases: GLib.Enum

An address type.

SENDER = 0

Represents the addresses in the Sender header.

FROM = 1

Represents the addresses in the From header.

REPLY_TO = 2

Represents the addresses in the Reply-To header.

TO = 3

Represents the recipients in the To header.

CC = 4

Represents the recipients in the Cc header.

BCC = 5

Represents the recipients in the Bcc header.

class GMime.AutocryptPreferEncrypt(value)

Bases: GLib.Enum

A description of the user’s preference for encrypted messaging.

NONE = 0

No preference stated.

MUTUAL = 1

Please encrypt, if you also have this preference

class GMime.CipherAlgo(value)

Bases: GLib.Enum

A cipher algorithm.

DEFAULT = 0

The default (or unknown) cipher.

IDEA = 1

The IDEA cipher.

TWOFISH = 10

The Twofish cipher.

CAMELLIA128 = 11

The Camellia-128 cipher.

CAMELLIA192 = 12

The Camellia-192 cipher.

CAMELLIA256 = 13

The Camellia-256 cipher.

3DES = 2
_3DES = 2

The 3DES cipher.

CAST5 = 3

The CAST5 cipher.

BLOWFISH = 4

The Blowfish cipher.

AES = 7

The AES (aka RIJANDALE) cipher.

AES192 = 8

The AES-192 cipher.

AES256 = 9

The AES-256 cipher.

class GMime.ContentEncoding(value)

Bases: GLib.Enum

A Content-Transfer-Encoding enumeration.

DEFAULT = 0

Default transfer encoding.

7BIT = 1
_7BIT = 1

7bit text transfer encoding.

8BIT = 2
_8BIT = 2

8bit text transfer encoding.

BINARY = 3

Binary transfer encoding.

BASE64 = 4

Base64 transfer encoding.

QUOTEDPRINTABLE = 5

Quoted-printable transfer encoding.

UUENCODE = 6

Uuencode transfer encoding.

class GMime.DigestAlgo(value)

Bases: GLib.Enum

A hash algorithm.

DEFAULT = 0

The default hash algorithm.

MD5 = 1

The MD5 hash algorithm.

SHA512 = 10

The SHA-512 hash algorithm.

SHA224 = 11

The SHA-224 hash algorithm.

SHA1 = 2

The SHA-1 hash algorithm.

RIPEMD160 = 3

The RIPEMD-160 hash algorithm.

MD4 = 301

The MD4 hash algorithm.

CRC32 = 302

The CRC32 hash algorithm.

CRC32_RFC1510 = 303

The rfc1510 CRC32 hash algorithm.

CRC32_RFC2440 = 304

The rfc2440 CRC32 hash algorithm.

MD2 = 5

The MD2 hash algorithm.

TIGER192 = 6

The TIGER-192 hash algorithm.

HAVAL5160 = 7

The HAVAL-5-160 hash algorithm.

SHA256 = 8

The SHA-256 hash algorithm.

SHA384 = 9

The SHA-384 hash algorithm.

class GMime.EncodingConstraint(value)

Bases: GLib.Enum

Used with functions like GMime.FilterBest.encoding() and GMime.Object.encode() as the ‘constraint’ argument. These values provide a means of letting the filter know what the encoding constraints are for the stream.

7BIT = 0
_7BIT = 0

The stream data must fit within the 7bit ASCII range.

8BIT = 1
_8BIT = 1

The stream data may have bytes with the high bit set, but no null bytes.

BINARY = 2

The stream may contain any binary data.

class GMime.EncryptFlags(value)

Bases: GLib.Enum

Encryption flags.

NONE = 0

No flags specified.

ALWAYS_TRUST = 1

Always trust the specified keys.

NO_COMPRESS = 16

Don’t compress the plaintext before encrypting.

SYMMETRIC = 32

Encrypt symmetrically.

THROW_KEYIDS = 64

Do not include the key ids in the ciphertext.

class GMime.FilterFromMode(value)

Bases: GLib.Enum

The mode for a GMime.FilterFrom filter.

DEFAULT = 0

Default mode.

ESCAPE = 0

Escape ‘From ‘ lines with a ‘>’

ARMOR = 1

QP-Encode ‘From ‘ lines

class GMime.FilterGZipMode(value)

Bases: GLib.Enum

The mode for the GMime.FilterGZip filter.

ZIP = 0

Compress (zip) mode.

UNZIP = 1

Uncompress (unzip) mode.

class GMime.Format(value)

Bases: GLib.Enum

An enum of formats.

MESSAGE = 0

The stream contains a single message.

MBOX = 1

The stream is in the UNIX mbox format.

MMDF = 2

The stream is in the MMDF format.

class GMime.NewLineFormat(value)

Bases: GLib.Enum

There are two commonly used line-endings used by modern Operating Systems. Unix-based systems such as Linux and Mac OS use a single character (‘\n’ aka LF) to represent the end of line where-as Windows (or DOS) uses a sequence of two characters (“\r\n” aka CRLF). Most text-based network protocols such as SMTP, POP3, and IMAP use the CRLF sequence as well.

UNIX = 0

The Unix New-Line format (“\n”).

DOS = 1

The DOS New-Line format (“\r\n”).

class GMime.OpenPGPData(value)

Bases: GLib.Enum

The type of OpenPGP data found, if any.

NONE = 0

No OpenPGP data found.

ENCRYPTED = 1

The content contains OpenPGP encrypted data.

SIGNED = 2

The content contains OpenPGP signed data.

PUBLIC_KEY = 3

The content contains OpenPGP public key data.

PRIVATE_KEY = 4

The content contains OpenPGP private key data.

class GMime.ParamEncodingMethod(value)

Bases: GLib.Enum

The MIME specifications specify that the proper method for encoding Content-Type and Content-Disposition parameter values is the method described in

rfc2231</a>. However, it is common for some older email clients to improperly encode using the method described in rfc2047</a> instead.

DEFAULT = 0

Use the default encoding method set on the GMime.FormatOptions.

RFC2231 = 1

Use the encoding method described in rfc2231.

RFC2047 = 2

Use the encoding method described in rfc2047.

class GMime.ParserWarning(value)

Bases: GLib.Enum

Issues the GMimeParser detects. Note that the GMIME_CRIT_* issues indicate that some parts of the GMimeParser input may be ignored or will be interpreted differently by other software products.

WARN_DUPLICATED_HEADER = 1

Repeated exactly the same header which should exist only once.

CRIT_CONFLICTING_HEADER = 10

Conflicting header.

CRIT_CONFLICTING_PARAMETER = 11

Conflicting header parameter.

CRIT_MULTIPART_WITHOUT_BOUNDARY = 12

A multipart lacks the required boundary parameter.

WARN_INVALID_PARAMETER = 13

Invalid header parameter.

WARN_INVALID_ADDRESS_LIST = 14

Invalid address list.

CRIT_NESTING_OVERFLOW = 15

The maximum MIME nesting level has been exceeded.

WARN_DUPLICATED_PARAMETER = 2

Repeated exactly the same header parameter.

WARN_UNENCODED_8BIT_HEADER = 3

A header contains unencoded 8-bit characters.

WARN_INVALID_CONTENT_TYPE = 4

Invalid content type, assuming application/octet-stream.

WARN_INVALID_RFC2047_HEADER_VALUE = 5

Invalid RFC 2047 encoded header value.

WARN_MALFORMED_MULTIPART = 6

No child parts detected within a multipart.

WARN_TRUNCATED_MESSAGE = 7

The message is truncated.

WARN_MALFORMED_MESSAGE = 8

The message is malformed.

CRIT_INVALID_HEADER_NAME = 9

Invalid header name, the parser may skip the message or parts of it.

class GMime.PubKeyAlgo(value)

Bases: GLib.Enum

A public-key algorithm.

DEFAULT = 0

The default public-key algorithm.

RSA = 1

The RSA algorithm.

ELG_E = 16

An encryption-only ElGamal algorithm.

DSA = 17

The DSA algorithm.

ECC = 18

The Eliptic Curve algorithm.

RSA_E = 2

An encryption-only RSA algorithm.

ELG = 20

The ElGamal algorithm.

RSA_S = 3

A signature-only RSA algorithm.

ECDSA = 301

The Eliptic Curve + DSA algorithm.

ECDH = 302

The Eliptic Curve + Diffie Helman algorithm.

EDDSA = 303

The Eliptic Curve + DSA algorithm.

class GMime.RfcComplianceMode(value)

Bases: GLib.Enum

An RFC compliance mode.

LOOSE = 0

Attempt to be much more liberal accepting broken and/or invalid formatting.

STRICT = 1

Do not attempt to be overly liberal in accepting broken and/or invalid formatting.

class GMime.SecureMimeType(value)

Bases: GLib.Enum

The S/MIME data type.

COMPRESSED_DATA = 0

The S/MIME content contains compressed data.

ENVELOPED_DATA = 1

The S/MIME content contains enveloped data.

SIGNED_DATA = 2

The S/MIME content contains signed data.

CERTS_ONLY = 3

The S/MIME content contains only certificates.

UNKNOWN = 4

The S/MIME content is unknown.

class GMime.SeekWhence(value)

Bases: GLib.Enum

Relative seek position.

SET = 0

Seek relative to the beginning of the stream.

CUR = 1

Seek relative to the current position in the stream.

END = 2

Seek relative to the end of the stream.

class GMime.SignatureStatus(value)

Bases: GLib.Enum

A value representing the signature status bit flags for a particular GMime.Signature.

VALID = 1

The signature is fully valid.

BAD_POLICY = 1024

A policy was not met.

KEY_MISSING = 128

Can’t verify due to missing key.

KEY_REVOKED = 16

The key has been revoked.

GREEN = 2

The signature is good.

SYS_ERROR = 2048

A system error occurred.

CRL_MISSING = 256

CRL not available.

KEY_EXPIRED = 32

The key has expired.

RED = 4

The signature is bad.

TOFU_CONFLICT = 4096

Tofu conflict detected.

CRL_TOO_OLD = 512

Available CRL is too old.

SIG_EXPIRED = 64

The signature has expired.

class GMime.StreamBufferMode(value)

Bases: GLib.Enum

The buffering mode for a GMime.StreamBuffer stream.

READ = 0

Read in 4k blocks.

WRITE = 1

Write in 4k blocks.

class GMime.Trust(value)

Bases: GLib.Enum

The trust level of a certificate. Trust level tries to answer the question: “How much is the user willing to rely on cryptographic identity assertions made by the owner of this certificate?”

By way of comparison with web browser X.509 certificate validation stacks, the certificate of a “Root CA” has GMime.Trust.ULTIMATE, while the certificate of an intermediate CA has GMime.Trust.FULL, and an end-entity certificate (e.g., with CA:FALSE set) would have GMime.Trust.NEVER.

UNKNOWN = 0

We do not know whether to rely on identity assertions made by the certificate.

UNDEFINED = 1

We do not have enough information to decide whether to rely on identity assertions made by the certificate.

NEVER = 2

We should never rely on identity assertions made by the certificate.

MARGINAL = 3

We can rely on identity assertions made by this certificate as long as they are corroborated by other marginally-trusted certificates.

FULL = 4

We can rely on identity assertions made by this certificate.

ULTIMATE = 5

This certificate is an undeniable root of trust (e.g. normally, this is a certificate controlled by the user themselves).

class GMime.Validity(value)

Bases: GLib.Enum

The validity level of a certificate’s User ID. Validity level tries to answer the question: “How strongly do we believe that this certificate belongs to the party it says it belongs to?”

Note that some OpenPGP certificates have multiple User IDs, and each User ID may have a different validity level (e.g. depending on which third parties have certified which User IDs, and which third parties the local user has chosen to trust).

Similarly, an X.509 certificate can have multiple SubjectAltNames, and each name may also have a different validity level (e.g. if the issuing CA is bound by name constraints).

Note that the GMime API currently only exposes the highest-validty User ID for any given certificate.

UNKNOWN = 0

The User ID of the certificate is of unknown validity.

UNDEFINED = 1

The User ID of the certificate is undefined.

NEVER = 2

The User ID of the certificate is never to be treated as valid.

MARGINAL = 3

The User ID of the certificate is marginally valid (e.g. it has been certified by only one marginally-trusted party).

FULL = 4

The User ID of the certificate is fully valid.

ULTIMATE = 5

The User ID of the certificate is ultimately valid (i.e., usually the certificate belongs to the local user themselves).