Skip to main content

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​

MemberTypeDetails
writeOmit<DeviceCommand, "frame">The characteristic commands are written to.
builderLepuCommandBuilderBuilds this connection's frames. One per connection: it carries a sequence number.
maxFileBytesnumberOptional. —
onFile(file: LepuFile): voidCalled once per file, and only after its length was confirmed exactly.
onError(reason: string): voidCalled with why a transfer stopped. Required, so a failed read cannot pass unseen.
skipFilesReadonlySet<string>Optional. Files the app has already persisted and does not want again.
acceptFile(name: string) => booleanOptional. 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; }) => voidOptional. 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.

Source​

View the declaration in the SDK source.