public class BuddyListTool extends Tool implements BuddyListListener
Modifier and Type | Field and Description |
---|---|
static int |
UC_AB |
static int |
UC_ADMIN |
static int |
UC_AOL |
static int |
UC_HIPTOP |
static int |
UC_NORMAL |
static int |
UC_UNAVAILABLE |
static int |
UC_UNCONFIRMED |
static int |
UC_WIRELESS |
Constructor and Description |
---|
BuddyListTool()
Creates a new BuddyList tool.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addBuddy(String name,
String group)
Add a buddy to the buddy list.
|
void |
addListener(DaimBuddyListener 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 |
buddyChange(AIMSession sess,
AIMFrame frame,
UserInfo info)
Describe
buddyChange method here. |
void |
buddylistRights(AIMSession sess,
AIMFrame frame,
int maxbuddies,
int maxwatchers)
Describe
buddylistRights method here. |
static String |
capsToText(int caps)
Print user capabilities as text.
|
Buddy |
findBuddy(String sn)
Find a Buddy by name.
|
Buddy |
findBuddy(String name,
BuddyGroup bg)
Find a buddy by name in a specific group
|
BuddyGroup |
findGroupForBuddy(String sn)
Find a BuddyGroup by a buddy.
|
ArrayList |
getBuddyGroups()
Describe
getBuddyGroups method here. |
boolean |
moveBuddy(String name,
String oldGroup,
String newGroup)
Move a Buddy to another buddy group.
|
void |
printBuddyList()
Describe
printBuddyList method here. |
boolean |
removeBuddy(String name,
String group)
Remove a buddy from the buddy list.
|
void |
removeListener(DaimBuddyListener l)
Remove a listener.
|
boolean |
renameGroup(String oldGroup,
String newGroup)
Rename a group.
|
void |
shutdown(AIMSession sess)
Called when the tool is shutting down.
|
Buddy[] |
ssiSetBuddyList(List list)
Set the buddy list/
Called by SSITool when the server sends us the server-side buddylist.
|
getFamily, getId, getSession, getToolData, getVersion, setFamily, setId, setSession, setToolData, setVersion
public static final int UC_UNAVAILABLE
public static final int UC_AOL
public static final int UC_ADMIN
public static final int UC_UNCONFIRMED
public static final int UC_NORMAL
public static final int UC_AB
public static final int UC_WIRELESS
public static final int UC_HIPTOP
public BuddyListTool()
public ArrayList getBuddyGroups()
getBuddyGroups
method here.ArrayList
valuepublic Buddy[] ssiSetBuddyList(List list)
list
- List of SSIItemspublic void printBuddyList()
printBuddyList
method here.public Buddy findBuddy(String name, BuddyGroup bg)
name
- the buddy namebg
- the grouppublic Buddy findBuddy(String sn)
sn
- the screenname of the buddypublic BuddyGroup findGroupForBuddy(String sn)
sn
- the screenname of the buddypublic boolean addBuddy(String name, String group) throws IOException
name
- Name of the buddygroup
- Group to add him inIOException
- if an error occurspublic boolean moveBuddy(String name, String oldGroup, String newGroup) throws IOException
name
- Name of buddy to moveoldGroup
- Old buddy groupnewGroup
- New buddy groupIOException
- if an error occurspublic boolean removeBuddy(String name, String group) throws IOException
name
- Screen name of buddy to remove.group
- Group the buddy belongs to.IOException
- if an error occurspublic boolean renameGroup(String oldGroup, String newGroup) throws IOException
oldGroup
- Old namenewGroup
- New nameIOException
- if an error occurspublic void buddyChange(AIMSession sess, AIMFrame frame, UserInfo info)
buddyChange
method here.buddyChange
in interface BuddyListListener
sess
- an AIMSession
valueframe
- an AIMFrame
valueinfo
- an UserInfo
valuepublic static String capsToText(int caps)
caps
- the capabilitiespublic void buddylistRights(AIMSession sess, AIMFrame frame, int maxbuddies, int maxwatchers)
buddylistRights
method here.buddylistRights
in interface BuddyListListener
sess
- an AIMSession
valueframe
- an AIMFrame
valuemaxbuddies
- an int
valuemaxwatchers
- an int
valuepublic void shutdown(AIMSession sess)
public void bosConnectionAvailable()
bosConnectionAvailable
in class Tool
public void addListener(DaimBuddyListener l)
l
- DaimBuddyListenerpublic void removeListener(DaimBuddyListener l)
l
- DaimBuddyListener