/* gmime-2.6.vapi generated by vapigen-0.22, do not modify. */

[CCode (cprefix = "GMime", gir_namespace = "GMime", gir_version = "2.6", lower_case_cprefix = "g_mime_")]
namespace GMime {
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_certificate_get_type ()")]
	public class Certificate : GLib.Object {
		public long created;
		public GMime.DigestAlgo digest_algo;
		public weak string email;
		public long expires;
		public weak string fingerprint;
		public weak string issuer_name;
		public weak string issuer_serial;
		public weak string keyid;
		public weak string name;
		public GMime.PubKeyAlgo pubkey_algo;
		public GMime.CertificateTrust trust;
		[CCode (has_construct_function = false)]
		public Certificate ();
		public long get_created ();
		public GMime.DigestAlgo get_digest_algo ();
		public unowned string get_email ();
		public long get_expires ();
		public unowned string get_fingerprint ();
		public unowned string get_issuer_name ();
		public unowned string get_issuer_serial ();
		public unowned string get_key_id ();
		public unowned string get_name ();
		public GMime.PubKeyAlgo get_pubkey_algo ();
		public GMime.CertificateTrust get_trust ();
		public void set_created (long created);
		public void set_digest_algo (GMime.DigestAlgo algo);
		public void set_email (string email);
		public void set_expires (long expires);
		public void set_fingerprint (string fingerprint);
		public void set_issuer_name (string issuer_name);
		public void set_issuer_serial (string issuer_serial);
		public void set_key_id (string key_id);
		public void set_name (string name);
		public void set_pubkey_algo (GMime.PubKeyAlgo algo);
		public void set_trust (GMime.CertificateTrust trust);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_certificate_list_get_type ()")]
	public class CertificateList : GLib.Object {
		public weak GLib.GenericArray<void*> array;
		[CCode (has_construct_function = false)]
		public CertificateList ();
		public int add (GMime.Certificate cert);
		public void clear ();
		public bool contains (GMime.Certificate cert);
		public GMime.Certificate get_certificate (int index);
		public int index_of (GMime.Certificate cert);
		public void insert (int index, GMime.Certificate cert);
		public int length ();
		public bool remove (GMime.Certificate cert);
		public bool remove_at (int index);
		public void set_certificate (int index, GMime.Certificate cert);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_content_disposition_get_type ()")]
	public class ContentDisposition : GLib.Object {
		public weak string disposition;
		public weak GLib.HashTable<void*,void*> param_hash;
		public weak GMime.Param @params;
		[CCode (has_construct_function = false)]
		public ContentDisposition ();
		[CCode (has_construct_function = false)]
		public ContentDisposition.from_string (string str);
		public unowned string get_disposition ();
		public unowned string get_parameter (string attribute);
		public unowned GMime.Param get_params ();
		public void set_disposition (string value);
		public void set_parameter (string attribute, string value);
		public void set_params (GMime.Param @params);
		public string to_string (bool fold);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_content_type_get_type ()")]
	public class ContentType : GLib.Object {
		public weak GLib.HashTable<void*,void*> param_hash;
		public weak GMime.Param @params;
		public weak string subtype;
		public weak string type;
		[CCode (has_construct_function = false)]
		public ContentType (string type, string subtype);
		[CCode (has_construct_function = false)]
		public ContentType.from_string (string str);
		public unowned string get_media_subtype ();
		public unowned string get_media_type ();
		public unowned string get_parameter (string attribute);
		public unowned GMime.Param get_params ();
		public bool is_type (string type, string subtype);
		public void set_media_subtype (string subtype);
		public void set_media_type (string type);
		public void set_parameter (string attribute, string value);
		public void set_params (GMime.Param @params);
		public string to_string ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_crypto_context_get_type ()")]
	public class CryptoContext : GLib.Object {
		public weak GMime.PasswordRequestFunc request_passwd;
		[CCode (has_construct_function = false)]
		protected CryptoContext ();
		public virtual GMime.DecryptResult decrypt (GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
		public virtual GMime.DigestAlgo digest_id (string name);
		public virtual unowned string digest_name (GMime.DigestAlgo digest);
		public virtual int encrypt (bool sign, string userid, GMime.DigestAlgo digest, GLib.GenericArray<string> recipients, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
		public virtual int export_keys (GLib.GenericArray<string> keys, GMime.Stream ostream) throws GLib.Error;
		public virtual unowned string get_encryption_protocol ();
		public virtual unowned string get_key_exchange_protocol ();
		public virtual unowned string get_signature_protocol ();
		public virtual int import_keys (GMime.Stream istream) throws GLib.Error;
		public virtual int sign (string userid, GMime.DigestAlgo digest, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
		public virtual GMime.SignatureList verify (GMime.DigestAlgo digest, GMime.Stream istream, GMime.Stream sigstream) throws GLib.Error;
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_data_wrapper_get_type ()")]
	public class DataWrapper : GLib.Object {
		public GMime.ContentEncoding encoding;
		public weak GMime.Stream stream;
		[CCode (has_construct_function = false)]
		public DataWrapper ();
		public GMime.ContentEncoding get_encoding ();
		public unowned GMime.Stream get_stream ();
		public void set_encoding (GMime.ContentEncoding encoding);
		public void set_stream (GMime.Stream stream);
		[CCode (has_construct_function = false)]
		public DataWrapper.with_stream (GMime.Stream stream, GMime.ContentEncoding encoding);
		public virtual long write_to_stream (GMime.Stream stream);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_decrypt_result_get_type ()")]
	public class DecryptResult : GLib.Object {
		public GMime.CipherAlgo cipher;
		public GMime.DigestAlgo mdc;
		public weak GMime.CertificateList recipients;
		public weak GMime.SignatureList signatures;
		[CCode (has_construct_function = false)]
		public DecryptResult ();
		public GMime.CipherAlgo get_cipher ();
		public GMime.DigestAlgo get_mdc ();
		public unowned GMime.CertificateList get_recipients ();
		public unowned GMime.SignatureList get_signatures ();
		public void set_cipher (GMime.CipherAlgo cipher);
		public void set_mdc (GMime.DigestAlgo mdc);
		public void set_recipients (GMime.CertificateList recipients);
		public void set_signatures (GMime.SignatureList signatures);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_get_type ()")]
	public abstract class Filter : GLib.Object {
		public weak string backbuf;
		public ulong backlen;
		public ulong backsize;
		public weak string outbuf;
		public ulong outpre;
		public weak string outptr;
		public weak string outreal;
		public ulong outsize;
		[CCode (has_construct_function = false)]
		protected Filter ();
		public void backup ([CCode (array_length_cname = "length", array_length_pos = 1.1, array_length_type = "gulong")] uint8[] data);
		public virtual void complete (ulong inlen, ulong prespace, [CCode (array_length_cname = "inbuf", array_length_pos = 0.5)] out uint8[] outbuf, out ulong outlen, ulong outprespace);
		public virtual GMime.Filter copy ();
		public virtual void filter (string inbuf, ulong inlen, ulong prespace, string outbuf, ulong outlen, ulong outprespace);
		public virtual void reset ();
		public void set_size (ulong size, bool keep);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_basic_get_type ()")]
	public class FilterBasic : GMime.Filter {
		public GMime.Encoding encoder;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterBasic (GMime.ContentEncoding encoding, bool encode);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_best_get_type ()")]
	public class FilterBest : GMime.Filter {
		public uint count0;
		public uint count8;
		public GMime.FilterBestFlags flags;
		[CCode (array_length = false, array_null_terminated = true)]
		public weak uint[] frombuf;
		public uint fromlen;
		public uint hadfrom;
		public uint linelen;
		public uint maxline;
		public uint midline;
		public uint startline;
		public uint total;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterBest (GMime.FilterBestFlags flags);
		public GMime.ContentEncoding encoding (GMime.EncodingConstraint constraint);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_crlf_get_type ()")]
	public class FilterCRLF : GMime.Filter {
		public bool dots;
		public bool encode;
		public bool saw_cr;
		public bool saw_dot;
		public bool saw_lf;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterCRLF (bool encode, bool dots);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_charset_get_type ()")]
	public class FilterCharset : GMime.Filter {
		public weak string from_charset;
		public weak string to_charset;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterCharset (string from_charset, string to_charset);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_enriched_get_type ()")]
	public class FilterEnriched : GMime.Filter {
		public uint32 flags;
		public int nofill;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterEnriched (uint32 flags);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_from_get_type ()")]
	public class FilterFrom : GMime.Filter {
		public bool midline;
		public GMime.FilterFromMode mode;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterFrom (GMime.FilterFromMode mode);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_gzip_get_type ()")]
	public class FilterGZip : GMime.Filter {
		public int level;
		public GMime.FilterGZipMode mode;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterGZip (GMime.FilterGZipMode mode, int level);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_html_get_type ()")]
	public class FilterHTML : GMime.Filter {
		public uint32 colour;
		public uint32 column;
		public uint32 flags;
		public uint32 pre_open;
		public void* scanner;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterHTML (uint32 flags, uint32 colour);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_md5_get_type ()")]
	public class FilterMd5 : GMime.Filter {
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterMd5 ();
		public void get_digest (uint8 digest);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_strip_get_type ()")]
	public class FilterStrip : GMime.Filter {
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterStrip ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_windows_get_type ()")]
	public class FilterWindows : GMime.Filter {
		public weak string claimed_charset;
		public bool is_windows;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterWindows (string claimed_charset);
		public bool is_windows_charset ();
		public unowned string real_charset ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_filter_yenc_get_type ()")]
	public class FilterYenc : GMime.Filter {
		public uint32 crc;
		public bool encode;
		public int part;
		public uint32 pcrc;
		public int state;
		[CCode (has_construct_function = false, type = "GMimeFilter*")]
		public FilterYenc (bool encode);
		public uint32 get_crc ();
		public uint32 get_pcrc ();
		public void set_crc (uint32 crc);
		public void set_state (int state);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_gpg_context_get_type ()")]
	public class GpgContext : GMime.CryptoContext {
		public bool always_trust;
		public bool auto_key_retrieve;
		public weak string path;
		public bool use_agent;
		[CCode (has_construct_function = false)]
		protected GpgContext ();
		public bool get_always_trust ();
		public bool get_auto_key_retrieve ();
		public bool get_use_agent ();
		public void set_always_trust (bool always_trust);
		public void set_auto_key_retrieve (bool auto_key_retrieve);
		public void set_use_agent (bool use_agent);
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class Header {
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class HeaderIter {
		public weak GMime.Header cursor;
		public weak GMime.HeaderList hdrlist;
		public uint32 version;
		public void copy_to (GMime.HeaderIter dest);
		public bool equal (GMime.HeaderIter iter2);
		public bool first ();
		public void free ();
		public unowned string get_name ();
		public unowned string get_value ();
		public bool is_valid ();
		public bool last ();
		public bool next ();
		public bool prev ();
		public bool remove ();
		public bool set_value (string value);
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class HeaderList {
		public void append (string name, string value);
		public void clear ();
		public bool contains (string name);
		public void destroy ();
		public void @foreach (GMime.HeaderForeachFunc func);
		public unowned string @get (string name);
		public bool get_iter (out unowned GMime.HeaderIter iter);
		public unowned GMime.Stream get_stream ();
		public void prepend (string name, string value);
		public bool remove (string name);
		public void @set (string name, string value);
		public void set_stream (GMime.Stream stream);
		public string to_string ();
		public long write_to_stream (GMime.Stream stream);
	}
	[CCode (cheader_filename = "gmime/gmime.h", cname = "InternetAddress", type_id = "internet_address_get_type ()")]
	public abstract class InternetAddress : GLib.Object {
		public weak string name;
		[CCode (has_construct_function = false)]
		protected InternetAddress ();
		[CCode (cname = "internet_address_get_name")]
		public unowned string get_name ();
		[CCode (cname = "internet_address_set_name")]
		public void set_name (string name);
		[CCode (cname = "internet_address_to_string")]
		public string to_new_string (bool encode);
		[NoWrapper]
		public virtual void to_string (uint32 flags, ulong linelen, GLib.StringBuilder @out);
	}
	[CCode (cheader_filename = "gmime/gmime.h", cname = "InternetAddressGroup", type_id = "internet_address_group_get_type ()")]
	public class InternetAddressGroup : GMime.InternetAddress {
		public weak GMime.InternetAddressList members;
		[CCode (cname = "internet_address_group_new", has_construct_function = false, type = "InternetAddress*")]
		public InternetAddressGroup (string name);
		[CCode (cname = "internet_address_group_add_member")]
		public int add_member (GMime.InternetAddress member);
		[CCode (cname = "internet_address_group_get_members")]
		public unowned GMime.InternetAddressList get_members ();
		[CCode (cname = "internet_address_group_set_members")]
		public void set_members (GMime.InternetAddressList members);
	}
	[CCode (cheader_filename = "gmime/gmime.h", cname = "InternetAddressList", type_id = "internet_address_list_get_type ()")]
	public class InternetAddressList : GLib.Object {
		public weak GLib.GenericArray<void*> array;
		[CCode (cname = "internet_address_list_new", has_construct_function = false)]
		public InternetAddressList ();
		[CCode (cname = "internet_address_list_add")]
		public int add (GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_append")]
		public void append (GMime.InternetAddressList append);
		[CCode (cname = "internet_address_list_clear")]
		public void clear ();
		[CCode (cname = "internet_address_list_contains")]
		public bool contains (GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_get_address")]
		public unowned GMime.InternetAddress get_address (int index);
		[CCode (cname = "internet_address_list_index_of")]
		public int index_of (GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_insert")]
		public void insert (int index, GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_length")]
		public int length ();
		[CCode (cname = "internet_address_list_parse_string")]
		public static GMime.InternetAddressList parse_string (string str);
		[CCode (cname = "internet_address_list_prepend")]
		public void prepend (GMime.InternetAddressList prepend);
		[CCode (cname = "internet_address_list_remove")]
		public bool remove (GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_remove_at")]
		public bool remove_at (int index);
		[CCode (cname = "internet_address_list_set_address")]
		public void set_address (int index, GMime.InternetAddress ia);
		[CCode (cname = "internet_address_list_to_string")]
		public string to_string (bool encode);
		[CCode (cname = "internet_address_list_writer")]
		public void writer (GLib.StringBuilder str);
	}
	[CCode (cheader_filename = "gmime/gmime.h", cname = "InternetAddressMailbox", type_id = "internet_address_mailbox_get_type ()")]
	public class InternetAddressMailbox : GMime.InternetAddress {
		public weak string addr;
		[CCode (cname = "internet_address_mailbox_new", has_construct_function = false, type = "InternetAddress*")]
		public InternetAddressMailbox (string name, string addr);
		[CCode (cname = "internet_address_mailbox_get_addr")]
		public unowned string get_addr ();
		[CCode (cname = "internet_address_mailbox_set_addr")]
		public void set_addr (string addr);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_message_get_type ()")]
	public class Message : GMime.Object {
		public long date;
		public weak string from;
		public weak string message_id;
		public weak GMime.Object mime_part;
		public weak GMime.InternetAddressList recipients;
		public weak string reply_to;
		public weak string subject;
		public int tz_offset;
		[CCode (has_construct_function = false)]
		public Message (bool pretty_headers);
		public void add_recipient (GMime.RecipientType type, string name, string addr);
		public void @foreach (GMime.ObjectForeachFunc callback);
		public GMime.InternetAddressList get_all_recipients ();
		public unowned GMime.Object get_body ();
		public void get_date (out long date, out int tz_offset);
		public string get_date_as_string ();
		public unowned string get_message_id ();
		public unowned GMime.Object? get_mime_part ();
		public unowned GMime.InternetAddressList get_recipients (GMime.RecipientType type);
		public unowned string get_reply_to ();
		public unowned string get_sender ();
		public unowned string get_subject ();
		public GMime.Message partial_split_message (ulong max_size, ulong nparts);
		public void set_date (long date, int tz_offset);
		public void set_date_as_string (string str);
		public void set_message_id (string message_id);
		public void set_mime_part (GMime.Object mime_part);
		public void set_reply_to (string reply_to);
		public void set_sender (string sender);
		public void set_subject (string subject);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_message_part_get_type ()")]
	public class MessagePart : GMime.Object {
		public weak GMime.Message message;
		[CCode (has_construct_function = false)]
		public MessagePart (string subtype);
		public unowned GMime.Message get_message ();
		public void set_message (GMime.Message message);
		[CCode (has_construct_function = false)]
		public MessagePart.with_message (string subtype, GMime.Message message);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_message_partial_get_type ()")]
	public class MessagePartial : GMime.Part {
		public weak string id;
		public int number;
		public int total;
		[CCode (has_construct_function = false)]
		public MessagePartial (string id, int number, int total);
		public unowned string get_id ();
		public int get_number ();
		public int get_total ();
		public static GMime.Message reconstruct_message (GMime.MessagePartial partials, ulong num);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_multipart_get_type ()")]
	public class Multipart : GMime.Object {
		public weak string boundary;
		public weak GLib.GenericArray<void*> children;
		public weak string postface;
		public weak string preface;
		[CCode (has_construct_function = false)]
		public Multipart ();
		public virtual void add (GMime.Object part);
		public virtual void clear ();
		public virtual bool contains (GMime.Object part);
		public void @foreach (GMime.ObjectForeachFunc callback);
		public virtual unowned string get_boundary ();
		public virtual int get_count ();
		public virtual unowned GMime.Object get_part (int index);
		public unowned string get_postface ();
		public unowned string get_preface ();
		public unowned GMime.Object get_subpart_from_content_id (string content_id);
		public virtual int index_of (GMime.Object part);
		public virtual void insert (int index, GMime.Object part);
		public virtual bool remove (GMime.Object part);
		public virtual GMime.Object remove_at (int index);
		public GMime.Object replace (int index, GMime.Object replacement);
		public virtual void set_boundary (string boundary);
		public void set_postface (string postface);
		public void set_preface (string preface);
		[CCode (has_construct_function = false)]
		public Multipart.with_subtype (string subtype);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_multipart_encrypted_get_type ()")]
	public class MultipartEncrypted : GMime.Multipart {
		[CCode (has_construct_function = false)]
		public MultipartEncrypted ();
		public GMime.Object decrypt (GMime.CryptoContext ctx, GMime.DecryptResult result) throws GLib.Error;
		public int encrypt (GMime.Object content, GMime.CryptoContext ctx, bool sign, string userid, GMime.DigestAlgo digest, GLib.GenericArray<string> recipients) throws GLib.Error;
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_multipart_signed_get_type ()")]
	public class MultipartSigned : GMime.Multipart {
		[CCode (has_construct_function = false)]
		public MultipartSigned ();
		public int sign (GMime.Object content, GMime.CryptoContext ctx, string userid, GMime.DigestAlgo digest) throws GLib.Error;
		public GMime.SignatureList verify (GMime.CryptoContext ctx) throws GLib.Error;
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_object_get_type ()")]
	public abstract class Object : GLib.Object {
		public weak string content_id;
		public weak GMime.ContentType content_type;
		public weak GMime.ContentDisposition disposition;
		public weak GMime.HeaderList headers;
		[CCode (has_construct_function = false)]
		public Object (GMime.ContentType content_type);
		public virtual void append_header (string header, string value);
		public virtual void encode (GMime.EncodingConstraint constraint);
		public unowned GMime.ContentDisposition get_content_disposition ();
		public unowned string get_content_disposition_parameter (string attribute);
		public unowned string get_content_id ();
		public unowned GMime.ContentType get_content_type ();
		public unowned string? get_content_type_parameter (string name);
		public unowned string get_disposition ();
		public virtual unowned string get_header (string header);
		public unowned GMime.HeaderList get_header_list ();
		public virtual string get_headers ();
		public virtual void prepend_header (string header, string value);
		public static void register_type (string type, string subtype, GLib.Type object_type);
		public virtual bool remove_header (string header);
		public void set_content_disposition (GMime.ContentDisposition disposition);
		public void set_content_disposition_parameter (string attribute, string value);
		public void set_content_id (string content_id);
		public virtual void set_content_type (GMime.ContentType content_type);
		public void set_content_type_parameter (string name, string value);
		public void set_disposition (string disposition);
		public virtual void set_header (string header, string value);
		public string to_string ();
		[CCode (has_construct_function = false)]
		public Object.type (string type, string subtype);
		public static void type_registry_init ();
		public static void type_registry_shutdown ();
		public virtual long write_to_stream (GMime.Stream stream);
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class Param {
		public weak string name;
		public weak GMime.Param next;
		public weak string value;
		public void destroy ();
		public unowned string get_name ();
		[CCode (cname = "g_mime_param_next")]
		public unowned GMime.Param? get_next ();
		public unowned string get_value ();
		public void write_to_string (bool fold, GLib.StringBuilder str);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_parser_get_type ()")]
	public class Parser : GLib.Object {
		[CCode (has_construct_function = false)]
		public Parser ();
		public GMime.Message? construct_message ();
		public GMime.Object construct_part ();
		public bool eos ();
		public string get_from ();
		public int64 get_from_offset ();
		public int64 get_headers_begin ();
		public int64 get_headers_end ();
		public bool get_persist_stream ();
		public bool get_respect_content_length ();
		public bool get_scan_from ();
		public void init_with_stream (GMime.Stream stream);
		public void set_persist_stream (bool persist);
		public void set_respect_content_length (bool respect_content_length);
		public void set_scan_from (bool scan_from);
		public int64 tell ();
		[CCode (has_construct_function = false)]
		public Parser.with_stream (GMime.Stream stream);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_part_get_type ()")]
	public class Part : GMime.Object {
		public weak GMime.DataWrapper content;
		public weak string content_description;
		public weak string content_location;
		public weak string content_md5;
		public GMime.ContentEncoding encoding;
		[CCode (has_construct_function = false)]
		public Part ();
		public GMime.ContentEncoding get_best_content_encoding (GMime.EncodingConstraint constraint);
		public unowned string get_content_description ();
		public GMime.ContentEncoding get_content_encoding ();
		public unowned string get_content_id ();
		public unowned string get_content_location ();
		public unowned string get_content_md5 ();
		public unowned GMime.DataWrapper get_content_object ();
		public unowned string get_filename ();
		public void set_content_description (string description);
		public void set_content_encoding (GMime.ContentEncoding encoding);
		public void set_content_id (string content_id);
		public void set_content_location (string content_location);
		public void set_content_md5 (string content_md5);
		public virtual void set_content_object (GMime.DataWrapper content);
		public void set_filename (string filename);
		public bool verify_content_md5 ();
		[CCode (has_construct_function = false)]
		public Part.with_type (string type, string subtype);
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class PartIter {
		public void free ();
		public unowned GMime.Object get_current ();
		public unowned GMime.Object get_parent ();
		public string get_path ();
		public unowned GMime.Object get_toplevel ();
		public bool is_valid ();
		public bool jump_to (string path);
		public bool next ();
		public bool prev ();
		public bool remove ();
		public bool replace (GMime.Object replacement);
		public void reset ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_pkcs7_context_get_type ()")]
	public class Pkcs7Context : GMime.CryptoContext {
		[CCode (has_construct_function = false)]
		protected Pkcs7Context ();
		public bool get_always_trust ();
		public void set_always_trust (bool always_trust);
	}
	[CCode (cheader_filename = "gmime/gmime.h")]
	[Compact]
	public class References {
		public weak string msgid;
		public weak GMime.References next;
		public static void append (GMime.References refs, string msgid);
		public static void clear (GMime.References refs);
		public void free ();
		public unowned string get_message_id ();
		public unowned GMime.References get_next ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_signature_get_type ()")]
	public class Signature : GLib.Object {
		public weak GMime.Certificate cert;
		public long created;
		public GMime.SignatureError errors;
		public long expires;
		public GMime.SignatureStatus status;
		[CCode (has_construct_function = false)]
		public Signature ();
		public unowned GMime.Certificate get_certificate ();
		public long get_created ();
		public GMime.SignatureError get_errors ();
		public long get_expires ();
		public GMime.SignatureStatus get_status ();
		public void set_certificate (GMime.Certificate cert);
		public void set_created (long created);
		public void set_errors (GMime.SignatureError errors);
		public void set_expires (long expires);
		public void set_status (GMime.SignatureStatus status);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_signature_list_get_type ()")]
	public class SignatureList : GLib.Object {
		public weak GLib.GenericArray<void*> array;
		[CCode (has_construct_function = false)]
		public SignatureList ();
		public int add (GMime.Signature sig);
		public void clear ();
		public bool contains (GMime.Signature sig);
		public unowned GMime.Signature get_signature (int index);
		public int index_of (GMime.Signature sig);
		public void insert (int index, GMime.Signature sig);
		public int length ();
		public bool remove (GMime.Signature sig);
		public bool remove_at (int index);
		public void set_signature (int index, GMime.Signature sig);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_get_type ()")]
	public abstract class Stream : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Stream ();
		public long buffer_gets (string buf, ulong max);
		public void buffer_readln (GLib.ByteArray buffer);
		public virtual int close ();
		public void @construct (int64 start, int64 end);
		public virtual bool eos ();
		public virtual int flush ();
		public virtual int64 length ();
		public virtual long read ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gulong")] uint8[] buf);
		public virtual int reset ();
		public virtual int64 seek (int64 offset, GMime.SeekWhence whence);
		public void set_bounds (int64 start, int64 end);
		public virtual GMime.Stream substream (int64 start, int64 end);
		public virtual int64 tell ();
		public virtual long write (string buf, ulong len);
		public long write_string (string str);
		public long write_to_stream (GMime.Stream dest);
		public long writev (GMime.StreamIOVector vector, ulong count);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_buffer_get_type ()")]
	public class StreamBuffer : GMime.Stream {
		public weak string bufend;
		public weak string buffer;
		public ulong buflen;
		public weak string bufptr;
		public GMime.StreamBufferMode mode;
		public weak GMime.Stream source;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamBuffer (GMime.Stream source, GMime.StreamBufferMode mode);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_cat_get_type ()")]
	public class StreamCat : GMime.Stream {
		public void* current;
		public void* sources;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamCat ();
		public int add_source (GMime.Stream source);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_file_get_type ()")]
	public class StreamFile : GMime.Stream {
		public void* fp;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamFile (void* fp);
		public bool get_owner ();
		public void set_owner (bool owner);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamFile.with_bounds (void* fp, int64 start, int64 end);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_filter_get_type ()")]
	public class StreamFilter : GMime.Stream {
		public weak GMime.Stream source;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamFilter (GMime.Stream stream);
		public int add (GMime.Filter filter);
		public void remove (int id);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_fs_get_type ()")]
	public class StreamFs : GMime.Stream {
		public bool eos;
		public int fd;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamFs (int fd);
		public bool get_owner ();
		public void set_owner (bool owner);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamFs.with_bounds (int fd, int64 start, int64 end);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_gio_get_type ()")]
	public class StreamGIO : GMime.Stream {
		public bool eos;
		public weak GLib.File file;
		public weak GLib.InputStream istream;
		public weak GLib.OutputStream ostream;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamGIO (GLib.File file);
		public bool get_owner ();
		public void set_owner (bool owner);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamGIO.with_bounds (GLib.File file, int64 start, int64 end);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_mem_get_type ()")]
	public class StreamMem : GMime.Stream {
		public weak GLib.ByteArray buffer;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamMem ();
		public unowned GLib.ByteArray get_byte_array ();
		public bool get_owner ();
		public void set_byte_array (GLib.ByteArray array);
		public void set_owner (bool owner);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamMem.with_buffer ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gulong")] uint8[] buffer);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamMem.with_byte_array (GLib.ByteArray array);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_mmap_get_type ()")]
	public class StreamMmap : GMime.Stream {
		public bool eos;
		public int fd;
		public weak string map;
		public ulong maplen;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamMmap (int fd, int prot, int flags);
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamMmap.with_bounds (int fd, int prot, int flags, int64 start, int64 end);
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_null_get_type ()")]
	public class StreamNull : GMime.Stream {
		public ulong newlines;
		public ulong written;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamNull ();
	}
	[CCode (cheader_filename = "gmime/gmime.h", type_id = "g_mime_stream_pipe_get_type ()")]
	public class StreamPipe : GMime.Stream {
		public bool eos;
		public int fd;
		public bool owner;
		[CCode (has_construct_function = false, type = "GMimeStream*")]
		public StreamPipe (int fd);
		public bool get_owner ();
		public void set_owner (bool owner);
	}
	[CCode (cheader_filename = "gmime/gmime.h", has_type_id = false)]
	public struct Charset {
		public uint mask;
		public uint level;
		public static unowned string best (string inbuf, ulong inlen);
		public unowned string best_name ();
		public bool can_encode (string charset, string text, ulong len);
		public static unowned string canon_name (string charset);
		public static unowned string iconv_name (string charset);
		public void init ();
		public static unowned string iso_to_windows (string isocharset);
		public static unowned string language (string charset);
		public static unowned string locale_name ();
		public static void map_init ();
		public static void map_shutdown ();
		public static unowned string name (string charset);
		public void step (string inbuf, ulong inlen);
	}
	[CCode (cheader_filename = "gmime/gmime.h", has_type_id = false)]
	public struct Encoding {
		public GMime.ContentEncoding encoding;
		[CCode (array_length = false, array_null_terminated = true)]
		public weak uint[] uubuf;
		public bool encode;
		public uint32 save;
		public int state;
		public static ulong base64_decode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public static ulong base64_encode_close (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public static ulong base64_encode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public ulong flush (string inbuf, ulong inlen, string outbuf);
		public void init_decode (GMime.ContentEncoding encoding);
		public void init_encode (GMime.ContentEncoding encoding);
		public ulong outlen (ulong inlen);
		public static ulong quoted_decode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public static ulong quoted_encode_close (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public static ulong quoted_encode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public void reset ();
		public ulong step (string inbuf, ulong inlen, string outbuf);
		public static ulong uudecode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 save);
		public static ulong uuencode_close (uint8 inbuf, ulong inlen, uint8 outbuf, uint8 uubuf, int state, uint32 save);
		public static ulong uuencode_step (uint8 inbuf, ulong inlen, uint8 outbuf, uint8 uubuf, int state, uint32 save);
	}
	[CCode (cheader_filename = "gmime/gmime.h", has_type_id = false)]
	public struct StreamIOVector {
		public void* data;
		public ulong len;
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_CERTIFICATE_TRUST_", has_type_id = false)]
	public enum CertificateTrust {
		NONE,
		NEVER,
		UNDEFINED,
		MARGINAL,
		FULLY,
		ULTIMATE
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_CIPHER_ALGO_", has_type_id = false)]
	public enum CipherAlgo {
		DEFAULT,
		IDEA,
		@3DES,
		CAST5,
		BLOWFISH,
		AES,
		AES192,
		AES256,
		TWOFISH,
		CAMELLIA128,
		CAMELLIA192,
		CAMELLIA256
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_CONTENT_ENCODING_", has_type_id = false)]
	public enum ContentEncoding {
		DEFAULT,
		@7BIT,
		@8BIT,
		BINARY,
		BASE64,
		QUOTEDPRINTABLE,
		UUENCODE;
		public static GMime.ContentEncoding from_string (string str);
		public static unowned string to_string (GMime.ContentEncoding encoding);
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_DIGEST_ALGO_", has_type_id = false)]
	public enum DigestAlgo {
		DEFAULT,
		MD5,
		SHA1,
		RIPEMD160,
		MD2,
		TIGER192,
		HAVAL5160,
		SHA256,
		SHA384,
		SHA512,
		SHA224,
		MD4
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_ENCODING_CONSTRAINT_", has_type_id = false)]
	public enum EncodingConstraint {
		@7BIT,
		@8BIT,
		BINARY
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_FILTER_BEST_", has_type_id = false)]
	[Flags]
	public enum FilterBestFlags {
		CHARSET,
		ENCODING
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_FILTER_FROM_MODE_", has_type_id = false)]
	public enum FilterFromMode {
		DEFAULT,
		ESCAPE,
		ARMOR
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_FILTER_GZIP_MODE_", has_type_id = false)]
	public enum FilterGZipMode {
		ZIP,
		UNZIP
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_PUBKEY_ALGO_", has_type_id = false)]
	public enum PubKeyAlgo {
		DEFAULT,
		RSA,
		RSA_E,
		RSA_S,
		ELG_E,
		DSA,
		ELG
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_RECIPIENT_TYPE_", has_type_id = false)]
	public enum RecipientType {
		TO,
		CC,
		BCC
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_STREAM_SEEK_", has_type_id = false)]
	public enum SeekWhence {
		SET,
		CUR,
		END
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNATURE_ERROR_", has_type_id = false)]
	[Flags]
	public enum SignatureError {
		NONE,
		EXPSIG,
		NO_PUBKEY,
		EXPKEYSIG,
		REVKEYSIG,
		UNSUPP_ALGO
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNATURE_STATUS_", has_type_id = false)]
	public enum SignatureStatus {
		GOOD,
		ERROR,
		BAD
	}
	[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_STREAM_BUFFER_", has_type_id = false)]
	public enum StreamBufferMode {
		CACHE_READ,
		BLOCK_READ,
		BLOCK_WRITE
	}
	[CCode (cheader_filename = "gmime/gmime.h", instance_pos = 2.9)]
	public delegate void HeaderForeachFunc (string name, string value);
	[CCode (cheader_filename = "gmime/gmime.h", has_target = false)]
	public delegate long HeaderWriter (GMime.Stream stream, string name, string value);
	[CCode (cheader_filename = "gmime/gmime.h", instance_pos = 2.9)]
	public delegate void ObjectForeachFunc (GMime.Object parent, GMime.Object part);
	[CCode (cheader_filename = "gmime/gmime.h", instance_pos = 4.9)]
	public delegate void ParserHeaderRegexFunc (GMime.Parser parser, string header, string value, int64 offset);
	[CCode (cheader_filename = "gmime/gmime.h", has_target = false)]
	public delegate bool PasswordRequestFunc (GMime.CryptoContext ctx, string user_id, string prompt_ctx, bool reprompt, GMime.Stream response) throws GLib.Error;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_BINARY_AGE")]
	public const int GMIME_BINARY_AGE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_DISPOSITION_ATTACHMENT")]
	public const string GMIME_DISPOSITION_ATTACHMENT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_DISPOSITION_INLINE")]
	public const string GMIME_DISPOSITION_INLINE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_ENABLE_RFC2047_WORKAROUNDS")]
	public const int GMIME_ENABLE_RFC2047_WORKAROUNDS;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_ENABLE_USE_ONLY_USER_CHARSETS")]
	public const int GMIME_ENABLE_USE_ONLY_USER_CHARSETS;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_ENRICHED_IS_RICHTEXT")]
	public const int GMIME_FILTER_ENRICHED_IS_RICHTEXT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_CITE")]
	public const int GMIME_FILTER_HTML_CITE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_CONVERT_ADDRESSES")]
	public const int GMIME_FILTER_HTML_CONVERT_ADDRESSES;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_CONVERT_NL")]
	public const int GMIME_FILTER_HTML_CONVERT_NL;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_CONVERT_SPACES")]
	public const int GMIME_FILTER_HTML_CONVERT_SPACES;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_CONVERT_URLS")]
	public const int GMIME_FILTER_HTML_CONVERT_URLS;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_ESCAPE_8BIT")]
	public const int GMIME_FILTER_HTML_ESCAPE_8BIT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_MARK_CITATION")]
	public const int GMIME_FILTER_HTML_MARK_CITATION;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_FILTER_HTML_PRE")]
	public const int GMIME_FILTER_HTML_PRE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_INTERFACE_AGE")]
	public const int GMIME_INTERFACE_AGE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_MAJOR_VERSION")]
	public const int GMIME_MAJOR_VERSION;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_MICRO_VERSION")]
	public const int GMIME_MICRO_VERSION;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_MINOR_VERSION")]
	public const int GMIME_MINOR_VERSION;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_UUDECODE_STATE_BEGIN")]
	public const int GMIME_UUDECODE_STATE_BEGIN;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_UUDECODE_STATE_END")]
	public const int GMIME_UUDECODE_STATE_END;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_UUDECODE_STATE_INIT")]
	public const int GMIME_UUDECODE_STATE_INIT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_UUDECODE_STATE_MASK")]
	public const int GMIME_UUDECODE_STATE_MASK;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_BEGIN")]
	public const int GMIME_YDECODE_STATE_BEGIN;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_DECODE")]
	public const int GMIME_YDECODE_STATE_DECODE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_END")]
	public const int GMIME_YDECODE_STATE_END;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_EOLN")]
	public const int GMIME_YDECODE_STATE_EOLN;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_ESCAPE")]
	public const int GMIME_YDECODE_STATE_ESCAPE;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_INIT")]
	public const int GMIME_YDECODE_STATE_INIT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YDECODE_STATE_PART")]
	public const int GMIME_YDECODE_STATE_PART;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YENCODE_CRC_INIT")]
	public const int GMIME_YENCODE_CRC_INIT;
	[CCode (cheader_filename = "gmime/gmime.h", cname = "GMIME_YENCODE_STATE_INIT")]
	public const int GMIME_YENCODE_STATE_INIT;
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static bool check_version (uint major, uint minor, uint micro);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void iconv_init ();
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string iconv_locale_to_utf8 (string str);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string iconv_locale_to_utf8_length (string str, ulong n);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void iconv_shutdown ();
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string iconv_utf8_to_locale (string str);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string iconv_utf8_to_locale_length (string str, ulong n);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void init (uint32 flags);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static unowned string locale_charset ();
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static unowned string locale_language ();
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void set_user_charsets (string charsets);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void shutdown ();
	[CCode (array_length = false, array_null_terminated = true, cheader_filename = "gmime/gmime.h")]
	public static unowned string[] user_charsets ();
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static GMime.ContentEncoding utils_best_encoding (uint8 text, ulong len);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_decode_8bit ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gulong")] uint8[] text);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_decode_message_id (string message_id);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_generate_message_id (string fqdn);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static time_t utils_header_decode_date (string str, out int tz_offset);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_decode_phrase (string phrase);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_decode_text (string text);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_encode_phrase (string phrase);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_encode_text (string text);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_fold (string header);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_header_format_date (long date, int tz_offset);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_quote_string (string str);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_structured_header_fold (string header);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static bool utils_text_is_8bit (uint8 text, ulong len);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static void utils_unquote_string (string str);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static string utils_unstructured_header_fold (string header);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static ulong ydecode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 pcrc, uint32 crc);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static ulong yencode_close (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 pcrc, uint32 crc);
	[CCode (cheader_filename = "gmime/gmime.h")]
	public static ulong yencode_step (uint8 inbuf, ulong inlen, uint8 outbuf, int state, uint32 pcrc, uint32 crc);
}
