net.sf.jqql.packets.out
Class TempSessionOpPacket
java.lang.Object
net.sf.jqql.packets.Packet
net.sf.jqql.packets.OutPacket
net.sf.jqql.packets.BasicOutPacket
net.sf.jqql.packets.out.TempSessionOpPacket
public class TempSessionOpPacket
- extends BasicOutPacket
temp session operation request packet, format:
1 head
2. subcommand, 1 byte
3. receiver's QQ number, 4 byte
4. unknown 4 byte
5. sender's nick name length, 1 byte
6. sender's nick name,
7. Site name length, 1 byte
8. site Name
Note: Site is the origin where open the temp session. If user open a temp
seesion from a cluster, site is the cluster name. This field can be assigned
any value, no effect
9. unknown 1 byte
Note: test and find, other can not receive message untill part 9 is 0x01 or 0x02,
10. unknown 4 byte
11. Content length behind, 2 byte, exclusive
12. mesage content, appendding space
13. font attribute, refer to net.sf.jqql.beans.FontStyle
Note: temp session message is sending length limited, and don't support multi-message sending
临时会话操作请求包,格式为
1. 头部
2. 子命令,1字节
当2部分为0x01时,表示发送临时会话消息,格式为
3. 接收者QQ号,4字节
4. 未知的4字节
5. 发送者昵称长度,1字节
6. 发送者昵称
7. Site名称长度,1字节
8. Site名称
Note: 所谓Site就是这个临时会话发源的地点,如果用户从某个群中开始一个
临时会话,Site就是群名称,这个域可以指定为任意值,没有什么影响
9. 未知的1字节
Note: 测试发现,9部分只有为0x01或者0x02时,才能使对方收到消息
10. 未知的4字节
11. 后面的内容长度,2字节,exclusive
12. 消息内容,结尾追加空格
13. 字体属性,参加net.sf.jqql.beans.FontStyle
Note: 临时会话消息在QQ中是限制发送长度的,而且不支持多条发送
- Author:
- luma
Fields inherited from class net.sf.jqql.packets.Packet |
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user |
Methods inherited from class net.sf.jqql.packets.BasicOutPacket |
decryptBody, encryptBody, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, parseHeader, parseTail, postFill, putHead, putTail, toString, validateHeader |
Methods inherited from class net.sf.jqql.packets.OutPacket |
dump, fill, getKey, getNextSeq, getSendCount, getTimeout, needAck, needResend, parseBody, setKey, setSendCount, setTimeout |
Methods inherited from class net.sf.jqql.packets.Packet |
equals, getCommand, getHeader, getSequence, getSource, hash, hashCode, isDuplicated, setDuplicated, setHeader, setSequence |
TempSessionOpPacket
public TempSessionOpPacket(QQUser user)
TempSessionOpPacket
public TempSessionOpPacket(ByteBuffer buf,
int length,
QQUser user)
throws PacketParseException
- Throws:
PacketParseException
getPacketName
public String getPacketName()
- Overrides:
getPacketName
in class BasicOutPacket
- Returns:
- descriptive name of packet
包的描述性名称
putBody
protected void putBody(ByteBuffer buf)
- Description copied from class:
Packet
- initialize packet body
初始化包体
- Specified by:
putBody
in class Packet
- Parameters:
buf
- ByteBuffer
getBlue
public int getBlue()
- Returns:
- Returns the blue.
setBlue
public void setBlue(int blue)
- Parameters:
blue
- The blue to set.
isBold
public boolean isBold()
- Returns:
- Returns the bold.
setBold
public void setBold(boolean bold)
- Parameters:
bold
- The bold to set.
getEncoding
public char getEncoding()
- Returns:
- Returns the encoding.
setEncoding
public void setEncoding(char encoding)
- Parameters:
encoding
- The encoding to set.
getFontName
public String getFontName()
- Returns:
- Returns the fontName.
setFontName
public void setFontName(String fontName)
- Parameters:
fontName
- The fontName to set.
getGreen
public int getGreen()
- Returns:
- Returns the green.
setGreen
public void setGreen(int green)
- Parameters:
green
- The green to set.
isItalic
public boolean isItalic()
- Returns:
- Returns the italic.
setItalic
public void setItalic(boolean italic)
- Parameters:
italic
- The italic to set.
getRed
public int getRed()
- Returns:
- Returns the red.
setRed
public void setRed(int red)
- Parameters:
red
- The red to set.
isUnderline
public boolean isUnderline()
- Returns:
- Returns the underline.
setUnderline
public void setUnderline(boolean underline)
- Parameters:
underline
- The underline to set.
getFontSize
public int getFontSize()
- Returns:
- Returns the fontSize.
setFontSize
public void setFontSize(int fontSize)
- Parameters:
fontSize
- The fontSize to set.
getMessage
public String getMessage()
- Returns:
- Returns the message.
setMessage
public void setMessage(String message)
- Parameters:
message
- The message to set.
getNick
public String getNick()
- Returns:
- Returns the nick.
setNick
public void setNick(String nick)
- Parameters:
nick
- The nick to set.
getReceiver
public int getReceiver()
- Returns:
- Returns the receiver.
setReceiver
public void setReceiver(int receiver)
- Parameters:
receiver
- The receiver to set.
getSite
public String getSite()
- Returns:
- Returns the site.
setSite
public void setSite(String site)
- Parameters:
site
- The site to set.
getSubCommand
public byte getSubCommand()
- Returns:
- Returns the subCommand.
setSubCommand
public void setSubCommand(byte subCommand)
- Parameters:
subCommand
- The subCommand to set.