| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- // @ts-check
- // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
- // This file is automatically generated. DO NOT EDIT
- /**
- * LocalSendService 是 LocalSend 功能的 Wails 服务。
- * @module
- */
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import * as model$0 from "./localsend/model/models.js";
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import * as $models from "./models.js";
- /**
- * ConfirmTransfer 手动接收确认:accept=true 接受,false 拒绝。
- * @param {string} sessionID
- * @param {boolean} accept
- * @returns {$CancellablePromise<void>}
- */
- export function ConfirmTransfer(sessionID, accept) {
- return $Call.ByID(2598966323, sessionID, accept);
- }
- /**
- * GetConfig 返回当前配置。
- * @returns {$CancellablePromise<$models.LocalSendConfig>}
- */
- export function GetConfig() {
- return $Call.ByID(304061066).then(/** @type {($result: any) => any} */(($result) => {
- return $$createType0($result);
- }));
- }
- /**
- * GetDevices 返回当前发现的设备列表。
- * @returns {$CancellablePromise<(model$0.Device | null)[]>}
- */
- export function GetDevices() {
- return $Call.ByID(2077455679).then(/** @type {($result: any) => any} */(($result) => {
- return $$createType3($result);
- }));
- }
- /**
- * SendFiles 把本地文件发送给指定的 LocalSend 设备(按 IP 定位)。
- * filePaths 为本地文件/目录路径列表;deviceIP 为目标设备 IP(如 192.168.1.5)。
- * @param {string[]} filePaths
- * @param {string} deviceIP
- * @returns {$CancellablePromise<void>}
- */
- export function SendFiles(filePaths, deviceIP) {
- return $Call.ByID(1947247873, filePaths, deviceIP);
- }
- /**
- * SetConfig 更新本机名、接收位置、接收模式。
- * 若服务运行中,即时生效(服务器配置与后续公告同步更新)。
- * @param {string} alias
- * @param {string} receiveDir
- * @param {boolean} autoAccept
- * @returns {$CancellablePromise<void>}
- */
- export function SetConfig(alias, receiveDir, autoAccept) {
- return $Call.ByID(3005820190, alias, receiveDir, autoAccept);
- }
- /**
- * Start 启动 LocalSend 服务:生成/加载证书、启动接收服务器与发现服务。
- * @returns {$CancellablePromise<void>}
- */
- export function Start() {
- return $Call.ByID(4044878204);
- }
- /**
- * Stop 停止 LocalSend 服务。
- * @returns {$CancellablePromise<void>}
- */
- export function Stop() {
- return $Call.ByID(926464408);
- }
- // Private type creation functions
- const $$createType0 = $models.LocalSendConfig.createFrom;
- const $$createType1 = model$0.Device.createFrom;
- const $$createType2 = $Create.Nullable($$createType1);
- const $$createType3 = $Create.Array($$createType2);
|