using System; using System.Collections.Generic; using System.Text; using System.Globalization; using System.Xml; namespace FastReport.Messaging.Xmpp { /// /// Represents the XMPP message. /// public class Message : Stanza { #region Fields private string type; #endregion // Fields #region Properties /// /// Gets or sets the type of message. /// public string Type { get { return type; } set { type = value; if (value == null) { Data.RemoveAttribute("type"); } else { Data.SetAttribute("type", value); } } } #endregion // Properties #region Constructors /// /// Initializes a new instance of the class with specified parameters. /// /// The namespace of the message. /// The type of message. /// The JID of the sender. /// The JID of the recipient. /// The ID of the message. /// The language of the message. /// The data of the message. public Message(string nspace, string type, string jidFrom, string jidTo, string id, CultureInfo language, List data) : base(nspace, jidFrom, jidTo, id, language, data) { Type = type; } /// /// Initializes a new instance of the class using specified XmlElement instance. /// /// The XmlElement instance using like a data. public Message(XmlElement data) : base(data) { } #endregion // Constructors } }