2023-04-19 17:26:36 +08:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
2023-04-19 17:06:59 +08:00
|
|
|
pub const ERR_SUCCESS: i32 = 0;
|
|
|
|
|
|
|
|
// ======================================================
|
2023-05-03 22:37:43 +08:00
|
|
|
// Errors from the plugins, must be handled by RustDesk
|
2023-04-19 17:06:59 +08:00
|
|
|
|
|
|
|
pub const ERR_RUSTDESK_HANDLE_BASE: i32 = 10000;
|
|
|
|
|
|
|
|
// not loaded
|
|
|
|
pub const ERR_PLUGIN_LOAD: i32 = 10001;
|
|
|
|
// not initialized
|
|
|
|
pub const ERR_PLUGIN_MSG_CB: i32 = 10101;
|
|
|
|
// invalid
|
|
|
|
pub const ERR_CALL_INVALID_METHOD: i32 = 10201;
|
|
|
|
pub const ERR_CALL_NOT_SUPPORTED_METHOD: i32 = 10202;
|
|
|
|
// failed on calling
|
|
|
|
pub const ERR_CALL_INVALID_ARGS: i32 = 10301;
|
|
|
|
pub const ERR_PEER_ID_MISMATCH: i32 = 10302;
|
2023-04-28 15:09:45 +08:00
|
|
|
// no handlers on calling
|
|
|
|
pub const ERR_NOT_HANDLED: i32 = 10401;
|
2023-04-19 17:06:59 +08:00
|
|
|
|
|
|
|
// ======================================================
|
2023-05-03 22:37:43 +08:00
|
|
|
// Errors from RustDesk callbacks.
|
2023-04-19 17:06:59 +08:00
|
|
|
|
2023-05-03 22:37:43 +08:00
|
|
|
pub const ERR_CALLBACK_HANDLE_BASE: i32 = 20000;
|
|
|
|
pub const ERR_CALLBACK_PLUGIN_ID: i32 = 20001;
|
|
|
|
pub const ERR_CALLBACK_INVALID_ARGS: i32 = 20002;
|
|
|
|
pub const ERR_CALLBACK_INVALID_MSG: i32 = 20003;
|
|
|
|
pub const ERR_CALLBACK_TARGET: i32 = 20004;
|
|
|
|
pub const ERR_CALLBACK_TARGET_TYPE: i32 = 20005;
|
|
|
|
pub const ERR_CALLBACK_PEER_NOT_FOUND: i32 = 20006;
|
2023-04-19 17:06:59 +08:00
|
|
|
|
2023-05-03 22:37:43 +08:00
|
|
|
pub const ERR_CALLBACK_FAILED: i32 = 21001;
|
|
|
|
|
|
|
|
// ======================================================
|
|
|
|
// Errors from the plugins, should be handled by the plugins.
|
|
|
|
|
|
|
|
pub const ERR_PLUGIN_HANDLE_BASE: i32 = 30000;
|
|
|
|
|
|
|
|
pub const EER_CALL_FAILED: i32 = 300021;
|
|
|
|
pub const ERR_PEER_ON_FAILED: i32 = 40012;
|
|
|
|
pub const ERR_PEER_OFF_FAILED: i32 = 40012;
|