JML

net.sf.jqql.packets.in
Class ClusterCommandReplyPacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.InPacket
          extended by net.sf.jqql.packets.BasicInPacket
              extended by net.sf.jqql.packets.in.ClusterCommandReplyPacket

public class ClusterCommandReplyPacket
extends BasicInPacket

 cluster command reply packet, which format is different according to different subcommand type.
 crtate cluster reply packet, format:
 1. head
 2. command type, 1 byte, create cluster is 0x1
 3. reply code, 1 byte, sucess is 0x0, if success, format behind is:
    1. cluster internal ID, 4 byte. If it's 0, mean creation fails
    2. cluster external ID, 4 byte. If it's 0, mean creation fails
 4. If reply code is not 0, the behind is erro info
 5. tail

 群命令的回复包,根据不同的子命令类型格式有所不同:
 创建群的回复包,格式为:
 1. 头部
 2. 命令类型,1字节,创建群是0x1
 3. 回复码,1字节,成功是0x0,如果成功则后面为
    1. 群内部ID,4字节,如果为0,表示创建失败
    2. 群外部ID,4字节,如果为0,表示创建失败
 4. 如果回复码不为0,则后面为出错信息
 5. 尾部
 
 create temp cluster reply packet
 1. head
 2. command type, 1 byte, 0x30
 3. reply code, 1 byte
 4. temp cluster type, 1 byte, 0x01 is mutil-persio dialog, 0x02 is discussion group
 5. parent cluster internal ID,  4 byte
 6. temp cluster created internal ID, 4 byte
 7. tail

 创建临时群的回复包
 1. 头部
 2. 命令类型,1字节,0x30
 3. 回复码,1字节
 4. 临时群类型,1字节,0x01是多人对话,0x02是讨论组
 5. 父群内部ID,4字节
 6. 创建的临时群的内部ID,4字节
 7. 尾部
 
 activate cluster reply packet, format is:
 1. head
 2. command type, activate is 0x5
 3. reply code, 1 byte, success is 0x0
 4. cluster interal ID
 5. tail

 激活群的回复包,格式为:
 1. 头部
 2. 命令类型,激活是0x5
 3. 回复码,1字节,成功是0x0
 4. 群的内部ID
 5. 尾部
 
 get cluster info reply packet, format:
 1. head
 2. command type, 1 byte, get cluster info is 0x4
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. cluster external ID, 4 byte
 6. cluster type, 1 byte
 7. unknown 4 byte
 8. creator's QQ number, 4 byte
 9. authentication type, 1 byte
 10. cluster category, 4 byte, category of 2004, only has 4 subcategory
 11. unknown 2 byte
 12. cluster category ID, 4 byte, this is category of 2005, whick at most has 3 layer. Each category has a unique id
 13. unknown 2 byte
 14. unkonw 1 byte
 15. cluster version id, 4 byte
 16. cluster name length, 1 byte
 17. cluster name
 18. unkown 2 byte
 19. cluster declaration length, 1 byte
 20. cluster declaration
 21. cluster description length, 1 byte
 22. cluster description
 23. cluster member's QQ number, 4 byte
 24. sequence of organization members belong to, 1 byte. Organization sequence begins from 1. If it's 0, mean not in some organization.
     a member belongs to only one organization, not like discussion group. discussion group is like the cluster in a cluster,organization is
    the classification for member, not a cluster 
 25. cluser member type, like admin, etc, 1 byte
 26. If there are more member, repeat part 23 to 25
 27. tail

 得到群信息的回复包,格式为:
 1. 头部
 2. 命令类型,1字节,得到群信息是0x4
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 群外部ID,4字节
 6. 群类型,1字节
 7. 未知的4字节
 8. 创建者QQ号,4字节
 9. 认证类型,1字节
 10. 群分类,4字节,这是2004的分类法。2004只有4个分类
 11. 未知的2字节
 12. 群分类ID,4字节,这是2005的分类法,2005的分类最多有三层。每个分类有一个唯一的id
 13. 未知的2字节
 14. 未知的1字节
 15. 群version id, 4字节
 16. 群名称长度,1字节
 17. 群名称
 18. 未知的两字节,全0
 19. 群声明长度,1字节
 20. 群声明
 21. 群描述长度,1字节
 22. 群描述
 23. 群中成员的QQ号,4字节
 24. 成员所属组织的序号,1字节,组织序号从1开始,如果为0,表示其不在某个组织中,
    一个成员只能在一个组织里面,组织和讨论组不同,讨论组可以看成是群中群,组织
     只是群成员的分类而已,它并不是一个群
 25. 群成员的类型,是不是管理员之类的,1字节
 26. 如果存在更多成员,重复23-25部分
 27. 尾部
 
 get temp cluster  reply packet, format:
 1. head
 2 command type, 1 byte, 0x33
 3. reply code, 1 byte, success is 0x00
 4. cluster type, 1 byte
 5. parent internal ID, 4 byte
 6. temp cluster internal ID, 4 byte
 7. creator's QQ number, 4 byte
 8. unkown 4 byte, all 0
 9. cluster name length, 1 byte
 10. cluster name
 11. cluster member's QQ number, 4 byte
 12. sequence of organization member belongs to, 1 byte. For temp cluster, there's no cluster organization, so the field is useless
 13. If there are more members, repeat par 11-12
 14. tail.

 得到临时群信息的回复包,格式为
 1. 头部
 2. 命令类型,1字节,0x33
 3. 回复码,1字节,成功是0x00
 4. 群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 创建者QQ号,4字节
 8. 未知的4字节,全0
 9. 群名称长度,1字节
 10. 群名称
 11. 群中成员的QQ号,4字节
 12. 成员所属组织的序号,1字节。对于临时群来说,没有群内组织的概念,所以这个字段无用
 13. 如果有更多成员,重复11-12部分
 14. 尾部
 
 exit cluster reply, format:
 1. head
 2. command type, 1 byte, exit is 0x9
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte, shoud not be 0
 5. tail

 退出群的回复,格式为:
 1. 头部
 2. 命令类型,1字节,退出是0x9
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节,应该是个非0值
 5. 尾部
 
 dimiss cluster reply
 1. head
 2. subcommand, 1 byte, 0x1D
 3. reply code, 1 byte
 4. cluster internal id, 4 byte
 5. tail

 解散群的回复
 1. 头部
 2. 子命令,1字节,0x1D
 3. 回复码,1字节
 4. 群内部id,4字节
 5. 尾部
 
 apply member info reply packet, format:
 1. head
 2. command type, 1 byte, apply member info is 0x0C
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. member QQ number, 4 byte
 6. head number, 2 byte
 7 . age, 1 byte
 8. gender, 1 byte
 9. nick name length, 1 byte
 10. nick name
 11. unknown 2 byte
 12. extend flag, 1 byte
 13. general flag, 1 byte
 14. If there are more member, repeat part 5-13, part 5-13 in fact is the structure of QQFriend
 15. tail

 请求成员信息的回复包,格式为
 1. 头部
 2. 命令类型,1字节,请求成员信息是0x0C
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 成员QQ号,4字节
 6. 头像号,2字节
 7. 年龄,1字节
 8. 性别,1字节
 9. 昵称长度,1字节
 10. 昵称
 11. 未知的2字节
 12. 扩展标志,1字节
 13. 通用标志,1字节
 14. 如果有更多成员,重复5-13部分,5-13部分其实也就是QQFriend结构
 15. 尾部
 
