#include <registrationhandler.h>
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, UNKNOWN_ERROR } |
Public Member Functions | |
virtual | ~RegistrationHandler () |
virtual void | handleRegistrationFields (const JID &from, int fields, std::string instructions)=0 |
virtual void | handleAlreadyRegistered (const JID &from)=0 |
virtual void | handleRegistrationResult (const JID &from, resultEnum result)=0 |
virtual void | handleDataForm (const JID &from, const DataForm &form)=0 |
virtual void | handleOOB (const JID &from, const std::string &url, const std::string &desc)=0 |
Derived classes can be registered as RegistrationHandlers with an Registration object. Incoming results for operations initiated through the Registration object are forwarded to this handler.
Definition at line 35 of file registrationhandler.h.
enum resultEnum |
Possible results of a JEP-0077 operation.
Definition at line 41 of file registrationhandler.h.
virtual ~RegistrationHandler | ( | ) | [inline, virtual] |
Virtual Destructor.
Definition at line 79 of file registrationhandler.h.
virtual void handleRegistrationFields | ( | const JID & | from, | |
int | fields, | |||
std::string | instructions | |||
) | [pure virtual] |
Reimplement this function to receive results of the Registration::fetchRegistrationFields() function.
from | The server or service the registration fields came from. | |
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 handleAlreadyRegistered | ( | const JID & | from | ) | [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 handleRegistrationResult | ( | const JID & | from, | |
resultEnum | result | |||
) | [pure virtual] |
This funtion is called to notify about the result of an operation.
from | The server or service the result came from. | |
result | The result of the last operation. |
Referenced by Registration::handleIq(), and Registration::handleIqID().
This function is called additionally to handleRegistrationFields() if the server supplied a data form together with legacy registration fields.
from | The server or service the data form came from. | |
form | The DataForm conataining registration information. |
Referenced by Registration::handleIqID().
virtual void handleOOB | ( | const JID & | from, | |
const std::string & | url, | |||
const std::string & | desc | |||
) | [pure virtual] |
This function is called if the server does not offer in-band registration but wants to refer the user to an external URL.
from | The server or service the referal came from. | |
url | The external URL where registration is possible (or where more information can be found). | |
desc | Some descriptive text. |
Referenced by Registration::handleIqID().