2using System.Threading.Tasks;
15 private readonly
string sortKey;
65 return Task.FromResult(
string.Empty);
74 return Task.FromResult(
string.Empty);
83 return Task.FromResult(
string.Empty);
93 return Task.FromResult(
true);
121 XmppClient Client = await this.connectedDevice.GetClient()
122 ??
throw new Exception(
"XMPP client not found.");
135 string FullJid = this.connectedDevice.GetRemoteFullJid(Client, out
bool HasContact, out
bool HasSubscription);
138 throw new Exception(this.connectedDevice.JID +
" is not in the list of contacts.");
140 if (!HasSubscription)
141 throw new Exception(
"Not subscribed to the precense of " + this.connectedDevice.JID);
143 if (
string.IsNullOrEmpty(FullJid))
144 throw new Exception(this.connectedDevice.JID +
" is not online.");
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
Contains information about a language.
Class handling the reception of data from a query.
Tokens available in request.
Abstract base class for commands on connected devices.
async Task< XmppClient > GetXmppClient()
Gets the concentrator client, if it exists.
string GetRemoteFullJid(XmppClient Client)
Gets the Full JID of the connected device.
abstract ICommand Copy()
Creates a copy of the command object.
ConnectedDevice ConnectedDevice
Reference to the connected device.
virtual Task< string > GetFailureStringAsync(Language Language)
Gets a failure string, if any, of the command. If no specific failure string is available,...
abstract Task< string > GetNameAsync(Language Language)
Gets the name of data source.
string SortCategory
Sort Category, if available.
virtual Task< string > GetSuccessStringAsync(Language Language)
Gets a success string, if any, of the command. If no specific success string is available,...
virtual Task< string > GetConfirmationStringAsync(Language Language)
Gets a confirmation string, if any, of the command. If no confirmation is necessary,...
virtual Task ExecuteCommandAsync()
Executes the command.
virtual Task StartQueryExecutionAsync(Query Query, Language Language)
Starts the execution of a query.
string SortKey
Sort Key, if available.
ConnectedDeviceCommand(ConnectedDevice ConnectedDevice, string SortKey)
Abstract base class for commands on connected devices.
abstract string CommandID
ID of command.
virtual Task< bool > CanExecuteAsync(RequestOrigin Caller)
If the command can be executed by the caller.
virtual CommandType Type
Type of command.
Node representing a device that is connected to XMPP.