message.cs
来自「语音视频功能 里面实现了基本的QQ与语音对话」· CS 代码 · 共 71 行
CS
71 行
using System;
using System.Xml;
using System.Xml.Serialization;
namespace gowk.core.packets
{
[System.Serializable]
[XmlRoot("message")]
public class Message:Packet
{
// private MessageType _type;
private string _s,_b,_t,_r;
videochat _v;
public Message()
{
}
/* [System.Xml.Serialization.XmlAttribute("type")]
public MessageType Type
{
get{return this._type;}
set{this._type=value;}
}*/
[System.Xml.Serialization.XmlElement("subject")]
public string Subject
{
get{return this._s;}
set{this._s=value;}
}
[System.Xml.Serialization.XmlElement("body")]
public string Body
{
get{return this._b;}
set{this._b=value;}
}
[System.Xml.Serialization.XmlElement("thread")]
public string Thread
{
get{return this._t;}
set{this._t=value;}
}
[System.Xml.Serialization.XmlElement("rtf",Namespace=Namespace.RTF)]
public string Rtf
{
get{return this._r;}
set{this._r=value;}
}
[System.Xml.Serialization.XmlElement("videochat",Namespace=Namespace.GOWKVIDEOCHAT)]
public videochat VideoChat
{
get{return _v;}
set{_v=value;}
}
public class videochat
{
public VideoChatType type;
public bool ok;
public string ip;
public int port;
public videochat(){}
public videochat(bool ok){this.ok=ok;}
}
public enum VideoChatType
{
request,response,end
}
}
/* public enum MessageType
{
chat,error,groupchat,headline,normal
}*/
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?