net.kano.joscar.snaccmd.icbm
Class RvResponse

java.lang.Object
  extended bySnacCommand
      extended byIcbmCommand
          extended byRvResponse

public class RvResponse
extends IcbmCommand

A SNAC command indicating that a rendezvous failed. Note that this is always sent by WinAIM after a "Send Buddy List" command is sent to it, whether or not the user accepts or declines the Send Buddy List.

Source of this SNAC:
AIM client
SNAC command type:
Family 0x04, command 0x0b

Field Summary
static int CODE_DECLINED
          A code indicating that a rendezvous was declined.
static int CODE_NOT_ACCEPTING
          A code indicating that a client is not accepting requests of the given type.
static int CODE_NOT_SUPPORTED
          A code indicating that a rendezvous type is not supported by the client.
 
Fields inherited from class IcbmCommand
CMD_ICBM, CMD_MISSED, CMD_MSG_ACK, CMD_PARAM_INFO, CMD_PARAM_INFO_REQ, CMD_RECV_TYPING, CMD_RV_RESPONSE, CMD_SEND_ICBM, CMD_SEND_TYPING, CMD_SET_PARAM_INFO, CMD_WARN, FAMILY_ICBM, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  RvResponse(long rvSessionId, int icbmChannel, java.lang.String sn, int resultCode)
          Creates a new outgoing rendezvous error command with the given properties.
protected RvResponse(SnacPacket packet)
          Creates a new rendezvous response command from the given incoming SNAC packet.
 
Method Summary
 int getChannel()
          Returns the ICBM channel on which the rendezvous to which this command is a response was received.
 int getResultCode()
          Returns the associated error code.
 long getRvSessionId()
          Returns the rendezvous session ID of the rendezvous being responded-to.
 java.lang.String getScreenname()
          Returns the screenname of the user whose rendezvous is being responded-to, or that of the user who is responding to a rendezvous we sent, depending on whether this is an outgoing or incoming 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

CODE_NOT_SUPPORTED

public static final int CODE_NOT_SUPPORTED
A code indicating that a rendezvous type is not supported by the client.

See Also:
Constant Field Values

CODE_DECLINED

public static final int CODE_DECLINED
A code indicating that a rendezvous was declined.

See Also:
Constant Field Values

CODE_NOT_ACCEPTING

public static final int CODE_NOT_ACCEPTING
A code indicating that a client is not accepting requests of the given type.

See Also:
Constant Field Values
Constructor Detail

RvResponse

protected RvResponse(SnacPacket packet)
Creates a new rendezvous response command from the given incoming SNAC packet.

Parameters:
packet - an incoming rendezvous response packet

RvResponse

public RvResponse(long rvSessionId,
                  int icbmChannel,
                  java.lang.String sn,
                  int resultCode)
Creates a new outgoing rendezvous error command with the given properties.

Parameters:
rvSessionId - the rendezvous session IDof the rendezvous being responded-to
icbmChannel - the ICBM channel on which the original rendezvous was sent
sn - the screenname whose rendezvous is being responded-to
resultCode - a result code, like CODE_NOT_SUPPORTED
Method Detail

getRvSessionId

public final long getRvSessionId()
Returns the rendezvous session ID of the rendezvous being responded-to. Note that this value seems to always be 0 when coming from a Windows AIM client.

Returns:
the failed rendezvous's RV session ID

getChannel

public final int getChannel()
Returns the ICBM channel on which the rendezvous to which this command is a response was received.

Returns:
the rendezvous's ICBM channel

getScreenname

public final java.lang.String getScreenname()
Returns the screenname of the user whose rendezvous is being responded-to, or that of the user who is responding to a rendezvous we sent, depending on whether this is an outgoing or incoming response.

Returns:
the screenname of the user whose rendezvous is being responded-to or that of the user responding to a rendezvous we sent

getResultCode

public final int getResultCode()
Returns the associated error code. Normally one of CODE_DECLINED, CODE_NOT_ACCEPTING, CODE_NOT_SUPPORTED.

Returns:
the result code associated with this rendezvous error

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