pub const PTP_OC_CHDK: u16 = 0x9999;
#[repr(u32)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Sub {
Version = 0,
GetMemory = 1,
SetMemory = 2,
CallFunction = 3,
TempData = 4,
UploadFile = 5,
DownloadFile = 6,
ExecuteScript = 7,
ScriptStatus = 8,
ScriptSupport = 9,
ReadScriptMsg = 10,
WriteScriptMsg = 11,
GetDisplayData = 12,
RemoteCaptureIsReady = 13,
RemoteCaptureGetData = 14,
}
impl Sub {
#[inline]
pub fn as_u32(self) -> u32 {
self as u32
}
}
pub const SCRIPT_LANG_LUA: u8 = 0;
pub const SCRIPT_LANG_UBASIC: u8 = 1;
pub const SCRIPT_FLAG_NOKILL: u32 = 0x100;
pub const SCRIPT_FLAG_FLUSH_CAM_MSGS: u32 = 0x200;
pub const SCRIPT_FLAG_FLUSH_HOST_MSGS: u32 = 0x400;
pub const SCRIPT_STATUS_RUN: u32 = 0x01;
pub const SCRIPT_STATUS_MSG: u32 = 0x02;
pub const MSGTYPE_NONE: u32 = 0;
pub const MSGTYPE_ERR: u32 = 1;
pub const MSGTYPE_RET: u32 = 2;
pub const MSGTYPE_USER: u32 = 3;
pub const TYPE_UNSUPPORTED: u32 = 0;
pub const TYPE_NIL: u32 = 1;
pub const TYPE_BOOLEAN: u32 = 2;
pub const TYPE_INTEGER: u32 = 3;
pub const TYPE_STRING: u32 = 4;
pub const TYPE_TABLE: u32 = 5;
pub const ERRTYPE_NONE: u32 = 0;
pub const ERRTYPE_COMPILE: u32 = 1;
pub const ERRTYPE_RUN: u32 = 2;