org.walluck.oscar.handlers
Class AdminHandler

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

public class AdminHandler
extends SNACHandler

Family 0x0007 - Account Administration.

Used for stuff like changing the formating of your screen name, changing your email address, requesting an account confirmation email, getting account info.

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

Constructor Summary
AdminHandler()
          Family 0x0007
 
Method Summary
 void changePassword(AIMSession sess, AIMConnection conn, String newPw, String curPw)
          Subtype 0x0004 - Change password.
 void getInfo(AIMSession sess, AIMConnection conn, int info)
          Subtype 0x0002 - Request a bit of account info.
 void handleSNAC(AIMSession sess, SNACHandler handler, AIMFrame frame, SNAC snac, AIMInputStream buffer)
          Handles incoming SNAC's.
 void reqConfirm(AIMSession sess, AIMConnection conn)
          Subtype 0x0006 - Request account confirmation.
 void setEmail(AIMSession sess, AIMConnection conn, String newEmail)
          Subtype 0x0004 - Change email address.
 void setNick(AIMSession sess, AIMConnection conn, String newNick)
          Subtype 0x0004 - Set screenname formatting.
 
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

AdminHandler

public AdminHandler()
Family 0x0007

Method Detail

getInfo

public void getInfo(AIMSession sess,
                    AIMConnection conn,
                    int info)
             throws IOException
Subtype 0x0002 - Request a bit of account info. The only known valid tag is 0x0011 (email address).

Parameters:
sess - the oscar session
conn - the bos connection for this session
info - the type of info to request
Throws:
IOException - if an error occurs

setNick

public void setNick(AIMSession sess,
                    AIMConnection conn,
                    String newNick)
             throws IOException
Subtype 0x0004 - Set screenname formatting.

Parameters:
sess - the oscar sesion
conn - the bos connection for this session
newNick - the new nick
Throws:
IOException - if an error occurs

changePassword

public void changePassword(AIMSession sess,
                           AIMConnection conn,
                           String newPw,
                           String curPw)
                    throws IOException
Subtype 0x0004 - Change password.

Parameters:
sess - the oscar sesion
conn - the bos connection for this session
newPw - the new password
curPw - the current password
Throws:
IOException - if an error occurs

setEmail

public void setEmail(AIMSession sess,
                     AIMConnection conn,
                     String newEmail)
              throws IOException
Subtype 0x0004 - Change email address.

Parameters:
sess - the oscar session
conn - the bos connection for this session
newEmail - the new email address
Throws:
IOException - if an error occurs

reqConfirm

public void reqConfirm(AIMSession sess,
                       AIMConnection conn)
                throws IOException
Subtype 0x0006 - Request account confirmation. This will cause an email to be sent to the address associated with the account. By following the instructions in the mail, you can get the TRIAL flag removed from your account.

Parameters:
sess - the oscar session
conn - the bos connection for this session
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