org.walluck.oscar.handlers
Class ICQHandler

java.lang.Object
  extended by org.walluck.oscar.handlers.SNACHandler
      extended by org.walluck.oscar.handlers.ICQHandler

public class ICQHandler
extends SNACHandler

Family 0x0015 - Encapsulated ICQ.

Since:
1.0
Version:
1.0
Author:
David Walluck
See Also:
SNACHandler

Constructor Summary
ICQHandler()
          Family 0x0015.
 
Method Summary
 void ackOfflineMsgs(AIMSession sess)
          Ack offline messages.
 void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer)
          Handles incoming SNAC's.
 void identifyClient(AIMSession sess)
          Identify this client to the server.
 void metaReqBasicInfo(AIMSession sess, int uin)
          Request basic user information.
 void metaReqInfo(AIMSession sess, int uin)
          Request user information.
 void metaReqUnkInfo(AIMSession sess, int uin)
          Request unk user information.
 void metaSearchWP(AIMSession sess, ICQMetaWP wp)
          Search the white pages.
 void metaSetAbout(AIMSession sess, String about)
          Set the about information.
 void metaSetGeneral(AIMSession sess, ICQMetaGeneral user)
          Set general information.
 void metaSetMore(AIMSession sess, ICQMetaMore user)
          Set more information.
 void metaSetOrg(AIMSession sess, byte orgCount, ArrayList orgAreas, ArrayList orgDescriptions, byte affiliationCount, ArrayList affiliationAreas, ArrayList affiliationDescriptions)
          Set your organization information.
 void metaSetPassword(AIMSession sess, String newPassword)
          Set the password.
 void metaSetSecurity(AIMSession sess, byte auth, byte webAware, byte direct, byte kind)
          Set your security information.
 void metaSomething(AIMSession sess)
          Dunno.
 void reqOfflineMsgs(AIMSession sess)
          Request offline messages.
 void reqXML(AIMSession sess)
          Request XML information.
 void searchByMail(AIMSession sess, String email)
          Search for a user by email.
 void searchByPersInf(AIMSession sess, String name, String surname, String nick, String email)
          Search for a user by personal information.
 void searchByUIN(AIMSession sess, int uin)
          Search for a user by UIN.
 void searchRandom(AIMSession sess, int group)
          Search for a random user to chat with.
 void sendSMS(AIMSession sess, ICQSMSMessage sms)
          Send an SMS (Short Message Service) message.
 void setRandom(AIMSession sess, int group)
          Set your random chat information.
 
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

ICQHandler

public ICQHandler()
Family 0x0015.

Method Detail

reqOfflineMsgs

public void reqOfflineMsgs(AIMSession sess)
                    throws IOException
Request offline messages.

Parameters:
sess - the oscar session
Throws:
IOException - if an error occurs

ackOfflineMsgs

public void ackOfflineMsgs(AIMSession sess)
                    throws IOException
Ack offline messages.

Parameters:
sess - the oscar session
Throws:
IOException - if an error occurs

metaSetGeneral

public void metaSetGeneral(AIMSession sess,
                           ICQMetaGeneral user)
                    throws IOException
Set general information.

Parameters:
sess - the oscar session
user - the general information
Throws:
IOException - if an error occurs

metaSetMore

public void metaSetMore(AIMSession sess,
                        ICQMetaMore user)
                 throws IOException
Set more information.

Parameters:
sess - the oscar session
user - more information
Throws:
IOException - if an error occurs

metaSetAbout

public void metaSetAbout(AIMSession sess,
                         String about)
                  throws IOException
Set the about information.

Parameters:
sess - the oscar session
about - the about information
Throws:
IOException - if an error occurs

metaSetOrg

public void metaSetOrg(AIMSession sess,
                       byte orgCount,
                       ArrayList orgAreas,
                       ArrayList orgDescriptions,
                       byte affiliationCount,
                       ArrayList affiliationAreas,
                       ArrayList affiliationDescriptions)
                throws IOException
Set your organization information.

Parameters:
sess - the oscar session
orgCount - the org count
orgAreas - the org areas
orgDescriptions - the org descriptions
affiliationCount - the affiliation count
affiliationAreas - the affiliation areas
affiliationDescriptions - the affiliation descriptions
Throws:
IOException - if an error occurs

metaSetSecurity

