mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 06:16:30 +03:00
add Context::get_id
This commit is contained in:
@@ -306,6 +306,16 @@ pub unsafe extern "C" fn dc_is_io_running(context: *mut dc_context_t) -> libc::c
|
||||
block_on(ctx.is_io_running()) as libc::c_int
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn dc_get_id(context: *mut dc_context_t) -> libc::c_int {
|
||||
if context.is_null() {
|
||||
return 0;
|
||||
}
|
||||
let ctx = &*context;
|
||||
|
||||
ctx.get_id() as libc::c_int
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub type dc_event_t = Event;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user