api!: remove save_mime_headers config option and dc_get_mime_headers()

This was only used in tests.
`msgs.mime_headers` coulmn remains
as it is used for HTML messages.
This commit is contained in:
link2xt
2025-03-05 19:07:40 +00:00
parent 476224b980
commit 0913b6707b
10 changed files with 7 additions and 139 deletions

View File

@@ -1953,28 +1953,6 @@ pub unsafe extern "C" fn dc_get_msg_html(
.strdup()
}
#[no_mangle]
pub unsafe extern "C" fn dc_get_mime_headers(
context: *mut dc_context_t,
msg_id: u32,
) -> *mut libc::c_char {
if context.is_null() {
eprintln!("ignoring careless call to dc_get_mime_headers()");
return ptr::null_mut(); // NULL explicitly defined as "no mime headers"
}
let ctx = &*context;
block_on(async move {
let mime = message::get_mime_headers(ctx, MsgId::new(msg_id))
.await
.unwrap_or_log_default(ctx, "failed to get mime headers");
if mime.is_empty() {
return ptr::null_mut();
}
mime.strdup()
})
}
#[no_mangle]
pub unsafe extern "C" fn dc_delete_msgs(
context: *mut dc_context_t,