net.kano.joscar.snaccmd.acct
Class AcctInfoRequest

java.lang.Object
  extended bySnacCommand
      extended byAcctCommand
          extended byAcctInfoRequest

public class AcctInfoRequest
extends AcctCommand

A SNAC command sent to request some information about one's AIM account.

See Also:
AcctInfoCmd
Source of this SNAC:
AIM client
SNAC command type:
Family 0x07, command 0x02

Field Summary
static int SUBTYPE_DEFAULT
          The only subtype code ever used as of this writing.
static int TYPE_EMAIL
          A type code indicating that this is a request for the user's registered email address.
static int TYPE_SN
          A type code indicating that this is a request for the user's screenname in the correct format (that is, with the "official" spacing and capitalization seen by other users).
 
Fields inherited from class AcctCommand
CMD_ACCT_MOD, CMD_CONFIRM, CMD_CONFIRM_ACK, CMD_INFO_REQ, CMD_INFO_RESP, CMD_MOD_ACK, FAMILY_ACCT, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  AcctInfoRequest(int type)
          Creates an outgoing account information request command with the given type and a subtype of SUBTYPE_DEFAULT.
  AcctInfoRequest(int type, int subType)
          Creates an outgoing account information request command with the given type and subtype.
protected AcctInfoRequest(SnacPacket packet)
          Generates an account information request command from the given incoming SNAC packet.
 
Method Summary
 int getSubType()
          Returns the "subtype" code of this request.
 int getType()
          Returns the "type" code of this request.
 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

TYPE_SN

public static final int TYPE_SN
A type code indicating that this is a request for the user's screenname in the correct format (that is, with the "official" spacing and capitalization seen by other users).

See Also:
Constant Field Values

TYPE_EMAIL

public static final int TYPE_EMAIL
A type code indicating that this is a request for the user's registered email address.

See Also:
Constant Field Values

SUBTYPE_DEFAULT

public static final int SUBTYPE_DEFAULT
The only subtype code ever used as of this writing.

See Also:
Constant Field Values
Constructor Detail

AcctInfoRequest

protected AcctInfoRequest(SnacPacket packet)
Generates an account information request command from the given incoming SNAC packet.

Parameters:
packet - the packet from which this object should be read

AcctInfoRequest

public AcctInfoRequest(int type)
Creates an outgoing account information request command with the given type and a subtype of SUBTYPE_DEFAULT.

Parameters:
type - the type of this command, like TYPE_SN

AcctInfoRequest

public AcctInfoRequest(int type,
                       int subType)
Creates an outgoing account information request command with the given type and subtype.

Parameters:
type - the type of this command, like TYPE_EMAIL
subType - the subtype of this command; should probably always be SUBTYPE_DEFAULT
Method Detail

getType

public final int getType()
Returns the "type" code of this request. Will normally be one of TYPE_SN or TYPE_EMAIL.

Returns:
this request's type code

getSubType

public final int getSubType()
Returns the "subtype" code of this request. Will normally be SUBTYPE_DEFAULT.

Returns:
this request's subtype 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()