|
||||||||||
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
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,
java.lang.String sn,
int info)
Subtype 0x0005 - Request info of another AIM user. |
void |
getInfo2(AIMSession sess,
AIMConnection conn,
java.lang.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,
java.lang.String profileEncoding,
java.lang.String profile,
java.lang.String awayMsgEncoding,
java.lang.String awayMsg,
int caps,
byte[] encodedCertificate)
Subtype 0x0004 - Gives BOS your profile. |
void |
setUserInterests(AIMSession sess,
AIMConnection conn,
java.util.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 java.io.IOException
sess
- the oscar sessionconn
- the bos connection for this session
java.io.IOException
- if an error occurspublic void setProfile(AIMSession sess, AIMConnection conn, java.lang.String profileEncoding, java.lang.String profile, java.lang.String awayMsgEncoding, java.lang.String awayMsg, int caps, byte[] encodedCertificate) throws java.io.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
java.io.IOException
- if an error occurspublic void getInfo(AIMSession sess, AIMConnection conn, java.lang.String sn, int info) throws java.io.IOException
sess
- the oscar sessionconn
- the bos connection for this sessionsn
- the screennameinfo
- the type of info to request
java.io.IOException
- if an error occursAIMConstants
public void getInfo2(AIMSession sess, AIMConnection conn, java.lang.String sn, int info) throws java.io.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
java.io.IOException
- if an error occurspublic void setDirectoryInfo(AIMSession sess, AIMConnection conn, ODirInfo info, int privacy) throws java.io.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.
java.io.IOException
- if an error occurspublic void setUserInterests(AIMSession sess, AIMConnection conn, java.util.ArrayList interests, int privacy) throws java.io.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
java.io.IOException
- if an error occurspublic void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer) throws java.io.IOException
handleSNAC
in class SNACHandler
sess
- the oscar sessionhandler
- the handlerframe
- the incoming framesnac
- the incoming SNACbuffer
- the incoming buffer
java.io.IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |