net.kano.joscar.snaccmd.ssi
Class SsiDataModResponse

java.lang.Object
  extended bySnacCommand
      extended bySsiCommand
          extended bySsiDataModResponse

public class SsiDataModResponse
extends SsiCommand

A SNAC command used to acknowledge the modification of the user's server-stored data. Normally sent in response to CreateItemsCmd, ModifyItemsCmd, and DeleteItemsCmd.

See Also:
CreateItemsCmd, ModifyItemsCmd, DeleteItemsCmd
Source of this SNAC:
AIM server
SNAC command type:
Family 0x13, command 0x0e

Field Summary
static int RESULT_CANT_ADD_ANOTHER_ROOT_GROUP
          A result code indicating that the client attempted to create a second group list.
static int RESULT_ID_TAKEN
          A result code indicating that one or more of the items requested to be created cannot be because an item with the same ID already exists.
static int RESULT_MAX_ITEMS
          A result code indicating that one or more of the requested items cannot be created because the maximum number of items of that type has been reached.
static int RESULT_NO_ICQ
          A result code indicating that ICQ users cannot be added to an AIM buddy list.
static int RESULT_NO_SUCH_ITEM
          A result code indicating that one or more of the items requested to be modified or deleted does not exist and thus cannot be modified or deleted.
static int RESULT_SUCCESS
          A result code indicating that the requested change was made successfully.
 
Fields inherited from class SsiCommand
CMD_ACTIVATE, CMD_CREATE_ITEMS, CMD_DATA_CHECK, CMD_DATA_REQ, CMD_DELETE_ITEMS, CMD_MOD_ACK, CMD_MODIFY_ITEMS, CMD_POST_MOD, CMD_PRE_MOD, CMD_RIGHTS, CMD_RIGHTS_REQ, CMD_SSI_DATA, CMD_UNCHANGED, FAMILY_INFO, FAMILY_SSI
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  SsiDataModResponse(int result)
          Creates a new outgoing SSI modification response with the given result code.
protected SsiDataModResponse(SnacPacket packet)
          Generates a new SSI data modification response command from the given incoming SNAC packet.
 
Method Summary
 int getResult()
          Returns the result code associated with this SSI modification response.
 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

RESULT_SUCCESS

public static final int RESULT_SUCCESS
A result code indicating that the requested change was made successfully.

See Also:
Constant Field Values

RESULT_NO_SUCH_ITEM

public static final int RESULT_NO_SUCH_ITEM
A result code indicating that one or more of the items requested to be modified or deleted does not exist and thus cannot be modified or deleted.

See Also:
Constant Field Values

RESULT_CANT_ADD_ANOTHER_ROOT_GROUP

public static final int RESULT_CANT_ADD_ANOTHER_ROOT_GROUP
A result code indicating that the client attempted to create a second group list.

See Also:
Constant Field Values

RESULT_ID_TAKEN

public static final int RESULT_ID_TAKEN
A result code indicating that one or more of the items requested to be created cannot be because an item with the same ID already exists.

See Also:
Constant Field Values

RESULT_MAX_ITEMS

public static final int RESULT_MAX_ITEMS
A result code indicating that one or more of the requested items cannot be created because the maximum number of items of that type has been reached.

See Also:
Constant Field Values

RESULT_NO_ICQ

public static final int RESULT_NO_ICQ
A result code indicating that ICQ users cannot be added to an AIM buddy list.

See Also:
Constant Field Values
Constructor Detail

SsiDataModResponse

protected SsiDataModResponse(SnacPacket packet)
Generates a new SSI data modification response command from the given incoming SNAC packet.

Parameters:
packet - an incoming SSI data modification response packet

SsiDataModResponse

public SsiDataModResponse(int result)
Creates a new outgoing SSI modification response with the given result code.

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

getResult

public final int getResult()
Returns the result code associated with this SSI modification response. Normally one of the RESULT_* constants.

Returns:
the result code sent in this SSI modification response

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()