From a153f915d5245a8c5108b681ce228822c0c422f8 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Sat, 27 Apr 2019 23:47:45 +0200 Subject: [PATCH] add dc_chat_t to ffi --- deltachat-ffi/src/lib.rs | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/deltachat-ffi/src/lib.rs b/deltachat-ffi/src/lib.rs index de5685356..a9aaa8372 100644 --- a/deltachat-ffi/src/lib.rs +++ b/deltachat-ffi/src/lib.rs @@ -178,6 +178,65 @@ pub unsafe extern "C" fn dc_chatlist_get_context(chatlist: *mut dc_chatlist::dc_ #[no_mangle] pub type dc_chat_t = dc_chat::dc_chat_t; +#[no_mangle] +pub unsafe extern "C" fn dc_chat_unref(chat: *mut dc_chat::dc_chat_t) { + dc_chat::dc_chat_unref(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_id(chat: *mut dc_chat::dc_chat_t) -> libc::uint32_t { + dc_chat::dc_chat_get_id(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_type(chat: *mut dc_chat::dc_chat_t) -> libc::c_int { + dc_chat::dc_chat_get_type(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_name(chat: *mut dc_chat::dc_chat_t) -> *mut libc::c_char { + dc_chat::dc_chat_get_name(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_subtitle(chat: *mut dc_chat::dc_chat_t) -> *mut libc::c_char { + dc_chat::dc_chat_get_subtitle(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_profile_image(chat: *mut dc_chat::dc_chat_t) -> *mut libc::c_char { + dc_chat::dc_chat_get_profile_image(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_color(chat: *mut dc_chat::dc_chat_t) -> libc::uint32_t { + dc_chat::dc_chat_get_color(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_get_archived(chat: *mut dc_chat::dc_chat_t) -> libc::c_int { + dc_chat::dc_chat_get_archived(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_is_unpromoted(chat: *mut dc_chat::dc_chat_t) -> libc::c_int { + dc_chat::dc_chat_is_unpromoted(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_is_self_talk(chat: *mut dc_chat::dc_chat_t) -> libc::c_int { + dc_chat::dc_chat_is_self_talk(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_is_verified(chat: *mut dc_chat::dc_chat_t)-> libc::c_int { + dc_chat::dc_chat_is_verified(chat) +} + +#[no_mangle] +pub unsafe extern "C" fn dc_chat_is_sending_locations(chat: *mut dc_chat::dc_chat_t) -> libc::c_int { + dc_chat::dc_chat_is_sending_locations(chat) +} // dc_lot_t