⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 presence.cs

📁 语音视频功能 里面实现了基本的QQ与语音对话
💻 CS
字号:
using System;
using System.Xml;
using System.Xml.Serialization;
namespace gowk.core.packets
{
	[System.Serializable]
	[XmlRoot("presence")]
	public class Presence:Packet
	{
		private string _st;
		int _p;
		private string _s;
		public AudioVideoChat _av;
		public Presence()
		{
		}
		[System.Xml.Serialization.XmlElement("show")]
		public string Show
		{
			get{return this._s;}
			set{this._s=value;}
		}
		[System.Xml.Serialization.XmlElement("status")]
		public string Status
		{
			get{return this._st;}
			set{this._st=value;}
		}
	/*	[System.Xml.Serialization.XmlElement("priority")]
		public int Priority
		{
			get{return this._p;}
			set{this._p=value;}
		}*/
		[System.Xml.Serialization.XmlElement(Namespace=Namespace.GOWKVIDEOCHAT)]
		public AudioVideoChat audiovideochat
		{
			get{return this._av;}
			set{this._av=value;}
		}
		public class AudioVideoChat
		{
			public AudioVideoChat()
			{
			}
			public AudioVideoChat(bool hascam,bool hsmic)
			{
				this.hascamera=hascam;
				this.hasmicrophone=hsmic;
			}
			public bool hascamera,hasmicrophone;
		}

	}
/// <summary>
///	unavailable -- Signals that the entity is no longer available for communication. 
///	subscribe -- The sender wishes to subscribe to the recipient's presence. 
///	subscribed -- The sender has allowed the recipient to receive their presence. 
///	unsubscribe -- The sender is unsubscribing from another entity's presence. 
///	unsubscribed -- The subscription request has been denied or a previously-granted subscription has been cancelled. 
///	probe -- A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user. 
///	error -- An error has occurred regarding processing or delivery of a previously-sent presence stanza. 
/// </summary>
//	public enum SubscribeType{unavailable,subscribe,subscribed,unsubscribe,unsubscribed,probe,error}
	/// <summary>
	/// away -- The entity or resource is temporarily away. 
	///chat -- The entity or resource is actively interested in chatting. 
	///dnd -- The entity or resource is busy (dnd = "Do Not Disturb"). 
	///xa -- The entity or resource is away for an extended period (xa = "eXtended Away").
	/// </summary>
	public class Show
	{
		public const string chat="chat";
		public const string away="away";
		public const string dnd="dnd";
		public const string xa="xa";
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -