RegistrationHandler Class Reference

A virtual interface that receives events from an Registration object. More...

#include <registrationhandler.h>

List of all members.

Public Types

enum  resultEnum {
  REGISTRATION_SUCCESS = 0, REGISTRATION_NOT_ACCEPTABLE, REGISTRATION_CONFLICT, REGISTRATION_NOT_AUTHORIZED,
  REGISTRATION_BAD_REQUEST, REGISTRATION_FORBIDDEN, REGISTRATION_REGISTRATION_REQUIRED, REGISTRATION_UNEXPECTED_REQUEST,
  REGISTRATION_NOT_ALLOWED
}

Public Member Functions

virtual ~RegistrationHandler ()
virtual void handleRegistrationFields (int fields, std::string instructions)=0
virtual void handleAlreadyRegistered ()=0
virtual void handleRegistrationResult (resultEnum result)=0


Detailed Description

A virtual interface that receives events from an Registration object.

Derived classes can be registered as RegistrationHandlers with an Registration object. Incoming result for operations initiated through the Registration object are forwarded to this handler.

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.2

Definition at line 32 of file registrationhandler.h.


Member Enumeration Documentation

enum resultEnum
 

Possible results of a JEP-0077 operation.

Enumerator:
REGISTRATION_SUCCESS  The last operation (account registration, account deletion or password change) was successful.
REGISTRATION_NOT_ACCEPTABLE  406: Not all necessary information provided
REGISTRATION_CONFLICT  409: Username alreday exists.
REGISTRATION_NOT_AUTHORIZED  Account removal: Unregistered entity waits too long before authentication or performs tasks other than authentication after registration.
Password change: The server or service does not consider the channel safe enough to enable a password change.
REGISTRATION_BAD_REQUEST  Account removal: The <remove/> element was not the only child element of the <query/> element. Should not happen when only gloox functions are being used.
Password change: The password change request does not contain complete information (both <username/> and <password/> are required).
REGISTRATION_FORBIDDEN  Account removal: The sender does not have sufficient permissions to cancel the registration.
REGISTRATION_REGISTRATION_REQUIRED  Account removal: The entity sending the remove request was not previously registered.
REGISTRATION_UNEXPECTED_REQUEST  Account removal: The host is an instant messaging server and the IQ get does not contain a 'from' address because the entity is not registered with the server.
Password change: The host is an instant messaging server and the IQ set does not contain a 'from' address because the entity is not registered with the server.
REGISTRATION_NOT_ALLOWED  Password change: The server or service does not allow password changes.

Definition at line 38 of file registrationhandler.h.


Constructor & Destructor Documentation

virtual ~RegistrationHandler  )  [inline, virtual]
 

Virtual Destructor.

Definition at line 72 of file registrationhandler.h.


Member Function Documentation

virtual void handleAlreadyRegistered  )  [pure virtual]
 

This function is called if Registration::createAccount() was called on an authenticated stream and the server lets us know about this.

Referenced by Registration::handleIqID().

virtual void handleRegistrationFields int  fields,
std::string  instructions
[pure virtual]
 

Reimplement this function to receive results of the Registration::fetchRegistrationFields() function.

Parameters:
fields The OR'ed fields the server requires. From Registration::fieldEnum.
instructions Any additional information the server sends along.

Referenced by Registration::handleIqID().

virtual void handleRegistrationResult resultEnum  result  )  [pure virtual]
 

This funtion is called to notify about the result of an operation.

Parameters:
result The result of the last operation.

Referenced by Registration::handleIq(), and Registration::handleIqID().


The documentation for this class was generated from the following file:
Generated on Mon Jan 16 16:20:01 2006 for gloox by  doxygen 1.4.6