public class AbstractOscarClient extends Object implements DaimLoginListener, DaimMsgListener, DaimBuddyListener
Modifier and Type | Field and Description |
---|---|
protected AdminTool |
admtool |
protected AdvertTool |
advtool |
protected BOSTool |
bostool |
protected BuddyListTool |
budtool |
protected ChatNavTool |
chntool |
protected ChatTool |
chttool |
protected ODirTool |
dirtool |
protected FileTransferTool |
filtool |
protected IconTool |
icotool |
protected ICQTool |
icqtool |
protected InviteTool |
invtool |
protected LocateTool |
loctool |
protected LoginTool |
logtool |
protected UserLookupTool |
loktool |
protected MailTool |
maltool |
protected MiscTool |
msctool |
protected ICBMTool |
msgtool |
protected PopupTool |
poptool |
protected AIMSession |
session |
protected SSITool |
ssitool |
protected StatsTool |
ststool |
protected ServiceTool |
svctool |
protected TranslateTool |
trntool |
Constructor and Description |
---|
AbstractOscarClient() |
Modifier and Type | Method and Description |
---|---|
boolean |
addBuddy(String name,
String group)
Add a buddy to the buddy list.
|
void |
buddyOffline(String sn,
Buddy buddy)
Called when a buddy goes offline.
|
void |
buddyOnline(String sn,
Buddy buddy)
Called when a buddy goes online.
|
void |
incomingICQ(UserInfo from,
int uin,
int args,
String message)
We received an ICQ message.
|
void |
incomingIM(Buddy buddy,
UserInfo from,
AOLIM args)
Called when a message is received from someone.
|
void |
joinRoomRequest(JoinRoomRequest jrr)
Someone requested us to join a chat room.
|
void |
login(String screenname,
String password)
Log in using the provided screenname and password.
|
void |
loginDone(DaimLoginEvent dle)
Method called when the login is succesful.
|
void |
loginError(DaimLoginEvent dle)
Method called when a login login fails.
|
void |
logout()
Log out and close the connection.
|
boolean |
moveBuddy(String name,
String oldGroup,
String newGroup)
Move a Buddy to another buddy group.
|
void |
newBuddyList(Buddy[] buddies)
The server sent us our buddy list.
|
void |
newUIN(DaimLoginEvent dle)
Method called when a new UIN is assigned by the server (ICQ account registration).
|
void |
receivedContacts(UserInfo from,
int uin,
Map contact,
boolean massmessage)
Received a list of contacts in an ICQ message
In the contact Map, the keys are UINs as Strings, and the values are the correcponding nick names.
|
void |
receivedICQSMS(UserInfo from,
int uin,
ICQSMSMessage message,
boolean massmessage)
Received SMS message over ICQ
|
void |
receivedURL(UserInfo from,
int uin,
String url,
String description,
boolean massmessage)
Received an ICQ URL message
|
boolean |
removeBuddy(String name,
String group)
Remove a buddy from the buddy list.
|
boolean |
renameGroup(String oldGroup,
String newGroup)
Rename a group.
|
void |
sendIM(String sn,
String message,
int imflags)
Send an IM
|
void |
typingNotification(String sn,
short typing)
Typing notification for a user.
|
protected AIMSession session
protected AdminTool admtool
protected AdvertTool advtool
protected BOSTool bostool
protected BuddyListTool budtool
protected ChatNavTool chntool
protected ChatTool chttool
protected FileTransferTool filtool
protected ICBMTool msgtool
protected IconTool icotool
protected ICQTool icqtool
protected InviteTool invtool
protected LocateTool loctool
protected LoginTool logtool
protected MailTool maltool
protected MiscTool msctool
protected ODirTool dirtool
protected PopupTool poptool
protected ServiceTool svctool
protected SSITool ssitool
protected StatsTool ststool
protected TranslateTool trntool
protected UserLookupTool loktool
public void login(String screenname, String password) throws IOException
screenname
- password
- IOException
public void logout()
public void sendIM(String sn, String message, int imflags) throws IOException
sn
- Screen Name you're sending to.message
- Message to sendimflags
- Flags. Only flag used is AIMConstant.AIM_IMFLAG_AWAYIOException
- if an error occurspublic 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 loginError(DaimLoginEvent dle)
loginError
in interface DaimLoginListener
dle
- DaimLoginEventpublic void loginDone(DaimLoginEvent dle)
loginDone
in interface DaimLoginListener
dle
- public void newUIN(DaimLoginEvent dle)
newUIN
in interface DaimLoginListener
dle
- public void incomingIM(Buddy buddy, UserInfo from, AOLIM args)
incomingIM
in interface DaimMsgListener
buddy
- Buddy who sent the message, or null if not created yet.from
- UserInfoargs
- public void joinRoomRequest(JoinRoomRequest jrr)
joinRoomRequest
in interface DaimMsgListener
public void typingNotification(String sn, short typing)
typingNotification
in interface DaimMsgListener
sn
- Screen Nametyping
- Typing code.public void incomingICQ(UserInfo from, int uin, int args, String message)
incomingICQ
in interface DaimMsgListener
from
- UserInfouin
- UIN#args
- Args. See AIMConstants.AIM_ICQMSG_*message
- Message.public void receivedURL(UserInfo from, int uin, String url, String description, boolean massmessage)
receivedURL
in interface DaimMsgListener
from
- UserInfouin
- UIN#url
- URLdescription
- URL Description or nullmassmessage
- Is this a mass-message?public void receivedContacts(UserInfo from, int uin, Map contact, boolean massmessage)
receivedContacts
in interface DaimMsgListener
from
- UserInfouin
- UIN#contact
- HashMapmassmessage
- Is this a mass-message?public void receivedICQSMS(UserInfo from, int uin, ICQSMSMessage message, boolean massmessage)
receivedICQSMS
in interface DaimMsgListener
from
- UserInfouin
- UIN#message
- ICQSMSMessagemassmessage
- Is this a mass-message?public void newBuddyList(Buddy[] buddies)
newBuddyList
in interface DaimBuddyListener
buddies
- Array of Buddy'spublic void buddyOffline(String sn, Buddy buddy)
buddyOffline
in interface DaimBuddyListener
sn
- ScreenNamebuddy
- Buddypublic void buddyOnline(String sn, Buddy buddy)
buddyOnline
in interface DaimBuddyListener
sn
- ScreenNamebuddy
- Buddy