config: remove bincode command bridge
This commit is contained in:
parent
d8920ed7a0
commit
87de5fcca3
6 changed files with 64 additions and 119 deletions
|
|
@ -16,18 +16,20 @@ use {
|
|||
|
||||
pub const VERSION: u32 = 1;
|
||||
|
||||
#[repr(C)]
|
||||
pub type ServerHandler = unsafe fn(data: *const u8, msg: &ipc::ClientMessage<'_>);
|
||||
pub type ConfigHandler = unsafe fn(data: *const u8, msg: &ipc::ServerMessage);
|
||||
pub type Unref = unsafe fn(data: *const u8);
|
||||
|
||||
pub struct ConfigEntry {
|
||||
pub version: u32,
|
||||
pub init: unsafe extern "C" fn(
|
||||
pub init: unsafe fn(
|
||||
srv_data: *const u8,
|
||||
srv_unref: unsafe extern "C" fn(data: *const u8),
|
||||
srv_handler: unsafe extern "C" fn(data: *const u8, msg: *const u8, size: usize),
|
||||
msg: *const u8,
|
||||
size: usize,
|
||||
srv_unref: Unref,
|
||||
srv_handler: ServerHandler,
|
||||
msg: ipc::InitMessage,
|
||||
) -> *const u8,
|
||||
pub unref: unsafe extern "C" fn(data: *const u8),
|
||||
pub handle_msg: unsafe extern "C" fn(data: *const u8, msg: *const u8, size: usize),
|
||||
pub unref: Unref,
|
||||
pub handle_msg: ConfigHandler,
|
||||
}
|
||||
|
||||
pub fn bincode_ops() -> impl Options {
|
||||
|
|
@ -37,7 +39,7 @@ pub fn bincode_ops() -> impl Options {
|
|||
.with_no_limit()
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||
pub struct WireMode {
|
||||
pub width: i32,
|
||||
pub height: i32,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue