org.walluck.oscar.handlers
Class ODirHandler

java.lang.Object
  extended byorg.walluck.oscar.handlers.SNACHandler
      extended byorg.walluck.oscar.handlers.ODirHandler

public class ODirHandler
extends SNACHandler

Family 0x000f - Newer Search Method.

Used for searching for other AIM users by email address, name, location, commmon interests, and a few other similar things.

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

Constructor Summary
ODirHandler()
          Family 0x000f.
 
Method Summary
 void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer)
          Handles incoming SNAC's.
 void reqInterests(AIMSession sess)
          Subtype 0x0004 - Request list of interests.
 void searchDirectoryInfo(AIMSession sess, java.lang.String region, ODirInfo info)
          Subtype 0x0002 - Submit a User Search Request.
 void searchEmail(AIMSession sess, java.lang.String region, java.lang.String email)
          Subtype 0x0002 - Submit a User Search Request.
 void searchInterests(AIMSession sess, java.lang.String region, java.util.ArrayList interests)
          Subtype 0x0002 - Submit a User Search Request.
 
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

ODirHandler

public ODirHandler()
Family 0x000f.

Method Detail

searchEmail

public void searchEmail(AIMSession sess,
                        java.lang.String region,
                        java.lang.String email)
                 throws java.io.IOException
Subtype 0x0002 - Submit a User Search Request.

Search for an AIM screen name based on their email address.

Parameters:
sess - the oscar session
region - should be "us-ascii" unless you know what you're doing
email - the email address you want to search for
Throws:
java.io.IOException - if an error occurs

searchDirectoryInfo

public void searchDirectoryInfo(AIMSession sess,
                                java.lang.String region,
                                ODirInfo info)
                         throws java.io.IOException
Subtype 0x0002 - Submit a User Search Request.

Search for an AIM screen name based on various info about the person.

Parameters:
sess - the oscar session
region - should be "us-ascii" unless you know what you're doing
info - directory info
Throws:
java.io.IOException - if an error occurs

searchInterests

public void searchInterests(AIMSession sess,
                            java.lang.String region,
                            java.util.ArrayList interests)
                     throws java.io.IOException
Subtype 0x0002 - Submit a User Search Request.

Search for a user by interests (5 max, but that may be a soft (client) limit.

Parameters:
sess - the oscar session
region - should be "us-ascii" unless you know what you're doing
interests - the interests
Throws:
java.io.IOException - if an error occurs

reqInterests

public void reqInterests(AIMSession sess)
                  throws java.io.IOException
Subtype 0x0004 - Request list of interests.

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

handleSNAC

public void handleSNAC(AIMSession sess,
                       SNACHandler handler,
                       AIMFrame frame,
                       SNAC snac,
                       AIMInputStream buffer)
                throws java.io.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:
java.io.IOException - if an error occurs