LepuFileTransferParams
No behavioral description is attached to this declaration. The public signature, parameter and return types, and source location below document its published contract.
Kind: Interface
Package: @ovok/native
Import
import { LepuFileTransferParams } from '@ovok/native/bt-management';
TypeScript shape
interface LepuFileTransferParams {
write: Omit<DeviceCommand, "frame">;
builder: LepuCommandBuilder;
maxFileBytes?: number;
onFile: (file: LepuFile) => void;
onError: (reason: string) => void;
skipFiles?: ReadonlySet<string>;
acceptFile?: (name: string) => boolean;
afterTransfer?: () => readonly DeviceCommand[];
onProgress?: (progress: {
name: string;
receivedBytes: number;
totalBytes: number;
}) => void;
}
This is a type-level export; it has no call parameters.
Public members
| Member | Type | Details |
|---|---|---|
write | Omit<DeviceCommand, "frame"> | The characteristic commands are written to. |
builder | LepuCommandBuilder | Builds this connection's frames. One per connection: it carries a sequence number. |
maxFileBytes | number | Optional. — |
onFile | (file: LepuFile): void | Called once per file, and only after its length was confirmed exactly. |
onError | (reason: string): void | Called with why a transfer stopped. Required, so a failed read cannot pass unseen. |
skipFiles | ReadonlySet<string> | Optional. Files the app has already persisted and does not want again. |
acceptFile | (name: string) => boolean | Optional. Files this transfer knows how to decode; rejected names are never opened. |
afterTransfer | () => readonly DeviceCommand[] | Optional. Commands to start after history has been exhausted, such as live polling. |
onProgress | (progress: { name: string; receivedBytes: number; totalBytes: number; }) => void | Optional. Called as each chunk lands, for a long file with a person waiting on it. |
Learn the workflow
Continue with Bluetooth for the workflow context and examples.