JML

net.sf.jqql.packets.out
Class AdvancedSearchUserPacket

java.lang.Object
  extended by net.sf.jqql.packets.Packet
      extended by net.sf.jqql.packets.OutPacket
          extended by net.sf.jqql.packets.BasicOutPacket
              extended by net.sf.jqql.packets.out.AdvancedSearchUserPacket

public class AdvancedSearchUserPacket
extends BasicOutPacket

 advanced search user request packet.
 1. head
 2. page count, from 0, 2 byte
 3. online or not, 1 byte, 0x01 stands for online, 0x00 for offline
 4. have camera or not, 1 byte, 0x01 stands for have, 0x00 for have not, TX QQ 2004 process like this:
     if the search targets are the users who have camera, search targets are limited to online user. I don't
    known if it can search the offline user.
 5. age, 1 byte, stants for index in the combo box.
 6. gender, 1 byte, stants for index in the combo box.
 7. province, 2 byte, stants for index in the combo box.
 8. city, 2 byte, stants for index in the combo box.
 9. tail.
 高级搜索用户的请求包:
 1. 头部
 2. 页数,从0开始,2字节
 3. 在线与否,1字节,0x01表示在线,0x00表示不在线
 4. 是否有摄像头,1字节,0x01表示有,0x00表示无,TX QQ 2004中的处理是如果要查找
    有摄像头的用户,则必须查找在线用户,不知道不这样行不行
 5. 年龄,1字节,表示在下拉框中的索引
 6. 性别,1字节,表示在下拉框中的索引
 7. 省份,2字节,表示在下拉框中的索引
 8. 城市,2字节,表示在下拉框中的索引
 9. 尾部
 

Author:
luma

Field Summary
 
Fields inherited from class net.sf.jqql.packets.OutPacket
ack, key, resendCountDown, sendCount, seq, timeout
 
Fields inherited from class net.sf.jqql.packets.Packet
bodyBuf, bodyDecrypted, command, crypter, ds, duplicated, header, log, sequence, source, user
 
Constructor Summary
AdvancedSearchUserPacket(ByteBuffer buf, int length, QQUser user)
           
AdvancedSearchUserPacket(QQUser user)
          construct a default packet which seach for online user, not limited by other conditions.
 
Method Summary
 byte getAgeIndex()
           
 char getCityIndex()
           
 byte getGenderIndex()
           
 String getPacketName()
           
 char getPage()
           
 char getProvinceIndex()
           
 boolean isHasCam()
           
 boolean isSearchOnline()
           
protected  void putBody(ByteBuffer buf)
          initialize packet body 初始化包体
 void setAgeIndex(byte ageIndex)
           
 void setCityIndex(char cityIndex)
           
 void setGenderIndex(byte genderIndex)
           
 void setHasCam(boolean hasCam)
           
 void setPage(char page)
           
 void setProvinceIndex(char provinceIndex)
           
 void setSearchOnline(boolean searchOnline)
           
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdvancedSearchUserPacket

public AdvancedSearchUserPacket(ByteBuffer buf,
                                int length,
                                QQUser user)
                         throws PacketParseException
Parameters:
buf -
length -
Throws:
PacketParseException

AdvancedSearchUserPacket

public AdvancedSearchUserPacket(QQUser user)
construct a default packet which seach for online user, not limited by other conditions. 构造一个缺省包,缺省包查找在线用户,其他条件都不限

Method Detail

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

getAgeIndex

public byte getAgeIndex()
Returns:
Returns the ageIndex.

setAgeIndex

public void setAgeIndex(byte ageIndex)
Parameters:
ageIndex - The ageIndex to set.

getGenderIndex

public byte getGenderIndex()
Returns:
Returns the genderIndex.

setGenderIndex

public void setGenderIndex(byte genderIndex)
Parameters:
genderIndex - The genderIndex to set.

isHasCam

public boolean isHasCam()
Returns:
Returns the hasCam.

setHasCam

public void setHasCam(boolean hasCam)
Parameters:
hasCam - The hasCam to set.

getPage

public char getPage()
Returns:
Returns the page.

setPage

public void setPage(char page)
Parameters:
page - The page to set.

isSearchOnline

public boolean isSearchOnline()
Returns:
Returns the searchOnline.

setSearchOnline

public void setSearchOnline(boolean searchOnline)
Parameters:
searchOnline - The searchOnline to set.

getCityIndex

public char getCityIndex()
Returns:
Returns the cityIndex.

setCityIndex

public void setCityIndex(char cityIndex)
Parameters:
cityIndex - The cityIndex to set.

getProvinceIndex

public char getProvinceIndex()
Returns:
Returns the provinceIndex.

setProvinceIndex

public void setProvinceIndex(char provinceIndex)
Parameters:
provinceIndex - The provinceIndex to set.

JML