GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Toss
  • GitHub
  • Quick Start
  • Installation
  • Development Setup
  • Overview
  • Pairing Devices
  • Using Toss
  • Architecture
  • API Reference
  • Platform Support
  • Testing
  • Overview
  • macOS

This view

  • Original page
  • New address

GeezerVison is showing toss.docs.renner.dev — API Reference

API Reference

API Reference

Section titled “API Reference”

Rust FFI API for Flutter integration.

Initialization

Section titled “Initialization”

initToss

Section titled “initToss”

Initialize the Toss core library.

api.initToss(
dataDir: '/path/to/data',
deviceName: 'My Device',
);

Parameters:

  • dataDir: Path to data directory
  • deviceName: Friendly device name

Returns: void

Device Management

Section titled “Device Management”

getDeviceId

Section titled “getDeviceId”

Get the current device’s unique identifier.

String deviceId = api.getDeviceId();

Returns: String - Device ID

setDeviceName

Section titled “setDeviceName”

Set the device’s friendly name.

api.setDeviceName(name: 'My Device');

Parameters:

  • name: Device name

Returns: void

Pairing

Section titled “Pairing”

startPairing

Section titled “startPairing”

Start a pairing session.

PairingInfo info = await api.startPairing();

Returns: PairingInfo with:

  • code: 6-digit pairing code
  • qrData: QR code data
  • expiresAt: Expiration timestamp
  • publicKey: Public key for pairing

completePairingQr

Section titled “completePairingQr”

Complete pairing using QR code.

bool success = await api.completePairingQr(
qrData: 'qr-code-data',
);

Parameters:

  • qrData: QR code data from other device

Returns: bool - Success status

completePairingCode

Section titled “completePairingCode”

Complete pairing using 6-digit code.

bool success = await api.completePairingCode(
code: '123456',
);

Parameters:

  • code: 6-digit pairing code

Returns: bool - Success status

Device List

Section titled “Device List”

getPairedDevices

Section titled “getPairedDevices”

Get list of paired devices.

List<DeviceInfo> devices = await api.getPairedDevices();

Returns: List<DeviceInfo> with:

  • id: Device ID
  • name: Device name
  • isOnline: Online status
  • lastSeen: Last seen timestamp

Clipboard Operations

Section titled “Clipboard Operations”

sendClipboard

Section titled “sendClipboard”

Send clipboard content to paired devices.

bool success = await api.sendClipboard(
contentType: 'text/plain',
content: 'Hello, World!',
);

Parameters:

  • contentType: MIME type of content
  • content: Base64-encoded content

Returns: bool - Success status

getClipboardHistory

Section titled “getClipboardHistory”

Get clipboard history.

List<ClipboardItemInfo> history = await api.getClipboardHistory(
limit: 50,
);

Parameters:

  • limit: Maximum number of items

Returns: List<ClipboardItemInfo> with:

  • contentType: Content type
  • preview: Preview text
  • sizeBytes: Size in bytes
  • timestamp: Timestamp
  • sourceDevice: Source device ID

Events

Section titled “Events”

pollEvent

Section titled “pollEvent”

Poll for network events.

NetworkEvent? event = await api.pollEvent();

Returns: NetworkEvent? - Event or null if none

Settings

Section titled “Settings”

getSettings

Section titled “getSettings”

Get current settings.

TossSettings settings = await api.getSettings();

Returns: TossSettings with:

  • autoSync: Auto-sync enabled
  • syncText: Sync text content
  • syncImages: Sync images
  • syncFiles: Sync files
  • maxFileSizeMb: Max file size in MB
  • historyEnabled: History enabled
  • historyDays: History retention days
  • relayUrl: Relay server URL

updateSettings

Section titled “updateSettings”

Update settings.

api.updateSettings(settings: settings);

Parameters:

  • settings: Updated settings object

Returns: void

Error Handling

Section titled “Error Handling”

All API functions may throw exceptions. Handle errors appropriately:

try {
await api.startPairing();
} catch (e) {
print('Error: $e');
}

Next Steps

Section titled “Next Steps”
  • Architecture - System design
  • Platform Support - Platform-specific details
  • Testing - Testing guide
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.