Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
XmppEventSinkNode.cs
2using System.Threading.Tasks;
3using System.Xml;
6using Waher.Things;
9
11{
16 {
21 : base()
22 {
23 }
24
33 string SinkId, string Jid)
34 : base(Source, Parent, SinkId)
35 {
36 this.Jid = Jid;
37 }
38
42 [Page(7, "Configuration")]
43 [Header(189, "Recipient JID:")]
44 [ToolTip(190, "JID of recipient for events.")]
45 [Required]
46 public string Jid { get; set; }
47
52 public override Task<string> GetTypeNameAsync(Language Language)
53 {
54 return Language.GetStringAsync(typeof(GatewayConfigSource), 191, "XMPP Event Sink");
55 }
56
63 public override async Task<IEnumerable<Parameter>> GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
64 {
65 LinkedList<Parameter> Parameters = (LinkedList<Parameter>)await base.GetDisplayableParametersAsync(Language, Caller);
67
68 Parameters.AddLast(new StringParameter("Jid", await Namespace.GetStringAsync(192, "JID"), this.Jid));
69
70 return Parameters;
71 }
72
77 public override void Export(XmlWriter Output)
78 {
79 Output.WriteStartElement("XmppEventSink");
80 Output.WriteAttributeString("id", this.SinkId);
81 Output.WriteAttributeString("jid", this.Jid);
82 Output.WriteEndElement();
83 }
84 }
85}
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
async Task< Namespace > GetNamespaceAsync(string Name)
Gets the namespace object, given its name, if available.
Definition: Language.cs:99
Contains information about a namespace in a language.
Definition: Namespace.cs:17
Task< LanguageString > GetStringAsync(int Id)
Gets the string object, given its ID, if available.
Definition: Namespace.cs:65
Abstract base class for gateway configuration nodes.
virtual INode Parent
Parent Node, or null if a root node.
GatewayConfigSource Source
Source hosting the node.
Abstract base class for event sink nodes.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
XmppEventSinkNode(GatewayConfigSource Source, ConfigurationNode Parent, string SinkId, string Jid)
Representation of a XmppEventSink
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
override void Export(XmlWriter Output)
Exports the event sink definition to XML.
Tokens available in request.
Definition: RequestOrigin.cs:9