Queue 接口
向 AstroBox 资源队列添加任务。
interface queue { enum resource-type { quickapp, watchface, firmware }
add-resource-to-queue: func(res-type: resource-type, file-path: string);}resource-type
Section titled “resource-type”quickapp:快应用资源。watchface:表盘资源。firmware:固件资源。
add-resource-to-queue
Section titled “add-resource-to-queue”- 参数:
res-type: resource-type资源类型。file-path: string本地文件路径。
- 返回:
()。
Rust 示例
Section titled “Rust 示例”use crate::astrobox::psys_host;
pub fn add_firmware(path: &str) { psys_host::queue::add_resource_to_queue( psys_host::queue::ResourceType::Firmware, path, );}