use std::ffi::{c_char, c_int};
#[repr(C)]
#[allow(non_camel_case_types)]
pub enum log_priority {
DLOG_UNKNOWN = 0,
DLOG_DEFAULT,
DLOG_VERBOSE,
DLOG_DEBUG,
DLOG_INFO,
DLOG_WARN,
DLOG_ERROR,
DLOG_FATAL,
DLOG_SILENT,
DLOG_PRIO_MAX,
}
#[repr(C)]
#[allow(non_camel_case_types)]
pub enum log_id_t {
LOG_ID_INVALID = -1,
LOG_ID_MAIN,
LOG_ID_RADIO,
LOG_ID_SYSTEM,
LOG_ID_APPS,
LOG_ID_KMSG,
LOG_ID_SYSLOG,
LOG_ID_MAX,
}
extern "C" {
pub fn dlog_print(prio: log_priority, tag: *const c_char, fmt: *const c_char, ...) -> c_int;
pub fn __dlog_critical_print(
log_id: log_id_t,
prio: c_int,
tag: *const c_char,
fmt: *const c_char,
...
) -> c_int;
pub fn dlog_set_minimum_priority(priority: c_int) -> c_int;
}