get online member reply packet, format is :
 1. head
 2. command type, 1 byte, apply member info is 0x0B
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. unknown byte, 0x3C
 6. online member 's QQ number
 7. If there are more online member, repeat 6
 8. tail

 得到在线成员的回复包,格式为:
 1. 头部
 2. 命令类型,1字节,请求成员信息是0x0B
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 未知字节,0x3C
 6. 在线成员的qq号
 7. 如果有更多在线成员,重复6
 8. 尾部
 
 activate temp cluster reply packet
 1. head
 2. command type, 1 byte, 0x37
 3. reply code, 1 byte
 4. temp cluster type, 1 byte
 5. parent internal ID, 4 byte
 6. temp cluster internal ID, 4 byte
 7. member's QQ number, 4 byte
 8. If there are more member, repeat part 7
 9 . tail

 激活临时群的回复包
 1. 头部
 2. 命令类型,1字节,0x37
 3. 回复码,1字节
 4. 临时群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 成员QQ号,4字节
 8. 如果有更多成员,重复7部分
 9. 尾部
 
 apply to join cluster reply packet, format:
 1. head
 2. command type, 1 byte, apply member info is 0x07
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. reply code, this code is fine-grain, specific to join request reply, 1 byte
 6. tail

 请求加入群的回复包,格式为:
 1. 头部
 2. 命令类型,1字节,请求成员信息是0x07
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 回复码,这个回复码是比较细的特定于join请求的回复,1字节
 6. 尾部
 
 apply to join cluster authenticate info reply packet, not usefull, indicates that ther server receive, format:
 1. head
 2. command type, here is 0x8
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte, If it's 0, means error
 5. tail

 请求加入群的认证信息回复包,没什么太大用处,就是表示服务器收到了,格式为:
 1. 头部
 2. 命令类型,这里是0x8
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节,如果为0表示出错
 5. 尾部
 
 modify cluster info reply packet, format is:
 1. head
 2. command type, here is 0x03
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. tail

 修改群信息的回复包,格式为:
 1. 头部
 2. 命令类型,这里是0x03
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 尾部
 
 modify cluster member reply packet, format:
 1. head
 2. command type, hre is 0x03
 3. reply code, 1 byte, success is 0x0
 4. cluster internal ID, 4 byte
 5. tail

 修改群成员的回复包,格式为:
 1. 头部
 2. 命令类型,这里是0x03
 3. 回复码,1字节,成功是0x0
 4. 群内部ID,4字节
 5. 尾部
 
 search cluster reply packet, format:
 1. head
 2. command type, here is 0x06
 3. reply code, 1 byte, success is 0x0
 4. search manner, 1 byte
 5. cluster internal ID, 4 byte
 6.  cluster type, 1 byte
 7. cluster type, 1 byte
 8. unknown 4 byte
 9. cluster creator, 4 byte
 10. cluster category, 4 byte, category of 2004, which has only 4 subcategory
 11. cluster category, 4 byte, category of 2005
 12. unknown 2 byte
 13. cluster name length, 1 byte
 14. cluster name
 15. unknown 2 byte
 16. authentication type, 1 byte
 17. cluster introduction length, 1 byte
 18. cluster introduction
 19. tail

 搜索群的回复包,格式为:
 1. 头部
 2. 命令类型,这里是0x06
 3. 回复码,1字节,成功是0x0
 4. 搜索方式,1字节
 5. 群内部ID,4字节
 6. 群外部ID,4字节
 7. 群类型,1字节
 8. 未知的4字节
 9. 群创建者,4字节
 10. 群分类,4字节,这是2004的分类法。2004只有4个分类
 11. 群分类,4字节,这是2005分类法
 12. 未知的2字节
 13. 群名称长度,1字节
 14. 群名称
 15. 未知的两字节
 16. 认证类型,1字节
 17. 群简介长度,1字节
 18. 群简介
 19. 尾部
 
 send cluster info and send extend cluster info reply packet
 1. head
 2. command type, 1 byte, 0x0A
 3. reply code, 1 byte
 4. cluster internal id, 4 byte
 5. tail

 发送群信息和发送扩展群信息的回复包
 1. 头部
 2. 命令类型,1字节,0x0A
 3. 回复码,1字节
 4. 群内部id,4字节
 5. 尾部
 
 send temp cluster info reply packet
 1. head
 2. command type, 1 byte, 0x35
 3. reply code, 1 byte
 4. temp cluster type, 1 byte
 5. parent cluster internal ID, 4 byte
 6. temp cluster internal ID, 4 byte
 7. tail 

 发送临时群信息的回复包
 1. 头部
 2. 命令类型,1字节,0x35
 3. 回复码,1字节
 4. 临时群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 尾部
 
 exit temp cluster reply packet
 1. head
 2. command type, 1 byte, 0x32
 3. reply code, 1 byte
 4. temp cluster type, 1 byte
 5. parent cluster ID, 4 byte
 6. temp cluster internal ID, 4 byte
 7 . tail

 退出临时群的回复包
 1. 头部
 2. 命令类型,1字节,0x32
 3. 回复码,1字节
 4. 临时群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 尾部
 
 modify temp cluster info reply packet
 1. head
 2. command type, here is 0x34
 3. reply code, 1 byte, success is 0x00
 4. temp cluster type, 1 byte
 5. parent internal ID, 4 byte
 6. temp cluster ID, 4 byte
 7. tail 

 修改临时群信息的回复包
 1. 头部
 2. 命令类型,这里是0x34
 3. 回复码,1字节,成功是0x00
 4. 临时群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 尾部
 
 modified temp cluster member reply packet
 1. head
 2. command type, hre is 0x31
 3. reply code, 1 byte, success is 0x00
 4. temp cluster type, 1 byte
 5. parent internal ID, 4 byte
 6. temp cluster internal ID, 4 byte
 7. operate type, 1 byte, 0x01 is add, 0x02 is remove
 8. operate cluster member's QQ number, 4 byte
 9. If there are more member, repeat part 8.
 10. tail

 修改临时群成员的回复包
 1. 头部
 2. 命令类型,这里是0x31
 3. 回复码,1字节,成功是0x00
 4. 临时群类型,1字节
 5. 父群内部ID,4字节
 6. 临时群内部ID,4字节
 7. 操作方式,1字节,0x01是添加,0x02是删除
 8. 操作的成员QQ号,4字节
 9. 如果有更多成员,重复8部分
 10. 尾部
 
 discussion group operate reply packet,  when subcommand type is 0x02(get discussion group list)
 1. head
 2. command type, 0x36
 3. reply code, 1 byte
 4. sub command type, 1 byte, 0x02
 5. cluster internal id, 4 byte
 6. cluster external id, 4 byte
 7. discussion group id
 8. discussion group name byte length, 1 byte
 9. discussion group name
 10. If there are more discussion group, repeat part 7-9
 11. tail

 讨论组操作的回复包,子命令类型为0x02时(得到讨论组列表)
 1. 头部
 2. 命令类型,0x36
 3. 回复码,1字节
 4. 子命令类型,1字节,0x02
 5. 群内部id,4字节
 6. 群外部id,4字节
 7. 讨论组id,4字节
 8. 讨论组名称字节长度,1字节
 9. 讨论组名称
 10. 如果有更多讨论组,重复7-9部分
 11. 尾部 
 
 discussion group operate reply packet, when sub command type is 0x01(get multi-person dialog list)
 1. head
 2. command type, 0x36
 3. reply code, 1 byte
 4. sub command type, 1 byte, 0x01
 5. cluster internal id, 4 byte, all 0
 6. cluster external id, 4 byte, all 0
 7. discussion group id, , 4 byte
 8. byte length of discussion group name, 1 byte
 9. discussion group name
 10. If there are more discussion group, repeat part 7-9
 11. tail

 讨论组操作的回复包,子命令类型为0x01时(得到多人对话列表)
 1. 头部
 2. 命令类型,0x36
 3. 回复码,1字节
 4. 子命令类型,1字节,0x01
 5. 群内部id,4字节,为0
 6. 群外部id,4字节,为0
 7. 讨论组id,4字节
 8. 讨论组名称字节长度,1字节
 9. 讨论组名称
 10. 如果有更多讨论组,重复7-9部分
 11. 尾部 
 
 update organization architeture
 1. head
 2. command, 1 byte, 0x12
 3. reply code, 1 byte, 0x00 is success
 4. cluster interal ID, 4 byte
 5. unknown 1 byte, 0x00
 6. organization Version ID, 4 byte, mean the same as cluster's
 7. organization count, 1 byte
 8. organization sequence, 1 byte, begin with 1
 9.  organization layer relationship, 4 byte. QQ's organization supports at most 4 layer, 4 byte totaly 32 bit.
 The first layer use 8 bits, the later use 6 bit, 6 bit is reserved. For example, If the field is in binary like:
  0000 0001 0000 1100 0101 0010 0100 0000
 we get that, the leading 8 bit : 0000 0001 is 1, and then 0000 11 is 3, 00 0101 is 5, 0010 01 is 9
 the 6 bits left is not used.
 So this organization posits is in layer 4, it's the 9th sub organization of its parent node. Its parent node
 is the 5th sub organization of its parent's parent node which is the 3rd organization of its parent's parent's 
 parent node which is the first organization of the cluster.
 We should make it clear that, organization sequence is different from layer number, and they are not related.
 At present, the relationship is maintained by us to search organization.
 10. organization name byte length, 2 byte
 11. organization name
 12. If there are more organization, repeat part 8-11
 13. tail

 从服务器更新组织架构的回复包
 1. 头部
 2. 命令,1字节,0x12
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 未知1字节,0x00
 6. 组织Version ID,4字节,意义和群的Version ID相同。
       如果这个字段为0,表示没有组织,并且7-12部分不存在
 7. 组织个数,1字节
 8. 组织序号,1字节,从1开始
 9. 组织的层次关系,4字节。QQ的组织最多支持4层,4个字节一共32bit,第一层用了8位,
    后面的层用了6位,所以还有6位是保留未用的。举个例子说明一下这个字段的具体格式,
    假如这个字段的二进制表示为
    0000 0001 0000 1100 0101 0010 0100 0000
    那么得知,前8位0000 0001,值为1
    然后是0000 11,值为3
    然后是00 0101,值为5
    然后后0010 01,值为9,
    最后6位保留未用,
    所以这个组织位于第四层,它是父节点的第9个子组织,它的父节点是祖父节点的第5个子组织,
    它的祖父节点是曾祖父节点的第3个组织,它的曾祖父节点是群的第一个组织。
    我们要分清楚的是,组织的序号和层次号并不是一样的,也不是有对应关系的。所以目前来看,
    这个关系需要我们自己维护,以便查找组织
 10. 组织名称字节长度,1字节
 11. 组织名称
 12. 如果有更多组织,重复8-11部分
 13. 尾部 
 
 commit organization architeture reply packet
 1. head
 2. command ,1 byte, 0x11
 3. reply code, 1 byte, 0x00 is success
 4. cluster internal ID, 4 byte
 5. organization Version ID, 4 byte
 6. organization count, 2 byte
 7. organization sequence, 1 byte
 8. If there are more organization, repeat part 7
 9. tail

 提交组织架构的回复包
 1. 头部
 2. 命令,1字节,0x11
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 组织Version ID,4字节
 6. 组织个数,2字节
 7. 组织序号,1字节
 8. 如果有更多组织,重复7部分
 9. 尾部
 
 commit member group info reply packet
 1. head
 2. command, 1 byte, 0x13
 3. reply code, 1 byte, 0x00 is success
 4. cluster internal ID, 4 byte
 5. member group info version id, 4 byte
 6. tail

 提交成员分组情况的回复包
 1. 头部
 2. 命令,1字节,0x13
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 成员分组情况version id,4字节
 6. 尾部
 
 modify cluster card reply packet
 1. head
 2. command , 1 byte, 0x0E
 3. reply code, 1 byte, 0x00 is success
 4. cluster internal ID, 4 byte
 5. your QQ number, 4 byte

 修改群名片回复包
 1. 头部
 2. 命令, 1字节,0x0E
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 自己的QQ号,4字节
 
 get cluster card real name in batch  reply packet
 1. head
 2. command, 1 byte, 0x0F
 3. reply code, 1 byte, 0x00 is success
 4. cluster internal ID, 4 byte
 5. cluster card version id, 4 byte
 6. Next request packet start position, 4 byte. If the field is 0, mean all the card are got.
 If  not 0, mean the intial record count, like total 10 pieces of card info, got 6 six, 4 left. The field
 is 0x00000006, for next sequence is 6(begin with 0)
 7. member QQ number, 4 byte
 8. read name length, 1 byte
 9. real name
 10. if there are more members, repeat part 7-9.
 11. tail

 批量得到群名片真实姓名的回复包
 1. 头部
 2. 命令, 1字节,0x0F
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 群名片Version id, 4字节
 6. 下一个请求包的起始位置,4字节。这个字段如果为0,表示所有名片都已经得到
    如果不为0,表示起始记录数,比如一共有10条名片信息,这次得到了6条,还剩
    4条,那么这个字段就是0x00000006,因为下一条的序号是6(从0开始)
 7. 成员QQ号,4字节
 8. 真实姓名长度,1字节
 9. 真实姓名
 10. 如果有更多成员,重复7-9部分
 11. 尾部
 
 get single member's all cluster card info reply packet
 1. head
 2. command,  1 byte, 0x0F
 3. reply code, 1 byte, 0x00 means success
 4. cluster internal ID, 4 byte
 5. member QQ number, 4 byte
 6. real name length, 1 byte
 7. real name
 8. gender index, 1 byte, gender order is 'male', 'female', '-', so male is 0x00, and so on.
 9 .telephone string length, 1 byte
 10. telephone in string form
 11.  email length, 1 byte
 12. email
 13. note length, 1 byte
 14. note 
 15. tail

 得到单个成员全部群名片信息的回复包
 1. 头部
 2. 命令, 1字节,0x0F
 3. 回复码,1字节,0x00为成功 
 4. 群内部ID,4字节
 5. 成员QQ号,4字节
 6. 真实姓名长度,1字节
 7. 真实姓名
 8. 性别索引,1字节,性别的顺序是'男', '女', '-',所以男是0x00,等等
 9. 电话字符串长度,1字节
 10. 电话的字符串表示
 11. 电子邮件长度,1字节
 12. 电子邮件
 13. 备注长度,1字节
 14. 备注内容
 15. 尾部
 
 set role reply packet
 1. head
 2. command , 1 byte, 0x18
 3. reply code, 1 byte
 4. cluster internal ID, 4 byte
 5. cluster version id, 4 byte
 6.  QQ number set, 4 byte
 7. member role after set, 1 byte
 8. tail

 设置角色的回复包
 1. 头部
 2. 命令,1字节,0x1B
 3. 回复码,1字节
 4. 群内部ID,4字节
 5. 群version id, 4字节
 6. 被设置的QQ号,4字节
 7. 操作之后成员的角色,1字节
 8. 尾部
 
 transfer role reply packet
 1. head
 2. command, 1 byte, 0x1B
 3. reply code, 1 byte
 4. cluster internal ID, 4 byte
 5. QQ number transfered to, 4 byte
 6. according to different reply code:
    i. when part 3 is 0x00, it's cluster version id, 4 byte
    ii, part 3 is other value, error info
 7. tail

 转让角色的回复包
 1. 头部
 2. 命令,1字节,0x1B
 3. 回复码,1字节
 4. 群内部ID,4字节
 5. 转让到的QQ号,4字节
 6. 根据回复码不同,有:
    i. 3部分为0x00时,为群version id,4字节
    ii. 3部分为其他值时,为错误信息
 7. 尾部
 

