An address type.
Represents the addresses in the Sender header.
Represents the addresses in the From header.
Represents the addresses in the Reply-To header.
Represents the recipients in the To header.
Represents the recipients in the Cc header.
Represents the recipients in the Bcc header.
An application/pkcs7-mime MIME part.
Creates a new application/pkcs7-mime object.
an empty application/pkcs7-mime object.
The type of S/MIME data contained within the part.
Attempts to encrypt the @entity MIME part to the public keys of @recipients
using S/MIME. If successful, a new application/pkcs7-mime object is returned.
a new #GMimeApplicationPkcs7Mime object on success
or %NULL on fail. If encrypting fails, an exception will be set on @err to provide
information as to why the failure occurred.
a #GMimeObject to encrypt
a #GMimeEncryptFlags
an array of recipients to encrypt to
Attempts to sign the @entity MIME part with @userid's private key using
S/MIME. If successful, a new application/pkcs7-mime object is returned.
a new #GMimeApplicationPkcs7Mime object on success
or %NULL on fail. If signing fails, an exception will be set on @err to provide
information as to why the failure occurred.
a #GMimeObject
the user id to sign with
Attempts to decrypt the encrypted application/pkcs7-mime part.
When non-%NULL, @session_key should be a %NULL-terminated string,
such as the one returned by g_mime_decrypt_result_get_session_key()
from a previous decryption. If the @session_key is not valid, decryption
will fail.
If @result is non-%NULL, then on a successful decrypt operation, it will be
updated to point to a newly-allocated #GMimeDecryptResult with signature
status information as well as a list of recipients that the part was
encrypted to.
the decrypted MIME part on success or
%NULL on fail. If the decryption fails, an exception will be set on
@err to provide information as to why the failure occurred.
a #GMimeApplicationPkcs7Mime
a #GMimeDecryptFlags
session key to use or %NULL
the decryption result
Gets the smime-type value of the Content-Type header.
the smime-type value.
A #GMimeApplicationPkcs7Mime object
Attempts to verify the signed @pkcs7_mime part and extract the original
MIME entity.
a new #GMimeSignatureList object on
success or %NULL on fail. If the verification fails, an exception
will be set on @err to provide information as to why the failure
occurred.
a #GMimeApplicationPkcs7Mime
a #GMimeVerifyFlags
the extracted entity
parent #GMimePart object
The smime-type Content-Type parameter.
An object containing Autocrypt information about a given e-mail
address, as derived from a message header.
See https://autocrypt.org/ for details and motivation.
Creates a new #GMimeAutocryptHeader object.
a new #GMimeAutocryptHeader object.
Creates a new #GMimeAutocryptHeader object based on the value of an
Autocrypt: header.
Note that this will not have an @effective_date set, since the
@effective_date is derived from the Date: line in the same block of
e-mail headers, but cannot be extracted from the raw Autocrypt:
header itself.
a new #GMimeAutocryptHeader object, or
%NULL on error.
The raw string value of an Autocrypt header
If address and type already match between @src and @dst, copy
keydata, prefer_encrypt, effective_date from @src to @dst.
a #GMimeAutocryptHeader object
a #GMimeAutocryptHeader object
Compare two Autocrypt Headers. This is useful for comparison, as well as for
sorting headers by:
- address
- effective_date
- keydata
- prefer_encrypt
-1, 0, or 1 when @ah1 is less than, equal to, or greater than @ah2.
a #GMimeAutocryptHeader object
a #GMimeAutocryptHeader object
Gets the internal address of the Autocrypt header, or %NULL if not set.
the address associated with the Autocrypt header
a #GMimeAutocryptHeader object
Gets the internal address of the Autocrypt header as a C string, or %NULL if not set.
the address associated with the Autocrypt header
a #GMimeAutocryptHeader object
Gets the effective date of the Autocrypt header, or %NULL if not set.
the effective date associated with the Autocrypt header
a #GMimeAutocryptHeader object
Gets the raw keydata of the Autocrypt header, or %NULL if not set.
the raw key data associated with the Autocrypt header
a #GMimeAutocryptHeader object
Gets the encryption preference stated by the Autocrypt header.
the encryption preference associated with the Autocrypt header
a #GMimeAutocryptHeader object
When dealing with Autocrypt headers derived from a message, some
sender addresses will not have a legitimate/complete header
associated with them. When a given sender address has no complete
header of a specific type, it should "reset" the state of the
associated address.
%TRUE if the header is complete, or %FALSE if it is incomplete.
a #GMimeAutocryptHeader object
Set the address associated with the autocrypt_header.
a #GMimeAutocryptHeader object
a #InternetAddressMailbox value
Set the address associated with the autocrypt_header.
a #GMimeAutocryptHeader object
a %NULL-terminated string that is a raw e-mail address
Set the effective date associated with the Autocrypt header.
a #GMimeAutocryptHeader object
a #GDateTime object
Set the raw key data associated with the Autocrypt header.
a #GMimeAutocryptHeader object
a #GBytes object
Set the encryption preference associated with the Autocrypt header.
a #GMimeAutocryptHeader object
a #GMimeAutocryptPreferEncrypt value
Gets the string representation of the Autocrypt header, or %NULL on
error. For example, it might return:
prefer-encrypt=mutual; addr=bob\@example.com; keydata=AAAB15BE...
If you are using this object to populate an Autocrypt-Gossip
header, you should set @gossip to %TRUE (this will suppress
inclusion of prefer-encrypt).
the string representation of the
Autocrypt header.
a #GMimeAutocryptHeader object
a #gboolean, indicating whether this header is for use with gossip
parent #GObject
the #InternetAddressMailbox associated with this Autocrypt header.
a #GMimeAutocryptPreferEncrypt value (defaults to @GMIME_AUTOCRYPT_PREFER_ENCRYPT_NONE).
the raw binary form of the encoded key.
the date associated with the Autocrypt header in this message.
A list of Autocrypt headers, typically extracted from a GMimeMessage.
Creates a new #GMimeAutocryptHeaderList object.
a new #GMimeAutocryptHeaderList object.
Adds a the passed #GMimeAutocryptHeader to the list.
a #GMimeAutocryptHeaderList object
a #GMimeAutocryptHeader object
Adds a new incomplete #GMimeAutocryptHeader object for each
InternetAddressMailbox found in #addresses.
the number of addresses added
a #GMimeAutocryptHeaderList object
an #InternetAddressList object
See how many Autocrypt headers are in the list.
the number of available Autocrypt headers
a #GMimeAutocryptHeaderList object
Get the Nth header in the list (returns %NULL on error, or if @index is out of bounds)
a pointer to the Nth header in the list.
a #GMimeAutocryptHeaderList object
an index into the list
Gets the Autocrypt header corresponding to the given @mailbox.
a pointer to the header in the list which
matches the requested address, or %NULL if no such header exists in
the list.
a #GMimeAutocryptHeaderList object
an #InternetAddressMailbox object
Remove all incomplete Autocrypt headers from the list.
a #GMimeAutocryptHeaderList object
parent #GObject
Array of #GMimeAutocryptHeader items.
A description of the user's preference for encrypted messaging.
No preference stated.
Please encrypt, if you also have this preference
Calculates the maximum number of bytes needed to base64 encode the
full input buffer of length @x.
Length of the input data to encode
An object containing useful information about a certificate.
Creates a new #GMimeCertificate object.
a new #GMimeCertificate object.
Get the creation date of the certificate's key.
the creation date of the certificate's key or %-1 if unknown.
a #GMimeCertificate
Get the creation date of the certificate's key in seconds since the
UNIX epoch, represented as a 64-bit signed integer.
the creation date of the certificate's key or %-1 if unknown.
a #GMimeCertificate
Get the digest algorithm used by the certificate.
the digest algorithm used by the certificate or
#GMIME_DIGEST_ALGO_DEFAULT if unspecified.
a #GMimeCertificate
Get the email address associated with the certificate. If the
certificate contains more than one email address with different
validities, the email address with the highest validity is
returned. If more than one email address appears in the
certificate with the same (highest) validity, the first such email
address will be returned.
the relevant e-mail address, or %NULL if unspecified.
a #GMimeCertificate
Get the expiration date of the certificate's key. A value of %0 means the certificate never expires.
the expiration date of the certificate's key or %-1 if unknown.
a #GMimeCertificate
Get the expiration date of the certificate's key in seconds since
the UNIX epoch, represented as a 64-bit signed integer. A value of
%0 means the certificate never expires.
the expiration date of the certificate's key or %-1 if unknown.
a #GMimeCertificate
Get the certificate's key fingerprint.
the certificate's key fingerprint or %NULL if unspecified.
a #GMimeCertificate
Get the validity of the certificate's identity information. This
validity applies to the name, email, and user_id fields associated
with the certificate.
the identity validity of the certificate.
a #GMimeCertificate
Get the certificate's issuer name.
the certificate's issuer name or %NULL if unspecified.
a #GMimeCertificate
Get the certificate's issuer serial.
the certificate's issuer serial or %NULL if unspecified.
a #GMimeCertificate
Get the certificate's key id.
the certificate's key id or %NULL if unspecified.
a #GMimeCertificate
Get the name associated with the certificate. For email
certificates, this is usually the name of the person who controls
the certificate (encoded in UTF-8). If the certificate contains
more than one name with different validities, the name with the
highest validity is returned. If more than one name appears in the
certificate with the same (highest) validity, the first such name
will be returned.
the the relevant name or %NULL if unspecified.
a #GMimeCertificate
Get the public-key algorithm used by the certificate.
the public-key algorithm used by the certificate or
#GMIME_PUBKEY_ALGO_DEFAULT if unspecified.
a #GMimeCertificate
Get the certificate trust.
the certificate trust.
a #GMimeCertificate
Get the certificate's full User ID. If the certificate contains
more than one User ID with different validities, the User ID with
the highest validity is returned. If more than one User ID appears
in the certificate with the same (highest) validity, the first such
User ID will be returned.
the relevant User ID or %NULL if unspecified.
a #GMimeCertificate
Set the creation date of the certificate's key.
a #GMimeCertificate
creation date
Set the digest algorithm used by the certificate.
a #GMimeCertificate
a #GMimeDigestAlgo
Set the email address associated with the
certificate. (e.g. "jane\@example.org")
a #GMimeCertificate
certificate's email
Set the expiration date of the certificate's key. A value of %0 means the certificate never expires.
a #GMimeCertificate
expiration date
Set the certificate's key fingerprint.
a #GMimeCertificate
fingerprint string
Set the validity associated with the certificate's name, email, and user_id.
a #GMimeCertificate
a #GMimeValidity representing the validity of the certificate's identity information.
Set the certificate's issuer name.
a #GMimeCertificate
certificate's issuer name
Set the certificate's issuer serial.
a #GMimeCertificate
certificate's issuer serial
Set the certificate's key id.
a #GMimeCertificate
key id
Set the name associated with the certificate. For email
certificates, this is usually the name of the person who controls
the certificate (encoded in UTF-8). (e.g. "Jane Doe")
a #GMimeCertificate
certificate's name
Set the public-key algorithm used by the certificate.
a #GMimeCertificate
a #GMimePubKeyAlgo
Set the certificate trust.
a #GMimeCertificate
a #GMimeTrust value
Set the certificate's full User ID. By convention, this is usually
a mail name-addr as described in RFC 5322. (e.g. "Jane Doe
<jane\@example.org>")
a #GMimeCertificate
the full User ID for a certificate
parent #GObject
The public-key algorithm used by the certificate, if known.
The digest algorithm used by the certificate, if known.
The level of trust assigned to this certificate.
The issuer of the certificate, if known.
The issuer of the certificate, if known.
A hex string representing the certificate's fingerprint.
The creation date of the certificate.
The expiration date of the certificate.
The certificate's key id.
The email address of the person or entity.
The name of the person or entity.
The full User ID of the certificate.
the validity of the email address, name, and User ID.
A collection of #GMimeCertificate objects.
Creates a new #GMimeCertificateList.
a new #GMimeCertificateList.
Adds a #GMimeCertificate to the #GMimeCertificateList.
the index of the added #GMimeCertificate.
a #GMimeCertificateList
a #GMimeCertificate
Clears the list of certificates.
a #GMimeCertificateList
Checks whether or not the specified #GMimeCertificate is contained within
the #GMimeCertificateList.
%TRUE if the specified #GMimeCertificate is contained within the
specified #GMimeCertificateList or %FALSE otherwise.
a #GMimeCertificateList
a #GMimeCertificate
Gets the #GMimeCertificate at the specified index.
the #GMimeCertificate at the specified
index or %NULL if the index is out of range.
a #GMimeCertificateList
index of #GMimeCertificate to get
Gets the index of the specified #GMimeCertificate inside the
#GMimeCertificateList.
the index of the requested #GMimeCertificate within the
#GMimeCertificateList or %-1 if it is not contained within the
#GMimeCertificateList.
a #GMimeCertificateList
a #GMimeCertificate
Inserts a #GMimeCertificate into the #GMimeCertificateList at the specified
index.
a #GMimeCertificateList
index to insert at
a #GMimeCertificate
Gets the length of the list.
the number of #GMimeCertificate objects in the list.
a #GMimeCertificateList
Removes a #GMimeCertificate from the #GMimeCertificateList.
%TRUE if the specified #GMimeCertificate was removed or %FALSE
otherwise.
a #GMimeCertificateList
a #GMimeCertificate
Removes a #GMimeCertificate from the #GMimeCertificateList at the specified
index.
%TRUE if a #GMimeCertificate was removed or %FALSE otherwise.
a #GMimeCertificateList
index of the certificate to remove
Sets the #GMimeCertificate at the specified index to @cert.
a #GMimeCertificateList
index of #GMimeCertificate to set
a #GMimeCertificate
parent #GObject
An array of #GMimeCertificate objects.
State used by g_mime_charset_best() and g_mime_charset_best_name().
charset mask
charset level
Gets the best charset name based on the charset mask @charset.
the charset name that best represents the charset
mask @charset or %NULL for us-ascii.
charset mask
Check to see if the UTF-8 @text will fit safely within @charset.
%TRUE if it is safe to encode @text into @charset or %FALSE
otherwise.
a #GMimeCharset mask
a charset
utf-8 text to check
length of @text
Initializes a charset mask structure.
charset mask
Steps through the input buffer 1 unicode character (glyph) at a
time (ie, not necessarily 1 byte at a time). Bitwise 'and' our
@charset->mask with the mask for each glyph. This has the effect of
limiting what charsets our @charset->mask can match.
charset structure
input text buffer (must be in UTF-8)
input buffer length
Computes the best charset to use to encode this text buffer.
the charset name best suited for the input text
or %NULL if it is ascii-safe.
a UTF-8 text buffer
input buffer length
Attempts to find a canonical charset name for @charset.
Note: Will normally return the same value as
g_mime_charset_iconv_name() unless the system iconv does not use
the canonical ISO charset names (such as using ISO8859-1 rather
than the canonical form ISO-8859-1).
a canonical charset name for @charset.
charset name
Attempts to find an iconv-friendly charset name for @charset.
an iconv-friendly charset name for @charset.
charset name
Maps the ISO-8859-# charset to the equivalent Windows-CP125#
charset.
equivalent Windows charset.
ISO-8859-# charset
Attempts to find a specific language code that is specific to
@charset. Currently only handles CJK and Russian/Ukranian
charset->lang mapping. Everything else will return %NULL.
a language code that is specific to @charset,
or %NULL on fail.
charset name
Gets the user's locale charset (or iso-8859-1 by default).
Note: This function is deprecated. Use g_mime_locale_charset()
instead.
the user's locale charset (or iso-8859-1 by default).
Initializes character set maps.
Note: g_mime_init() calls this routine for you.
Frees internal lookup tables created in g_mime_charset_map_init().
Attempts to find an iconv-friendly charset name for @charset.
Note: This function is deprecated. Use g_mime_charset_iconv_name()
instead.
an iconv-friendly charset name for @charset.
charset name
A cipher algorithm.
The default (or unknown) cipher.
The IDEA cipher.
The 3DES cipher.
The CAST5 cipher.
The Blowfish cipher.
The AES (aka RIJANDALE) cipher.
The AES-192 cipher.
The AES-256 cipher.
The Twofish cipher.
The Camellia-128 cipher.
The Camellia-192 cipher.
The Camellia-256 cipher.
A data structure representing a Content-Disposition.
Creates a new #GMimeContentDisposition object.
a new #GMimeContentDisposition object.
Parses the input string into a #GMimeContentDisposition object.
a new #GMimeContentDisposition object.
a #GMimeParserOptions or %NULL
Content-Disposition field value
Encodes the Content-Disposition header.
a new string containing the encoded header value.
a #GMimeContentDisposition object
a #GMimeFormatOptions or %NULL
Gets the disposition or %NULL on fail.
the disposition string which is probably one of
#GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE.
a #GMimeContentDisposition object
Gets the parameter value specified by @name if it's available.
the value of the requested parameter or %NULL if the
parameter is not set. If the parameter is set, the returned string
will be in UTF-8.
a #GMimeContentDisposition object
parameter name
Gets the Content-Disposition parameter list.
the Content-Disposition's parameter list.
a #GMimeContentDisposition object
Determines if a Content-Disposition has a value of "attachment".
%TRUE if the value matches "attachment", otherwise %FALSE.
a #GMimeContentDisposition object
Sets the disposition to @value which may be one of
#GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE or, by
your choice, any other string which would indicate how the MIME
part should be displayed by the MUA.
a #GMimeContentDisposition object
disposition value
Sets a parameter on the Content-Disposition.
Note: The @name should be in US-ASCII while the @value should be in
UTF-8.
a #GMimeContentDisposition object
parameter name
parameter value
parent #GObject
disposition
a #GMimeParam list
A Content-Transfer-Encoding enumeration.
Default transfer encoding.
7bit text transfer encoding.
8bit text transfer encoding.
Binary transfer encoding.
Base64 transfer encoding.
Quoted-printable transfer encoding.
Uuencode transfer encoding.
A data structure representing a Content-Type.
Creates a Content-Type object with type @type and subtype @subtype.
a new #GMimeContentType object.
the MIME type or %NULL for the default value
the MIME subtype or %NULL for the default value
Parses the input string into a #GMimeContentType object.
a new #GMimeContentType object.
a #GMimeParserOptions or %NULL
input string containing a content-type (and params)
Encodes the Content-Disposition header.
a new string containing the encoded header value.
a #GMimeContentType
a #GMimeFormatOptions or %NULL
Gets the Content-Type's media sub-type.
the Content-Type's media sub-type.
a #GMimeContentType
Gets the Content-Type's media type.
the Content-Type's media type.
a #GMimeContentType
Allocates a string buffer containing the type and subtype defined
by the @content_type.
an allocated string containing the type and subtype of the
content-type in the format: type/subtype.
a #GMimeContentType
Gets the parameter value specified by @name if it's available.
the value of the requested parameter or %NULL if the
parameter is not set. If the parameter is set, the returned string
will be in UTF-8.
a #GMimeContentType
parameter name (aka attribute)
Gets the Content-Type's parameter list.
the Content-Type's parameter list.
a #GMimeContentType
Compares the given type and subtype with that of the given mime
type object.
%TRUE if the MIME types match or %FALSE otherwise. You may
use "*" in place of @type and/or @subtype as a wilcard.
a #GMimeContentType
MIME type to compare against
MIME subtype to compare against
Sets the Content-Type's media subtype.
a #GMimeContentType
media subtype
Sets the Content-Type's media type.
a #GMimeContentType
media type
Sets a parameter on the Content-Type.
Note: The @name should be in US-ASCII while the @value should be in
UTF-8.
a #GMimeContentType
parameter name (aka attribute)
parameter value
parent #GObject
media type
media subtype
a #GMimeParam list
A crypto context for use with MIME.
Creates a new crypto context for the specified @protocol.
a newly allocated #GMimeCryptoContext.
the crypto protocol
Registers the callback for the specified @protocol.
crypto protocol
a #GMimeCryptoContextNewFunc
Decrypts the ciphertext input stream and writes the resulting cleartext
to the output stream.
When non-%NULL, @session_key should be a %NULL-terminated string,
such as the one returned by g_mime_decrypt_result_get_session_key()
from a previous decryption. If the @session_key is not valid, decryption
will fail.
If the encrypted input stream was also signed, the returned
#GMimeDecryptResult will have a non-%NULL list of signatures, each with a
#GMimeSignatureStatus (among other details about each signature).
On success, the returned #GMimeDecryptResult will contain a list of
certificates, one for each recipient, that the original encrypted stream
was encrypted to.
Note: It *may* be possible to maliciously design an encrypted stream such
that recursively decrypting it will result in an endless loop, causing
a denial of service attack on your application.
a #GMimeDecryptResult on success or %NULL
on error.
a #GMimeCryptoContext
a set of #GMimeDecryptFlags
the session key to use or %NULL
input/ciphertext stream
output/cleartext stream
Gets the digest id based on the digest name.
the equivalent digest id or #GMIME_DIGEST_ALGO_DEFAULT on fail.
a #GMimeCryptoContext
digest name
Gets the digest name based on the digest id @digest.
the equivalent digest name or %NULL on fail.
a #GMimeCryptoContext
digest id
Encrypts (and optionally signs) the cleartext input stream and
writes the resulting ciphertext to the output stream.
%0 on success or %-1 on fail.
a #GMimeCryptoContext
sign as well as encrypt
the key id (or email address) to use when signing (assuming @sign is %TRUE)
a set of #GMimeEncryptFlags
an array of recipient key ids and/or email addresses
cleartext input stream
ciphertext output stream
Exports the keys/certificates in @keys to the stream @ostream from
the key/certificate database controlled by @ctx.
If @keys is %NULL or contains only a %NULL element, then all keys
will be exported.
%0 on success or %-1 on fail.
a #GMimeCryptoContext
an array of key ids, terminated by a %NULL element
output stream
Gets the encryption protocol for the crypto context.
the encryption protocol or %NULL if not supported.
a #GMimeCryptoContext
Gets the key exchange protocol for the crypto context.
the key exchange protocol or %NULL if not supported.
a #GMimeCryptoContext
Gets the signature protocol for the crypto context.
the signature protocol or %NULL if not supported.
a #GMimeCryptoContext
Imports a stream of keys/certificates contained within @istream
into the key/certificate database controlled by @ctx.
the total number of keys imported on success or %-1 on fail.
a #GMimeCryptoContext
input stream (containing keys)
Signs the input stream and writes the resulting signature to the output stream.
the #GMimeDigestAlgo used on success or %-1 on fail.
a #GMimeCryptoContext
%TRUE if @ostream should be the detached signature; otherwise, %FALSE
private key to use to sign the stream
input stream
output stream
Verifies the signature. If @istream is a clearsigned stream, you
should pass %NULL as the @sigstream parameter and may wish to
provide an @ostream argument for GMime to output the original
plaintext into. Otherwise @sigstream is assumed to be the signature
stream and is used to verify the integirity of the @istream.
a #GMimeSignatureList object containing
the status of each signature or %NULL on error.
a #GMimeCryptoContext
a #GMimeVerifyFlags
input stream
detached-signature stream
output stream for use with encapsulated signature input streams
Decrypts the ciphertext input stream and writes the resulting cleartext
to the output stream.
When non-%NULL, @session_key should be a %NULL-terminated string,
such as the one returned by g_mime_decrypt_result_get_session_key()
from a previous decryption. If the @session_key is not valid, decryption
will fail.
If the encrypted input stream was also signed, the returned
#GMimeDecryptResult will have a non-%NULL list of signatures, each with a
#GMimeSignatureStatus (among other details about each signature).
On success, the returned #GMimeDecryptResult will contain a list of
certificates, one for each recipient, that the original encrypted stream
was encrypted to.
Note: It *may* be possible to maliciously design an encrypted stream such
that recursively decrypting it will result in an endless loop, causing
a denial of service attack on your application.
a #GMimeDecryptResult on success or %NULL
on error.
a #GMimeCryptoContext
a set of #GMimeDecryptFlags
the session key to use or %NULL
input/ciphertext stream
output/cleartext stream
Gets the digest id based on the digest name.
the equivalent digest id or #GMIME_DIGEST_ALGO_DEFAULT on fail.
a #GMimeCryptoContext
digest name
Gets the digest name based on the digest id @digest.
the equivalent digest name or %NULL on fail.
a #GMimeCryptoContext
digest id
Encrypts (and optionally signs) the cleartext input stream and
writes the resulting ciphertext to the output stream.
%0 on success or %-1 on fail.
a #GMimeCryptoContext
sign as well as encrypt
the key id (or email address) to use when signing (assuming @sign is %TRUE)
a set of #GMimeEncryptFlags
an array of recipient key ids and/or email addresses
cleartext input stream
ciphertext output stream
Exports the keys/certificates in @keys to the stream @ostream from
the key/certificate database controlled by @ctx.
If @keys is %NULL or contains only a %NULL element, then all keys
will be exported.
%0 on success or %-1 on fail.
a #GMimeCryptoContext
an array of key ids, terminated by a %NULL element
output stream
Gets the encryption protocol for the crypto context.
the encryption protocol or %NULL if not supported.
a #GMimeCryptoContext
Gets the key exchange protocol for the crypto context.
the key exchange protocol or %NULL if not supported.
a #GMimeCryptoContext
Gets the signature protocol for the crypto context.
the signature protocol or %NULL if not supported.
a #GMimeCryptoContext
Imports a stream of keys/certificates contained within @istream
into the key/certificate database controlled by @ctx.
the total number of keys imported on success or %-1 on fail.
a #GMimeCryptoContext
input stream (containing keys)
Sets the function used by the @ctx for requesting a password from
the user.
a #GMimeCryptoContext
a callback function for requesting a password
Signs the input stream and writes the resulting signature to the output stream.
the #GMimeDigestAlgo used on success or %-1 on fail.
a #GMimeCryptoContext
%TRUE if @ostream should be the detached signature; otherwise, %FALSE
private key to use to sign the stream
input stream
output stream
Verifies the signature. If @istream is a clearsigned stream, you
should pass %NULL as the @sigstream parameter and may wish to
provide an @ostream argument for GMime to output the original
plaintext into. Otherwise @sigstream is assumed to be the signature
stream and is used to verify the integirity of the @istream.
a #GMimeSignatureList object containing
the status of each signature or %NULL on error.
a #GMimeCryptoContext
a #GMimeVerifyFlags
input stream
detached-signature stream
output stream for use with encapsulated signature input streams
parent #GObject
a callback for requesting a password
the equivalent digest id or #GMIME_DIGEST_ALGO_DEFAULT on fail.
a #GMimeCryptoContext
digest name
the equivalent digest name or %NULL on fail.
a #GMimeCryptoContext
digest id
the signature protocol or %NULL if not supported.
a #GMimeCryptoContext
the encryption protocol or %NULL if not supported.
a #GMimeCryptoContext
the key exchange protocol or %NULL if not supported.
a #GMimeCryptoContext
the #GMimeDigestAlgo used on success or %-1 on fail.
a #GMimeCryptoContext
%TRUE if @ostream should be the detached signature; otherwise, %FALSE
private key to use to sign the stream
input stream
output stream
a #GMimeSignatureList object containing
the status of each signature or %NULL on error.
a #GMimeCryptoContext
a #GMimeVerifyFlags
input stream
detached-signature stream
output stream for use with encapsulated signature input streams
%0 on success or %-1 on fail.
a #GMimeCryptoContext
sign as well as encrypt
the key id (or email address) to use when signing (assuming @sign is %TRUE)
a set of #GMimeEncryptFlags
an array of recipient key ids and/or email addresses
cleartext input stream
ciphertext output stream
a #GMimeDecryptResult on success or %NULL
on error.
a #GMimeCryptoContext
a set of #GMimeDecryptFlags
the session key to use or %NULL
input/ciphertext stream
output/cleartext stream
the total number of keys imported on success or %-1 on fail.
a #GMimeCryptoContext
input stream (containing keys)
%0 on success or %-1 on fail.
a #GMimeCryptoContext
an array of key ids, terminated by a %NULL element
output stream
A callback used to create a new instance of a #GMimeCryptoContext subclass.
a new #GMimeCryptoContext instance.
Standard attachment disposition.
Standard inline disposition.
A wrapper for a stream which may be encoded.
Creates a new #GMimeDataWrapper object.
a new data wrapper object.
Creates a new #GMimeDataWrapper object around @stream.
a data wrapper around @stream. Since the wrapper owns its
own reference on the stream, caller is responsible for unrefing
its own copy.
a #GMimeStream
stream's encoding
Writes the raw (decoded) data to the output stream.
the number of bytes written or %-1 on failure.
a #GMimeDataWrapper
output stream
Gets the encoding type of the stream wrapped by @wrapper.
the encoding type of the internal stream.
a #GMimeDataWrapper
Gets a reference to the stream wrapped by @wrapper.
a reference to the internal stream.
a #GMimeDataWrapper
Sets the encoding type of the internal stream.
a #GMimeDataWrapper
encoding
Replaces the wrapper's internal stream with @stream. Don't forget,
if @stream is not of the same encoding as the old stream, you'll
want to call g_mime_data_wrapper_set_encoding() as well.
Note: caller is responsible for its own reference on
@stream.
a #GMimeDataWrapper
a #GMimeStream
Writes the raw (decoded) data to the output stream.
the number of bytes written or %-1 on failure.
a #GMimeDataWrapper
output stream
parent #GObject
the encoding of the content
content stream
the number of bytes written or %-1 on failure.
a #GMimeDataWrapper
output stream
Decryption flags.
No flags specified.
Export the decryption session-key.
Disable signature verification.
Enable OpenPGP keyserver lookups.
Enable CRL and OCSP checks that require network lookups.
An object containing the results from decrypting an encrypted stream.
Creates a new #GMimeDecryptResult object.
a new #GMimeDecryptResult object.
Get the cipher algorithm used.
the cipher algorithm used.
a #GMimeDecryptResult
Get the mdc digest algorithm used.
the mdc digest algorithm used.
a #GMimeDecryptResult
Gets the list of certificates that the stream had been encrypted to.
a #GMimeCertificateList.
A #GMimeDecryptResult
Get the session key used for this decryption.
the session key digest algorithm used, or %NULL if no
session key was requested or found.
a #GMimeDecryptResult
Gets a list of signatures if the encrypted stream had also been signed.
a #GMimeSignatureList or %NULL if the
stream was not signed.
A #GMimeDecryptResult
Set the cipher algorithm used.
a #GMimeDecryptResult
a #GMimeCipherAlgo
Set the mdc digest algorithm used.
a #GMimeDecryptResult
a #GMimeDigestAlgo
Sets the list of certificates that the stream had been encrypted to.
A #GMimeDecryptResult
A #GMimeCertificateList
Set the session key to be returned by this decryption result.
a #GMimeDecryptResult
a string representing the session key or %NULL to unset the key
Sets the list of signatures.
A #GMimeDecryptResult
A #GMimeSignatureList
parent #GObject
A #GMimeCertificateList
A #GMimeSignatureList if signed or %NULL otherwise.
The cipher algorithm used to encrypt the stream.
The MDC digest algorithm used, if any.
The session key if requested or %NULL otherwise.
A hash algorithm.
The default hash algorithm.
The MD5 hash algorithm.
The SHA-1 hash algorithm.
The RIPEMD-160 hash algorithm.
The MD2 hash algorithm.
The TIGER-192 hash algorithm.
The HAVAL-5-160 hash algorithm.
The SHA-256 hash algorithm.
The SHA-384 hash algorithm.
The SHA-512 hash algorithm.
The SHA-224 hash algorithm.
The MD4 hash algorithm.
The CRC32 hash algorithm.
The rfc1510 CRC32 hash algorithm.
The rfc2440 CRC32 hash algorithm.
Decides if an error is a system error (aka errno value) vs. a GMime
error.
Meant to be used with #GError::code
integer error value
A context used for encoding or decoding data.
the type of encoding
a temporary buffer needed when uuencoding data
%TRUE if encoding or %FALSE if decoding
saved bytes from the previous step
current encder/decoder state
Completes the incremental encode or decode of the input stream (see
g_mime_encoding_step() for details).
the number of bytes written to @outbuf.
a #GMimeEncoding
an input buffer to encode or decode
input buffer length
an output buffer
Initializes a #GMimeEncoding state machine for decoding from
@encoding.
a #GMimeEncoding to initialize
a #GMimeContentEncoding to use
Initializes a #GMimeEncoding state machine for encoding to
@encoding.
a #GMimeEncoding to initialize
a #GMimeContentEncoding to use
Given the input length, @inlen, calculate the needed output length
to perform an encoding or decoding step.
the maximum number of bytes needed to encode or decode a
buffer of @inlen bytes.
a #GMimeEncoding
an input length
Resets the state of the #GMimeEncoding.
a #GMimeEncoding to reset
Incrementally encodes or decodes (depending on @state) an input
stream by 'stepping' through a block of input at a time.
You should make sure @outbuf is large enough by calling
g_mime_encoding_outlen() to find out how large @outbuf might need
to be.
the number of bytes written to @outbuf.
a #GMimeEncoding
an input buffer to encode or decode
input buffer length
an output buffer
Decodes a chunk of base64 encoded data.
the number of bytes decoded (which have been dumped in
@outbuf).
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Base64 encodes the input stream to the output stream. Call this
when finished encoding data with g_mime_encoding_base64_encode_step()
to flush off the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Base64 encodes a chunk of data. Performs an 'encode step', only
encodes blocks of 3 characters to the output at a time, saves
left-over state in state and save (initialise to 0 on first
invocation).
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Decodes a block of quoted-printable encoded data. Performs a
'decode step' on a chunk of QP encoded data.
the number of bytes decoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Quoted-printable encodes a block of text. Call this when finished
encoding data with g_mime_encoding_quoted_encode_step() to flush off
the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Quoted-printable encodes a block of text. Performs an 'encode
step', saves left-over state in state and save (initialise to -1 on
first invocation).
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Uudecodes a chunk of data. Performs a 'decode step' on a chunk of
uuencoded data. Assumes the "begin mode filename" line has
been stripped off.
the number of bytes decoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Uuencodes a chunk of data. Call this when finished encoding data
with g_mime_encoding_uuencode_step() to flush off the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
temporary buffer of 60 bytes
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Uuencodes a chunk of data. Performs an 'encode step', only encodes
blocks of 45 characters to the output at a time, saves left-over
state in @uubuf, @state and @save (initialize to 0 on first
invocation).
the number of bytes encoded.
input buffer
input buffer length
output stream
temporary buffer of 60 bytes
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Used with functions like g_mime_filter_best_encoding() and
g_mime_object_encode() as the 'constraint' argument. These values
provide a means of letting the filter know what the encoding
constraints are for the stream.
The stream data must fit within the 7bit ASCII range.
The stream data may have bytes with the high bit set, but no null bytes.
The stream may contain any binary data.
Encryption flags.
No flags specified.
Always trust the specified keys.
Don't compress the plaintext before encrypting.
Encrypt symmetrically.
Do not include the key ids in the ciphertext.
A bit flag for g_mime_filter_enriched_new() which signifies that
the filter should expect Rich Text (aka RTF).
Enclose citation text in blockquotes.
Cites text by prepending "> " to each cited line.
Wrap email addresses in "mailto:" href tags.
Convert new-lines ('\n') into <br> tags.
Preserve whitespace by converting spaces into their appropriate
html entities.
Wrap detected URLs in <a href=...> tags.
Converts 8bit characters to '?'.
Change the colour of citation text.
Wrap stream in <pre> and </pre> tags.
Base class for filters used by #GMimeStreamFilter.
Completes the filtering.
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
Copies @filter into a new #GMimeFilter object.
a duplicate of @filter.
filter
Filters the input data and writes it to @out.
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
Resets the filter.
a #GMimeFilter object
Sets number of bytes backed up on the input, new calls replace
previous ones
filter
data to backup
length of @data
Completes the filtering.
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
Copies @filter into a new #GMimeFilter object.
a duplicate of @filter.
filter
Filters the input data and writes it to @out.
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
Resets the filter.
a #GMimeFilter object
Ensure this much size is available for filter output (if required)
filter
requested size for the output buffer
%TRUE if existing data in the output buffer should be kept
parent #GObject
private state data
A basic encoder/decoder filter for the MIME encodings.
Creates a new basic filter for @encoding.
a new basic encoder filter.
a #GMimeContentEncoding
%TRUE to encode or %FALSE to decode
parent #GMimeFilter
#GMimeEncoding state
A filter for calculating the best encoding and/or charset to encode
the data passed through it.
Creates a new GMimeFilterBest filter. @flags are used to determine
which information to keep statistics of. If the
#GMIME_FILTER_BEST_CHARSET bit is set, the filter will be able to
compute the best charset for encoding the stream of data
filtered. If the #GMIME_FILTER_BEST_ENCODING bit is set, the filter
will be able to compute the best Content-Transfer-Encoding for use
with the stream being filtered.
Note: In order for the g_mime_filter_best_charset() function to
work, the stream being filtered MUST already be encoded in UTF-8.
a new best filter with flags @flags.
filter flags
Calculates the best charset for encoding the content filtered
through the @best filter.
the name of the charset most suitable for encoding
the content that has been passed through the filter or %NULL
if the filter was not configured to detect this.
a #GMimeFilterBest
Calculates the most efficient Content-Transfer-Encoding for the
content filtered through @best that fits within the encoding
@constraint.
the best encoding for the content filtered by @best.
a #GMimeFilterBest
a #GMimeEncodingConstraint
parent #GMimeFilter
#GMimeFilterBestFlags
#GMimeCharset state
count of nul-bytes passed through the filter
count of 8bit bytes passed through the filter
total number of bytes passed through the filter
the length of the longest line passed through the filter
current line length
buffer for checking From_ lines
length of bytes in @frombuf
%TRUE if any line started with "From "
start line state
mid-line state
Bit flags to enable charset and/or encoding scanning to make
educated guesses as to what the best charset and/or encodings to
use for the content passed through the filter.
Enable best-charset detection.
Enable best-encoding detection.
A filter to convert between charsets.
Creates a new #GMimeFilterCharset filter.
a new charset filter or %NULL if the charset conversion is
not possible.
charset to convert from
charset to convert to
parent #GMimeFilter
charset that the filter is converting from
charset the filter is converting to
charset conversion state
A filter for calculating the checksum of a stream.
Creates a new checksum filter.
a new #GMimeFilterChecksum filter.
the type of checksum
Outputs the checksum digest into @digest.
the number of bytes used of the @digest buffer.
checksum filter object
the digest buffer
the length of the digest buffer
Outputs the checksum digest as a newly allocated hexadecimal string.
the hexadecimal representation of the checksum. The returned string should be freed with g_free() when no longer needed.
checksum filter object
parent #GMimeFilter
The checksum context
a duplicate of @filter.
filter
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
filter
input buffer
input buffer length
prespace buffer length
pointer to output buffer
pointer to output length
pointer to output prespace buffer length
a #GMimeFilter object
A filter to convert a stream from Windows/DOS line endings to Unix line endings.
Creates a new #GMimeFilterDos2Unix filter.
a new #GMimeFilterDos2Unix filter.
%TRUE if the filter should ensure that the stream ends in a new line
parent #GMimeFilter
%TRUE if the filter should ensure that the stream ends with a new line
the previous character encountered
A filter for converting text/enriched or text/richtext textual
streams into text/html.
Creates a new GMimeFilterEnriched object.
a new GMimeFilter object.
flags
parent #GMimeFilter
bit flags
nofill tag state
A filter for armoring or escaping lines beginning with "From ".
Creates a new GMimeFilterFrom filter. If @mode is
#GMIME_FILTER_FROM_MODE_ARMOR, the from-filter will encode from
lines using the quoted-printable encoding resulting in "=46rom ".
Using the #GMIME_FILTER_FROM_MODE_DEFAULT or
#GMIME_FILTER_FROM_MODE_ESCAPE mode (they are the same), from lines
will be escaped to ">From ".
Note: If you plan on using a from-filter in mode ARMOR, you should
remember to also use a #GMimeFilterBasic filter with an encoding of
#GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE.
a new from filter with mode @mode.
filter mode
parent #GMimeFilter
#GMimeFilterFromMode
%TRUE if in the middle of a line
The mode for a #GMimeFilterFrom filter.
Default mode.
Escape 'From ' lines with a '>'
QP-Encode 'From ' lines
A filter for compresing or decompressing a gzip stream.
Creates a new gzip (or gunzip) filter.
a new gzip (or gunzip) filter.
zip or unzip
compression level
Gets the comment that was either previously set or retrieved when decoding a gzip stream.
a string containing the comment.
A #GMimeFilterGZip filter
Gets the filename that was either previously set or retrieved when decoding a gzip stream.
a string containing th ename of the file.
A #GMimeFilterGZip filter
Sets the comment that should be used when generating the gzip header.
A #GMimeFilterGZip filter
The comment
Sets the filename that should be used when generating the gzip header.
A #GMimeFilterGZip filter
The name of the file
parent #GMimeFilter
private state data
#GMimeFilterGZipMode
compression level
The mode for the #GMimeFilterGZip filter.
Compress (zip) mode.
Uncompress (unzip) mode.
A filter for converting text/plain into text/html.
Creates a new GMimeFilterHTML filter which can be used to convert a
plain UTF-8 text stream into an html stream.
a new html filter.
html flags
citation colour
parent #GMimeFilter
URL scanner state
flags specifying HTML conversion rules
cite colour
current column
currently inside of a 'pre' tag.
current citation depth level.
A filter to detect OpenPGP markers.
Creates a new #GMimeFilterOpenPGP filter.
a new #GMimeFilterOpenPGP filter.
Gets the stream offset of the beginning of the OpenPGP data block, if any have been found.
The stream offset or %-1 if no OpenPGP block was found.
A #GMimeFilterOpenPGP filter
Gets the type of OpenPGP data that has been detected.
a #GMimeOpenPGPData value.
A #GMimeFilterOpenPGP filter
Gets the stream offset of the end of the OpenPGP data block, if any have been found.
The stream offset or %-1 if no OpenPGP block was found.
A #GMimeFilterOpenPGP filter
parent #GMimeFilter
A filter to byte-stuff SMTP DATA.
Creates a new #GMimeFilterSmtpData filter.
a new #GMimeFilterSmtpData filter.
parent #GMimeFilter
beginning-of-line state.
A filter for stripping whitespace from the end of lines.
Creates a new #GMimeFilterStrip filter which will strip trailing
whitespace from every line of input passed through the filter.
a new strip filter.
parent #GMimeFilter
A filter to convert a stream from Windows/DOS line endings to Unix line endings.
Creates a new #GMimeFilterUnix2Dos filter.
a new #GMimeFilterUnix2Dos filter.
%TRUE if the filter should ensure that the stream ends in a new line
parent #GMimeFilter
%TRUE if the filter should ensure that the stream ends with a new line
the previous character encountered
A filter for detecting whether or not a text stream claimed to be
iso-8859-X is really that charset or if it is really a
Windows-CP125x charset.
Creates a new GMimeFilterWindows filter. When a stream of text has
been filtered, it can be determined whether or not said text stream
was in @claimed_charset or the equivalent Windows-CP125# charset.
a new windows filter.
charset that a text stream claims to be
Determines whether or not a Windows-CP125# charset has been
detected so far.
%TRUE if the filtered stream has been detected to contain
Windows-CP125# characters or %FALSE otherwise.
windows filter object
Figures out the real charset that the text is encoded in based on whether or not Windows-CP125# characters were found.
a const string pointer to the claimed charset if filtered
text stream was found not to contain any Windows-CP125# characters
or the proper Windows-CP125# charset.
windows filter object
parent #GMimeFilter
%TRUE if the stream is detected to be a windows-cp125x charset
charset the text stream is claimed to be
A filter for yEncoding or yDecoding a stream.
Creates a new yEnc filter.
a new yEnc filter.
encode vs decode
Get the computed crc or (guint32) -1 on fail.
the computed crc or (guint32) -1 on fail.
yEnc filter
Get the computed part crc or (guint32) -1 on fail.
the computed part crc or (guint32) -1 on fail.
yEnc filter
Sets the current crc32 value on the yEnc filter @yenc to @crc.
yEnc filter
crc32
Sets the current state of the yencoder/ydecoder
yEnc filter
encode/decode state
parent #GMimeFilter
encode vs decode
part id
encode/decode state
part crc
full crc
An enum of formats.
The stream contains a single message.
The stream is in the UNIX mbox format.
The stream is in the MMDF format.
Format options for serializing various GMime objects.
Creates a new set of #GMimeFormatOptions.
a newly allocated set of #GMimeFormatOptions with the default values.
Adds the given header to the list of headers that should be hidden.
a #GMimeFormatOptions
a header name
Clears the list of headers that should be hidden.
a #GMimeFormatOptions
Clones a #GMimeFormatOptions.
a newly allocated #GMimeFormatOptions.
a #GMimeFormatOptions or %NULL
Creates a #GMimeFilter suitable for converting line-endings to the
currently set new-line format.
a #GMimeFilter to convert to the specified new-line format.
a #GMimeFormatOptions or %NULL
%TRUE if the output must *always* end with a new line
Frees a set of #GMimeFormatOptions.
a #GMimeFormatOptions
Gets a string representing the currently set new-line format.
a new-line character sequence.
a #GMimeFormatOptions or %NULL
Gets the new-line format to use when writing out messages and headers.
the new-line format that is currently set.
a #GMimeFormatOptions or %NULL
Gets the parameter encoding method to use for #GMimeParam parameters that do not
already have an encoding method specified.
the encoding method that is currently set.
a #GMimeFormatOptions or %NULL
Gets whether or not the specified header should be hidden.
%TRUE if the header should be hidden or %FALSE otherwise.
a #GMimeFormatOptions or %NULL
the name of a header
Removes the given header from the list of headers that should be hidden.
a #GMimeFormatOptions
a header name
Sets the new-line format that should be used when writing headers and messages.
a #GMimeFormatOptions
a #GMimeNewLineFormat
Sets the parameter encoding method to use when encoding parameters which
do not have an encoding method specified.
Note: #GMIME_PARAM_ENCODING_METHOD_DEFAULT is not allowed.
a #GMimeFormatOptions
a #GMimeParamEncodingMethod
Gets the default format options.
the default format options.
A GnuPG crypto context.
Creates a new gpg crypto context object.
a new gpg crypto context object.
A message or mime-part header.
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a Sender, From, Reply-To, To, Cc, or Bcc header value
a charset (note: unused)
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a Content-Disposition header value
a charset (note: unused)
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a Content-Type header value
a charset (note: unused)
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a header value
a charset to use when encoding the @value
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a Message-Id or Content-Id header value
a charset (note: unused)
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a Received header value
a charset (note: unused)
Parses the @value and then re-formats it to conform to the formatting options,
folding the value if necessary.
a newly allocated string containing the reformatted value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a References or In-Reply-To header value
a charset (note: unused)
Gets the header's name.
the header name or %NULL if invalid.
a #GMimeHeader
Gets the header's stream offset if known.
the header offset or %-1 if unknown.
a #GMimeHeader
Gets the header's raw name. The raw header name is the complete string up to
(but not including) the ':' separating the header's name from its value. This
string may be different from the value returned by g_mime_header_get_name()
if the parsed message's header contained trailing whitespace after the header
name, such as: "Subject : this is the subject\r\n".
the raw header name.
a #GMimeHeader
Gets the header's raw (folded) value.
the header value or %NULL if invalid.
a #GMimeHeader
Gets the header's unfolded value.
the header's decoded value or %NULL if invalid.
a #GMimeHeader
Sets the header's raw value.
a #GMimeHeader
the raw value
Sets the header's decoded value.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
the new header value
a charset
Write the header to the specified stream.
the number of bytes written, or %-1 on fail.
a #GMimeHeader
a #GMimeFormatOptions or %NULL
a #GMimeStream
the name of the header
the unfolded value of the header
A list of message or mime-part headers.
Creates a new #GMimeHeaderList object.
a new header list object.
a #GMimeParserOptions or %NULL
Appends a header. If @value is %NULL, a space will be set aside for it
(useful for setting the order of headers before values can be
obtained for them) otherwise the header will be unset.
a #GMimeHeaderList
header name
header value
a charset
Removes all of the headers from the #GMimeHeaderList.
a #GMimeHeaderList
Checks whether or not a header exists.
%TRUE if the specified header exists or %FALSE otherwise.
a #GMimeHeaderList
header name
Gets the number of headers contained within the header list.
the number of headers in the header list.
a #GMimeHeaderList
Gets the first header with the specified name.
a #GMimeHeader for the specified @name.
a #GMimeHeaderList
header name
Gets the header at the specified @index within the list.
the header at position @index.
a #GMimeHeaderList
the 0-based index of the header
Prepends a header. If @value is %NULL, a space will be set aside
for it (useful for setting the order of headers before values can
be obtained for them) otherwise the header will be unset.
a #GMimeHeaderList
header name
header value
a charset
Remove the first instance of the specified header.
%TRUE if the header was successfully removed or %FALSE if
the specified header could not be found.
a #GMimeHeaderList
header name
Removes the header at the specified @index from @headers.
a #GMimeHeaderList
the 0-based index of the header to remove
Set the value of the specified header. If @value is %NULL and the
header, @name, had not been previously set, a space will be set
aside for it (useful for setting the order of headers before values
can be obtained for them) otherwise the header will be unset.
Note: If there are multiple headers with the specified field name,
the first instance of the header will be replaced and further
instances will be removed.
a #GMimeHeaderList
header name
header value
a charset
Allocates a string buffer containing the raw rfc822 headers
contained in @headers.
a string containing the header block.
a #GMimeHeaderList
a #GMimeFormatOptions or %NULL
Write the headers to a stream.
the number of bytes written or %-1 on fail.
a #GMimeHeaderList
a #GMimeFormatOptions or %NULL
output stream
Function callback for encoding and formatting a header value.
the encoded and formatted raw header value.
a #GMimeHeader
a #GMimeFormatOptions
an unencoded header value
a charset
An RFC 2822 Address object.
Gets the charset to be used when encoding the name of the mailbox or group.
the charset to be used when encoding the name of the
mailbox or group if available or %NULL otherwise.
a #InternetAddress
Gets the display name of the #InternetAddress.
the name of the mailbox or group in a form suitable
for display if available or %NULL otherwise. If the name is available,
the returned string will be in UTF-8.
a #InternetAddress
Set the charset to use for encoding the name of the mailbox or group.
a #InternetAddress
the charset to use when encoding the name or %NULL to use the defaults
Set the display name of the #InternetAddress.
Note: The @name string should be in UTF-8.
a #InternetAddress
the display name for the address group or mailbox
Allocates a string containing the contents of the #InternetAddress
object.
the #InternetAddress object as an allocated string in
rfc822 format.
Internet Address object
a #GMimeFormatOptions or %NULL
%TRUE if the address should be rfc2047 encoded
parent #GObject
the charset used for encoding the name
display name
An RFC 2822 Group address.
Creates a new #InternetAddressGroup object with the specified
@name.
a new #InternetAddressGroup object.
Note: The @name string should be in UTF-8.
group name
Add a contact to the internet address group.
the index of the newly added member.
a #InternetAddressGroup
a #InternetAddress
Gets the #InternetAddressList containing the group members of an
rfc822 group address.
a #InternetAddressList containing the
members of @group.
a #InternetAddressGroup
Set the members of the internet address group.
a #InternetAddressGroup
a #InternetAddressList
parent #InternetAddress
a #InternetAddressList of group members
A collection of #InternetAddress objects.
Creates a new #InternetAddressList.
a new #InternetAddressList.
Construct a list of internet addresses from the given string.
a #InternetAddressList or %NULL if the
input string does not contain any addresses.
a #GMimeParserOptions or %NULL
a string containing internet addresses
Adds an #InternetAddress to the #InternetAddressList.
the index of the added #InternetAddress.
a #InternetAddressList
a #InternetAddress
Adds all of the addresses in @append to @list.
a #InternetAddressList
a #InternetAddressList
Clears the list of addresses.
a #InternetAddressList
Checks whether or not the specified #InternetAddress is contained
within the #InternetAddressList.
%TRUE if the specified #InternetAddress is contained
within the specified #InternetAddressList or %FALSE otherwise.
a #InternetAddressList
a #InternetAddress
Writes the rfc2047-encoded rfc822 formatted addresses in @list to
@str, folding appropriately.
list of internet addresses
a #GMimeFormatOptions or %NULL
string to write to
Gets the #InternetAddress at the specified index.
the #InternetAddress at the specified
index or %NULL if the index is out of range.
a #InternetAddressList
index of #InternetAddress to get
Gets the index of the specified #InternetAddress inside the
#InternetAddressList.
the index of the requested #InternetAddress within the
#InternetAddressList or %-1 if it is not contained within the
#InternetAddressList.
a #InternetAddressList
a #InternetAddress
Inserts an #InternetAddress into the #InternetAddressList at the
specified index.
a #InternetAddressList
index to insert at
a #InternetAddress
Gets the length of the list.
the number of #InternetAddress objects in the list.
a #InternetAddressList
Inserts all of the addresses in @prepend to the beginning of @list.
a #InternetAddressList
a #InternetAddressList
Removes an #InternetAddress from the #InternetAddressList.
%TRUE if the specified #InternetAddress was removed or
%FALSE otherwise.
a #InternetAddressList
a #InternetAddress
Removes an #InternetAddress from the #InternetAddressList at the
specified index.
%TRUE if an #InternetAddress was removed or %FALSE
otherwise.
a #InternetAddressList
index to remove
Sets the #InternetAddress at the specified index to @ia.
a #InternetAddressList
index of #InternetAddress to set
a #InternetAddress
Allocates a string buffer containing the rfc822 formatted addresses
in @list.
a string containing the list of addresses in rfc822
format or %NULL if no addresses are contained in the list.
list of internet addresses
a #GMimeFormatOptions or %NULL
%TRUE if the address should be rfc2047 encoded
parent #GObject
The array of #InternetAddress objects.
An RFC 2822 Mailbox address.
Creates a new #InternetAddress object with the specified @name and
@addr.
a new #InternetAddressMailbox object.
Note: The @name string should be in UTF-8.
person's name
person's address
Gets the addr-spec of the internet address mailbox.
the addr-spec string.
a #InternetAddressMailbox
Gets the IDN ascii-encoded addr-spec.
the encoded addr-spec string.
a #InternetAddressMailbox
Set the mailbox address.
a #InternetAddressMailbox
contact's email address
parent #InternetAddress
the ascii-encoded version of @addr
the address string
the index of the '@' character
A MIME Message object.
If @pretty_headers is %TRUE, then the standard rfc822 headers are
initialized so as to put headers in a nice friendly order. This is
strictly a cosmetic thing, so if you are unsure, it is safe to say
no (%FALSE).
an empty #GMimeMessage object.
make pretty headers
Add a mailbox of a chosen type to the MIME message.
Note: The @name (and @addr) strings should be in UTF-8.
A #GMimeMessage
A #GMimeAddressType
The name of the mailbox (or %NULL)
The address of the mailbox
Recursively calls @callback on each of the mime parts in the mime message.
A #GMimeMessage
function to call on each of the mime parts
contained by the mime message
user-supplied callback data
Gets a list of addresses of the specified @type from the @message.
a list of addresses of the specified
@type from the @message.
A #GMimeMessage
A #GMimeAddressType
Gets the complete list of recipients for @message.
a newly allocated #InternetAddressList
containing all recipients of the message or %NULL if no recipients
are set.
A #GMimeMessage
Creates a new #GMimeAutocryptHeaderList of relevant headers of the
given type based on the recipient(s) of an e-mail message.
Returns the same object as
#g_mime_message_get_autocrypt_gossip_headers_with_inner_part , but
handles decryption and cleanup automatically.
@flags and @session_key are passed through to
#g_mime_multipart_encrypted_decrypt, as needed.
If the message is not actually an encrypted message, returns %NULL:
it should be ignored for purposes of evaluating gossip.
If decryption fails, returns %NULL. In this case, an exception
will be set on @err to provide information about the decryption
failure.
a new #GMimeAutocryptHeaderList object,
or %NULL on error.
a #GMimeMessage object, which is expected to be encrypted.
a #GDateTime object, or %NULL
a #GMimeDecryptFlags, to be used during decryption
session key to use or %NULL
Creates a new #GMimeAutocryptHeaderList of relevant headers of the
given type based on the recipient(s) of an e-mail message.
You must pass the decrypted inner part of the message to this
function, since Autocrypt-Gossip headers are only stored within the
encrypted layer.
If you don't already have the decrypted inner part available to
you, you probably want to use
#g_mime_message_get_autocrypt_gossip_headers instead.
Each header in the returned list will:
- have a valid address
- be of the type requested
- be complete
If no Autocrypt header is found for a recipient, no
#GMimeAutocryptHeader will be in the list associated with that e-mail address.
Note that the following types of Autocrypt headers will not be
returned by this function:
- headers of an unrequested type
- headers that do not match an address in "From:"
- unparseable headers
- headers with unknown critical attributes
- duplicate valid headers for a given address
On error (e.g. if this version of GMime cannot handle the requested
Autocrypt type, or if a parameter is missing or malformed), returns
%NULL
The returned Autocrypt headers will have their effective_date set
to the earliest of either:
- the Date: header of the message or
- @now (or the current time, if @now is %NULL)
a new #GMimeAutocryptHeaderList object,
or %NULL on error.
a #GMimeMessage object.
a #GDateTime object, or %NULL
a #GMimeObject which is the cleartext part of the inner message
Creates a new #GMimeAutocryptHeader based on the relevant Autocrypt
header associated with the sender of an e-mail message.
If the message has no sender in the From: field, or has more than
one sender, then this function will return %NULL. Autocrypt should
ignore the message entirely.
If there is one sender, but no single Autocrypt header is found
that matches that e-mail address, a #GMimeAutocryptHeader will be
returned for the sender, but it will be incomplete (see
#g_mime_autocrypt_header_is_complete).
Note that the following types of Autocrypt headers will not be
returned by this function:
- headers that do not match an address in "From:"
- unparseable headers
- headers with unknown critical attributes
- duplicate valid headers for the sender's address
The returned Autocrypt header will have its effective_date set to
the earliest of either:
- the Date: header of the message or
- @now (or the current time, if @now is %NULL)
a new #GMimeAutocryptHeader object,
or %NULL if the message should be ignored for purposes of
Autocrypt.
a #GMimeMessage object.
a #GDateTime object, or %NULL
Gets combined list of parsed addresses in the Bcc header(s).
the parsed list of addresses in the Bcc header(s).
A #GMimeMessage
Attempts to identify the MIME part containing the body of the
message.
a #GMimeObject containing the textual
content that appears to be the main body of the message, or %NULL if no
body part has been set.
Note: This function is NOT guaranteed to always work as it
makes some assumptions that are not necessarily true. It is
recommended that you traverse the MIME structure yourself.
A #GMimeMessage
Gets combined list of parsed addresses in the Cc header(s).
the parsed list of addresses in the Cc header(s).
A #GMimeMessage
Gets the parsed date and time value from the Date header.
a #GDateTime on success or %NULL if
the date could not be parsed.
A #GMimeMessage
Gets the parsed list of addresses in the From header.
the parsed list of addresses in the From header.
A #GMimeMessage
Gets the Message-Id header of @message.
the Message-Id of a message, or %NULL if not specified.
A #GMimeMessage
Gets the toplevel MIME part contained within @message.
the toplevel MIME part of @message, or
%NULL if none is present.
A #GMimeMessage
Gets the parsed list of addresses in the Reply-To header.
the parsed list of addresses in the Reply-To header.
A #GMimeMessage
Gets the parsed list of addresses in the Sender header.
the parsed list of addresses in the Sender header.
A #GMimeMessage
Gets the subject of the @message.
the subject of the @message in a form suitable for
display or %NULL if no subject is set. If not %NULL, the returned string
will be in UTF-8.
A #GMimeMessage
Gets combined list of parsed addresses in the To header(s).
the parsed list of addresses in the To header(s).
A #GMimeMessage
Splits @message into an array of #GMimeMessage objects each
containing a single #GMimeMessagePartial object containing
@max_size bytes or fewer. @nparts is set to the number of
#GMimeMessagePartial objects created.
an array of #GMimeMessage objects and
sets @nparts to the number of messages returned or %NULL on fail.
message object
max size
number of parts
Sets the Date header on a MIME Message.
A #GMimeMessage
a date to be used in the Date header
Set the Message-Id on a message.
A #GMimeMessage
message-id (addr-spec portion)
Set the root-level MIME part of the message.
A #GMimeMessage
The root-level MIME Part
Set the subject of a @message.
Note: The @subject string should be in UTF-8.
A #GMimeMessage
Subject string
The charset to use for encoding the subject or %NULL to use the default
parent #GMimeObject
a table of address lists
toplevel MIME part
Message-Id string
Date value
Subject string
A message/rfc822 or message/news MIME part.
Creates a new MIME message part object with a default content-type
of message/@subtype.
an empty MIME message part object with a default
content-type of message/@subtype.
message subtype or %NULL for "rfc822"
Creates a new MIME message part object with a default content-type
of message/@subtype containing @message.
a MIME message part object with a default content-type of
message/@subtype containing @message.
message subtype or %NULL for "rfc822"
message
Gets the message object on the message part object @part.
the message part contained within @part.
message part
Sets the @message object on the message part object @part.
message part
message
parent #GMimeObject
child #GMimeMessage
A message/partial MIME part.
Creates a new MIME message/partial object.
an empty MIME message/partial object.
message/partial part id
message/partial part number
total number of message/partial parts
Reconstructs the GMimeMessage from the given message/partial parts
in @partials.
a GMimeMessage object on success or %NULL
on fail.
an array of message/partial mime parts
the number of elements in @partials
Gets the message/partial id parameter value.
the message/partial id or %NULL on fail.
message/partial object
Gets the message/partial part number.
the message/partial part number or %-1 on fail.
message/partial object
Gets the total number of message/partial parts needed to
reconstruct the original message.
the total number of message/partial parts needed to
reconstruct the original message or -1 on fail.
message/partial object
parent #GMimePart object
the part number
the total number of message/partials that make up the whole message/rfc822
message/partial id
A base MIME multipart object.
Creates a new MIME multipart object with a default content-type of
multipart/mixed.
an empty MIME multipart object with a default content-type of
multipart/mixed.
Creates a new MIME multipart object with a content-type of
multipart/@subtype.
an empty MIME multipart object with a content-type of
multipart/@subtype.
content-type subtype
Appends a mime part to @multipart.
a #GMimeMultipart object
a #GMimeObject
Removes all subparts from @multipart.
a #GMimeMultipart object
Checks if @part is contained within @multipart.
%TRUE if @part is a subpart of @multipart or %FALSE
otherwise.
a #GMimeMultipart object
a #GMimeObject
Gets the boundary on the multipart. If the internal boundary is
%NULL, then an auto-generated boundary will be set on the multipart
and returned.
the boundary on the multipart.
a #GMimeMultipart object
Gets the number of parts contained within @multipart.
the number of parts contained within @multipart.
a #GMimeMultipart object
Gets the part at the specified @index within the multipart.
the part at position @index.
a #GMimeMultipart object
the 0-based index of the part
Gets the 0-based index of @part within @multipart.
the 0-based index of @part within @multipart or %-1 if not found.
a #GMimeMultipart object
a #GMimeObject
Inserts @part into @multipart at the specified @index.
a #GMimeMultipart object
the 0-based index to insert the part
a #GMimeObject
Removes the specified @part from @multipart.
%TRUE if the part was removed or %FALSE otherwise.
a #GMimeMultipart object
a #GMimeObject
Removes the part at the specified @index from @multipart.
the mime part that was removed or %NULL
if the part was not contained within the multipart.
a #GMimeMultipart object
the 0-based index of the part to remove
Sets @boundary as the boundary on the multipart. If @boundary is
%NULL, then a boundary will be auto-generated for you.
a #GMimeMultipart object
boundary or %NULL to autogenerate one
Appends a mime part to @multipart.
a #GMimeMultipart object
a #GMimeObject
Removes all subparts from @multipart.
a #GMimeMultipart object
Checks if @part is contained within @multipart.
%TRUE if @part is a subpart of @multipart or %FALSE
otherwise.
a #GMimeMultipart object
a #GMimeObject
Recursively calls @callback on each of @multipart's subparts.
a #GMimeMultipart
function to call for each of @multipart's
subparts.
user-supplied callback data
Gets the boundary on the multipart. If the internal boundary is
%NULL, then an auto-generated boundary will be set on the multipart
and returned.
the boundary on the multipart.
a #GMimeMultipart object
Gets the number of parts contained within @multipart.
the number of parts contained within @multipart.
a #GMimeMultipart object
Gets the epilogue on the multipart.
a pointer to the epilogue string on the multipart.
a #GMimeMultipart object
Gets the part at the specified @index within the multipart.
the part at position @index.
a #GMimeMultipart object
the 0-based index of the part
Gets the prologue on the multipart.
a pointer to the prologue string on the multipart.
a #GMimeMultipart object
Gets the mime part with the content-id @content_id from the
multipart @multipart.
the #GMimeObject whose content-id matches
the search string, or %NULL if a match cannot be found.
a multipart
the content id of the part to look for
Gets the 0-based index of @part within @multipart.
the 0-based index of @part within @multipart or %-1 if not found.
a #GMimeMultipart object
a #GMimeObject
Inserts @part into @multipart at the specified @index.
a #GMimeMultipart object
the 0-based index to insert the part
a #GMimeObject
Removes the specified @part from @multipart.
%TRUE if the part was removed or %FALSE otherwise.
a #GMimeMultipart object
a #GMimeObject
Removes the part at the specified @index from @multipart.
the mime part that was removed or %NULL
if the part was not contained within the multipart.
a #GMimeMultipart object
the 0-based index of the part to remove
Replaces the part at the specified @index within @multipart with
@replacement.
the part that was replaced or %NULL
if the part was not contained within the multipart.
a #GMimeMultipart object
the 0-based index of the part to replace
a #GMimeObject to use as the replacement
Sets @boundary as the boundary on the multipart. If @boundary is
%NULL, then a boundary will be auto-generated for you.
a #GMimeMultipart object
boundary or %NULL to autogenerate one
Sets the epilogue on the multipart.
a #GMimeMultipart object
epilogue
Sets the prologue on the multipart.
a #GMimeMultipart object
prologue
parent #GMimeObject
array of MIME sub-parts
MIME boundary
multipart prologue
multipart epilogue
a #GMimeMultipart object
a #GMimeMultipart object
a #GMimeObject
a #GMimeMultipart object
the 0-based index to insert the part
a #GMimeObject
%TRUE if the part was removed or %FALSE otherwise.
a #GMimeMultipart object
a #GMimeObject
the mime part that was removed or %NULL
if the part was not contained within the multipart.
a #GMimeMultipart object
the 0-based index of the part to remove
the part at position @index.
a #GMimeMultipart object
the 0-based index of the part
%TRUE if @part is a subpart of @multipart or %FALSE
otherwise.
a #GMimeMultipart object
a #GMimeObject
the 0-based index of @part within @multipart or %-1 if not found.
a #GMimeMultipart object
a #GMimeObject
the number of parts contained within @multipart.
a #GMimeMultipart object
a #GMimeMultipart object
boundary or %NULL to autogenerate one
the boundary on the multipart.
a #GMimeMultipart object
A multipart/encrypted MIME part.
Creates a new MIME multipart/encrypted object.
an empty MIME multipart/encrypted object.
Attempts to encrypt (and conditionally sign) the @entity MIME part
to the public keys of @recipients using the @ctx encryption
context. If successful, a new multipart/encrypted object is returned.
a new #GMimeMultipartEncrypted object on success
or %NULL on fail. If encrypting fails, an exception will be set on @err to provide
information as to why the failure occurred.
a #GMimeCryptoContext
MIME part to encrypt
%TRUE if the content should also be signed or %FALSE otherwise
user id to use for signing (only used if @sign is %TRUE)
a #GMimeEncryptFlags
an array of recipients to encrypt to
Attempts to decrypt the encrypted MIME part contained within the
multipart/encrypted object @encrypted.
When non-%NULL, @session_key should be a %NULL-terminated string,
such as the one returned by g_mime_decrypt_result_get_session_key()
from a previous decryption. If the @session_key is not valid, decryption
will fail.
If @result is non-%NULL, then on a successful decrypt operation, it will be
updated to point to a newly-allocated #GMimeDecryptResult with signature
status information as well as a list of recipients that the part was
encrypted to.
the decrypted MIME part on success or
%NULL on fail. If the decryption fails, an exception will be set on
@err to provide information as to why the failure occurred.
a #GMimeMultipartEncrypted
a #GMimeDecryptFlags
session key to use or %NULL
a #GMimeDecryptResult
parent #GMimeMultipart
A multipart/signed MIME part.
Creates a new MIME multipart/signed object.
an empty MIME multipart/signed object.
Attempts to sign the @content MIME part with @userid's private key
using the @ctx signing context. If successful, a new multipart/signed
object is returned.
a new #GMimeMultipartSigned object on success
or %NULL on fail. If signing fails, an exception will be set on @err to provide
information as to why the failure occurred.
a #GMimeCryptoContext
MIME part to sign
user id to sign with
Attempts to verify the signed MIME part contained within the
multipart/signed object @mps.
a new #GMimeSignatureList object on
success or %NULL on fail. If the verification fails, an exception
will be set on @err to provide information as to why the failure
occurred.
a #GMimeMultipartSigned
a #GMimeVerifyFlags
parent #GMimeMultipart
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.
The Unix New-Line format ("\n").
The DOS New-Line format ("\r\n").
Base class for all MIME parts.
Performs a lookup of registered #GMimeObject subclasses, registered
using g_mime_object_register_type(), to find an appropriate class
capable of handling MIME parts of the specified Content-Type. If no
class has been registered to handle that type, it looks for a
registered class that can handle @content_type's media type. If
that also fails, then it will use the generic part class,
#GMimePart.
an appropriate #GMimeObject registered to handle MIME
parts appropriate for @content_type.
a #GMimeParserOptions or %NULL
a #GMimeContentType object
Performs a lookup of registered #GMimeObject subclasses, registered
using g_mime_object_register_type(), to find an appropriate class
capable of handling MIME parts of type @type/@subtype. If no class
has been registered to handle that type, it looks for a registered
class that can handle @type. If that also fails, then it will use
the generic part class, #GMimePart.
an appropriate #GMimeObject registered to handle mime-types
of @type/@subtype.
a #GMimeParserOptions or %NULL
mime type
mime subtype
Registers the object type @object_type for use with the
g_mime_object_new_type() convenience function.
Note: You may use the wildcard "*" to match any type and/or
subtype.
mime type
mime subtype
object type
Calculates and sets the most efficient Content-Transfer-Encoding
for this #GMimeObject and all child parts based on the @constraint
provided.
a #GMimeObject
a #GMimeEncodingConstraint
Allocates a string buffer containing all of the MIME object's raw
headers.
an allocated string containing all of the raw MIME headers.
Note: The returned string will not be suitable for display.
a #GMimeObject
a #GMimeFormatOptions or %NULL
Sets the content-type for the specified MIME object and then
serializes it to the Content-Type header field.
a #GMimeObject
a #GMimeContentType object
Appends a new header to the header list.
a #GMimeObject
header name
header value
a charset
Calculates and sets the most efficient Content-Transfer-Encoding
for this #GMimeObject and all child parts based on the @constraint
provided.
a #GMimeObject
a #GMimeEncodingConstraint
Gets the #GMimeContentDisposition for the specified MIME object.
the #GMimeContentDisposition set on the
MIME object.
a #GMimeObject
Gets the value of the Content-Disposition parameter specified by
@name, or %NULL if the parameter does not exist.
the value of the requested content-disposition param or
%NULL if the param doesn't exist. If the param is set, the returned
string will be in UTF-8.
a #GMimeObject
parameter name
Gets the Content-Id of the MIME object or NULL if one is not set.
a const pointer to the Content-Id header.
a #GMimeObject
Gets the #GMimeContentType object for the given MIME object or
%NULL on fail.
the content-type object for the specified
MIME object.
a #GMimeObject
Gets the value of the content-type param @name set on the MIME part
@object.
the value of the requested content-type param or %NULL if
the param doesn't exist. If the param is set, the returned string
will be in UTF-8.
a #GMimeObject
param name
Gets the MIME object's disposition if set or %NULL otherwise.
the disposition string which is probably one of
#GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE.
a #GMimeObject
Gets the value of the first header with the specified name.
the value of the requested header if it
exists or %NULL otherwise.
a #GMimeObject
header name
Get the header list for @object.
the #GMimeHeaderList for @object. Do not
free this pointer when you are done with it.
a #GMimeObject
Allocates a string buffer containing all of the MIME object's raw
headers.
an allocated string containing all of the raw MIME headers.
Note: The returned string will not be suitable for display.
a #GMimeObject
a #GMimeFormatOptions or %NULL
Prepends a new header to the header list.
a #GMimeObject
header name
header value
a charset
Removed the specified header if it exists.
%TRUE if the header was removed or %FALSE if it could not
be found.
a #GMimeObject
header name
Set the content disposition for the specified mime part and then
serializes it to the Content-Disposition header field.
a #GMimeObject
a #GMimeContentDisposition object
Add a content-disposition parameter to the specified mime part.
Note: The @name string should be in US-ASCII while the @value
string should be in UTF-8.
a #GMimeObject
parameter name
parameter value
Sets the Content-Id of the MIME object.
a #GMimeObject
content-id (addr-spec portion)
Sets the content-type for the specified MIME object and then
serializes it to the Content-Type header field.
a #GMimeObject
a #GMimeContentType object
Sets the content-type param @name to the value @value.
Note: The @name string should be in US-ASCII while the @value
string should be in UTF-8.
a #GMimeObject
param name
param value
Sets the disposition to @disposition which may be one of
#GMIME_DISPOSITION_ATTACHMENT or #GMIME_DISPOSITION_INLINE or, by
your choice, any other string which would indicate how the MIME
part should be displayed by the MUA.
a #GMimeObject
disposition ("attachment" or "inline")
Sets a header to the specified value.
a #GMimeObject
header name
header value
a charset
Allocates a string buffer containing the contents of @object.
an allocated string containing the contents of the mime
object.
a #GMimeObject
a #GMimeFormatOptions or %NULL
Write only the content of the MIME object to @stream.
the number of bytes written or %-1 on fail.
a #GMimeObject
a #GMimeFormatOptions or %NULL
stream
Write the headers and content of the MIME object to @stream.
the number of bytes written or %-1 on fail.
a #GMimeObject
a #GMimeFormatOptions or %NULL
stream
parent #GObject
a #GMimeContentDisposition
a #GMimeContentType
a #GMimeHeaderList
a Content-Id
a #GMimeObject
a #GMimeContentType object
an allocated string containing all of the raw MIME headers.
Note: The returned string will not be suitable for display.
a #GMimeObject
a #GMimeFormatOptions or %NULL
a #GMimeObject
a #GMimeEncodingConstraint
The function signature for a callback to g_mime_message_foreach()
and g_mime_multipart_foreach().
parent #GMimeObject
a #GMimeObject
User-supplied callback data.
The type of OpenPGP data found, if any.
No OpenPGP data found.
The content contains OpenPGP encrypted data.
The content contains OpenPGP signed data.
The content contains OpenPGP public key data.
The content contains OpenPGP private key data.
An OpenPGP marker for use with GMime's internal state machines used for detecting OpenPGP blocks.
The OpenPGP marker.
The length of the OpenPGP marker.
The #GMimeOpenPGPState that the state machine must be in before encountering this marker.
The #GMimeOpenPGPState that the state machine will transition into once this marker is found.
%TRUE if the marker is an end marker; otherwise, %FALSE.
The current state of the #GMimeFilterOpenPGP filter.
No OpenPGP markers have been found (yet).
The "-----BEGIN PGP MESSAGE-----" marker has been found.
The "-----END PGP MESSAGE-----" marker has been found.
The "-----BEGIN PGP SIGNED MESSAGE-----" marker has been found.
The "-----BEGIN PGP SIGNATURE-----" marker has been found.
The "-----END PGP SIGNATURE-----" marker has been found.
The "-----BEGIN PGP PUBLIC KEY BLOCK-----" marker has been found.
The "-----END PGP PUBLIC KEY BLOCK-----" marker has been found.
The "-----BEGIN PGP PRIVATE KEY BLOCK-----" marker has been found.
The "-----END PGP PRIVATE KEY BLOCK-----" marker has been found.
A parameter name/value pair as used in the Content-Type and Content-Disposition headers.
Gets the charset used for encoding the parameter.
the charset used for encoding the parameter.
a #GMimeParam
Gets the encoding method used for encoding the parameter.
the encoding method used for encoding the parameter.
a #GMimeParam
Gets the language specifier used for encoding the parameter.
the language specifier used for encoding the parameter.
a #GMimeParam
Gets the name of the parameter.
the name of the parameter.
a #GMimeParam
Gets the value of the parameter.
the value of the parameter.
a #GMimeParam
Sets the parameter charset used for encoding the value.
a #GMimeParam
the charset or %NULL to use the default
Sets the encoding method used for encoding the value.
a #GMimeParam
a #GMimeParamEncodingMethod
Sets the parameter language specifier used for encoding the value.
a #GMimeParam
the language specifier
Sets the parameter value to @value.
a #GMimeParam
the new parameter value
The encoding method used for the parameter value.
The charset to use when encoding the parameter value.
the language specifier to use when encoding the value.
The parameter name.
The parameter value.
The MIME specifications specify that the proper method for encoding Content-Type and
Content-Disposition parameter values is the method described in
<a href="https://tools.ietf.org/html/rfc2231">rfc2231</a>. However, it is common for
some older email clients to improperly encode using the method described in
<a href="https://tools.ietf.org/html/rfc2047">rfc2047</a> instead.
Use the default encoding method set on the #GMimeFormatOptions.
Use the encoding method described in rfc2231.
Use the encoding method described in rfc2047.
A list of Content-Type or Content-Disposition parameters.
Creates a new Content-Type or Content-Disposition parameter list.
a new #GMimeParamList.
Parses the input string into a parameter list.
a new #GMimeParamList.
a #GMimeParserOptions or %NULL
a string to parse
Clears the list of parameters.
a #GMimeParamList
Encodes the parameter list into @str, folding lines if required.
a #GMimeParamList
a #GMimeFormatOptions or %NULL
%TRUE if the parameter list should be folded; otherwise, %FALSE
the output string buffer
Gets the #GMimeParam with the given @name.
the requested #GMimeParam.
list: a #GMimeParamList
the name of the parameter
Gets the #GMimeParam at the specified @index.
the #GMimeParam at the specified index.
a #GMimeParamList
the index of the requested parameter
Gets the length of the list.
the number of #GMimeParam items in the list.
a #GMimeParamList
Removes a parameter from the #GMimeParamList.
%TRUE if the specified parameter was removed or %FALSE otherwise.
a #GMimeParamList
the name of the parameter
Removes a #GMimeParam from the #GMimeParamList at the specified index.
%TRUE if a #GMimeParam was removed or %FALSE otherwise.
a #GMimeParamList
index of the param to remove
Sets the specified parameter to @value.
a #GMimeParamList
The name of the parameter
The parameter value
A MIME parser context.
Creates a new parser object.
a new parser object.
Creates a new parser object preset to parse @stream.
a new parser object.
raw message or part stream
Constructs a MIME message from @parser.
a MIME message or %NULL on fail.
a #GMimeParser context
a #GMimeParserOptions or %NULL
Constructs a MIME part from @parser.
a MIME part based on @parser or %NULL on
fail.
a #GMimeParser context
a #GMimeParserOptions or %NULL
Tests the end-of-stream indicator for @parser's internal stream.
%TRUE on EOS or %FALSE otherwise.
a #GMimeParser context
Gets the format that the parser is set to parse.
the format that the parser is set to parse.
a #GMimeParser context
Gets the stream offset of the beginning of the headers of the most
recently parsed message.
the offset of the beginning of the headers of the most
recently parsed message or %-1 on error.
a #GMimeParser context
Gets the stream offset of the end of the headers of the most
recently parsed message.
the offset of the end of the headers of the most recently
parsed message or %-1 on error.
a #GMimeParser context
Gets the mbox-style From-line of the most recently parsed message
(gotten from g_mime_parser_construct_message()).
the mbox-style From-line of the most recently parsed
message or %NULL on error.
a #GMimeParser context
Gets the offset of the most recently parsed mbox-style From-line
(gotten from g_mime_parser_construct_message()).
the offset of the most recently parsed mbox-style From-line
or %-1 on error.
a #GMimeParser context
Gets whether or not the underlying stream is persistent.
%TRUE if the @parser will leave the content on disk or
%FALSE if it will load the content into memory.
a #GMimeParser context
Gets whether or not @parser is set to use Content-Length for
determining the offset of the end of the message.
whether or not @parser is set to use Content-Length for
determining the offset of the end of the message.
a #GMimeParser context
Initializes @parser to use @stream.
WARNING: Initializing a parser with a stream is comparable to
selling your soul (@stream) to the devil (@parser). You are
basically giving the parser complete control of the stream, this
means that you had better not touch the stream so long as the
parser is still using it. This means no reading, writing, seeking,
or resetting of the stream. Anything that will/could change the
current stream's offset is PROHIBITED.
It is also recommended that you not use g_mime_stream_tell()
because it will not necessarily give you the current @parser offset
since @parser handles its own internal read-ahead buffer. Instead,
it is recommended that you use g_mime_parser_tell() if you have a
reason to need the current offset of the @parser.
a #GMimeParser context
raw message or part stream
Sets the format that the parser should expect the stream to be in.
a #GMimeParser context
a #GMimeFormat
Sets the regular expression pattern @regex on @parser. Whenever a
header matching the pattern @regex is parsed, @header_cb is called
with @user_data as the user_data argument.
If @regex is %NULL, then the previously registered regex callback
is unregistered and no new callback is set.
a #GMimeParser context
regular expression
callback function
user data
Sets whether or not the @parser's underlying stream is persistent.
If @persist is %TRUE, the @parser will attempt to construct
messages/parts whose content will remain on disk rather than being
loaded into memory so as to reduce memory usage. This is the default.
If @persist is %FALSE, the @parser will always load message content
into memory.
Note: This attribute only serves as a hint to the @parser. If the
underlying stream does not support seeking, then this attribute
will be ignored.
By default, this feature is enabled if the underlying stream is seekable.
a #GMimeParser context
persist attribute
Sets whether or not @parser should respect Content-Length headers
when deciding where to look for the start of the next message. Only
used when the parser is also set to scan for From-lines.
Most notably useful when parsing broken Solaris mbox files (See
http://www.jwz.org/doc/content-length.html for details).
By default, this feature is disabled.
a #GMimeParser context
%TRUE if the parser should use Content-Length headers or %FALSE otherwise.
Gets the current stream offset from the parser's internal stream.
the current stream offset from the parser's internal stream
or %-1 on error.
a #GMimeParser context
parent #GObject
private parser state
Function signature for the callback to
g_mime_parser_set_header_regex().
The #GMimeParser object.
The header field matched.
The header field value.
The header field offset.
The user-supplied callback data.
A set of parser options used by #GMimeParser and various other parsing functions.
Creates a new set of #GMimeParserOptions.
a newly allocated set of #GMimeParserOptions with the default values.
Clones a #GMimeParserOptions.
a newly allocated #GMimeParserOptions.
a #GMimeParserOptions or %NULL
Frees a set of #GMimeParserOptions.
a #GMimeParserOptions
Gets the compliance mode that should be used when parsing rfc822 addresses.
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the address parser is fairly liberal in
what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to
deal with garbage input.
the compliance mode that is currently set.
a #GMimeParserOptions or %NULL
Gets whether or not the rfc822 address parser should allow addresses without a domain.
In general, you'll probably want this value to be %FALSE (the default) as it allows
maximum interoperability with existing (broken) mail clients and other mail software
such as sloppily written perl scripts (aka spambots) that do not properly quote the
name when it contains a comma.
This option exists in order to allow parsing of mailbox addresses that do not have a
domain component. These types of addresses are rare and were typically only used when
sending mail to other users on the same UNIX system.
%TRUE if the address parser should allow addresses without a domain.
a #GMimeParserOptions or %NULL
Gets the fallback charsets to try when decoding 8-bit headers.
a %NULL-terminated list of charsets to try when
decoding 8-bit headers.
a #GMimeParserOptions or %NULL
Gets the compliance mode that should be used when parsing Content-Type and
Content-Disposition parameters.
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal
in what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder
to deal with garbage input.
the compliance mode that is currently set.
a #GMimeParserOptions or %NULL
Gets the compliance mode that should be used when parsing rfc2047 encoded words.
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the rfc2047 parser is fairly liberal
in what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder
to deal with garbage input.
the compliance mode that is currently set.
a #GMimeParserOptions or %NULL
Gets callback function which is called if the parser detects any issues.
the currently registered warning callback function
a #GMimeParserOptions or %NULL
Sets the compliance mode that should be used when parsing rfc822 addresses.
In general, you'll probably want this value to be #GMIME_RFC_COMPLIANCE_LOOSE
(the default) as it allows maximum interoperability with existing (broken) mail clients
and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the address parser is fairly liberal in
what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder to
deal with garbage input.
a #GMimeParserOptions
a #GMimeRfcComplianceMode
Sets whether the rfc822 address parser should allow addresses without a domain.
In general, you'll probably want this value to be %FALSE (the default) as it allows
maximum interoperability with existing (broken) mail clients and other mail software
such as sloppily written perl scripts (aka spambots) that do not properly quote the
name when it contains a comma.
This option exists in order to allow parsing of mailbox addresses that do not have a
domain component. These types of addresses are rare and were typically only used when
sending mail to other users on the same UNIX system.
a #GMimeParserOptions
%TRUE if the parser should allow addresses without a domain or %FALSE otherwise
Sets the fallback charsets to try when decoding 8-bit headers.
Note: It is recommended that the list of charsets start with utf-8
and end with iso-8859-1.
a #GMimeParserOptions
a %NULL-terminated list of charsets or %NULL for the default list
Sets the compliance mode that should be used when parsing Content-Type and
Content-Disposition parameters.
In general, you'll probably want this value to be #GMIME_RFC_COMPLIANCE_LOOSE
(the default) as it allows maximum interoperability with existing (broken) mail clients
and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal
in what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder
to deal with garbage input.
a #GMimeParserOptions
a #GMimeRfcComplianceMode
Sets the compliance mode that should be used when parsing rfc2047 encoded words.
In general, you'll probably want this value to be #GMIME_RFC_COMPLIANCE_LOOSE
(the default) as it allows maximum interoperability with existing (broken) mail clients
and other mail software such as sloppily written perl scripts (aka spambots).
Note: Even in #GMIME_RFC_COMPLIANCE_STRICT mode, the parameter parser is fairly liberal
in what it accepts. Setting it to #GMIME_RFC_COMPLIANCE_LOOSE just makes it try harder
to deal with garbage input.
a #GMimeParserOptions
a #GMimeRfcComplianceMode
Registers the callback function being called if the parser detects any issues.
a #GMimeParserOptions
a #GMimeParserWarningFunc or %NULL to clear the callback
data passed to the warning callback function
Gets the default parser options.
the default parser options.
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.
Repeated exactly the same header which should exist only once.
Repeated exactly the same header parameter.
A header contains unencoded 8-bit characters.
Invalid content type, assuming `application/octet-stream`.
Invalid RFC 2047 encoded header value.
No child parts detected within a multipart.
The message is truncated.
The message is malformed.
Invalid header name, the parser may skip the message or parts of it.
Conflicting header.
Conflicting header parameter.
A multipart lacks the required boundary parameter.
Invalid header parameter.
Invalid address list.
The maximum MIME nesting level has been exceeded. This is very likely to be an attempt to exploit the MIME parser.
A MIME part's headers were terminated by a boundary marker.
A MIME part was encountered without any headers -or- content. This is very likely to be an attempt to exploit the MIME parser.
The function signature for a callback to g_mime_parser_options_set_warning_callback().
parser offset where the issue has been detected, or -1 if it is unknown
a #GMimeParserWarning
a NUL-terminated string containing the value causing the issue, may be %NULL
User-supplied callback data.
A leaf-node MIME part object.
Creates a new MIME Part object with a default content-type of
application/octet-stream.
an empty MIME Part object with a default content-type of
application/octet-stream.
Creates a new MIME Part with a sepcified type.
an empty MIME Part object with the specified content-type.
content-type string
content-subtype string
Sets the content on the mime part.
a #GMimePart object
a #GMimeDataWrapper content object
Calculates the most efficient content encoding for the @mime_part
given the @constraint.
the best content encoding for the specified mime part.
a #GMimePart object
a #GMimeEncodingConstraint
Gets the internal data-wrapper of the specified mime part, or %NULL
on error.
the data-wrapper for the mime part's
contents.
a #GMimePart object
Gets the value of the Content-Description for the specified mime
part if it exists or %NULL otherwise.
the content description for the specified mime part.
a #GMimePart object
Gets the content encoding of the mime part.
the content encoding for the specified mime part.
a #GMimePart object
Gets the content-id of the specified mime part if it exists, or
%NULL otherwise.
the content id for the specified mime part.
a #GMimePart object
Gets the value of the Content-Location header if it exists, or
%NULL otherwise.
the content location for the specified mime part.
a #GMimePart object
Gets the md5sum contained in the Content-Md5 header of the
specified mime part if it exists, or %NULL otherwise.
the content md5 for the specified mime part.
a #GMimePart object
Gets the filename of the specificed mime part, or %NULL if the
@mime_part does not have the filename or name parameter set.
the filename of the specified @mime_part or %NULL if
neither of the parameters is set. If a file name is set, the
returned string will be in UTF-8.
a #GMimePart object
Gets whether or not (and what type) of OpenPGP data is contained
within the #GMimePart.
a #GMimeOpenPGPData.
a #GMimePart
Determines whether or not the part is an attachment based on the
value of the Content-Disposition header.
%TRUE if the part is an attachment, otherwise %FALSE.
a #GMimePart object
Decrypts the content of the @mime_part and then replaces the content with
the new, decrypted, content.
a #GMimeDecryptResult on success or %NULL on error.
a #GMimePart
a set of #GMimeDecryptFlags
the session key to use or %NULL
Encrypts (and optionally signs) the content of the @mime_part and then replaces
the content with the new, encrypted, content.
%TRUE on success or %FALSE on error.
a #GMimePart
%TRUE if the content should also be signed; otherwise, %FALSE
the key id (or email address) to use when signing (assuming @sign is %TRUE)
a set of #GMimeEncryptFlags
an array of recipient key ids and/or email addresses
Signs the content of the @mime_part and then replaces the content with
the new, signed, content.
%TRUE on success or %FALSE on error.
a #GMimePart
the key id (or email address) to use for signing
Verifies the OpenPGP signature of the @mime_part and then replaces the content
with the original, raw, content.
a #GMimeSignatureList on success or %NULL on error.
a #GMimePart
a set of #GMimeVerifyFlags
Sets the content on the mime part.
a #GMimePart object
a #GMimeDataWrapper content object
Set the content description for the specified mime part.
a #GMimePart object
content description
Set the content encoding for the specified mime part.
a #GMimePart object
a #GMimeContentEncoding
Set the content id for the specified mime part.
a #GMimePart object
content id
Set the content location for the specified mime part.
a #GMimePart object
content location
Set the content md5 for the specified mime part.
a #GMimePart object
content md5 or %NULL to generate the md5 digest.
Sets the "filename" parameter on the Content-Disposition and also sets the
"name" parameter on the Content-Type.
Note: The @filename string should be in UTF-8.
a #GMimePart object
the file name
Sets whether or not (and what type) of OpenPGP data is contained
within the #GMimePart.
a #GMimePart
a #GMimeOpenPGPData
Verify the content md5 for the specified mime part.
%TRUE if the md5 is valid or %FALSE otherwise. Note: will
return %FALSE if the mime part does not contain a Content-MD5.
a #GMimePart object
parent #GMimeObject
a #GMimeContentEncoding
a #GMimeOpenPGPData
Content-Description string
Content-Location string
Content-MD5 string
a #GMimeDataWrapper representing the MIME part's content
a #GMimePart object
a #GMimeDataWrapper content object
A MIME part iterator.
Creates a new #GMimePartIter for iterating over @toplevel's subparts.
a newly allocated #GMimePartIter which should be freed
using g_mime_part_iter_free() when finished with it.
a #GMimeObject to use as the toplevel
Clones the @iter, including its current state.
a new #GMimePartIter that is identical to @iter.
a #GMimePartIter
Frees the memory allocated by g_mime_part_iter_new().
a #GMimePartIter
Gets the #GMimeObject at the current #GMimePartIter position.
the current #GMimeObject or %NULL if the
state of @iter is invalid.
a #GMimePartIter
Gets the parent of the #GMimeObject at the current #GMimePartIter
position.
the parent #GMimeObject or %NULL if the
state of @iter is invalid.
a #GMimePartIter
Gets the path of the current #GMimeObject in the MIME structure
used to initialize @iter.
a newly allocated string representation of the path to the
#GMimeObject at the current #GMimePartIter position.
a #GMimePartIter
Gets the toplevel #GMimeObject used to initialize @iter.
the toplevel #GMimeObject.
a #GMimePartIter
Checks that the current state of @iter is valid.
%TRUE if @iter is valid or %FALSE otherwise.
a #GMimePartIter
Updates the state of @iter to point to the #GMimeObject specified
by @path.
%TRUE if the #GMimeObject specified by @path exists or
%FALSE otherwise.
a #GMimePartIter
a string representing the path to jump to
Advances to the next part in the MIME structure used to initialize
@iter.
%TRUE if successful or %FALSE otherwise.
a #GMimePartIter
Rewinds to the previous part in the MIME structure used to
initialize @iter.
%TRUE if successful or %FALSE otherwise.
a #GMimePartIter
Removes the #GMimeObject at the current position from its
parent. If successful, @iter is advanced to the next position
(since the current position will become invalid).
%TRUE if the part at the current position was removed or
%FALSE otherwise.
a #GMimePartIter
Replaces the #GMimeObject at the current position with @replacement.
%TRUE if the part at the current position was replaced or
%FALSE otherwise.
a #GMimePartIter
a #GMimeObject
Resets the state of @iter to its initial state.
a #GMimePartIter
A password request callback allowing a #GMimeCryptoContext to
prompt the user for a password for a given key.
%TRUE on success or %FALSE on error.
the #GMimeCryptoContext making the request
the user_id of the password being requested
a string containing some helpful context for the prompt
%TRUE if this password request is a reprompt due to a previously bad password response
a stream for the application to write the password to (followed by a newline '\n' character)
A PKCS7 crypto context.
Creates a new pkcs7 crypto context object.
a new pkcs7 crypto context object.
A public-key algorithm.
The default public-key algorithm.
The RSA algorithm.
An encryption-only RSA algorithm.
A signature-only RSA algorithm.
An encryption-only ElGamal algorithm.
The DSA algorithm.
The Eliptic Curve algorithm.
The ElGamal algorithm.
The Eliptic Curve + DSA algorithm.
The Eliptic Curve + Diffie Helman algorithm.
The Eliptic Curve + DSA algorithm.
Calculates the maximum number of bytes needed to encode the full
input buffer of length @x using the quoted-printable encoding.
Length of the input data to encode
A List of references, as per the References or In-Reply-To header
fields.
the array of message-id references
Creates a new #GMimeReferences.
a new #GMimeReferences.
Appends a reference to msgid to the list of references.
a #GMimeReferences
a message-id string
Clears the #GMimeReferences list.
a #GMimeReferences
Copies a #GMimeReferences list.
a new #GMimeReferences list that contains
an identical list of items as @refs.
the list of references to copy
Frees the #GMimeReferences list.
a #GMimeReferences list
Gets the specified Message-Id reference from the #GMimeReferences.
the Message-Id reference from the #GMimeReferences.
a #GMimeReferences
the index of the message id
Gets the length of the #GMimeReferences list.
the number of message ids in the list.
a #GMimeReferences
Sets the specified Message-Id reference from the #GMimeReferences.
a #GMimeReferences
the index of the message id
the message id
Decodes a list of msg-ids as in the References and/or In-Reply-To
headers defined in rfc822.
a new #GMimeReferences containing the parsed message ids.
a #GMimeParserOptions or %NULL
string containing a list of msg-ids
An RFC compliance mode.
Attempt to be much more liberal accepting broken and/or invalid formatting.
Do not attempt to be overly liberal in accepting broken and/or invalid formatting.
A convenience macro for masking out the non-error bit flags.
The S/MIME data type.
The S/MIME content contains compressed data.
The S/MIME content contains enveloped data.
The S/MIME content contains signed data.
The S/MIME content contains only certificates.
The S/MIME content is unknown.
Relative seek position.
Seek relative to the beginning of the stream.
Seek relative to the current position in the stream.
Seek relative to the end of the stream.
An object containing useful information about a signature.
Creates a new #GMimeSignature object.
a new #GMimeSignature object.
Get the signature's certificate.
the signature's certificate.
a #GMimeSignature
Get the creation date of the signature.
the creation date of the signature or %-1 if unknown.
a #GMimeSignature
Get the creation date of the signature in seconds since the UNIX
epoch, represented as a 64-bit signed integer.
the creation date of the signature or %-1 if unknown.
a #GMimeSignature
Get the expiration date of the signature. A value of %0 means the signature never expires.
the expiration date of the signature or %-1 if unknown.
a #GMimeSignature
Get the expiration date of the signature in seconds since the UNIX
epoch, represented as a 64-bit signed integer. A value of %0 means
the signature never expires.
the expiration date of the signature or %-1 if unknown.
a #GMimeSignature
Get the signature status as a bitfield of #GMimeSignatureStatus flags.
the signature status.
a #GMimeSignature
Set the signature's certificate.
a #GMimeSignature
a #GMimeCertificate
Set the creation date of the signature.
a #GMimeSignature
creation date
Set the expiration date of the signature. A value of %0 means the signature never expires.
a #GMimeSignature
expiration date
Set the status on the signature.
a #GMimeSignature
a #GMimeSignatureStatus
parent #GObject
A bitfield of #GMimeSignatureStatus values.
The #GMimeCertificate used in the signature.
The creation date of the signature.
The expiration date of the signature.
A collection of #GMimeSignature objects.
Creates a new #GMimeSignatureList.
a new #GMimeSignatureList.
Adds a #GMimeSignature to the #GMimeSignatureList.
the index of the added #GMimeSignature.
a #GMimeSignatureList
a #GMimeSignature
Clears the list of addresses.
a #GMimeSignatureList
Checks whether or not the specified #GMimeSignature is contained within
the #GMimeSignatureList.
%TRUE if the specified #GMimeSignature is contained within the
specified #GMimeSignatureList or %FALSE otherwise.
a #GMimeSignatureList
a #GMimeSignature
Gets the #GMimeSignature at the specified index.
the #GMimeSignature at the specified
index or %NULL if the index is out of range.
a #GMimeSignatureList
index of #GMimeSignature to get
Gets the index of the specified #GMimeSignature inside the
#GMimeSignatureList.
the index of the requested #GMimeSignature within the
#GMimeSignatureList or %-1 if it is not contained within the
#GMimeSignatureList.
a #GMimeSignatureList
a #GMimeSignature
Inserts a #GMimeSignature into the #GMimeSignatureList at the specified
index.
a #GMimeSignatureList
index to insert at
a #GMimeSignature
Gets the length of the list.
the number of #GMimeSignature objects in the list.
a #GMimeSignatureList
Removes a #GMimeSignature from the #GMimeSignatureList.
%TRUE if the specified #GMimeSignature was removed or %FALSE
otherwise.
a #GMimeSignatureList
a #GMimeSignature
Removes a #GMimeSignature from the #GMimeSignatureList at the specified
index.
%TRUE if an #GMimeSignature was removed or %FALSE otherwise.
a #GMimeSignatureList
index to remove
Sets the #GMimeSignature at the specified index to @sig.
a #GMimeSignatureList
index of #GMimeSignature to set
a #GMimeSignature
parent #GObject
A value representing the signature status bit flags for a particular
#GMimeSignature.
The signature is fully valid.
The signature is good.
The signature is bad.
The key has been revoked.
The key has expired.
The signature has expired.
Can't verify due to missing key.
CRL not available.
Available CRL is too old.
A policy was not met.
A system error occurred.
Tofu conflict detected.
Abstract I/O stream class.
Closes the stream.
%0 on success or %-1 on fail.
a #GMimeStream
Tests the end-of-stream indicator for @stream.
%TRUE on EOS or %FALSE otherwise.
a #GMimeStream
Sync's the stream to disk.
%0 on success or %-1 on fail.
a #GMimeStream
Gets the length of the stream.
the length of the stream or %-1 if unknown.
a #GMimeStream
Attempts to read up to @len bytes from @stream into @buf.
the number of bytes read or %-1 on fail.
a #GMimeStream
buffer
buffer length
Resets the stream.
%0 on success or %-1 on fail.
a #GMimeStream
Repositions the offset of the stream @stream to
the argument @offset according to the
directive @whence as follows:
#GMIME_STREAM_SEEK_SET: Seek @offset bytes relative to
the beginning (bound_start) of the stream.
#GMIME_STREAM_SEEK_CUR: Seek @offset bytes relative to the
current offset of the stream.
#GMIME_STREAM_SEEK_END: Seek @offset bytes relative to the
end of the stream (bound_end if non-negative).
the resultant position on success or %-1 on fail.
a #GMimeStream
positional offset
seek directive
Creates a new substream of @stream with bounds @start and @end.
a substream of @stream with bounds @start
and @end.
a #GMimeStream
start boundary
end boundary
Gets the current offset within the stream.
the current position within the stream or %-1 on fail.
a #GMimeStream
Attempts to write up to @len bytes of @buf to @stream.
the number of bytes written or %-1 on fail.
a #GMimeStream
buffer
buffer length
Reads in at most one less than @max characters from @stream and
stores them into the buffer pointed to by @buf. Reading stops after
an EOS or newline ('\n'). If a newline is read, it is stored into
the buffer. A '\0' is stored after the last character in the
buffer.
the number of characters read into @buf on success or %-1
on fail.
stream
line buffer
max length of a line
Reads a single line into @buffer.
stream
output buffer
Closes the stream.
%0 on success or %-1 on fail.
a #GMimeStream
Initializes a new stream with bounds @start and @end.
a #GMimeStream
start boundary
end boundary
Tests the end-of-stream indicator for @stream.
%TRUE on EOS or %FALSE otherwise.
a #GMimeStream
Sync's the stream to disk.
%0 on success or %-1 on fail.
a #GMimeStream
Gets the length of the stream.
the length of the stream or %-1 if unknown.
a #GMimeStream
Write formatted output to a stream.
the number of bytes written or %-1 on fail.
a #GMimeStream
format
arguments
Attempts to read up to @len bytes from @stream into @buf.
the number of bytes read or %-1 on fail.
a #GMimeStream
buffer
buffer length
Resets the stream.
%0 on success or %-1 on fail.
a #GMimeStream
Repositions the offset of the stream @stream to
the argument @offset according to the
directive @whence as follows:
#GMIME_STREAM_SEEK_SET: Seek @offset bytes relative to
the beginning (bound_start) of the stream.
#GMIME_STREAM_SEEK_CUR: Seek @offset bytes relative to the
current offset of the stream.
#GMIME_STREAM_SEEK_END: Seek @offset bytes relative to the
end of the stream (bound_end if non-negative).
the resultant position on success or %-1 on fail.
a #GMimeStream
positional offset
seek directive
Set the bounds on a stream.
a #GMimeStream
start boundary
end boundary
Creates a new substream of @stream with bounds @start and @end.
a substream of @stream with bounds @start
and @end.
a #GMimeStream
start boundary
end boundary
Gets the current offset within the stream.
the current position within the stream or %-1 on fail.
a #GMimeStream
Attempts to write up to @len bytes of @buf to @stream.
the number of bytes written or %-1 on fail.
a #GMimeStream
buffer
buffer length
Writes @string to @stream.
the number of bytes written or %-1 on fail.
a #GMimeStream
string to write
Attempts to write the source stream to the destination stream.
the number of bytes written or %-1 on fail.
source stream
destination stream
Writes at most @count blocks described by @vector to @stream.
the number of bytes written or %-1 on fail.
a #GMimeStream
a #GMimeStreamIOVector
number of vector elements
parent #GObject
A buffered stream wrapper around any #GMimeStream object.
Creates a new GMimeStreamBuffer object.
a new buffer stream with source @source and mode @mode.
source stream
buffering mode
parent #GMimeStream
buffering mode
source stream
internal buffer
current position in the buffer
end of the buffer
buffer length
The buffering mode for a #GMimeStreamBuffer stream.
Read in 4k blocks.
Write in 4k blocks.
A concatenation of other #GMimeStream objects.
Creates a new #GMimeStreamCat object.
a new #GMimeStreamCat stream.
Adds the @source stream to the @cat.
%0 on success or %-1 on fail.
a #GMimeStreamCat
a source stream
parent #GMimeStream
list of sources
current source
the number of bytes read or %-1 on fail.
a #GMimeStream
buffer
buffer length
the number of bytes written or %-1 on fail.
a #GMimeStream
buffer
buffer length
%0 on success or %-1 on fail.
a #GMimeStream
%0 on success or %-1 on fail.
a #GMimeStream
%TRUE on EOS or %FALSE otherwise.
a #GMimeStream
%0 on success or %-1 on fail.
a #GMimeStream
the resultant position on success or %-1 on fail.
a #GMimeStream
positional offset
seek directive
the current position within the stream or %-1 on fail.
a #GMimeStream
the length of the stream or %-1 if unknown.
a #GMimeStream
a substream of @stream with bounds @start
and @end.
a #GMimeStream
start boundary
end boundary
A #GMimeStream wrapper around standard-c FILE pointers.
Creates a new #GMimeStreamFile object around @fp.
Note: The created #GMimeStreamFile object will own the FILE pointer
passed in.
a stream using @fp.
a FILE pointer
Creates a new #GMimeStreamFile object around @fp with bounds @start
and @end.
Note: The created #GMimeStreamFile object will own the FILE pointer
passed in.
a stream using @fp with bounds @start and @end.
a FILE pointer
start boundary
end boundary
Creates a new #GMimeStreamFile object for the specified @path.
a stream using for reading and/or writing to the
specified file path or %NULL on error.
the path to a file
as in fopen(3)
Gets whether or not @stream owns the backend FILE pointer.
%TRUE if @stream owns the backend FILE pointer or %FALSE
otherwise.
a #GMimeStreamFile
Sets whether or not @stream owns the backend FILE pointer.
Note: @owner should be %TRUE if the stream should fclose() the
backend FILE pointer when destroyed or %FALSE otherwise.
a #GMimeStreamFile
%TRUE if this stream should own the FILE pointer or %FALSE otherwise
parent #GMimeStream
%TRUE if this stream owns @fd
standard-c FILE pointer
A #GMimeStream which passes data through any #GMimeFilter objects.
Creates a new #GMimeStreamFilter object using @stream as the source
stream.
a new filter stream with @stream as its source.
source stream
Adds @filter to @stream. Filters are applied in the same order in
which they are added.
an id for the filter.
a #GMimeStreamFilter
a #GMimeFilter
Gets whether or not @stream owns the source stream.
%TRUE if @stream owns the source stream or %FALSE
otherwise.
a #GMimeStreamFilter
Removed a filter from the stream based on the id (as returned from
filter_add).
a #GMimeStreamFilter
filter id
Sets whether or not @stream owns the source stream..
Note: @owner should be %TRUE if the stream should close() the
backend source stream when destroyed or %FALSE otherwise.
a #GMimeStreamFilter
%TRUE if this stream should own the source stream or %FALSE otherwise
parent #GMimeStream
private state data
source stream
A #GMimeStream wrapper around POSIX file descriptors.
Creates a new #GMimeStreamFs object around @fd.
a stream using @fd.
a file descriptor
Creates a new #GMimeStreamFs object around @fd with bounds @start
and @end.
a stream using @fd with bounds @start and @end.
a file descriptor
start boundary
end boundary
Creates a new #GMimeStreamFs object for the specified @path.
a stream using for reading and/or writing to the
specified file path or %NULL on error.
the path to a file
as in open(2)
as in open(2)
Gets whether or not @stream owns the backend file descriptor.
%TRUE if @stream owns the backend file descriptor or %FALSE
otherwise.
a #GMimeStreamFs
Sets whether or not @stream owns the backend file descriptor.
Note: @owner should be %TRUE if the stream should close() the
backend file descriptor when destroyed or %FALSE otherwise.
a #GMimeStreamFs
%TRUE if this stream should own the file descriptor or %FALSE otherwise
parent #GMimeStream
%TRUE if this stream owns @fd
%TRUE if end-of-stream
file descriptor
A #GMimeStream wrapper around GLib's GIO streams.
Creates a new #GMimeStreamGIO wrapper around a #GFile object.
a stream using @file.
a #GFile
Creates a new #GMimeStreamGIO stream around a #GFile with bounds
@start and @end.
a stream using @file with bounds @start
and @end.
a #GFile
start boundary
end boundary
Gets whether or not @stream owns the backend #GFile.
%TRUE if @stream owns the backend #GFile or %FALSE
otherwise.
a #GMimeStreamGIO stream
Sets whether or not @stream owns the backend GIO pointer.
Note: @owner should be %TRUE if the stream should close() the
backend file descriptor when destroyed or %FALSE otherwise.
a #GMimeStreamGIO stream
%TRUE if this stream should own the #GFile or %FALSE otherwise
parent #GMimeStream
a #GOutputStream
a #GInputStream
a #GFile
%TRUE if this stream owns the #GFile or %FALSE otherwise
%TRUE if the end of the stream has been reached or %FALSE otherwise
An I/O vector for use with g_mime_stream_writev().
data to pass to the I/O function.
length of the data, in bytes.
A memory-backed #GMimeStream.
Creates a new #GMimeStreamMem object.
a new memory stream.
Creates a new #GMimeStreamMem object and initializes the stream
contents with the first @len bytes of @buffer.
a new memory stream initialized with @buffer.
stream data
buffer length
Creates a new #GMimeStreamMem with data @array.
a new memory stream using @array.
source data
Gets the byte array from the memory stream.
the byte array from the memory stream.
a #GMimeStreamMem
Gets whether or not @mem owns the backend memory buffer.
%TRUE if @mem owns the backend memory buffer or %FALSE
otherwise.
a #GMimeStreamMem
Sets the byte array on the memory stream.
Note: The memory stream is not responsible for freeing the byte
array. Use g_mime_stream_mem_set_owner() to change this behavior.
a #GMimeStreamMem
stream data
Sets whether or not @mem owns the backend memory buffer.
Note: @owner should be %TRUE if the stream should free the backend
memory buffer when destroyed or %FALSE otherwise.
a #GMimeStreamMem
%TRUE if this stream should own the #GByteArray or %FALSE otherwise
parent #GMimeStream
a memory buffer
%TRUE if this stream owns the memory buffer
A memory-mapped #GMimeStream.
Creates a new #GMimeStreamMmap object around @fd.
a stream using @fd.
file descriptor
protection flags
map flags
Creates a new #GMimeStreamMmap object around @fd with bounds @start
and @end.
a stream using @fd with bounds @start and @end.
file descriptor
protection flags
map flags
start boundary
end boundary
Gets whether or not @stream owns the backend file descriptor.
%TRUE if @stream owns the backend file descriptor or %FALSE
otherwise.
a #GMimeStreamFs
Sets whether or not @stream owns the backend file descriptor.
Note: @owner should be %TRUE if the stream should close() the
backend file descriptor when destroyed or %FALSE otherwise.
a #GMimeStreamMmap
%TRUE if this stream should own the file descriptor or %FALSE otherwise
parent #GMimeStream
%TRUE if this stream owns the memory map
%TRUE if end-of-stream
file descriptor
memory map
length of the memory map
A #GMimeStream which has no backing store.
Creates a new #GMimeStreamNull object.
a new null stream (similar to /dev/null on Unix).
Gets whether or not the stream should keep track of the number of newlines
encountered.
%TRUE if the stream should count the number of newlines or %FALSE otherwise.
a #GMimeStreamNull
Sets whether or not the stream should keep track of the number of newlines
encountered.
a #GMimeStreamNull
%TRUE if newlines should be counted or %FALSE otherwise
parent #GMimeStream
number of bytes written to this stream
the number of newlines written to this stream
whether or not the stream should count newlines
A #GMimeStream wrapper around pipes.
Creates a new #GMimeStreamPipe object around @fd.
a stream using @fd.
a pipe descriptor
Gets whether or not @stream owns the backend pipe descriptor.
%TRUE if @stream owns the backend pipe descriptor or %FALSE
otherwise.
a #GMimeStreamPipe
Sets whether or not @stream owns the backend pipe descriptor.
Note: @owner should be %TRUE if the stream should close() the
backend pipe descriptor when destroyed or %FALSE otherwise.
a #GMimeStreamPipe
owner
parent #GMimeStream
%TRUE if this stream owns @fd
%TRUE if end-of-stream
pipe descriptor
A text MIME part object.
Creates a new text MIME part object with a default content-type of
text/plain.
an empty MIME Part object with a default content-type of
text/plain.
Creates a new text MIME part with a sepcified subtype.
an empty text MIME part object with the specified subtype.
textual subtype string
Gets the value of the charset parameter on the Content-Type header.
the value of the charset parameter or %NULL if unavailable.
a #GMimeTextPart
Gets the text content of the @mime_part as a string.
a newly allocated string containing the utf-8 encoded text content.
a #GMimeTextPart
Sets the charset parameter on the Content-Type header to the specified value.
a #GMimeTextPart
the name of the charset
Sets the specified text as the content and updates the charset parameter on the Content-Type header.
a #GMimeTextPart
the text in utf-8
parent #GMimePart
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.
We do not know whether to rely on identity assertions made by the certificate.
We do not have enough information to decide whether to rely on identity assertions made by the certificate.
We should never rely on identity assertions made by the certificate.
We can rely on identity assertions made by this certificate as long as they are corroborated by other marginally-trusted certificates.
We can rely on identity assertions made by this certificate.
This certificate is an undeniable root of trust (e.g. normally, this is a certificate controlled by the user themselves).
State for the g_mime_encoding_uudecode_step() function, denoting that
the 'begin' line has been found.
State for the g_mime_encoding_uudecode_step() function, denoting that
the end of the UU encoded block has been found.
Initial state for the g_mime_encoding_uudecode_step() function.
Calculates the maximum number of bytes needed to uuencode the full
input buffer of length @x.
Length of the input data to encode
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.
The User ID of the certificate is of unknown validity.
The User ID of the certificate is undefined.
The User ID of the certificate is never to be treated as valid.
The User ID of the certificate is marginally valid (e.g. it has been certified by only one marginally-trusted party).
The User ID of the certificate is fully valid.
The User ID of the certificate is ultimately valid (i.e., usually the certificate belongs to the local user themselves).
Signature verification flags.
No flags specified.
Enable OpenPGP keyserver lookups.
Enable CRL and OCSP checks that require network lookups.
State bit that denotes the yEnc filter has found the =ybegin line.
State bit that denotes yEnc filter has begun decoding the actual
yencoded content and will continue to do so until an =yend line is
found (or until there is nothing left to decode).
State bit that denoates that g_mime_ydecode_step() has finished
decoding.
State bit that denotes the yEnc filter has reached an end-of-line.
This state is for internal use only.
State bit that denotes the yEnc filter has reached an escape
sequence.
This state is for internal use only.
Initial state for the g_mime_ydecode_step() function.
State bit that denotes the yEnc filter has found the =ypart
line. (Note: not all yencoded blocks have one)
Gets the final crc value from @crc.
crc or pcrc state variable
Initial state for the crc and pcrc state variables.
Initial state for the g_mime_ydecode_step() function.
Computes the best charset to use to encode this text buffer.
the charset name best suited for the input text
or %NULL if it is ascii-safe.
a UTF-8 text buffer
input buffer length
Attempts to find a canonical charset name for @charset.
Note: Will normally return the same value as
g_mime_charset_iconv_name() unless the system iconv does not use
the canonical ISO charset names (such as using ISO8859-1 rather
than the canonical form ISO-8859-1).
a canonical charset name for @charset.
charset name
Attempts to find an iconv-friendly charset name for @charset.
an iconv-friendly charset name for @charset.
charset name
Maps the ISO-8859-# charset to the equivalent Windows-CP125#
charset.
equivalent Windows charset.
ISO-8859-# charset
Attempts to find a specific language code that is specific to
@charset. Currently only handles CJK and Russian/Ukranian
charset->lang mapping. Everything else will return %NULL.
a language code that is specific to @charset,
or %NULL on fail.
charset name
Gets the user's locale charset (or iso-8859-1 by default).
Note: This function is deprecated. Use g_mime_locale_charset()
instead.
the user's locale charset (or iso-8859-1 by default).
Initializes character set maps.
Note: g_mime_init() calls this routine for you.
Frees internal lookup tables created in g_mime_charset_map_init().
Attempts to find an iconv-friendly charset name for @charset.
Note: This function is deprecated. Use g_mime_charset_iconv_name()
instead.
an iconv-friendly charset name for @charset.
charset name
Checks that the GMime library version meets the requirements of the
required version.
%TRUE if the requirement is met or %FALSE otherwise.
Minimum major version
Minimum minor version
Minimum micro version
Gets the appropriate #GMimeContentEncoding enumeration value based
on the input string.
the #GMimeContentEncoding specified by @str or
#GMIME_CONTENT_ENCODING_DEFAULT on error.
a string representing a Content-Transfer-Encoding value
Gets the string value of the content encoding.
the encoding type as a string or %NULL on error. Available
values for the encoding are: #GMIME_CONTENT_ENCODING_DEFAULT,
#GMIME_CONTENT_ENCODING_7BIT, #GMIME_CONTENT_ENCODING_8BIT,
#GMIME_CONTENT_ENCODING_BINARY, #GMIME_CONTENT_ENCODING_BASE64,
#GMIME_CONTENT_ENCODING_QUOTEDPRINTABLE and
#GMIME_CONTENT_ENCODING_UUENCODE.
a #GMimeContentEncoding
Decodes a chunk of base64 encoded data.
the number of bytes decoded (which have been dumped in
@outbuf).
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Base64 encodes the input stream to the output stream. Call this
when finished encoding data with g_mime_encoding_base64_encode_step()
to flush off the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Base64 encodes a chunk of data. Performs an 'encode step', only
encodes blocks of 3 characters to the output at a time, saves
left-over state in state and save (initialise to 0 on first
invocation).
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Decodes a block of quoted-printable encoded data. Performs a
'decode step' on a chunk of QP encoded data.
the number of bytes decoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Quoted-printable encodes a block of text. Call this when finished
encoding data with g_mime_encoding_quoted_encode_step() to flush off
the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Quoted-printable encodes a block of text. Performs an 'encode
step', saves left-over state in state and save (initialise to -1 on
first invocation).
the number of bytes encoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Uudecodes a chunk of data. Performs a 'decode step' on a chunk of
uuencoded data. Assumes the "begin mode filename" line has
been stripped off.
the number of bytes decoded.
input buffer
input buffer length
output buffer
holds the number of bits that are stored in @save
leftover bits that have not yet been decoded
Uuencodes a chunk of data. Call this when finished encoding data
with g_mime_encoding_uuencode_step() to flush off the last little bit.
the number of bytes encoded.
input buffer
input buffer length
output buffer
temporary buffer of 60 bytes
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Uuencodes a chunk of data. Performs an 'encode step', only encodes
blocks of 45 characters to the output at a time, saves left-over
state in @uubuf, @state and @save (initialize to 0 on first
invocation).
the number of bytes encoded.
input buffer
input buffer length
output stream
temporary buffer of 60 bytes
holds the number of bits that are stored in @save
leftover bits that have not yet been encoded
Gets the default format options.
the default format options.
Initialization, shutdown, and version-check functions.
A #GMimeApplicationPkcs7Mime represents the application/pkcs7-mime MIME part.
A #GMimeAutocryptHeader is an object containing information derived
from a message about the sender's cryptographic keys and
preferences. It can be used in conjunction with local storage and
business logic to make a better user experience for encrypted
e-mail.
A #GMimeCertificate is an object containing useful information about a
digital certificate as used in signing and encrypting data.
Charset utility functions.
A #GMimeContentType represents the pre-parsed contents of a
Content-Type header field.
A #GMimeCryptoContext is used for encrypting, decrypting, signing
and verifying cryptographic signatures.
A #GMimeDataWrapper is a wrapper object for a #GMimePart's body,
allowing clients to read the content from the backing stream
without having to know whether it is encoded/compressed/etc and not
neding to know how to undo said encoding(s).
A #GMimeContentDisposition represents the pre-parsed contents of a
Content-Disposition header field.
Utility functions to encode or decode MIME
Content-Transfer-Encodings.
Stream filters are an efficient way of converting data from one
format to another.
A #GMimeFilter which can encode or decode basic MIME encodings such
as Quoted-Printable, Base64 and UUEncode.
A #GMimeFilter which is meant to determine the best charset and/or
transfer encoding suitable for the stream which is filtered through
it.
A #GMimeFilter which is used for converting text from one charset
to another.
Calculate a checksum for a stream.
A #GMimeFilter for converting from DOS to UNIX line-endings.
A #GMimeFilter used for converting text/enriched or text/rtf to HTML.
A #GMimeFilter used for escaping MBox From_ lines using either the
traditional ">From " or quoted-printable encoding.
A #GMimeFilter used for compressing or decompressing a stream using
GNU Zip.
A #GMimeFilter used for converting plain text into HTML.
A #GMimeFilter for detecting OpenPGP markers and filtering out any content outside the bounds of said markers.
A #GMimeFilter for byte-stuffing outgoing SMTP DATA.
A #GMimeFilter used for stripping trailing whitespace from the end
of lines.
A #GMimeFilter for converting from UNIX to DOS line-endings.
A #GMimeFilter used for determining if text marked as iso-8859-##
is actually encoded in one of the Windows-CP125# charsets.
A #GMimeFilter used to encode or decode the Usenet yEncoding.
A #GMimeFormatOptions is used by GMime to determine how to serialize various objects and headers.
A #GMimeGpgContext is a #GMimeCryptoContext that uses GnuPG to do
all of the encryption and digital signatures.
A #GMimeHeader is a collection of rfc822 header fields and their
values.
These functions are wrappers around the system iconv(3) routines. The
purpose of this wrapper is to use the appropriate system charset alias for
the MIME charset names given as arguments.
Charset conversion utility functions.
A #GMimeMessage represents an rfc822 message.
A #GMimeMessagePart represents message/rfc822 and message/news MIME
parts.
A #GMimeMessagePartial represents the message/partial MIME part.
A #GMimeMultipart represents all multipart MIME container parts.
A #GMimeMultipartEncrypted part is a special subclass of
#GMimeMultipart to make it easier to manipulate the
multipart/encrypted MIME type.
A #GMimeMultipartSigned part is a special subclass of
#GMimeMultipart to make it easier to manipulate the
multipart/signed MIME type.
#GMimeObject is an abstract class from which all message and MIME
parts are derived.
A #GMimeParam is a parameter name/value pair as found on MIME
header fields such as Content-Type and Content-Disposition.
A #GMimeParser parses a stream into a #GMimeMessage or other
#GMimeObject and can also handle parsing MBox formatted streams
into multiple #GMimeMessage objects.
A #GMimeParserOptions is used to pass various options to #GMimeParser
and all of the various other parser functions in GMime.
A #GMimePart represents any MIME leaf part (meaning it has no
sub-parts).
#GMimePartIter is an iterator for traversing a #GMimeObject tree in
Depth-First order.
A #GMimePkcs7Context is a #GMimeCryptoContext that uses GnuPG to do
all of the encryption and digital signatures.
A list of Message-Ids as found in a References or In-Reply-To header.
A #GMimeSignature is an object containing useful information about a
digital signature as used in signing and encrypting data.
Streams are the fundamental method for reading and writing data
used by GMime. You'll probably notice that the basic API is similar
to that of the low-level Unix I/O layer (read(), write(), lseek(),
etc) with some additional nicities such as a printf-like function.
A #GMimeStreamBuffer can be used on top of any other type of stream
and has 3 modes: block reads, block writes, and cached reads. Block
reads are especially useful if you will be making a lot of small
reads from a stream that accesses the file system. Block writes are
useful for very much the same reason. The final mode, cached reads,
can become memory intensive but can be very helpful when inheriting
from a stream that does not support seeking (Note: this mode is the
least tested so be careful using it).
A #GMimeStream which chains together any number of other streams.
A simple #GMimeStream implementation that sits on top of the
Standard C FILE pointer based I/O layer. Unlike #GMimeStreamFs, a
#GMimeStreamFile will typically buffer read and write operations at
the FILE level and so it may be wasteful to wrap one in a
#GMimeStreamBuffer stream.
A #GMimeStream meant for filtering data passing through it.
This stream class is useful for converting data of one type to
another using #GMimeFilter objects.
When data passes through a #GMimeStreamFilter, it will pass through
#GMimeFilter filters in the order they were added.
A simple #GMimeStream implementation that sits on top of the
low-level UNIX file descriptor based I/O layer.
A simple #GMimeStream implementation that sits on top of GLib's GIO
input and output streams.
A simple #GMimeStream implementation that uses a memory buffer for
storage.
A #GMimeStream implementation using a memory-mapped file backing
store. This may be faster than #GMimeStreamFs or #GMimeStreamFile
but you'll have to do your own performance checking to be sure for
your particular application/platform.
A #GMimeStream which has no real backing storage at all. This
stream is useful for dry-runs and can also be useful for
determining statistics on source data which can be written to
streams but cannot be read as a stream itself (e.g. a #GMimeObject
via g_mime_object_write_to_stream()).
A simple #GMimeStream implementation that sits on top of low-level
POSIX pipes.
A #GMimeTextPart represents any text MIME part.
Utility functions to parse, encode and decode various MIME tokens
and encodings.
The argument @cd must be a conversion descriptor created using the
function #g_mime_iconv_open.
The main case is when @inbuf is not %NULL and *inbuf is not
%NULL. In this case, the #g_mime_iconv function converts the
multibyte sequence starting at *inbuf to a multibyte sequence
starting at *outbuf. At most *inleft bytes, starting at *inbuf,
will be read. At most *outleft bytes, starting at *outbuf, will
be written.
The #g_mime_iconv function converts one multibyte character at a
time, and for each character conversion it increments *inbuf and
decrements *inleft by the number of converted input bytes, it
increments *outbuf and decrements *outleft by the number of
converted output bytes, and it updates the conversion state
contained in @cd. The conversion can stop for four reasons:
1. An invalid multibyte sequence is encountered in the input. In
this case it sets errno to %EILSEQ and returns (size_t)(-1).
*inbuf is left pointing to the beginning of the invalid multibyte
sequence.
2. The input byte sequence has been entirely converted, i.e.
*inleft has gone down to %0. In this case #g_mime_iconv returns
the number of non-reversible conversions performed during this
call.
3. An incomplete multibyte sequence is encountered in the input,
and the input byte sequence terminates after it. In this case it
sets errno to %EINVAL and returns (size_t)(-1). *inbuf is left
pointing to the beginning of the incomplete multibyte sequence.
4. The output buffer has no more room for the next converted
character. In this case it sets errno to %E2BIG and returns
(size_t)(-1).
A different case is when @inbuf is %NULL or *inbuf is %NULL, but
@outbuf is not %NULL and *outbuf is not %NULL. In this case, the
#g_mime_iconv function attempts to set @cd's conversion state to
the initial state and store a corresponding shift sequence at
*outbuf. At most *outleft bytes, starting at *outbuf, will be
written. If the output buffer has no more room for this reset
sequence, it sets errno to %E2BIG and returns (size_t)(-1).
Otherwise it increments *outbuf and decrements *outleft by the
number of bytes written.
A third case is when @inbuf is %NULL or *inbuf is %NULL, and
@outbuf is %NULL or *outbuf is %NULL. In this case, the
#g_mime_iconv function sets @cd's conversion state to the initial
state.
iconv_t conversion descriptor
input buffer
number of bytes left in @inbuf
output buffer
number of bytes left in @outbuf
Closes the iconv descriptor @cd.
See the manual page for iconv_close(3) for further details.
%0 on success or %-1 on fail as well as setting an
appropriate errno value.
iconv conversion descriptor
Allocates a new string buffer containing @str in UTF-8.
a new string buffer containing @str converted to UTF-8.
string in locale charset
Allocates a new string buffer containing the first @n bytes of
@str converted to UTF-8.
a new string buffer containing the first @n bytes of
@str converted to UTF-8.
string in locale charset
number of bytes to convert
Allocates a coversion descriptor suitable for converting byte
sequences from charset @from to charset @to. The resulting
descriptor can be used with iconv() (or the g_mime_iconv() wrapper) any
number of times until closed using g_mime_iconv_close().
See the manual page for iconv_open(3) for further details.
a new conversion descriptor for use with g_mime_iconv() on
success or (iconv_t) %-1 on fail as well as setting an appropriate
errno value.
charset to convert to
charset to convert from
Allocates a new string buffer containing @str converted to the
destination charset described in @cd.
a new string buffer containing the original string
converted to the new charset.
conversion descriptor
string in source charset
Allocates a new string buffer containing the first @n bytes of @str
converted to the destination charset as described by the conversion
descriptor @cd.
a new string buffer containing the first @n bytes of
@str converted to the destination charset as described by the
conversion descriptor @cd.
conversion descriptor
string in source charset
number of bytes to convert
Allocates a new string buffer containing @str converted to the
user's locale charset.
a new string buffer containing @str converted to the
user's locale charset.
string in UTF-8 charset
Allocates a new string buffer containing the first @n bytes of
@str converted to the user's locale charset.
a new string buffer containing the first @n bytes of
@str converted to the user's locale charset.
string in UTF-8 charset
number of bytes to convert
Initializes GMime.
An #InternetAddress is the base class for #InternetAddressGroup and
#InternetAddressMailbox.
An #InternetAddressGroup represents an rfc822 'group' address.
An #InternetAddressList is a collection of #InternetAddress
objects.
An #InternetAddressMailbox represents what is a typical "email
address".
Gets the user's locale charset (or iso-8859-1 by default).
the user's locale charset (or iso-8859-1 by default).
Gets the user's locale language code (or %NULL by default).
the user's locale language code (or %NULL by default).
Gets the default parser options.
the default parser options.
Decodes a list of msg-ids as in the References and/or In-Reply-To
headers defined in rfc822.
a new #GMimeReferences containing the parsed message ids.
a #GMimeParserOptions or %NULL
string containing a list of msg-ids
Frees internally allocated tables created in g_mime_init().
Determines the best content encoding for the first @len bytes of
@text.
a #GMimeContentEncoding that is determined to be the best
encoding type for the specified block of text. ("best" in this
particular case means smallest output size)
text to encode
text length
Attempts to convert text in an unknown 8bit/multibyte charset into
UTF-8 by finding the charset which will convert the most bytes into
valid UTF-8 characters as possible. If no exact match can be found,
it will choose the best match and convert invalid byte sequences
into question-marks (?) in the returned string buffer.
a UTF-8 string representation of @text.
a #GMimeParserOptions or %NULL
input text in
unknown 8bit/multibyte character set
input text length
Decodes a msg-id as defined by rfc822.
the addr-spec portion of the msg-id.
string containing a message-id
Generates a unique Message-Id.
a unique string in an addr-spec format suitable for use as
a Message-Id.
Fully qualified domain name
Parses the rfc822 date string.
the #GDateTime representation of the date
string specified by @str or %NULL on error.
input date string
Decodes an rfc2047 encoded 'phrase' header.
a newly allocated UTF-8 string representing the the decoded
header.
a #GMimeParserOptions or %NULL
header to decode
Decodes an rfc2047 encoded 'text' header.
a newly allocated UTF-8 string representing the the decoded
header.
a #GMimeParserOptions or %NULL
header text to decode
Encodes a 'phrase' header according to the rules in rfc2047.
the encoded 'phrase'. Useful for encoding internet
addresses.
a #GMimeFormatOptions or %NULL
phrase to encode
the charset to use or %NULL to use the default
Encodes a 'text' header according to the rules in rfc2047.
the encoded header. Useful for encoding
headers like "Subject".
a #GMimeFormatOptions or %NULL
text to encode
the charset to use or %NULL to use the default
Allocates a string buffer containing the rfc822 formatted date
string represented by @date.
a valid string representation of the date.
a #GDateTime
Allocates a buffer containing a formatted header specified by the
@Varargs.
an allocated string containing the folded header specified
by @text and the following arguments.
a #GMimeParserOptions or %NULL
a #GMimeFormatOptions or %NULL
text with printf-style formatters
arguments
Unfolds a raw header value according to the rules in rfc822.
an allocated string containing the unfolded header value.
raw header value
Quotes @string as needed according to the rules in rfc2822.
an allocated string containing the escaped and quoted (if
needed to be) input string. The decision to quote the string is
based on whether or not the input string contains any 'specials'
as defined by rfc2822.
input string
Folds a structured header according to the rules in rfc822.
an allocated string containing the folded header.
a #GMimeParserOptions or %NULL
a #GMimeFormatOptions or %NULL
header field and value string
Determines if @text contains 8bit characters within the first @len
bytes.
%TRUE if the text contains 8bit characters or %FALSE
otherwise.
text to check for 8bit chars
text length
Unquotes and unescapes a string.
input string
Folds an unstructured header according to the rules in rfc822.
an allocated string containing the folded header.
a #GMimeParserOptions or %NULL
a #GMimeFormatOptions or %NULL
header field and value string
Performs a 'decode step' on a chunk of yEncoded data of length
@inlen pointed to by @inbuf and writes to @outbuf. Assumes the =ybegin
and =ypart lines have already been stripped off.
To get the crc32 value of the part, use #GMIME_YENCODE_CRC_FINAL
(@pcrc). If there are more parts, you should reuse @crc without
re-initializing. Once all parts have been decoded, you may get the
combined crc32 value of all the parts using #GMIME_YENCODE_CRC_FINAL
(@crc).
the number of bytes decoded.
input buffer
input buffer length
output buffer
ydecode state
part crc state
crc state
Call this function when finished encoding data with
g_mime_yencode_step() to flush off the remaining state.
#GMIME_YENCODE_CRC_FINAL (@pcrc) will give you the crc32 of the
encoded "part". If there are more "parts" to encode, you should
re-use @crc when encoding the next "parts" and then use
#GMIME_YENCODE_CRC_FINAL (@crc) to get the combined crc32 value of
all the parts.
the number of bytes encoded.
input buffer
input buffer length
output buffer
yencode state
part crc state
crc state
Performs an yEncode 'encode step' on a chunk of raw data of length
@inlen pointed to by @inbuf and writes to @outbuf.
@state should be initialized to #GMIME_YENCODE_STATE_INIT before
beginning making the first call to this function. Subsequent calls
should reuse @state.
Along the same lines, @pcrc and @crc should be initialized to
#GMIME_YENCODE_CRC_INIT before using.
the number of bytes encoded.
input buffer
input buffer length
output buffer
yencode state
part crc state
crc state