net.sf.jqql.packets.out
Class GroupDataOpPacket
java.lang.Object
net.sf.jqql.packets.Packet
net.sf.jqql.packets.OutPacket
net.sf.jqql.packets.BasicOutPacket
net.sf.jqql.packets.out.GroupDataOpPacket
public class GroupDataOpPacket
- extends BasicOutPacket
upload, download grouping name message packet, format:
1. head
2. operation mode byte, if it's 0x2, it's upload group name. If it's 0x1, download groupname.
If it's 0x2, part behind are:
i. group sequence, qq default group, like my friend, sequence 0, other groups begin with 1, 1 byte.
Notice, this doesn't include my friend group, for it's the default QQ group, not necessary to upload
its name.
ii. 16 byte group name. If the group name length is less than 16 byte, fill 0 in the back. 16 byte length is
because the length of QQ group name is at most 8 Chinese word long.
iii. If there are more groups, repeat part i, ii
If ti's 0x1, part behind are:
i. unknwon byte 0x2
ii. 4 unknown byte, all 0.
3. tail
上传下载分组名字的消息包,格式为
1. 头部
2. 操作方式字节,如果为0x2,为上传组名,如果为0x1,为请求下载组名
如果为0x2,后面的部分为
i. 组序号,qq缺省的组,比如我的好友,序号是0,其他我们自己添加的组,从1开始,一个字节。
但是要注意的是,这里不包括我的好友组,因为我的好友组是QQ的缺省组,无需上传名称
ii. 16个字节的组名,如果组名长度少于16个字节,后面的填0。之所以是16个,是因为QQ的组名长度最多8个汉字
iii. 如果有更多组,重复i,ii部分
如果为0x1,后面的部分为
i. 未知字节0x2
ii. 4个未知字节,全0
3. 尾部
This packet doesn't limit the group name added, or the first group should be my friend group.
They are implemented in the upper program. Of cource, it's not necessary to have my friend group as the first group.
These client trick is played with as what you want.
这个包没有限制添加的组名叫什么,也没有明确规定第一个组必须是
我的好友组,这些规范需要在上层程序中实现。当然也可以不一定非要第一个组是
我的好友组,这些客户端的trick随便你怎么搞
each upload should upload all the group name.
每次上传都必须上传所有组名
- 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 |
GroupDataOpPacket
public GroupDataOpPacket(QQUser user)
- constructor
构造函数
GroupDataOpPacket
public GroupDataOpPacket(ByteBuffer buf,
int length,
QQUser user)
throws PacketParseException
- Parameters:
buf - length -
- 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
getType
public byte getType()
- Returns:
- Returns the type.
setType
public void setType(byte type)
- Parameters:
type - The type to set.
getGroups
public List<String> getGroups()
- Returns:
- Returns the groups.
setGroups
public void setGroups(List<String> groups)
- Parameters:
groups - The groups to set.