net.kano.joscar.snaccmd.loc
Class SetInterestsAck

java.lang.Object
  extended bySnacCommand
      extended byLocCommand
          extended bySetInterestsAck

public class SetInterestsAck
extends LocCommand

A SNAC command sent to acknowledge the setting of one's chat interests. Normally sent in response to a SetInterestsCmd.

See Also:
SetInterestsCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x02, command 0x10

Field Summary
static int CODE_SUCCESS
          A result code indicating that one's interests were set successfully.
 
Fields inherited from class LocCommand
CMD_DIR_INFO, CMD_GET_DIR, CMD_INTEREST_ACK, CMD_NEW_GET_INFO, CMD_OLD_GET_INFO, CMD_RIGHTS_REQ, CMD_RIGHTS_RESP, CMD_SET_DIR, CMD_SET_DIR_ACK, CMD_SET_INFO, CMD_SET_INTERESTS, CMD_USER_INFO, FAMILY_INFO, FAMILY_LOC
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  SetInterestsAck()
          Creates a new set-chat-interests acknowledgement command with a result code of CODE_SUCCESS.
  SetInterestsAck(int code)
          Creates a new set-chat-interests acknowledgement command with the given result code.
protected SetInterestsAck(SnacPacket packet)
          Generates a new set-chat-interests acknowledgement command from the given incoming SNAC packet.
 
Method Summary
 int getResultCode()
          Returns this command's result code.
 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

CODE_SUCCESS

public static final int CODE_SUCCESS
A result code indicating that one's interests were set successfully.

See Also:
Constant Field Values
Constructor Detail

SetInterestsAck

protected SetInterestsAck(SnacPacket packet)
Generates a new set-chat-interests acknowledgement command from the given incoming SNAC packet.

Parameters:
packet - an incoming set-chat-interests acknowledgement packet

SetInterestsAck

public SetInterestsAck()
Creates a new set-chat-interests acknowledgement command with a result code of CODE_SUCCESS.


SetInterestsAck

public SetInterestsAck(int code)
Creates a new set-chat-interests acknowledgement command with the given result code.

Parameters:
code - a result code, normally CODE_SUCCESS
Method Detail

getResultCode

public final int getResultCode()
Returns this command's result code. Normally CODE_SUCCESS.

Returns:
the result code

writeData

public void writeData(java.io.OutputStream out)
               throws java.io.IOException
Description copied from class: SnacCommand
Writes this command's SNAC data block to the given stream. The SNAC data block is the data after the first ten bytes of a SNAC packet.

Specified by:
writeData in class SnacCommand
Parameters:
out - the stream to which to write the SNAC data
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()