diff --git a/vapi/Makefile.am b/vapi/Makefile.am index a5a2435311b8802e57c4593044417635a16c22ea..bc05e95bb7655e2343e2e940676313ad24a72459 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -190,7 +190,7 @@ dist_vapi_DATA = \ libbonoboui-2.0.vapi \ libdaemon.vapi \ libepc-1.0.vapi \ - libesmtp.vapi \ + libesmtp-1.0.vapi \ libftdi.deps \ libftdi.vapi \ libgeoclue-2.0.vapi \ diff --git a/vapi/libesmtp.vapi b/vapi/libesmtp-1.0.vapi similarity index 93% rename from vapi/libesmtp.vapi rename to vapi/libesmtp-1.0.vapi index dfe51b3ef5ae94387edf35ba3cd7b65b9b4c5e7e..3e951feedc60dd4752130662d6b837f75e9d661a 100644 --- a/vapi/libesmtp.vapi +++ b/vapi/libesmtp-1.0.vapi @@ -1,4 +1,4 @@ -/* libesmtp.vapi +/* libesmtp-1.0.vapi * * Copyright (C) 2010 Adrien Bustany * @@ -82,10 +82,12 @@ namespace Smtp { public int set_resent_headers (int onoff); [CCode (cname="smtp_set_messagecb")] public int set_messagecb (MessageCb cb); + [CCode (cname="smtp_set_message_str")] + public int set_message_str (string str); [CCode (cname="smtp_message_transfer_status")] - public Smtp.Status transfer_status (); + public Smtp.Status* transfer_status (); [CCode (cname="smtp_reverse_path_status")] - public Smtp.Status reverse_path_status (); + public Smtp.Status* reverse_path_status (); [CCode (cname="smtp_message_reset_status")] public static int reset_status (Smtp.Recipient recipient); [CCode (cname="smtp_dsn_set_ret")] @@ -132,7 +134,7 @@ namespace Smtp { [CCode (cname="smtp_etrn_node_t", has_type_id = false)] public struct EtrnNode { [CCode (cname="smtp_etrn_node_status")] - public Smtp.Status node_status (); + public Smtp.Status* node_status (); [CCode (cname="smtp_etrn_set_application_data")] public void* set_application_data (void *data); [CCode (cname="smtp_etrn_get_application_data")] @@ -171,15 +173,15 @@ namespace Smtp { } // the "what" parameter must be 0 - // if buf_len is not enough, SMTP_ERR_INVAL error will be set. 32 is generally enough + // if size of buf is not enough, SMTP_ERR_INVAL error will be set. 32 is generally enough [CCode (cname="smtp_version")] - public static int version (string buf, string buf_len, int what); + public static int version (uint8[] buf, int what); [CCode (cname="smtp_errno")] public static int errno (); [CCode (cname="smtp_strerror")] - public static string strerror (int error, string buf, string buflen); + public static unowned string strerror (int error, uint8[] buf); [CCode (cname="auth_client_init", cheader_filename="auth-client.h")] public static void auth_client_init (); @@ -203,7 +205,7 @@ namespace Smtp { public delegate void EnumerateRecipientCb (Smtp.Recipient recipient, string mailbox); [CCode (cname="smtp_messagecb_t")] - public delegate unowned string MessageCb (out string buf, out int len); + public delegate unowned string? MessageCb (out string buf, out int len); [CCode (cname="smtp_eventcb_t", instance_pos="2.5")] public delegate void EventCb (Smtp.Session session, int event_no, ...); @@ -226,20 +228,20 @@ namespace Smtp { [CCode (cname="auth_recode_t", cheader_filename="auth-client.h", has_target=false)] public delegate int AuthRecode (void *ctx, out string dstbuf, out int dstlen, string srcbuf, int srclen); - [CCode (cname="header_option", cprefix="Hdr_", has_type_id = false)] + [CCode (cname="enum header_option", cprefix="Hdr_", has_type_id = false)] public enum HeaderOption { OVERRIDE, PROHIBIT } - [CCode (cname="ret_flags", cprefix="Ret_", has_type_id = false)] + [CCode (cname="enum ret_flags", cprefix="Ret_", has_type_id = false)] public enum RetFlags { NOTSET, FULL, HDRS } - [CCode (cname="notify_flags", cprefix="Notify_", has_type_id = false)] + [CCode (cname="enum notify_flags", cprefix="Notify_", has_type_id = false)] public enum NotifyFlags { NOTSET, NEVER, @@ -248,7 +250,7 @@ namespace Smtp { DELAY } - [CCode (cname="e8bitmime_body", cprefix="E8bitmime_", has_type_id = false)] + [CCode (cname="enum e8bitmime_body", cprefix="E8bitmime_", has_type_id = false)] public enum E8BitMimeBody { NOTSET, @7BIT, @@ -256,14 +258,14 @@ namespace Smtp { BINARYMIME } - [CCode (cname="by_mode", cprefix="By_", has_type_id = false)] + [CCode (cname="enum by_mode", cprefix="By_", has_type_id = false)] public enum ByMode { NOTSET, NOTIFY, RETURN } - [CCode (cname="starttls_option", cprefix="Starttls_", has_type_id = false)] + [CCode (cname="enum starttls_option", cprefix="Starttls_", has_type_id = false)] public enum StartTlsOption { DISABLED, ENABLED,