High-level Nim wrapper for Pebble AppSync API.
Provides synchronization of dictionary data between phone and watch.
Types
AppSyncHandle = object
- Managed handle for AppSync. Automatically handles allocation of the AppSync struct and its internal buffer. Source Edit
Procs
proc `=copy`(dest: var AppSyncHandle; src: AppSyncHandle) {.error.}
- Source Edit
proc `=destroy`(h: var AppSyncHandle) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `=sink`(dest: var AppSyncHandle; src: AppSyncHandle) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc `=wasMoved`(h: var AppSyncHandle) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc get(h: AppSyncHandle; key: uint32): ptr Tuple_f {.inline, ...raises: [], tags: [], forbids: [].}
- Get a value from the synchronization context. Source Edit
proc init(s: ptr AppSync; buffer: ptr uint8; bufferSize: uint16; keysAndInitialValues: ptr Tuplet; count: uint8; tupleChangedCallback: AppSyncTupleChangedCallback; errorCallback: AppSyncErrorCallback; context: pointer) {.inline, ...raises: [], tags: [], forbids: [].}
- Initialize an AppSync synchronization context (raw pointer version). Source Edit
proc isValid(h: AppSyncHandle): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Source Edit
proc newAppSync(bufferSize: uint16; keysAndInitialValues: ptr Tuplet; count: uint8; tupleChangedCallback: AppSyncTupleChangedCallback; errorCallback: AppSyncErrorCallback; context: pointer): AppSyncHandle {. ...raises: [], tags: [], forbids: [].}
- Alias for newAppSyncHandle. Source Edit
proc newAppSyncHandle(bufferSize: uint16; keysAndInitialValues: ptr Tuplet; count: uint8; tupleChangedCallback: AppSyncTupleChangedCallback; errorCallback: AppSyncErrorCallback; context: pointer): AppSyncHandle {. ...raises: [], tags: [], forbids: [].}
- Create a managed AppSync handle. Allocates both the AppSync struct and the message buffer. Returns an invalid handle if allocation fails (Out of Memory) or bufferSize is 0. Source Edit
proc set(h: AppSyncHandle; keysAndValuesToUpdate: ptr Tuplet; count: uint8): AppMessageResult {. inline, ...raises: [], tags: [], forbids: [].}
- Update values in the synchronization context. Source Edit
Converters
converter toPtr(h: AppSyncHandle): ptr AppSync {....raises: [], tags: [], forbids: [].}
- Source Edit