Author:
luma

Field Summary
 Card card
           
 List<CardStub> cardStubs
           
 int cardVersionId
           
 int clusterId
          ç¾¤å†…部id
 List<ClusterInfo> clusters
          æœç´¢åˆ°çš„群,类型是ClusterInfo
 String errorMessage
          å¦‚æžœreplyCode不是ok,那么这个字段有效,表示出错信息
 int externalId
          ç¾¤å¤–部id
 ClusterInfo info
          ç¾¤ä¿¡æ¯
 byte joinReply
          åŠ å…¥ç¾¤çš„å›žå¤
 List<QQFriend> memberInfos
          åŒ…含了群成员信息的列表,元素类型是QQFriend
 int memberOrganziationVersionId
           
 int memberQQ
          å¦‚果某个包是对单个群成员进行操作,则使用这个字段保存QQ号
 List<Member> members
          ç¾¤æˆå‘˜åˆ—表,元素类型为Integer,包含了成员的QQ号
 int nextStart
           
 List<Integer> onlineMembers
          åŒ…含了在线成员列表,元素类型是Integer,表示成员的QQ号
 int organizationCount
           
 List<QQOrganization> organizations
           
 int organizationVersionId
           
 int parentClusterId
          çˆ¶ç¾¤å†…部ID
 byte replyCode
          å›žå¤ç 
 byte role
           
 byte searchType
          æœç´¢ç±»åž‹
 byte subClusterOpByte
          å­ç¾¤æ“ä½œå­ç±»åž‹
 List<SimpleClusterInfo> subClusters
          å­ç¾¤åˆ—表,可能是讨论组也可能是多人对话
 byte subCommand
          å­å‘½ä»¤
 byte type
          ç¾¤ç±»åž‹
 int versionId
          ç¾¤ç‰ˆæœ¬å·
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
ClusterCommandReplyPacket(ByteBuffer buf, int length, QQUser user)
          constructor 构造函数
 
