Commit 27b8450d authored by Eric Gregory's avatar Eric Gregory

Closes #4167 Updated to GMime 2.6

parent d7929a7e
......@@ -222,13 +222,13 @@ pkg_check_modules(DEPS REQUIRED
unique-3.0>=3.0.0
sqlite3>=3.7.4
sqlheavy-0.2>=0.2.0
gmime-2.4>=2.4.14
gmime-2.6>=2.6.0
gnome-keyring-1>=2.32.0
webkitgtk-3.0>=1.4.3
)
set(ENGINE_PACKAGES
glib-2.0 gee-1.0 gio-2.0 sqlheavy-0.2 gmime-2.4 unique-3.0 posix
glib-2.0 gee-1.0 gio-2.0 sqlheavy-0.2 gmime-2.6 unique-3.0 posix
)
set(CLIENT_PACKAGES
......
......@@ -2,21 +2,21 @@
# which are not default in a standard Vala installation.
GMIME_FILES := \
gmime-2.4/gmime-2.4.defines \
gmime-2.4/gmime-2.4.files \
gmime-2.4/gmime-2.4.metadata \
gmime-2.4/gmime-2.4.namespace \
gmime-2.4/gmime-2.4-custom.vala
gmime-2.6/gmime-2.6.defines \
gmime-2.6/gmime-2.6.files \
gmime-2.6/gmime-2.6.metadata \
gmime-2.6/gmime-2.6.namespace \
gmime-2.6/gmime-2.6-custom.vala
all: gmime-2.4.vapi
all: gmime-2.6.vapi
.PHONY: clean
clean:
rm gmime-2.4.vapi gmime-2.4/gmime-2.4.gi
rm gmime-2.6.vapi gmime-2.6/gmime-2.6.gi
gmime-2.4/gmime-2.4.gi: $(GMIME_FILES)
vala-gen-introspect gmime-2.4 gmime-2.4
gmime-2.6/gmime-2.6.gi: $(GMIME_FILES)
vala-gen-introspect gmime-2.6 gmime-2.6
gmime-2.4.vapi: gmime-2.4/gmime-2.4.gi
vapigen --pkg=glib-2.0 --pkg=gio-2.0 --library gmime-2.4 gmime-2.4/gmime-2.4.gi gmime-2.4/gmime-2.4-custom.vala
gmime-2.6.vapi: gmime-2.6/gmime-2.6.gi
vapigen --pkg=glib-2.0 --pkg=gio-2.0 --library gmime-2.6 gmime-2.6/gmime-2.6.gi gmime-2.6/gmime-2.6-custom.vala
include/gmime-2.4/
lib/libgmime-2.4.so
/* gmime-2.4.vapi generated by vapigen, do not modify. */
/* gmime-2.6.vapi generated by vapigen, do not modify. */
[CCode (lower_case_cprefix = "gmime_")]
namespace GMime {
[CCode (cheader_filename = "gmime/gmime.h")]
public class Certificate : GLib.Object {
public ulong created;
public GMime.DigestAlgo digest_algo;
public weak string email;
public ulong 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 (cname = "g_mime_certificate_new", has_construct_function = false)]
public Certificate ();
[CCode (cname = "g_mime_certificate_get_created")]
public ulong get_created ();
[CCode (cname = "g_mime_certificate_get_digest_algo")]
public GMime.DigestAlgo get_digest_algo ();
[CCode (cname = "g_mime_certificate_get_email")]
public unowned string get_email ();
[CCode (cname = "g_mime_certificate_get_expires")]
public ulong get_expires ();
[CCode (cname = "g_mime_certificate_get_fingerprint")]
public unowned string get_fingerprint ();
[CCode (cname = "g_mime_certificate_get_issuer_name")]
public unowned string get_issuer_name ();
[CCode (cname = "g_mime_certificate_get_issuer_serial")]
public unowned string get_issuer_serial ();
[CCode (cname = "g_mime_certificate_get_key_id")]
public unowned string get_key_id ();
[CCode (cname = "g_mime_certificate_get_name")]
public unowned string get_name ();
[CCode (cname = "g_mime_certificate_get_pubkey_algo")]
public GMime.PubKeyAlgo get_pubkey_algo ();
[CCode (cname = "g_mime_certificate_get_trust")]
public GMime.CertificateTrust get_trust ();
[CCode (cname = "g_mime_certificate_set_created")]
public void set_created (ulong created);
[CCode (cname = "g_mime_certificate_set_digest_algo")]
public void set_digest_algo (GMime.DigestAlgo algo);
[CCode (cname = "g_mime_certificate_set_email")]
public void set_email (string email);
[CCode (cname = "g_mime_certificate_set_expires")]
public void set_expires (ulong expires);
[CCode (cname = "g_mime_certificate_set_fingerprint")]
public void set_fingerprint (string fingerprint);
[CCode (cname = "g_mime_certificate_set_issuer_name")]
public void set_issuer_name (string issuer_name);
[CCode (cname = "g_mime_certificate_set_issuer_serial")]
public void set_issuer_serial (string issuer_serial);
[CCode (cname = "g_mime_certificate_set_key_id")]
public void set_key_id (string key_id);
[CCode (cname = "g_mime_certificate_set_name")]
public void set_name (string name);
[CCode (cname = "g_mime_certificate_set_pubkey_algo")]
public void set_pubkey_algo (GMime.PubKeyAlgo algo);
[CCode (cname = "g_mime_certificate_set_trust")]
public void set_trust (GMime.CertificateTrust trust);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class CertificateList : GLib.Object {
public weak GLib.PtrArray array;
[CCode (cname = "g_mime_certificate_list_new", has_construct_function = false)]
public CertificateList ();
[CCode (cname = "g_mime_certificate_list_add")]
public int add (GMime.Certificate cert);
[CCode (cname = "g_mime_certificate_list_clear")]
public void clear ();
[CCode (cname = "g_mime_certificate_list_contains")]
public bool contains (GMime.Certificate cert);
[CCode (cname = "g_mime_certificate_list_get_certificate")]
public unowned GMime.Certificate get_certificate (int index);
[CCode (cname = "g_mime_certificate_list_index_of")]
public int index_of (GMime.Certificate cert);
[CCode (cname = "g_mime_certificate_list_insert")]
public void insert (int index, GMime.Certificate cert);
[CCode (cname = "g_mime_certificate_list_length")]
public int length ();
[CCode (cname = "g_mime_certificate_list_remove")]
public bool remove (GMime.Certificate cert);
[CCode (cname = "g_mime_certificate_list_remove_at")]
public bool remove_at (int index);
[CCode (cname = "g_mime_certificate_list_set_certificate")]
public void set_certificate (int index, GMime.Certificate cert);
}
[CCode (cheader_filename = "gmime/gmime.h")]
[Compact]
public class Charset {
......@@ -35,31 +121,6 @@ namespace GMime {
public void step (string inbuf, size_t inlen);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class CipherContext : GLib.Object {
public weak string encrypt_protocol;
public weak string key_protocol;
public weak GMime.Session session;
public weak string sign_protocol;
[CCode (has_construct_function = false)]
protected CipherContext ();
[CCode (cname = "g_mime_cipher_context_decrypt")]
public virtual unowned GMime.SignatureValidity decrypt (GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_cipher_context_encrypt")]
public virtual int encrypt (bool sign, string userid, GLib.PtrArray recipients, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_cipher_context_export_keys")]
public virtual int export_keys (GLib.PtrArray keys, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_cipher_context_hash_id")]
public virtual GMime.CipherHash hash_id (string hash);
[CCode (cname = "g_mime_cipher_context_hash_name")]
public virtual unowned string hash_name (GMime.CipherHash hash);
[CCode (cname = "g_mime_cipher_context_import_keys")]
public virtual int import_keys (GMime.Stream istream) throws GLib.Error;
[CCode (cname = "g_mime_cipher_context_sign")]
public virtual int sign (string userid, GMime.CipherHash hash, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_cipher_context_verify")]
public virtual unowned GMime.SignatureValidity verify (GMime.CipherHash hash, GMime.Stream istream, GMime.Stream sigstream) throws GLib.Error;
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class ContentDisposition : GLib.Object {
public weak string disposition;
public weak GLib.HashTable param_hash;
......@@ -82,7 +143,6 @@ namespace GMime {
public void set_params (GMime.Param @params);
[CCode (cname = "g_mime_content_disposition_to_string")]
public unowned string to_string (bool fold);
public virtual signal void changed ();
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class ContentType : GLib.Object {
......@@ -114,7 +174,36 @@ namespace GMime {
public void set_params (GMime.Param @params);
[CCode (cname = "g_mime_content_type_to_string")]
public unowned string to_string ();
public virtual signal void changed ();
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class CryptoContext : GLib.Object {
public weak GMime.PasswordRequestFunc request_passwd;
[CCode (has_construct_function = false)]
protected CryptoContext ();
[CCode (cname = "g_mime_crypto_context_decrypt")]
public virtual unowned GMime.DecryptResult decrypt (GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_crypto_context_digest_id")]
public virtual GMime.DigestAlgo digest_id (string name);
[CCode (cname = "g_mime_crypto_context_digest_name")]
public virtual unowned string digest_name (GMime.DigestAlgo digest);
[CCode (cname = "g_mime_crypto_context_encrypt")]
public virtual int encrypt (bool sign, string userid, GMime.DigestAlgo digest, GLib.PtrArray recipients, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_crypto_context_export_keys")]
public virtual int export_keys (GLib.PtrArray keys, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_crypto_context_get_encryption_protocol")]
public virtual unowned string get_encryption_protocol ();
[CCode (cname = "g_mime_crypto_context_get_key_exchange_protocol")]
public virtual unowned string get_key_exchange_protocol ();
[CCode (cname = "g_mime_crypto_context_get_signature_protocol")]
public virtual unowned string get_signature_protocol ();
[CCode (cname = "g_mime_crypto_context_import_keys")]
public virtual int import_keys (GMime.Stream istream) throws GLib.Error;
[CCode (cname = "g_mime_crypto_context_set_request_password")]
public void set_request_password (GMime.PasswordRequestFunc request_passwd);
[CCode (cname = "g_mime_crypto_context_sign")]
public virtual int sign (string userid, GMime.DigestAlgo digest, GMime.Stream istream, GMime.Stream ostream) throws GLib.Error;
[CCode (cname = "g_mime_crypto_context_verify")]
public virtual unowned GMime.SignatureList verify (GMime.DigestAlgo digest, GMime.Stream istream, GMime.Stream sigstream) throws GLib.Error;
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class DataWrapper : GLib.Object {
......@@ -136,6 +225,31 @@ namespace GMime {
public virtual ssize_t write_to_stream (GMime.Stream stream);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class DecryptResult : GLib.Object {
public GMime.CipherAlgo cipher;
public GMime.DigestAlgo mdc;
public weak GMime.CertificateList recipients;
public weak GMime.SignatureList signatures;
[CCode (cname = "g_mime_decrypt_result_new", has_construct_function = false)]
public DecryptResult ();
[CCode (cname = "g_mime_decrypt_result_get_cipher")]
public GMime.CipherAlgo get_cipher ();
[CCode (cname = "g_mime_decrypt_result_get_mdc")]
public GMime.DigestAlgo get_mdc ();
[CCode (cname = "g_mime_decrypt_result_get_recipients")]
public unowned GMime.CertificateList get_recipients ();
[CCode (cname = "g_mime_decrypt_result_get_signatures")]
public unowned GMime.SignatureList get_signatures ();
[CCode (cname = "g_mime_decrypt_result_set_cipher")]
public void set_cipher (GMime.CipherAlgo cipher);
[CCode (cname = "g_mime_decrypt_result_set_mdc")]
public void set_mdc (GMime.DigestAlgo mdc);
[CCode (cname = "g_mime_decrypt_result_set_recipients")]
public void set_recipients (GMime.CertificateList recipients);
[CCode (cname = "g_mime_decrypt_result_set_signatures")]
public void set_signatures (GMime.SignatureList signatures);
}
[CCode (cheader_filename = "gmime/gmime.h")]
[Compact]
public class Encoding {
public bool encode;
......@@ -225,7 +339,7 @@ namespace GMime {
[CCode (cname = "g_mime_filter_best_charset")]
public unowned string charset ();
[CCode (cname = "g_mime_filter_best_encoding")]
public GMime.ContentEncoding encoding (GMime.BestEncoding required);
public GMime.ContentEncoding encoding (GMime.EncodingConstraint constraint);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class FilterCRLF : GMime.Filter {
......@@ -318,15 +432,25 @@ namespace GMime {
public void set_state (int state);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class GpgContext : GMime.CipherContext {
public class GpgContext : GMime.CryptoContext {
public bool always_trust;
public bool auto_key_retrieve;
public weak string path;
[CCode (cname = "g_mime_gpg_context_new", has_construct_function = false, type = "GMimeCipherContext*")]
public GpgContext (GMime.Session session, string path);
public bool use_agent;
[CCode (cname = "g_mime_gpg_context_new", has_construct_function = false, type = "GMimeCryptoContext*")]
public GpgContext (GMime.PasswordRequestFunc request_passwd, string path);
[CCode (cname = "g_mime_gpg_context_get_always_trust")]
public bool get_always_trust ();
[CCode (cname = "g_mime_gpg_context_get_auto_key_retrieve")]
public bool get_auto_key_retrieve ();
[CCode (cname = "g_mime_gpg_context_get_use_agent")]
public bool get_use_agent ();
[CCode (cname = "g_mime_gpg_context_set_always_trust")]
public void set_always_trust (bool always_trust);
[CCode (cname = "g_mime_gpg_context_set_auto_key_retrieve")]
public void set_auto_key_retrieve (bool auto_key_retrieve);
[CCode (cname = "g_mime_gpg_context_set_use_agent")]
public void set_use_agent (bool use_agent);
}
[CCode (cheader_filename = "gmime/gmime.h")]
[Compact]
......@@ -372,6 +496,10 @@ namespace GMime {
public HeaderList ();
[CCode (cname = "g_mime_header_list_append")]
public void append (string name, string value);
[CCode (cname = "g_mime_header_list_clear")]
public void clear ();
[CCode (cname = "g_mime_header_list_contains")]
public bool contains (string name);
[CCode (cname = "g_mime_header_list_foreach")]
public void @foreach (GMime.HeaderForeachFunc func);
[CCode (cname = "g_mime_header_list_get")]
......@@ -380,8 +508,6 @@ namespace GMime {
public bool get_iter (out unowned GMime.HeaderIter iter);
[CCode (cname = "g_mime_header_list_get_stream")]
public unowned GMime.Stream get_stream ();
[CCode (cname = "g_mime_header_list_has_raw")]
public bool has_raw ();
[CCode (cname = "g_mime_header_list_prepend")]
public void prepend (string name, string value);
[CCode (cname = "g_mime_header_list_register_writer")]
......@@ -390,8 +516,6 @@ namespace GMime {
public bool remove (string name);
[CCode (cname = "g_mime_header_list_set")]
public void @set (string name, string value);
[CCode (cname = "g_mime_header_list_set_raw")]
public void set_raw (string raw);
[CCode (cname = "g_mime_header_list_set_stream")]
public void set_stream (GMime.Stream stream);
[CCode (cname = "g_mime_header_list_to_string")]
......@@ -417,6 +541,8 @@ namespace GMime {
public void @foreach (GMime.ObjectForeachFunc callback);
[CCode (cname = "g_mime_message_get_all_recipients")]
public unowned InternetAddressList get_all_recipients ();
[CCode (cname = "g_mime_message_get_body")]
public unowned GMime.Object get_body ();
[CCode (cname = "g_mime_message_get_date")]
public void get_date (out ulong date, out int tz_offset);
[CCode (cname = "g_mime_message_get_date_as_string")]
......@@ -514,6 +640,8 @@ namespace GMime {
public virtual bool remove (GMime.Object part);
[CCode (cname = "g_mime_multipart_remove_at")]
public virtual unowned GMime.Object remove_at (int index);
[CCode (cname = "g_mime_multipart_replace")]
public unowned GMime.Object replace (int index, GMime.Object replacement);
[CCode (cname = "g_mime_multipart_set_boundary")]
public virtual void set_boundary (string boundary);
[CCode (cname = "g_mime_multipart_set_postface")]
......@@ -525,25 +653,21 @@ namespace GMime {
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class MultipartEncrypted : GMime.Multipart {
public weak GMime.Object decrypted;
public weak GMime.SignatureValidity validity;
[CCode (cname = "g_mime_multipart_encrypted_new", has_construct_function = false)]
public MultipartEncrypted ();
[CCode (cname = "g_mime_multipart_encrypted_decrypt")]
public unowned GMime.Object decrypt (GMime.CipherContext ctx) throws GLib.Error;
public unowned GMime.Object decrypt (GMime.CryptoContext ctx, out unowned GMime.DecryptResult _result) throws GLib.Error;
[CCode (cname = "g_mime_multipart_encrypted_encrypt")]
public int encrypt (GMime.Object content, GMime.CipherContext ctx, bool sign, string userid, GLib.PtrArray recipients) throws GLib.Error;
[CCode (cname = "g_mime_multipart_encrypted_get_signature_validity")]
public unowned GMime.SignatureValidity get_signature_validity ();
public int encrypt (GMime.Object content, GMime.CryptoContext ctx, bool sign, string userid, GMime.DigestAlgo digest, GLib.PtrArray recipients) throws GLib.Error;
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class MultipartSigned : GMime.Multipart {
[CCode (cname = "g_mime_multipart_signed_new", has_construct_function = false)]
public MultipartSigned ();
[CCode (cname = "g_mime_multipart_signed_sign")]
public int sign (GMime.Object content, GMime.CipherContext ctx, string userid, GMime.CipherHash hash) throws GLib.Error;
public int sign (GMime.Object content, GMime.CryptoContext ctx, string userid, GMime.DigestAlgo digest) throws GLib.Error;
[CCode (cname = "g_mime_multipart_signed_verify")]
public unowned GMime.SignatureValidity verify (GMime.CipherContext ctx) throws GLib.Error;
public unowned GMime.SignatureList verify (GMime.CryptoContext ctx) throws GLib.Error;
}
[CCode (cheader_filename = "gmime/gmime.h")]
public abstract class Object : GLib.Object {
......@@ -555,6 +679,8 @@ namespace GMime {
public Object (GMime.ContentType content_type);
[CCode (cname = "g_mime_object_append_header")]
public virtual void append_header (string header, string value);
[CCode (cname = "g_mime_object_encode")]
public virtual void encode (GMime.EncodingConstraint constraint);
[CCode (cname = "g_mime_object_get_content_disposition")]
public unowned GMime.ContentDisposition get_content_disposition ();
[CCode (cname = "g_mime_object_get_content_disposition_parameter")]
......@@ -675,6 +801,8 @@ namespace GMime {
public GMime.ContentEncoding encoding;
[CCode (cname = "g_mime_part_new", has_construct_function = false)]
public Part ();
[CCode (cname = "g_mime_part_get_best_content_encoding")]
public GMime.ContentEncoding get_best_content_encoding (GMime.EncodingConstraint constraint);
[CCode (cname = "g_mime_part_get_content_description")]
public unowned string get_content_description ();
[CCode (cname = "g_mime_part_get_content_encoding")]
......@@ -708,6 +836,43 @@ namespace GMime {
[CCode (cname = "g_mime_part_new_with_type", has_construct_function = false)]
public Part.with_type (string type, string subtype);
}
[CCode (cheader_filename = "gmime/gmime.h", free_function = "g_mime_part_iter_free")]
[Compact]
public class PartIter {
[CCode (cname = "g_mime_part_iter_new", has_construct_function = false)]
public PartIter (GMime.Object toplevel);
[CCode (cname = "g_mime_part_iter_get_current")]
public unowned GMime.Object get_current ();
[CCode (cname = "g_mime_part_iter_get_parent")]
public unowned GMime.Object get_parent ();
[CCode (cname = "g_mime_part_iter_get_path")]
public unowned string get_path ();
[CCode (cname = "g_mime_part_iter_get_toplevel")]
public unowned GMime.Object get_toplevel ();
[CCode (cname = "g_mime_part_iter_is_valid")]
public bool is_valid ();
[CCode (cname = "g_mime_part_iter_jump_to")]
public bool jump_to (string path);
[CCode (cname = "g_mime_part_iter_next")]
public bool next ();
[CCode (cname = "g_mime_part_iter_prev")]
public bool prev ();
[CCode (cname = "g_mime_part_iter_remove")]
public bool remove ();
[CCode (cname = "g_mime_part_iter_replace")]
public bool replace (GMime.Object replacement);
[CCode (cname = "g_mime_part_iter_reset")]
public void reset ();
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class Pkcs7Context : GMime.CryptoContext {
[CCode (cname = "g_mime_pkcs7_context_new", has_construct_function = false, type = "GMimeCryptoContext*")]
public Pkcs7Context (GMime.PasswordRequestFunc request_passwd);
[CCode (cname = "g_mime_pkcs7_context_get_always_trust")]
public bool get_always_trust ();
[CCode (cname = "g_mime_pkcs7_context_set_always_trust")]
public void set_always_trust (bool always_trust);
}
[CCode (cheader_filename = "gmime/gmime.h", free_function = "g_mime_references_free")]
[Compact]
public class References {
......@@ -725,100 +890,60 @@ namespace GMime {
public unowned GMime.References get_next ();
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class Session : GLib.Object {
[CCode (has_construct_function = false)]
protected Session ();
[CCode (cname = "g_mime_session_forget_passwd")]
public virtual void forget_passwd (string item) throws GLib.Error;
[CCode (cname = "g_mime_session_is_online")]
public virtual bool is_online ();
[CCode (cname = "g_mime_session_request_passwd")]
public virtual unowned string request_passwd (string prompt, bool secret, string item) throws GLib.Error;
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class SessionSimple : GMime.Session {
public weak GMime.SimpleForgetPasswdFunc forget_passwd;
public weak GMime.SimpleIsOnlineFunc is_online;
public weak GMime.SimpleRequestPasswdFunc request_passwd;
[CCode (has_construct_function = false)]
protected SessionSimple ();
[CCode (cname = "g_mime_session_simple_set_forget_passwd")]
public void set_forget_passwd (GMime.SimpleForgetPasswdFunc forget_passwd);
[CCode (cname = "g_mime_session_simple_set_is_online")]
public void set_is_online (GMime.SimpleIsOnlineFunc is_online);
[CCode (cname = "g_mime_session_simple_set_request_passwd")]
public void set_request_passwd (GMime.SimpleRequestPasswdFunc request_passwd);
}
[CCode (cheader_filename = "gmime/gmime.h", free_function = "g_mime_signature_validity_free")]
[Compact]
public class SignatureValidity {
public weak string details;
public weak GMime.Signer signers;
public GMime.SignatureStatus status;
[CCode (cname = "g_mime_signature_validity_new", has_construct_function = false)]
public SignatureValidity ();
[CCode (cname = "g_mime_signature_validity_add_signer")]
public void add_signer (GMime.Signer signer);
[CCode (cname = "g_mime_signature_validity_get_details")]
public unowned string get_details ();
[CCode (cname = "g_mime_signature_validity_get_signers")]
public unowned GMime.Signer get_signers ();
[CCode (cname = "g_mime_signature_validity_get_status")]
public GMime.SignatureStatus get_status ();
[CCode (cname = "g_mime_signature_validity_set_details")]
public void set_details (string details);
[CCode (cname = "g_mime_signature_validity_set_status")]
public void set_status (GMime.SignatureStatus status);
}
[CCode (cheader_filename = "gmime/gmime.h", free_function = "g_mime_signer_free")]
[Compact]
public class Signer {
public class Signature : GLib.Object {
public weak GMime.Certificate cert;
public ulong created;
public uint errors;
public GMime.SignatureError errors;
public ulong expires;
public weak string fingerprint;
public weak string keyid;
public weak string name;
public weak GMime.Signer next;
public uint status;
public uint trust;
public uint unused;
[CCode (cname = "g_mime_signer_new", has_construct_function = false)]
public Signer ();
[CCode (cname = "g_mime_signer_get_created")]
public GMime.SignatureStatus status;
[CCode (cname = "g_mime_signature_new", has_construct_function = false)]
public Signature ();
[CCode (cname = "g_mime_signature_get_certificate")]
public unowned GMime.Certificate get_certificate ();
[CCode (cname = "g_mime_signature_get_created")]
public ulong get_created ();
[CCode (cname = "g_mime_signer_get_errors")]
public GMime.SignerError get_errors ();
[CCode (cname = "g_mime_signer_get_expires")]
[CCode (cname = "g_mime_signature_get_errors")]
public GMime.SignatureError get_errors ();
[CCode (cname = "g_mime_signature_get_expires")]
public ulong get_expires ();
[CCode (cname = "g_mime_signer_get_fingerprint")]
public unowned string get_fingerprint ();
[CCode (cname = "g_mime_signer_get_key_id")]
public unowned string get_key_id ();
[CCode (cname = "g_mime_signer_get_name")]
public unowned string get_name ();
[CCode (cname = "g_mime_signer_next")]
public unowned GMime.Signer get_next ();
[CCode (cname = "g_mime_signer_get_status")]
public GMime.SignerStatus get_status ();
[CCode (cname = "g_mime_signer_get_trust")]
public GMime.SignerTrust get_trust ();
[CCode (cname = "g_mime_signer_set_created")]
[CCode (cname = "g_mime_signature_get_status")]
public GMime.SignatureStatus get_status ();
[CCode (cname = "g_mime_signature_set_certificate")]
public void set_certificate (GMime.Certificate cert);
[CCode (cname = "g_mime_signature_set_created")]
public void set_created (ulong created);
[CCode (cname = "g_mime_signer_set_errors")]
public void set_errors (GMime.SignerError error);
[CCode (cname = "g_mime_signer_set_expires")]
[CCode (cname = "g_mime_signature_set_errors")]
public void set_errors (GMime.SignatureError errors);
[CCode (cname = "g_mime_signature_set_expires")]
public void set_expires (ulong expires);
[CCode (cname = "g_mime_signer_set_fingerprint")]
public void set_fingerprint (string fingerprint);
[CCode (cname = "g_mime_signer_set_key_id")]
public void set_key_id (string key_id);
[CCode (cname = "g_mime_signer_set_name")]
public void set_name (string name);
[CCode (cname = "g_mime_signer_set_status")]
public void set_status (GMime.SignerStatus status);
[CCode (cname = "g_mime_signer_set_trust")]
public void set_trust (GMime.SignerTrust trust);
[CCode (cname = "g_mime_signature_set_status")]
public void set_status (GMime.SignatureStatus status);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public class SignatureList : GLib.Object {
public weak GLib.PtrArray array;
[CCode (cname = "g_mime_signature_list_new", has_construct_function = false)]
public SignatureList ();
[CCode (cname = "g_mime_signature_list_add")]
public int add (GMime.Signature sig);
[CCode (cname = "g_mime_signature_list_clear")]
public void clear ();
[CCode (cname = "g_mime_signature_list_contains")]
public bool contains (GMime.Signature sig);
[CCode (cname = "g_mime_signature_list_get_signature")]
public unowned GMime.Signature get_signature (int index);
[CCode (cname = "g_mime_signature_list_index_of")]
public int index_of (GMime.Signature sig);
[CCode (cname = "g_mime_signature_list_insert")]
public void insert (int index, GMime.Signature sig);
[CCode (cname = "g_mime_signature_list_length")]
public int length ();
[CCode (cname = "g_mime_signature_list_remove")]
public bool remove (GMime.Signature sig);
[CCode (cname = "g_mime_signature_list_remove_at")]
public bool remove_at (int index);
[CCode (cname = "g_mime_signature_list_set_signature")]
public void set_signature (int index, GMime.Signature sig);
}
[CCode (cheader_filename = "gmime/gmime.h")]
public abstract class Stream : GLib.Object {
......@@ -837,7 +962,7 @@ namespace GMime {
[CCode (cname = "g_mime_stream_flush")]
public virtual int flush ();
[CCode (cname = "g_mime_stream_length")]
public virtual ssize_t length ();
public virtual int64 length ();
[CCode (cname = "g_mime_stream_printf")]
public ssize_t printf (string fmt);
[CCode (cname = "g_mime_stream_read")]
......@@ -923,6 +1048,22 @@ namespace GMime {
public StreamFs.with_bounds (int fd, int64 start, int64 end);
}
[CCode (cheader_filename = "gmime/gmime.h")]
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 (cname = "g_mime_stream_gio_new", has_construct_function = false, type = "GMimeStream*")]
public StreamGIO (GLib.File file);
[CCode (cname = "g_mime_stream_gio_get_owner")]
public bool get_owner ();
[CCode (cname = "g_mime_stream_gio_set_owner")]
public void set_owner (bool owner);
[CCode (cname = "g_mime_stream_gio_new_with_bounds", has_construct_function = false, type = "GMimeStream*")]
public StreamGIO.with_bounds (GLib.File file, int64 start, int64 end);
}
[CCode (cheader_filename = "gmime/gmime.h")]
[Compact]
public class StreamIOVector {
public void* data;
......@@ -966,25 +1107,41 @@ namespace GMime {
[CCode (cname = "g_mime_stream_null_new", has_construct_function = false, type = "GMimeStream*")]
public StreamNull ();
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_BEST_ENCODING_", has_type_id = false)]
public enum BestEncoding {
@7BIT,
@8BIT,
BINARY
[CCode (cheader_filename = "gmime/gmime.h")]
public class StreamPipe : GMime.Stream {
public bool eos;
public int fd;
public bool owner;
[CCode (cname = "g_mime_stream_pipe_new", has_construct_function = false, type = "GMimeStream*")]
public StreamPipe (int fd);
[CCode (cname = "g_mime_stream_pipe_get_owner")]
public bool get_owner ();
[CCode (cname = "g_mime_stream_pipe_set_owner")]
public void set_owner (bool owner);
}
[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_HASH_", has_type_id = false)]
public enum CipherHash {
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_CIPHER_ALGO_", has_type_id = false)]
public enum CipherAlgo {
DEFAULT,
MD2,
MD5,
SHA1,
SHA224,
SHA256,
SHA384,
SHA512,
RIPEMD160,
TIGER192,
HAVAL5160
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 {
......@@ -996,6 +1153,27 @@ namespace GMime {
QUOTEDPRINTABLE,
UUENCODE
}
[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)]
public enum FilterBestFlags {
CHARSET,
......@@ -1012,6 +1190,16 @@ namespace GMime {
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,
......@@ -1024,36 +1212,20 @@ namespace GMime {
CUR,
END
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNATURE_STATUS_", has_type_id = false)]
public enum SignatureStatus {
NONE,
GOOD,
BAD,
UNKNOWN
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNER_ERROR_", has_type_id = false)]
public enum SignerError {
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNATURE_ERROR_", has_type_id = false)]
public enum SignatureError {
NONE,
EXPSIG,
NO_PUBKEY,
EXPKEYSIG,
REVKEYSIG
REVKEYSIG,
UNSUPP_ALGO
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNER_STATUS_", has_type_id = false)]
public enum SignerStatus {
NONE,
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNATURE_STATUS_", has_type_id = false)]
public enum SignatureStatus {
GOOD,
BAD,
ERROR
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_SIGNER_TRUST_", has_type_id = false)]
public enum SignerTrust {
NONE,
NEVER,
UNDEFINED,
MARGINAL,
FULLY,
ULTIMATE
ERROR,
BAD
}
[CCode (cheader_filename = "gmime/gmime.h", cprefix = "GMIME_STREAM_BUFFER_", has_type_id = false)]
public enum StreamBufferMode {
......@@ -1070,11 +1242,9 @@ namespace GMime {
[CCode (cheader_filename = "gmime/gmime.h")]
public delegate void ParserHeaderRegexFunc (GMime.Parser parser, string header, string value, int64 offset);
[CCode (cheader_filename = "gmime/gmime.h", has_target = false)]
public delegate void SimpleForgetPasswdFunc (GMime.Session session, string item) throws GLib.Error;
[CCode (cheader_filename = "gmime/gmime.h", has_target = false)]
public delegate bool SimpleIsOnlineFunc (GMime.Session session);
[CCode (cheader_filename = "gmime/gmime.h", has_target = false)]
public delegate unowned string SimpleRequestPasswdFunc (GMime.Session session, string prompt, bool secret, string item) throws GLib.Error;
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")]
public const int BINARY_AGE;
[CCode (cheader_filename = "gmime/gmime.h")]
public const string DISPOSITION_ATTACHMENT;
[CCode (cheader_filename = "gmime/gmime.h")]
......@@ -1100,6 +1270,14 @@ namespace GMime {
[CCode (cheader_filename = "gmime/gmime.h")]
public const int FILTER_HTML_PRE;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int INTERFACE_AGE;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int MAJOR_VERSION;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int MICRO_VERSION;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int MINOR_VERSION;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int UUDECODE_STATE_BEGIN;
[CCode (cheader_filename = "gmime/gmime.h")]
public const int UUDECODE_STATE_END;
......@@ -1131,12 +1309,6 @@ namespace GMime {
public static GMime.ContentEncoding content_encoding_from_string (string str);
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_content_encoding_to_string")]
public static unowned string content_encoding_to_string (GMime.ContentEncoding encoding);
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_decode_domain")]
public static bool decode_domain (out unowned string @in, GLib.StringBuilder domain);
[CCode (cheader_filename = "gmime/gmime.h", cname = "g_mime_decode_lwsp")]