public class LocateHandler extends SNACHandler
The functions here are responsible for requesting and parsing information-gathering SNAC's. Or something like that.
SNACHandler| Constructor and Description |
|---|
LocateHandler()
Family 0x0002.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getFamily, getVersion, setFamily, setVersionpublic void reqLocateRights(AIMSession sess, AIMConnection conn) throws IOException
sess - the oscar sessionconn - the bos connection for this sessionIOException - if an error occurspublic 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 certificateIOException - if an error occurspublic 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 requestIOException - if an error occursAIMConstantspublic 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 requestIOException - if an error occurspublic 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 occurspublic 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 valueIOException - 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