Method Summary
 String getPacketName()
           
protected  void parseBody(ByteBuffer buf)
          parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起
 
Methods inherited from class net.sf.jqql.packets.BasicInPacket
decryptBody, encryptBody, getBodyBytes, getCryptographStart, getFamily, getHeadLength, getLength, getTailLength, parseHeader, parseTail, putBody, putHead, putTail, toString
 
Methods inherited from class net.sf.jqql.packets.InPacket
validateHeader
 
Methods inherited from class net.sf.jqql.packets.Packet
dump, equals, getCommand, getHeader, getSequence, getSource, hash, hashCode, isDuplicated, setDuplicated, setHeader, setSequence
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

subCommand

public byte subCommand
子命令


replyCode

public byte replyCode
回复码


clusterId

public int clusterId
群内部id


externalId

public int externalId
群外部id


type

public byte type
群类型


parentClusterId

public int parentClusterId
父群内部ID


versionId

public int versionId
群版本号


memberQQ

public int memberQQ
如果某个包是对单个群成员进行操作,则使用这个字段保存QQ号


errorMessage

public String errorMessage
如果replyCode不是ok,那么这个字段有效,表示出错信息


info

public ClusterInfo info
群信息


members

public List<Member> members
群成员列表,元素类型为Integer,包含了成员的QQ号


