Skip to content

Queue 接口

向 AstroBox 资源队列添加任务。

interface queue {
enum resource-type {
quickapp,
watchface,
firmware
}
add-resource-to-queue: func(res-type: resource-type, file-path: string);
}
  • quickapp:快应用资源。
  • watchface:表盘资源。
  • firmware:固件资源。
  • 参数:
    • res-type: resource-type 资源类型。
    • file-path: string 本地文件路径。
  • 返回:()
use crate::astrobox::psys_host;
pub fn add_firmware(path: &str) {
psys_host::queue::add_resource_to_queue(
psys_host::queue::ResourceType::Firmware,
path,
);
}