?? rosterquery.cs
字號:
using System;
namespace gowk.core.packets.querys
{
[System.Serializable]
public class RosterQuery:Query
{
private Item[] items;
public Item[] Items
{
get{return this.items;}
set{this.items=value;}
}
}
public class Item
{
string _jid,_name,_group,_ask, _subscription;
string _action;
[System.Xml.Serialization.XmlElement("group")]
public string Group
{
get{return this._group;}
set{this._group=value;}
}
[System.Xml.Serialization.XmlAttribute("jid")]
public string Jid
{
get{return this._jid;}
set{this._jid=value;}
}
[System.Xml.Serialization.XmlAttribute("name")]
public string Name
{
get{return this._name;}
set{this._name=value;}
}
[System.Xml.Serialization.XmlAttribute("subscription")]
public string Subscription
{
get{return this._subscription;}
set{this._subscription=value;}
}
[System.Xml.Serialization.XmlAttribute("action")]
public string Action
{
get{return this._action;}
set{this._action=value;}
}
[System.Xml.Serialization.XmlAttribute("ask")]
public string Ask
{
get{return this._ask;}
set{this._ask=value;}
}
}
public class RosterItemCollection:System.Collections.Hashtable
{
public Item this[string jid]
{
get{return (Item)base[Jid.GetBareJid(jid)];}
set{base[Jid.GetBareJid(jid)]=value;}
}
public Item this[Jid jid]
{
get{return (Item)base[jid.ToString(false)];}
set{base[jid.ToString(false)]=value;}
}
public new System.Collections.IEnumerable GetEnumerator()
{
return new System.Collections.ArrayList(base.Values);
}
public void Add(Item itm)
{
base.Add(gowk.core.Jid.GetBareJid(itm.Jid),itm);
}
}
public class RosterGroup
{
public RosterGroup()
{
}
public RosterGroup(string name)
{
this.Name=name;
}
RosterItemCollection items=new RosterItemCollection();
public string Name;
public RosterItemCollection Items
{
get{return this.items;}
}
}
public class RosterGroupCollection:System.Collections.Hashtable
{
public RosterGroup this[string groupname]
{
get{return (RosterGroup)base[groupname];}
set{base[groupname]=value;}
}
public new System.Collections.IEnumerable GetEnumerator()
{
return new System.Collections.ArrayList(this.Values);
}
}
public class Ask
{
public const string Subscribe="subscribe";
}
public class Subscription
{
public const string none="none";
public const string to="to";
public const string from="from";
public const string both="both";
public const string remove="remove";
}
public class Action
{
public const string allow="allow";
public const string deny="deny";
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -