net.kano.joscar.snaccmd.loc
Class OldGetInfoCmd

java.lang.Object
  extended bySnacCommand
      extended byLocCommand
          extended byOldGetInfoCmd

public class OldGetInfoCmd
extends LocCommand

A SNAC command used by older clients to request a specific type of information about another user. Normally responded-to with a UserInfoCmd. Newer clients use the new Get Info command.

See Also:
GetInfoCmd, UserInfoCmd
Source of this SNAC:
AIM client
SNAC command type:
Family 0x02, command 0x05

Field Summary
static int TYPE_AWAYMSG
          An information request type indicating a request for the user's away message.
static int TYPE_CAPS
          An information request type indicating a request for a list of the user's capabilities.
static int TYPE_INFO
          An information request type indicating a request for the user's "info."
 
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
  OldGetInfoCmd(int type, java.lang.String sn)
          Creates a new information request for the given user of the given type.
protected OldGetInfoCmd(SnacPacket packet)
          Generates a new info request command from the given incoming SNAC packet.
 
Method Summary
 int getRequestType()
          Returns the "request type."
 java.lang.String getScreenname()
          Returns the screenname of the user whose info is being requested.
 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_INFO

public static final int TYPE_INFO
An information request type indicating a request for the user's "info."

See Also:
Constant Field Values

TYPE_AWAYMSG

public static final int TYPE_AWAYMSG
An information request type indicating a request for the user's away message.

See Also:
Constant Field Values

TYPE_CAPS

public static final int TYPE_CAPS
An information request type indicating a request for a list of the user's capabilities.

See Also:
Constant Field Values
Constructor Detail

OldGetInfoCmd

protected OldGetInfoCmd(SnacPacket packet)
Generates a new info request command from the given incoming SNAC packet.

Parameters:
packet - an incoming info request packet

OldGetInfoCmd

public OldGetInfoCmd(int type,
                     java.lang.String sn)
Creates a new information request for the given user of the given type.

Parameters:
sn - the screenname of the user whose information is being requested
type - the type of information being requested, like TYPE_AWAYMSG
Method Detail

getRequestType

public final int getRequestType()
Returns the "request type." Normally one of TYPE_INFO, TYPE_AWAYMSG, and TYPE_CAPS.

Returns:
the type of information being requested

getScreenname

public final java.lang.String getScreenname()
Returns the screenname of the user whose info is being requested.

Returns:
the screenname of the user whose information is being requested

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