|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.walluck.oscar.handlers.SNACHandler
org.walluck.oscar.handlers.LocateHandler
public class LocateHandler
Family 0x0002 - Information.
The functions here are responsible for requesting and parsing information-gathering SNAC's. Or something like that.
SNACHandler| Constructor Summary | |
|---|---|
LocateHandler()
Family 0x0002. |
|
| Method Summary | |
|---|---|
void |
getInfo(AIMSession sess,
AIMConnection conn,
String sn,
int info)
Subtype 0x0005 - Request info of another AIM user. |
void |
getInfo2(AIMSession sess,
AIMConnection conn,
String sn,
int info)
Send a new userinfo request. |
void |
handleSNAC(AIMSession sess,
SNACHandler handler,
AIMFrame frame,
SNAC snac,
AIMInputStream buffer)
Handles incoming SNAC's. |
void |
reqLocateRights(AIMSession sess,
AIMConnection conn)
Subtype 0x0002 - Request location service rights. |
void |
setDirectoryInfo(AIMSession sess,
AIMConnection conn,
ODirInfo info,
int privacy)
Subtype 0x0009 - Set directory profile data. |
void |
setProfile(AIMSession sess,
AIMConnection conn,
String profileEncoding,
String profile,
String awayMsgEncoding,
String awayMsg,
int caps,
byte[] encodedCertificate)
Subtype 0x0004 - Gives BOS your profile. |
void |
setUserInterests(AIMSession sess,
AIMConnection conn,
ArrayList interests,
int privacy)
Subtype 0x000f - Set user interests. |
| 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 |
|---|
public LocateHandler()
| Method Detail |
|---|
public void reqLocateRights(AIMSession sess,
AIMConnection conn)
throws IOException
sess - the oscar sessionconn - the bos connection for this session
IOException - if an error occurs
public void setProfile(AIMSession sess,
AIMConnection conn,
String profileEncoding,
String profile,
String awayMsgEncoding,
String awayMsg,
int caps,
byte[] encodedCertificate)
throws IOException
profileEncoding and awayMsgEncoding must be
set if profile or awayMsg are set,
respectively, and their value may or may not be restricted to a few
choices. I am currently aware of:
us-ascii Just that unicode-2-0 UCS2-BE
FIXME: This will not work with non-ASCII strings, which assumes that the string length can be used to calculated the bytes.
sess - the oscar sessionconn - the bos connection for this sessionprofileEncoding - the profile encodingprofile - the profile messageawayMsgEncoding - the away message encodingawayMsg - the away message if anycaps - your capabilitiesencodedCertificate - the encoded certificate
IOException - if an error occurs
public void getInfo(AIMSession sess,
AIMConnection conn,
String sn,
int info)
throws IOException
sess - the oscar sessionconn - the bos connection for this sessionsn - the screennameinfo - the type of info to request
IOException - if an error occursAIMConstants
public void getInfo2(AIMSession sess,
AIMConnection conn,
String sn,
int info)
throws IOException
This is the way AIM 5.2 and up gets userinfo.
sess - the oscar sessionconn - the bos connection for this sessionsn - the screennameinfo - the type of info to request
IOException - if an error occurs
public void setDirectoryInfo(AIMSession sess,
AIMConnection conn,
ODirInfo info,
int privacy)
throws IOException
This is not the same as setProfile!
sess - the oscar sessionconn - the bos connection for this sessioninfo - directory infoprivacy - privacy value: set to 1 to allow searching, or 0 to
disallow searching.
IOException - if an error occurs
public void setUserInterests(AIMSession sess,
AIMConnection conn,
ArrayList interests,
int privacy)
throws IOException
There is a hard limit of 5 interests in the API, but the actual limit may be a soft (client) limit.
sess - the oscar sessionconn - the bos connection for this sessioninterests - a vector of interests (5 max)privacy - privacy value
IOException - if an error occurs
public 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 buffer
IOException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||