public class ChatHandler extends SNACHandler
SNACHandler
Constructor and Description |
---|
ChatHandler()
Family 0x000e.
|
Modifier and Type | Method and Description |
---|---|
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's.
|
void |
join(AIMSession sess,
AIMConnection conn,
int exchange,
String name,
int instance)
Join a chat room.
|
void |
leaveRoom(AIMSession sess,
String name)
Leave a chat room.
|
void |
sendIM(AIMSession sess,
AIMConnection conn,
int flags,
String msg)
Subtype 0x0005 - Send a chat message.
|
getFamily, getVersion, setFamily, setVersion
public void join(AIMSession sess, AIMConnection conn, int exchange, String name, int instance) throws IOException
sess
- the oscar sessionconn
- the chat connection for this sessionexchange
- the exchangename
- the room nameinstance
- the instanceIOException
- if an error occurspublic void leaveRoom(AIMSession sess, String name)
sess
- the oscar sessionname
- the name of the room to leavepublic void sendIM(AIMSession sess, AIMConnection conn, int flags, String msg) throws IOException
Unlike gaim, this has been converted to use TLVChain's.
Possible chat flags:
sess
- the oscar sessionconn
- the chat conenction for this sessionflags
- the chat flagsmsg
- the messageIOException
- if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws IOException
handleSNAC
in class SNACHandler
sess
- the oscar sessionhandler
- the handlerframe
- the incoming framesnac
- the incoming SNACbuffer
- the incoming bufferIOException
- if an error occurs