2using System.Collections.Generic;
3using System.Threading.Tasks;
16 private string componentAddress;
48 public override Task
FromXml(XmlElement Definition)
50 this.componentAddress =
XML.
Attribute(Definition,
"componentAddress");
52 return base.FromXml(Definition);
64 Client.SetTag(
"MUC", Extension);
66 Extension.OccupantPresence += (Sender, e) =>
69 new KeyValuePair<string, object>(
"e", e),
70 new KeyValuePair<string, object>(
"Client", Client));
72 return Task.CompletedTask;
75 Extension.OccupantRequest += (Sender, e) =>
78 new KeyValuePair<string, object>(
"e", e),
79 new KeyValuePair<string, object>(
"Client", Client));
81 return Task.CompletedTask;
84 Extension.PrivateMessageReceived += (Sender, e) =>
87 new KeyValuePair<string, object>(
"e", e),
88 new KeyValuePair<string, object>(
"Client", Client));
90 return Task.CompletedTask;
93 Extension.RegistrationRequest += (Sender, e) =>
96 new KeyValuePair<string, object>(
"e", e),
97 new KeyValuePair<string, object>(
"Client", Client));
99 return Task.CompletedTask;
102 Extension.RoomDeclinedInvitationReceived += (Sender, e) =>
105 new KeyValuePair<string, object>(
"e", e),
106 new KeyValuePair<string, object>(
"Client", Client));
108 return Task.CompletedTask;
111 Extension.RoomDestroyed += (Sender, e) =>
114 new KeyValuePair<string, object>(
"e", e),
115 new KeyValuePair<string, object>(
"Client", Client));
117 return Task.CompletedTask;
120 Extension.RoomInvitationReceived += (Sender, e) =>
123 new KeyValuePair<string, object>(
"e", e),
124 new KeyValuePair<string, object>(
"Client", Client));
126 return Task.CompletedTask;
129 Extension.RoomMessage += (Sender, e) =>
132 new KeyValuePair<string, object>(
"e", e),
133 new KeyValuePair<string, object>(
"Client", Client));
135 return Task.CompletedTask;
138 Extension.RoomOccupantMessage += (Sender, e) =>
141 new KeyValuePair<string, object>(
"e", e),
142 new KeyValuePair<string, object>(
"Client", Client));
144 return Task.CompletedTask;
147 Extension.RoomPresence += (Sender, e) =>
150 new KeyValuePair<string, object>(
"e", e),
151 new KeyValuePair<string, object>(
"Client", Client));
153 return Task.CompletedTask;
156 Extension.RoomSubject += (Sender, e) =>
159 new KeyValuePair<string, object>(
"e", e),
160 new KeyValuePair<string, object>(
"Client", Client));
162 return Task.CompletedTask;
165 return Task.FromResult<
object>(Extension);
Root node of a simulation model
bool ExternalEvent(IExternalEventsNode Source, string Name, params KeyValuePair< string, object >[] Arguments)
Method called when an external event has been received.
Multi-User Chat XMPP extension
override Task FromXml(XmlElement Definition)
Sets properties and attributes of class in accordance with XML definition.
override Task< object > Add(IActor Instance, Waher.Networking.XMPP.XmppClient Client)
Adds the extension to the client.
override ISimulationNode Create(ISimulationNode Parent, Model Model)
Creates a new instance of the node.
override string LocalName
Local name of XML element defining contents of class.
MucExtension(ISimulationNode Parent, Model Model)
Multi-User Chat XMPP extension
Abstract base class for XMPP extensions.
Helps with common XML-related tasks.
static string Attribute(XmlElement E, string Name)
Gets the value of an XML attribute.
Client managing communication with a Multi-User-Chat service. https://xmpp.org/extensions/xep-0045....
Manages an XMPP client connection. Implements XMPP, as defined in https://tools.ietf....
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...
ISimulationNode Parent
Parent node in the simulation model.
Basic interface for simulator nodes. Implementing this interface allows classes with default contruct...