|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSnacCommand
SearchCommand
InterestListCmd
A SNAC command containing a "tree" of valid "chat interests." Normally sent
in response to a InterestListReq
. See InterestInfo
for
details on how to interpret the data sent in this command.
InterestListReq
,
InterestInfo
0x0f
, command 0x05
Field Summary | |
static int |
CODE_SUCCESS
A result code indicating that a interest list request was successful. |
static int |
CODE_UNAVAILABLE
A result code indicating that a chat interest list is currently unavailable. |
Fields inherited from class SearchCommand |
CMD_INTERESTS, CMD_INTERESTS_REQ, CMD_RESULTS, CMD_SEARCH, FAMILY_INFO, FAMILY_SEARCH |
Fields inherited from class SnacCommand |
SNACFLAG_DEFAULT |
Constructor Summary | |
|
InterestListCmd(int code)
Creates a new outgoing interest list command with no interest list and with the given result code. |
|
InterestListCmd(InterestInfo[] interests)
Creates a new outgoing interest list command with the given interest list. |
|
InterestListCmd(int code,
InterestInfo[] interests)
Creates a new outgoing interest list command with the given result code and the given interest list. |
protected |
InterestListCmd(SnacPacket packet)
Generates a new interest list command from the given incoming SNAC packet. |
Method Summary | |
InterestInfo[] |
getInterests()
Returns the interest list sent in this command, or null if
none was sent. |
int |
getResultCode()
Returns the result code sent in this command. |
java.lang.String |
toString()
|
void |
writeData(java.io.OutputStream out)
Writes this command's SNAC data block to the given stream. |
Methods inherited from class SnacCommand |
getCommand, getFamily, getFlag1, getFlag2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CODE_SUCCESS
public static final int CODE_UNAVAILABLE
Constructor Detail |
protected InterestListCmd(SnacPacket packet)
packet
- an incoming interest list packetpublic InterestListCmd(int code)
code
- a result code, like CODE_UNAVAILABLE
public InterestListCmd(InterestInfo[] interests)
CODE_SUCCESS
if
interests
is not null
(even if
interests.length
is 0
!), and CODE_UNAVAILABLE
if interests
is null
.
interests
- a list of interestspublic InterestListCmd(int code, InterestInfo[] interests)
code
- a result code, like CODE_UNAVAILABLE
interests
- a list of interest, or null
for noneMethod Detail |
public int getResultCode()
CODE_SUCCESS
or CODE_UNAVAILABLE
.
public final InterestInfo[] getInterests()
null
if
none was sent. See InterestInfo
for details on how to interpret
this list.
public void writeData(java.io.OutputStream out) throws java.io.IOException
SnacCommand
writeData
in class SnacCommand
out
- the stream to which to write the SNAC data
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |