net.kano.joscar.snaccmd.popup
Class PopupMsg

java.lang.Object
  extended bySnacCommand
      extended byPopupCommand
          extended byPopupMsg

public class PopupMsg
extends PopupCommand

A SNAC command used to pop up a message on the user's screen. I have never seen this command used and thus, the documentation for it is rather vague.

Source of this SNAC:
AIM server
SNAC command type:
Family 0x08, command 0x02

Field Summary
 
Fields inherited from class PopupCommand
CMD_POPUP_MSG, FAMILY_INFO, FAMILY_POPUP
 
Fields inherited from class SnacCommand
SNACFLAG_DEFAULT
 
Constructor Summary
protected PopupMsg(SnacPacket packet)
          Generates a popup message command from the given incoming SNAC packet.
  PopupMsg(java.lang.String message, java.lang.String url, int width, int height, int delay)
          Creates a new outgoing popup message command with the given properties.
 
Method Summary
 int getDelay()
          Returns some sort of delay before popping up the messsage.
 int getHeight()
          Returns the height, in pixels, of the window to pop up.
 java.lang.String getMessage()
          Returns the message to pop up, presumably in AOLRTF (HTML) format.
 java.lang.String getUrl()
          Returns some sort of URL related to the popup message.
 int getWidth()
          Returns the width, in pixels, of the window to pop up.
 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

PopupMsg

protected PopupMsg(SnacPacket packet)
Generates a popup message command from the given incoming SNAC packet.

Parameters:
packet - an incoming popup message packet

PopupMsg

public PopupMsg(java.lang.String message,
                java.lang.String url,
                int width,
                int height,
                int delay)
Creates a new outgoing popup message command with the given properties.

Parameters:
message - the message to pop up, presumably in AOLRTF (HTML) format
url - some sort of URL related to the message
width - the width of the popup window, in pixels
height - the height of the popup window, in pixels
delay - some sort of delay before showing the window
Method Detail

getMessage

public final java.lang.String getMessage()
Returns the message to pop up, presumably in AOLRTF (HTML) format.

Returns:
the message to pop up

getUrl

public final java.lang.String getUrl()
Returns some sort of URL related to the popup message.

Returns:
the URL associated with this message

getWidth

public final int getWidth()
Returns the width, in pixels, of the window to pop up.

Returns:
the width, in pixels, of the popup window to be displayed

getHeight

public final int getHeight()
Returns the height, in pixels, of the window to pop up.

Returns:
the height, in pixels, of the popup window to be displayed

getDelay

public final int getDelay()
Returns some sort of delay before popping up the messsage. I do not know what sort of units this value is in, as I have never seen this command used.

Returns:
some sort of delay related to this popup message

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