RemoteCommandStore
open class RemoteCommandStore:
RemoteCommandStoreProtocol
-
Declaration
Swift
required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer)
-
Add a new command, after which it will be pending. Returns false if the command is already active.
Declaration
Swift
open func addRemoteCommand(deviceId: String, command: RemoteCommand) throws -> Bool
-
Add a new command with an explicit timestamp. Primarily used by tests.
Declaration
Swift
open func addRemoteCommandAt(deviceId: String, command: RemoteCommand, when: Timestamp) throws -> Bool
-
Return all unsent commands. This is for the code sending the commands, result is sorted by time_requested.
Declaration
Swift
open func getUnsentCommands() throws -> [PendingCommand]
-
Removes the remote command. Typically used to implement “undo” but may also be used by the queue processor when it gives up trying to send a command.
Declaration
Swift
open func removeRemoteCommand(deviceId: String, command: RemoteCommand) throws -> Bool
-
Flag a command as sent.
Declaration
Swift
open func setPendingCommandSent(command: PendingCommand) throws -> Bool