memberInfos

public List<QQFriend> memberInfos
包含了群成员信息的列表,元素类型是QQFriend


onlineMembers

public List<Integer> onlineMembers
包含了在线成员列表,元素类型是Integer,表示成员的QQ号


subClusters

public List<SimpleClusterInfo> subClusters
子群列表,可能是讨论组也可能是多人对话


subClusterOpByte

public byte subClusterOpByte
子群操作子类型


joinReply

public byte joinReply
加入群的回复


searchType

public byte searchType
搜索类型


clusters

public List<ClusterInfo> clusters
搜索到的群,类型是ClusterInfo


organizationVersionId

public int organizationVersionId

organizationCount

public int organizationCount

organizations

public List<QQOrganization> organizations

memberOrganziationVersionId

public int memberOrganziationVersionId

cardStubs

public List<CardStub> cardStubs

cardVersionId

public int cardVersionId

nextStart

public int nextStart

card

public Card card

role

public byte role
Constructor Detail

ClusterCommandReplyPacket

public ClusterCommandReplyPacket(ByteBuffer buf,
                                 int length,
                                 QQUser user)
                          throws PacketParseException
constructor 构造函数

Parameters:
buf - buffer
length - packet length
buf - 缓冲区
length - 包长度
Throws:
PacketParseException - parse erro
PacketParseException - 解析错误
Method Detail

getPacketName

public String getPacketName()
Overrides:
getPacketName in class BasicInPacket
Returns:
descriptive name of packet 包的描述性名称

parseBody

protected void parseBody(ByteBuffer buf)
                  throws PacketParseException
Description copied from class: Packet
parse packet body, from begin position of buf 解析包体,从buf的开头位置解析起

Specified by:
parseBody in class Packet
Parameters:
buf - ByteBuffer
Throws:
PacketParseException - if parse error 如果解析出错

JML