RemoteCommandStoreProtocol
public protocol RemoteCommandStoreProtocol : AnyObject
-
Add a new command, after which it will be pending. Returns false if the command is already active.
Declaration
Swift
func addRemoteCommand(deviceId: String, command: RemoteCommand) throws -> Bool
-
Add a new command with an explicit timestamp. Primarily used by tests.
Declaration
Swift
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
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
func removeRemoteCommand(deviceId: String, command: RemoteCommand) throws -> Bool
-
Flag a command as sent.
Declaration
Swift
func setPendingCommandSent(command: PendingCommand) throws -> Bool