public void metaSetSecurity(AIMSession sess,
                            byte auth,
                            byte webAware,
                            byte direct,
                            byte kind)
                     throws IOException
Set your security information.

Parameters:
sess - the oscar session
auth - whether or not you require authorization
webAware - whether or not others can see your prescence on the web
direct - direct connections with any user, only contact list, or only authorized
kind - user kind
Throws:
IOException - if an error occurs

metaSetPassword

public void metaSetPassword(AIMSession sess,
                            String newPassword)
                     throws IOException
Set the password.

Parameters:
sess - the oscar session
newPassword - the new password
Throws:
IOException - if an error occurs

metaReqBasicInfo

public void metaReqBasicInfo(AIMSession sess,
                             int uin)
                      throws IOException
Request basic user information.

Parameters:
sess - the oscar session
uin - the UIN to request information for
Throws:
IOException - if an error occurs

metaReqUnkInfo

public void metaReqUnkInfo(AIMSession sess,
                           int uin)
                    throws IOException
Request unk user information.

Parameters:
sess - the oscar session
uin - the UIN to request information for
Throws:
IOException - if an error occurs

metaReqInfo

public void metaReqInfo(AIMSession sess,
                        int uin)
                 throws IOException
Request user information.

Parameters:
sess - the oscar session
uin - the UIN to request information for
Throws:
IOException - if an error occurs

metaSearchWP

public void metaSearchWP(AIMSession sess,
                         ICQMetaWP wp)
                  throws IOException
Search the white pages.

Parameters:
sess - the oscar session
wp - the white page information
Throws:
IOException - if an error occurs

searchByPersInf

public void searchByPersInf(AIMSession sess,
                            String name,
                            String surname,
                            String nick,
                            String email)
                     throws IOException
Search for a user by personal information.

Parameters:
sess - the oscar session
name - the user's name
surname - the user's last name
nick - the user's nick
email - the user's email
Throws:
IOException - if an error occurs

searchByUIN

public void searchByUIN(AIMSession sess,
                        int uin)
                 throws IOException
Search for a user by UIN.

Parameters:
sess - the oscar session
uin - the UIN to search for
Throws:
IOException - if an error occurs

searchByMail

public void searchByMail(AIMSession sess,
                         String email)
                  throws IOException
Search for a user by email.

Parameters:
sess - the oscar session
email - the email to search for
Throws:
IOException - if an error occurs

searchRandom

public void searchRandom(AIMSession sess,
                         int group)
                  throws IOException
Search for a random user to chat with.

Parameters:
sess - the oscar session
group - the chat group
Throws:
IOException - if an error occurs

setRandom

public void setRandom(AIMSession sess,
                      int group)
               throws IOException
Set your random chat information.

Parameters:
sess - the oscar session
group - the chat group
Throws:
IOException - if an error occurs

metaSomething

public void metaSomething(AIMSession sess)
                   throws IOException
Dunno.

Parameters:
sess - the oscar session
Throws:
IOException - if an error occurs

reqXML

public void reqXML(AIMSession sess)
            throws IOException
Request XML information.

Parameters:
sess - the oscar session
Throws:
IOException - if an error occurs

identifyClient

public void identifyClient(AIMSession sess)
                    throws IOException
Identify this client to the server. I currently have no idea when this packet gets sent, nor do I know what most of the following information is.

Parameters:
sess - the oscar session
Throws:
IOException - if an error occurs

sendSMS

public void sendSMS(AIMSession sess,
                    ICQSMSMessage sms)
             throws IOException
Send an SMS (Short Message Service) message.

Currently this seems to really make my life difficult for making ICQ packets. I need to switch to a TLVChain model.

TLV(0x0001, 0x0016, 0x00000000000000000000000000000000)
TLV(0x0000, message.length(), message)

Parameters:
sess - the oscar session
sms - the SMS message
Throws:
IOException - if an error occurs

handleSNAC

public void handleSNAC(AIMSession sess,
                       SNACHandler handler,
                       AIMFrame frame,
                       SNAC snac,
                       AIMInputStream buffer)
                throws IOException
Handles incoming SNAC's.

Specified by:
handleSNAC in class SNACHandler
Parameters:
sess - the oscar session
handler - the handler
frame - the incoming frame
snac - the incoming SNAC
buffer - the incoming buffer
Throws:
IOException - if an error occurs