net.kano.joscar.snaccmd.loc
Class SetDirAck

java.lang.Object
  extended bySnacCommand
      extended byLocCommand
          extended bySetDirAck

public class SetDirAck
extends LocCommand

A SNAC command sent to acknowledge the setting of one's directory information. Normally sent in response to a SetDirInfoCmd.

See Also:
SetDirInfoCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x02, command 0x0a

Field Summary
static int CODE_ERROR
          A result code indicating that your directory information was not set successfully.
static int CODE_SUCCESS
          A result code indicating that your directory information was 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
  SetDirAck()
          Creates a new set-directory-information acknowledgement command with a result code of CODE_SUCCESS.
  SetDirAck(int code)
          Creates a new set-directory-information acknowledgement command with the given result code.
protected SetDirAck(SnacPacket packet)
          Generates a set-directory-information acknowledgement from the given incoming SNAC packet.
 
Method Summary
 int getResultCode()
          Returns the result code of this acknowledgement.
 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 your directory information was set successfully.

See Also:
Constant Field Values

CODE_ERROR

public static final int CODE_ERROR
A result code indicating that your directory information was not set successfully.

See Also:
Constant Field Values
Constructor Detail

SetDirAck

protected SetDirAck(SnacPacket packet)
Generates a set-directory-information acknowledgement from the given incoming SNAC packet.

Parameters:
packet - an incoming set-dir-info acknowlegement packet

SetDirAck

public SetDirAck()
Creates a new set-directory-information acknowledgement command with a result code of CODE_SUCCESS.


SetDirAck

public SetDirAck(int code)
Creates a new set-directory-information acknowledgement command with the given result code.

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

getResultCode

public final int getResultCode()
Returns the result code of this acknowledgement. Normally one of CODE_SUCCESS and CODE_ERROR.

Returns:
this acknowledgement command's 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()