org.walluck.oscar.handlers
Class BOSHandler

java.lang.Object
  extended byorg.walluck.oscar.handlers.SNACHandler
      extended byorg.walluck.oscar.handlers.BOSHandler

public class BOSHandler
extends SNACHandler

Family 0x0009 - Basic Oscar Service.

THe functionality of this family has been replaced by SSI.

Since:
1.0
Version:
1.0
Author:
David Walluck
See Also:
SNACHandler

Constructor Summary
BOSHandler()
          Family 0x0009
 
Method Summary
 void changeVisibility(AIMSession sess, AIMConnection conn, int changetype, java.lang.String list)
          Subtypes 0x0005, 0x0006, 0x0007, 0x0008 - Modify the permit/deny lists.
 void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer)
          Handles incoming SNAC's.
 void reqRights(AIMSession sess, AIMConnection conn)
          Subtype 0x0002 - Request BOS rights.
 void setGroupPerm(AIMSession sess, AIMConnection conn, int mask)
          Subtype 0x0004 - Set the group permission mask.
 
Methods inherited from class org.walluck.oscar.handlers.SNACHandler
getFamily, getVersion, setFamily, setVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BOSHandler

public BOSHandler()
Family 0x0009

Method Detail

reqRights

public void reqRights(AIMSession sess,
                      AIMConnection conn)
               throws java.io.IOException
Subtype 0x0002 - Request BOS rights.

Parameters:
sess - the oscar session
conn - the bos connection for this session
Throws:
java.io.IOException - if an error occurs

setGroupPerm

public void setGroupPerm(AIMSession sess,
                         AIMConnection conn,
                         int mask)
                  throws java.io.IOException
Subtype 0x0004 - Set the group permission mask.

This is normally set to 0x1f (allow all classes).

The group permission mask allows you to keep users of certain classes from being able to communicate with you. The mask is a bitwise OR of all of the classes that you wish to be able to communicate with you.

Parameters:
sess - the oscar session
conn - the bos conenction for this sesion
mask - the permit/deny bitmask
Throws:
java.io.IOException - if an error occurs
See Also:
AIMConstants

changeVisibility

public void changeVisibility(AIMSession sess,
                             AIMConnection conn,
                             int changetype,
                             java.lang.String list)
                      throws java.io.IOException
Subtypes 0x0005, 0x0006, 0x0007, 0x0008 - Modify the permit/deny lists.

Changes your visibility depending on change type:

AIM_VISIBILITYCHANGE_PERMITADD
Lets the provided list of names see you
AIM_VISIBILITYCHANGE_PERMIDREMOVE
Removes the listed names from the permit list
AIM_VISIBILITYCHANGE_DENYADD
Hides you from the provided list of names
AIM_VISIBILITYCHANGE_DENYREMOVE
Lets the list see you again
list should be a list of screen names of the form "Screen Name One&ScreenNameTwo&", etc.

Equivalents to options in WinAIM are:

Parameters:
sess - the oscar session
conn - the bos connection for this session
changetype - the change type
list - the list, which contains the name of each buddy you wish to permit/deny separated by an "&" character
Throws:
java.io.IOException - if an error occurs
See Also:
AIMConstants

handleSNAC

public void handleSNAC(AIMSession sess,
                       SNACHandler handler,
                       AIMFrame frame,
                       SNAC snac,
                       AIMInputStream buffer)
                throws java.io.IOException
Handles incoming SNAC's.

Specified by:
handleSNAC in class SNACHandler
Parameters:
sess - the oscar session
handler - the handler
frame - the incoming frame
snac - the incoming SNAC
buffer - the incoming buffer
Throws:
java.io.IOException - if an error occurs