using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Globalization;
namespace FastReport.Messaging.Xmpp
{
///
/// Represents the IQ stanza.
///
public class Iq : Stanza
{
#region Fields
private string type;
#endregion // Fields
#region Properties
///
/// Gets or sets the type of iq.
///
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 iq.
/// The type of iq.
/// The JID of the sender.
/// The JID of the recipient.
/// The ID of the iq.
/// The language of the iq.
/// The data of the iq.
public Iq(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 Iq(XmlElement data) : base(data)
{
}
#endregion // Constructors
}
}