mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
rename ffi func
This commit is contained in:
@ -3,12 +3,11 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
int64_t init_sdk(char *path);
|
||||
|
||||
void async_command(int64_t port, const uint8_t *input, uintptr_t len);
|
||||
void async_event(int64_t port, const uint8_t *input, uintptr_t len);
|
||||
|
||||
const uint8_t *sync_command(const uint8_t *input, uintptr_t len);
|
||||
const uint8_t *sync_event(const uint8_t *input, uintptr_t len);
|
||||
|
||||
int32_t set_stream_port(int64_t port);
|
||||
|
||||
|
@ -33,7 +33,7 @@ pub extern "C" fn init_sdk(path: *mut c_char) -> i64 {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn async_command(port: i64, input: *const u8, len: usize) {
|
||||
pub extern "C" fn async_event(port: i64, input: *const u8, len: usize) {
|
||||
let request: ModuleRequest = FFIRequest::from_u8_pointer(input, len).into();
|
||||
log::trace!(
|
||||
"[FFI]: {} Async Event: {:?} with {} port",
|
||||
@ -49,7 +49,7 @@ pub extern "C" fn async_command(port: i64, input: *const u8, len: usize) {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn sync_command(input: *const u8, len: usize) -> *const u8 {
|
||||
pub extern "C" fn sync_event(input: *const u8, len: usize) -> *const u8 {
|
||||
let request: ModuleRequest = FFIRequest::from_u8_pointer(input, len).into();
|
||||
log::trace!("[FFI]: {} Sync Event: {:?}", &request.id, &request.event,);
|
||||
let _response = EventDispatch::sync_send(dispatch(), request);
|
||||
|
Reference in New Issue
Block a user