Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SubscribeToPresence.cs
1using System.Threading.Tasks;
4
6{
11 {
17 : base(ConnectedDevice, "1")
18 {
19 }
20
24 public override string CommandID => nameof(SubscribeToPresence);
25
29 public override CommandType Type => CommandType.Simple;
30
35 public override Task<string> GetNameAsync(Language Language)
36 {
37 return Language.GetStringAsync(typeof(ConcentratorDevice), 45, "Subscribe");
38 }
39
43 public override async Task ExecuteCommandAsync()
44 {
45 XmppClient Client = await this.GetXmppClient();
47 }
48
53 public override ICommand Copy()
54 {
55 return new SubscribeToPresence(this.ConnectedDevice);
56 }
57 }
58}
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
Definition: XmppClient.cs:59
Task RequestPresenceSubscription(string BareJid)
Requests subscription of presence information from a contact.
Definition: XmppClient.cs:4919
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
Abstract base class for commands on connected devices.
async Task< XmppClient > GetXmppClient()
Gets the concentrator client, if it exists.
Sends a presence subscription request.
SubscribeToPresence(ConnectedDevice ConnectedDevice)
Sends a presence subscription request.
override CommandType Type
Type of command.
override Task< string > GetNameAsync(Language Language)
Gets the name of data source.
override ICommand Copy()
Creates a copy of the command object.
override async Task ExecuteCommandAsync()
Executes the command.
Node representing an XMPP concentrator.
Node representing a device that is connected to XMPP.
Interface for commands.
Definition: ICommand.cs:32
CommandType
Command type.
Definition: ICommand.cs:11