gmime.global

Global functions for gmime3 library

Functions 30

fnbool checkVersion(uint major, uint minor, uint micro)Checks that the GMime library version meets the requirements of the required version.
fngmime.types.ContentEncoding contentEncodingFromString(string str)Gets the appropriate #GMimeContentEncoding enumeration value based on the input string.
fnstring contentEncodingToString(gmime.types.ContentEncoding encoding)Gets the string value of the content encoding.
fnstring iconvLocaleToUtf8(string str)Allocates a new string buffer containing str in UTF-8.
fnstring iconvLocaleToUtf8Length(string str, size_t n)Allocates a new string buffer containing the first `n` bytes of str converted to UTF-8.
fnstring iconvUtf8ToLocale(string str)Allocates a new string buffer containing str converted to the user's locale charset.
fnstring iconvUtf8ToLocaleLength(string str, size_t n)Allocates a new string buffer containing the first `n` bytes of str converted to the user's locale charset.
fnvoid init_()Initializes GMime.
fnstring localeCharset()Gets the user's locale charset (or iso-8859-1 by default). Returns: the user's locale charset (or iso-8859-1 by default).
fnstring localeLanguage()Gets the user's locale language code (or null by default). Returns: the user's locale language code (or null by default).
fnvoid shutdown()Frees internally allocated tables created in [gmime.global.init_].
fngmime.types.ContentEncoding utilsBestEncoding(ubyte[] text)Determines the best content encoding for the first len bytes of text.
fnstring utilsDecode8bit(gmime.parser_options.ParserOptions options, ubyte[] text)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 f...
fnstring utilsDecodeMessageId(string messageId)Decodes a msg-id as defined by rfc822.
fnstring utilsGenerateMessageId(string fqdn)Generates a unique Message-Id.
fnglib.date_time.DateTime utilsHeaderDecodeDate(string str)Parses the rfc822 date string.
fnstring utilsHeaderDecodePhrase(gmime.parser_options.ParserOptions options, string phrase)Decodes an rfc2047 encoded 'phrase' header.
fnstring utilsHeaderDecodeText(gmime.parser_options.ParserOptions options, string text)Decodes an rfc2047 encoded 'text' header.
fnstring utilsHeaderEncodePhrase(gmime.format_options.FormatOptions options, string phrase, string charset = null)Encodes a 'phrase' header according to the rules in rfc2047.
fnstring utilsHeaderEncodeText(gmime.format_options.FormatOptions options, string text, string charset = null)Encodes a 'text' header according to the rules in rfc2047.
fnstring utilsHeaderFormatDate(glib.date_time.DateTime date)Allocates a string buffer containing the rfc822 formatted date string represented by date.
fnstring utilsHeaderUnfold(string value)Unfolds a raw header value according to the rules in rfc822.
fnstring utilsQuoteString(string str)Quotes string as needed according to the rules in rfc2822.
fnstring utilsStructuredHeaderFold(gmime.parser_options.ParserOptions options, gmime.format_options.FormatOptions format, string header)Folds a structured header according to the rules in rfc822.
fnbool utilsTextIs8bit(ubyte[] text)Determines if text contains 8bit characters within the first len bytes.
fnvoid utilsUnquoteString(string str)Unquotes and unescapes a string.
fnstring utilsUnstructuredHeaderFold(gmime.parser_options.ParserOptions options, gmime.format_options.FormatOptions format, string header)Folds an unstructured header according to the rules in rfc822.
fnsize_t ydecodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint pcrc, ref uint crc)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.
fnsize_t yencodeClose(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint pcrc, ref uint crc)Call this function when finished encoding data with [gmime.global.yencodeStep] to flush off the remaining state.
fnsize_t yencodeStep(ubyte[] inbuf, ref ubyte[] outbuf, ref int state, ref uint pcrc, ref uint crc)Performs an yEncode 'encode step' on a chunk of raw data of length inlen pointed to by inbuf and writes to outbuf.