org.walluck.oscar.tools
Class ICBMTool

java.lang.Object
  extended by org.walluck.oscar.tools.Tool
      extended by org.walluck.oscar.tools.ICBMTool
All Implemented Interfaces:
ICBMListener, Listener

public class ICBMTool
extends Tool
implements ICBMListener

ICBM tool.

Since:
1.0
Version:
1.0
Author:

Field Summary
 
Fields inherited from class org.walluck.oscar.tools.Tool
listeners
 
Constructor Summary
ICBMTool()
          Creates a new ICBM tool.
 
Method Summary
 void addListener(DaimMsgListener l)
          Add a listener to get useful events from this tool.
 void bosConnectionAvailable()
          Method called by the LoginTool once the BOS connection is available.
 void clientAutoresp(AIMSession sess, AIMFrame frame, int channel, String sn, int reason)
          Describe clientAutoresp method here.
 void clientAutoresp(AIMSession sess, AIMFrame frame, int channel, String sn, int reason, int state, String msg)
          Describe clientAutoresp method here.
static String getIMCH4TypeString(int type)
          Get a textual representation of the IMCH4 type field.
 void incomingIMCH1(AIMSession sess, AIMFrame frame, int channel, UserInfo userinfo, AOLIM args)
          Describe incomingIMCH1 method here.
 void incomingIMCH2(AIMSession sess, AIMFrame frame, int channel, UserInfo userinfo, IncomingIMCH2 args)
          Describe incomingIMCH2 method here.
 void incomingIMCH4(AIMSession sess, AIMFrame frame, int channel, UserInfo userinfo, IncomingIMCH4 args)
          Incoming ICQ messages (channel 4).
 void missedCall(AIMSession sess, AIMFrame frame, int channel, UserInfo userinfo, int numMissed, int reason)
          Describe missedCall method here.
 void msgAck(AIMSession sess, AIMFrame frame, int type, String sn)
          Describe msgAck method here.
 void outgoingIM(AIMSession sess, AIMFrame frame, int channel, String sn, String msg, int icbmflags, short flag1, short flag2)
          Describe outgoingIM method here.
 void paramInfo(AIMSession sess, AIMFrame frame, ICBMParams params)
          Describe paramInfo method here.
 void removeListener(DaimMsgListener l)
          Remove a listener.
 void sendIM(String name, String message, int imflags)
          Send an IM
 void shutdown(AIMSession sess)
          Called when the tool is shutting down.
 void typingNotification(AIMSession sess, AIMFrame frame, byte[] ck, short type, String sn, short typing)
          Describe typingNotification method here.
 
Methods inherited from class org.walluck.oscar.tools.Tool
getFamily, getId, getSession, getToolData, getVersion, setFamily, setId, setSession, setToolData, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ICBMTool

public ICBMTool()
Creates a new ICBM tool. Family 0x0004.

Method Detail

sendIM

public void sendIM(String name,
                   String message,
                   int imflags)
            throws IOException
Send an IM

Parameters:
name - Screen Name you're sending to.
message - Message to send
imflags - Flags. Only flag used is AIMConstant.AIM_IMFLAG_AWAY
Throws:
IOException - if an error occurs

shutdown

public void shutdown(AIMSession sess)
Called when the tool is shutting down.

Specified by:
shutdown in class Tool
Parameters:
sess - the oscar session

bosConnectionAvailable

public void bosConnectionAvailable()
Method called by the LoginTool once the BOS connection is available. This allows the other tools to get registered and get involved in the process.

Specified by:
bosConnectionAvailable in class Tool

outgoingIM

public void outgoingIM(AIMSession sess,
                       AIMFrame frame,
                       int channel,
                       String sn,
                       String msg,
                       int icbmflags,
                       short flag1,
                       short flag2)
Describe outgoingIM method here.

Specified by:
outgoingIM in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
sn - a String value
msg - a String value
icbmflags - an int value
flag1 - a short value
flag2 - a short value

incomingIMCH1

public void incomingIMCH1(AIMSession sess,
                          AIMFrame frame,
                          int channel,
                          UserInfo userinfo,
                          AOLIM args)
Describe incomingIMCH1 method here.

Specified by:
incomingIMCH1 in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
userinfo - an UserInfo value
args - an AOLIM value

incomingIMCH2

public void incomingIMCH2(AIMSession sess,
                          AIMFrame frame,
                          int channel,
                          UserInfo userinfo,
                          IncomingIMCH2 args)
Describe incomingIMCH2 method here.

Specified by:
incomingIMCH2 in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
userinfo - an UserInfo value
args - an IncomingIMCH2 value

incomingIMCH4

public void incomingIMCH4(AIMSession sess,
                          AIMFrame frame,
                          int channel,
                          UserInfo userinfo,
                          IncomingIMCH4 args)
Incoming ICQ messages (channel 4).

Specified by:
incomingIMCH4 in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
userinfo - an UserInfo value
args - an IncomingIMCH4 value

getIMCH4TypeString

public static String getIMCH4TypeString(int type)
Get a textual representation of the IMCH4 type field. For debugging purposes only.

Parameters:
type -
Returns:
String

paramInfo

public void paramInfo(AIMSession sess,
                      AIMFrame frame,
                      ICBMParams params)
Describe paramInfo method here.

Specified by:
paramInfo in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
params - an ICBMParams value

missedCall

public void missedCall(AIMSession sess,
                       AIMFrame frame,
                       int channel,
                       UserInfo userinfo,
                       int numMissed,
                       int reason)
Describe missedCall method here. TODO: implement listener

Specified by:
missedCall in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
userinfo - an UserInfo value
numMissed - an int value
reason - an int value

clientAutoresp

public void clientAutoresp(AIMSession sess,
                           AIMFrame frame,
                           int channel,
                           String sn,
                           int reason)
Describe clientAutoresp method here.

Specified by:
clientAutoresp in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
sn - a String value
reason - an int value

clientAutoresp

public void clientAutoresp(AIMSession sess,
                           AIMFrame frame,
                           int channel,
                           String sn,
                           int reason,
                           int state,
                           String msg)
Describe clientAutoresp method here. TODO: Listener

Specified by:
clientAutoresp in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
channel - an int value
sn - a String value
reason - an int value
state - an int value
msg - a String value

msgAck

public void msgAck(AIMSession sess,
                   AIMFrame frame,
                   int type,
                   String sn)
Describe msgAck method here.

Specified by:
msgAck in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
type - an int value
sn - a String value

typingNotification

public void typingNotification(AIMSession sess,
                               AIMFrame frame,
                               byte[] ck,
                               short type,
                               String sn,
                               short typing)
Describe typingNotification method here.

Specified by:
typingNotification in interface ICBMListener
Parameters:
sess - an AIMSession value
frame - an AIMFrame value
ck - a byte[] value
type - a short value
sn - a String value
typing - a short value

addListener

public void addListener(DaimMsgListener l)
Add a listener to get useful events from this tool.

Parameters:
l - DaimMMsgListener

removeListener

public void removeListener(DaimMsgListener l)
Remove a listener.

Parameters:
l - DaimMsgListener