net.kano.joscar.snaccmd.icbm
Class RecvImIcbm

java.lang.Object
  extended bySnacCommand
      extended byAbstractIcbm
          extended byAbstractImIcbm
              extended byRecvImIcbm

public class RecvImIcbm
extends AbstractImIcbm

A SNAC command containing an IM.

See Also:
SendImIcbm
Source of this SNAC:
AIM server
SNAC command type:
Family 0x04, command 0x07

Field Summary
 
Fields inherited from class AbstractIcbm
CHANNEL_CHAT, CHANNEL_IM, CHANNEL_RV
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  RecvImIcbm(long messageId, FullUserInfo userInfo, InstantMessage message, boolean autoResponse, boolean wantsIcon, OldIconHashInfo iconInfo, ExtraInfoBlock[] expInfoBlocks, boolean canType)
          Creates a new outgoing client-bound IM ICBM command with the given properties.
protected RecvImIcbm(SnacPacket packet)
          Generates a new incoming IM ICBM command from the given incoming SNAC packet.
 
Method Summary
 boolean canType()
          Returns whether or not the sender supports typing notification.
 FullUserInfo getSenderInfo()
          Returns a user information block containing information about the sender of this IM.
 java.lang.String toString()
           
protected  void writeChannelData(java.io.OutputStream out)
          Writes the channel-specific data for this ICBM command to the given output stream.
 
Methods inherited from class AbstractImIcbm
getAimExpressionInfo, getIconInfo, getMessage, isAutoResponse, senderWantsIcon
 
Methods inherited from class AbstractIcbm
getChannel, getChannelData, getIcbmChannel, getIcbmMessageId, 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

RecvImIcbm

protected RecvImIcbm(SnacPacket packet)
Generates a new incoming IM ICBM command from the given incoming SNAC packet.

Parameters:
packet - an incoming IM ICBM packet

RecvImIcbm

public RecvImIcbm(long messageId,
                  FullUserInfo userInfo,
                  InstantMessage message,
                  boolean autoResponse,
                  boolean wantsIcon,
                  OldIconHashInfo iconInfo,
                  ExtraInfoBlock[] expInfoBlocks,
                  boolean canType)
Creates a new outgoing client-bound IM ICBM command with the given properties.

Parameters:
messageId - the ICBM message ID to associate with this message
userInfo - a user information block for the sender of this IM
message - the instant message
autoResponse - whether this message is an auto-response
wantsIcon - whether the sender wants the receiver's buddy icon
iconInfo - a set of icon information provided by the sender, or null if none was provided
canType - whether or not the sender supports typing notification
expInfoBlocks - a list of AIM Expression information blocks
Method Detail

getSenderInfo

public final FullUserInfo getSenderInfo()
Returns a user information block containing information about the sender of this IM.

Returns:
a user information block for the sender of this IM

canType

public final boolean canType()
Returns whether or not the sender supports typing notification.

Returns:
whether the sender supports typing notification

writeChannelData

protected final void writeChannelData(java.io.OutputStream out)
                               throws java.io.IOException
Description copied from class: AbstractIcbm
Writes the channel-specific data for this ICBM command to the given output stream.

Specified by:
writeChannelData in class AbstractIcbm
Parameters:
out - the stream to write to
Throws:
java.io.IOException - if an I/O error occurs

toString

public java.lang.String toString()
Overrides:
toString in class AbstractIcbm