reword ffi from 'archived' to 'visibility'

This commit is contained in:
B. Petersen
2020-02-13 17:41:46 +01:00
parent 60493d30f6
commit e3420da60f
3 changed files with 63 additions and 40 deletions

View File

@@ -1188,13 +1188,13 @@ pub unsafe extern "C" fn dc_get_next_media(
}
#[no_mangle]
pub unsafe extern "C" fn dc_archive_chat(
pub unsafe extern "C" fn dc_set_chat_visibility(
context: *mut dc_context_t,
chat_id: u32,
archive: libc::c_int,
) {
if context.is_null() {
eprintln!("ignoring careless call to dc_archive_chat()");
eprintln!("ignoring careless call to dc_set_chat_visibility()");
return;
}
let ffi_context = &*context;
@@ -1204,7 +1204,7 @@ pub unsafe extern "C" fn dc_archive_chat(
2 => ArchiveState::Pinned,
_ => {
ffi_context
.warning("ignoring careless call to dc_archive_chat(): unknown archived state");
.warning("ignoring careless call to dc_set_chat_visibility(): unknown archived state");
return;
}
};
@@ -2456,9 +2456,9 @@ pub unsafe extern "C" fn dc_chat_get_color(chat: *mut dc_chat_t) -> u32 {
}
#[no_mangle]
pub unsafe extern "C" fn dc_chat_get_archived(chat: *mut dc_chat_t) -> libc::c_int {
pub unsafe extern "C" fn dc_chat_get_visibility(chat: *mut dc_chat_t) -> libc::c_int {
if chat.is_null() {
eprintln!("ignoring careless call to dc_chat_get_archived()");
eprintln!("ignoring careless call to dc_chat_get_visibility()");
return 0;
}
let ffi_chat = &*chat;