net.kano.joscar.snaccmd.icbm
Class AbstractImIcbm

java.lang.Object
  extended bySnacCommand
      extended byAbstractIcbm
          extended byAbstractImIcbm
Direct Known Subclasses:
RecvImIcbm, SendImIcbm

public abstract class AbstractImIcbm
extends AbstractIcbm

A base class for the two IM-based ICBM commands in this family. These commands are SendImIcbm and RecvImIcbm.


Field Summary
 
Fields inherited from class AbstractIcbm
CHANNEL_CHAT, CHANNEL_IM, CHANNEL_RV
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
protected AbstractImIcbm(int command, long messageId, InstantMessage message, boolean autoResponse, boolean wantsIcon, OldIconHashInfo iconInfo, ExtraInfoBlock[] expInfoBlocks)
          Creates a new outgoing IM ICBM with the given properties.
protected AbstractImIcbm(int command, SnacPacket packet)
          Generates an IM ICBM from the given incoming SNAC packet and with the given SNAC command subtype.
 
Method Summary
 ExtraInfoBlock[] getAimExpressionInfo()
          Returns the list of AIM Expression information blocks sent in this command.
 OldIconHashInfo getIconInfo()
          Returns a set of icon data provided by the sender, or null if none was sent.
 InstantMessage getMessage()
          Returns the instant message sent with this command.
 boolean isAutoResponse()
          Returns whether this message was an "auto-response."
 boolean senderWantsIcon()
          Returns whether the sender is requesting a buddy icon.
 
Methods inherited from class AbstractIcbm
getChannel, getChannelData, getIcbmChannel, getIcbmMessageId, toString, writeChannelData, writeData
 
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
 

Constructor Detail

AbstractImIcbm

protected AbstractImIcbm(int command,
                         SnacPacket packet)
Generates an IM ICBM from the given incoming SNAC packet and with the given SNAC command subtype.

Parameters:
command - the SNAC command subtype of this command
packet - an incoming IM ICBM

AbstractImIcbm

protected AbstractImIcbm(int command,
                         long messageId,
                         InstantMessage message,
                         boolean autoResponse,
                         boolean wantsIcon,
                         OldIconHashInfo iconInfo,
                         ExtraInfoBlock[] expInfoBlocks)
Creates a new outgoing IM ICBM with the given properties.

Parameters:
command - the SNAC command subtype of this command
messageId - the eight-byte ICBM message ID to attach to this command
message - the instant message
autoResponse - whether this is an auto-response or not
wantsIcon - whether to request the receiving user's buddy icon
iconInfo - a set of our own buddy icon information
expInfoBlocks - a list of AIM Expression information blocks
Method Detail

getMessage

public final InstantMessage getMessage()
Returns the instant message sent with this command.

Returns:
the instant message sent

isAutoResponse

public final boolean isAutoResponse()
Returns whether this message was an "auto-response."

Returns:
whether this message was an auto-response

senderWantsIcon

public final boolean senderWantsIcon()
Returns whether the sender is requesting a buddy icon.

Returns:
whether the sender wants our buddy icon (or whether we want the receiver's, if this is an outgoing IM)

getIconInfo

public final OldIconHashInfo getIconInfo()
Returns a set of icon data provided by the sender, or null if none was sent.

Returns:
the sender's buddy icon information

getAimExpressionInfo

public ExtraInfoBlock[] getAimExpressionInfo()
Returns the list of AIM Expression information blocks sent in this command.

Returns:
the list of AIM Expression information blocks sent in this command, or null if none were sent