From b2af8c51124819d7c5d0bd348c52a0b15f54d582 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 9 Jan 2020 13:39:36 +0100 Subject: Fix various typing issues in signal bindings --- .../signal-protocol/vapi/signal-protocol-native.vapi | 2 +- .../signal-protocol/vapi/signal-protocol-public.vapi | 18 ++---------------- 2 files changed, 3 insertions(+), 17 deletions(-) (limited to 'plugins/signal-protocol/vapi') diff --git a/plugins/signal-protocol/vapi/signal-protocol-native.vapi b/plugins/signal-protocol/vapi/signal-protocol-native.vapi index 72ba1710..fd69d7d0 100644 --- a/plugins/signal-protocol/vapi/signal-protocol-native.vapi +++ b/plugins/signal-protocol/vapi/signal-protocol-native.vapi @@ -10,7 +10,7 @@ namespace Signal { [CCode (has_target = false)] public delegate void LockingFunc(void* user_data); [CCode (has_target = false)] - public delegate void LogFunc(LogLevel level, string message, void* user_data); + public delegate void LogFunc(LogLevel level, string message, size_t len, void* user_data); [Compact] [CCode (cname = "signal_crypto_provider", cheader_filename = "signal/signal_protocol.h")] diff --git a/plugins/signal-protocol/vapi/signal-protocol-public.vapi b/plugins/signal-protocol/vapi/signal-protocol-public.vapi index 40e85c7f..eaf73c0c 100644 --- a/plugins/signal-protocol/vapi/signal-protocol-public.vapi +++ b/plugins/signal-protocol/vapi/signal-protocol-public.vapi @@ -118,14 +118,7 @@ namespace Signal { [Compact] [CCode (cname = "session_pre_key", cprefix = "session_pre_key_", cheader_filename = "signal/session_pre_key.h,signal_helper.h")] public class PreKeyRecord : TypeBase { - public PreKeyRecord(uint32 id, ECKeyPair key_pair) throws GLib.Error { - int err; - this.new(id, key_pair, out err); - throw_by_code(err); - } - [CCode (cheader_filename = "signal_helper.h")] - private PreKeyRecord.new(uint32 id, ECKeyPair key_pair, out int err); - private static int create(out PreKeyRecord pre_key, uint32 id, ECKeyPair key_pair); + public static int create(out PreKeyRecord pre_key, uint32 id, ECKeyPair key_pair); //public static int deserialize(out PreKeyRecord pre_key, uint8[] data, NativeContext global_context); [CCode (instance_pos = 2)] public int serialze(out Buffer buffer); @@ -166,14 +159,7 @@ namespace Signal { [Compact] [CCode (cname = "session_signed_pre_key", cprefix = "session_signed_pre_key_", cheader_filename = "signal/session_pre_key.h")] public class SignedPreKeyRecord : TypeBase { - public SignedPreKeyRecord(uint32 id, uint64 timestamp, ECKeyPair key_pair, uint8[] signature) throws GLib.Error { - int err; - this.new(id, timestamp, key_pair, signature, out err); - throw_by_code(err); - } - [CCode (cheader_filename = "signal_helper.h")] - private SignedPreKeyRecord.new(uint32 id, uint64 timestamp, ECKeyPair key_pair, uint8[] signature, out int err); - private static int create(out SignedPreKeyRecord pre_key, uint32 id, uint64 timestamp, ECKeyPair key_pair, uint8[] signature); + public static int create(out SignedPreKeyRecord pre_key, uint32 id, uint64 timestamp, ECKeyPair key_pair, uint8[] signature); [CCode (instance_pos = 2)] public int serialze(out Buffer buffer); -- cgit v1.2.3-70-g09d2