net.kano.joscar.snaccmd.buddy
Class BuddyStatusCmd

java.lang.Object
  extended bySnacCommand
      extended byBuddyCommand
          extended byBuddyStatusCmd

public class BuddyStatusCmd
extends BuddyCommand

A command sent when a buddy signs on or when some property of the buddy (such as idle time) has changed.

Source of this SNAC:
AIM server
SNAC command type:
Family 0x03, command 0x0b

Field Summary
 
Fields inherited from class BuddyCommand
CMD_BUDDY_OFFLINE, CMD_BUDDY_STATUS, FAMILY_BUDDY, FAMILY_INFO
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
  BuddyStatusCmd(FullUserInfo userInfo)
          Creates a new outgoing buddy status update command with the given user information block.
protected BuddyStatusCmd(SnacPacket packet)
          Generates a new buddy status update command from the given incoming SNAC packet.
 
Method Summary
 FullUserInfo getUserInfo()
          Returns the user info block that was updated.
 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
 

Constructor Detail

BuddyStatusCmd

protected BuddyStatusCmd(SnacPacket packet)
Generates a new buddy status update command from the given incoming SNAC packet.

Parameters:
packet - a buddy status update packet

BuddyStatusCmd

public BuddyStatusCmd(FullUserInfo userInfo)
Creates a new outgoing buddy status update command with the given user information block.

Parameters:
userInfo - the user information block for the user being updated
Method Detail

getUserInfo

public final FullUserInfo getUserInfo()
Returns the user info block that was updated.

Returns:
the updated user info block

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