public class BuddyListHandler extends SNACHandler
SNACHandler| Constructor and Description |
|---|
BuddyListHandler()
Family 0x0003.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBuddy(AIMSession sess,
AIMConnection conn,
String sn)
Subtype 0x0004 - Adds a single buddy to your buddy list.
|
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's.
|
void |
removeBuddy(AIMSession sess,
AIMConnection conn,
String sn)
Subtype 0x0004 - Removes a single buddy from your buddy list.
|
void |
reqBuddyRights(AIMSession sess,
AIMConnection conn)
Subtype 0x0002 - Request buddy list rights.
|
void |
setBuddyList(AIMSession sess,
AIMConnection conn,
String buddyList)
Subtype 0x0004 - Add multiple buddies to your buddy list.
|
getFamily, getVersion, setFamily, setVersionpublic void reqBuddyRights(AIMSession sess, AIMConnection conn) throws IOException
sess - the oscar sessionconn - the bos connection for this sessionIOException - if an error occurspublic void addBuddy(AIMSession sess, AIMConnection conn, String sn) throws IOException
TODO: Make this an extension of setBuddyList.
sess - the oscar sessionconn - the bos connection for this sessionsn - the screename of the buddy you wish to addIOException - if an error occurspublic void setBuddyList(AIMSession sess, AIMConnection conn, String buddyList) throws IOException
This just builds the "set buddy list" command then queues it.
sess - the oscar sessionconn - the bos connection for this sessionbuddyList - "ScreenNameOne&ScreenNameTwo&"IOException - if an error occurspublic void removeBuddy(AIMSession sess, AIMConnection conn, String sn) throws IOException
TODO: make this an extension of setBuddyList, and support removing multiple buddies.
sess - the oscar sessionconn - the bos connection for this sessionsn - the screename of the buddy you wish to removeIOException - if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws IOException
handleSNAC in class SNACHandlersess - the oscar sessionhandler - the handlerframe - the incoming framesnac - the incoming SNACbuffer - the incoming bufferIOException - if an error occurs