registrationhandler.h
/*
Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef REGISTRATIONHANDLER_H__
#define REGISTRATIONHANDLER_H__
#include "oob.h"
#include <string>
namespace gloox
{
class OOB;
class JID;
class DataForm;
enum RegistrationResult
{
RegistrationSuccess = 0,
RegistrationNotAcceptable,
RegistrationConflict,
RegistrationNotAuthorized,
RegistrationBadRequest,
RegistrationForbidden,
RegistrationRequired,
RegistrationUnexpectedRequest,
RegistrationNotAllowed,
RegistrationConstraint,
RegistrationUnknownError
};
class GLOOX_API RegistrationHandler
{
public:
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, RegistrationResult regResult ) = 0;
virtual void handleDataForm( const JID& from, const DataForm& form ) = 0;
virtual void handleOOB( const JID& from, const OOB& oob ) = 0;
};
}
#endif // REGISTRATIONHANDLER_H__
gloox::DataForm
An abstraction of a XEP-0004 Data Form.
Definition dataform.h:57
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::OOB
This is an abstraction of a jabber:x:oob namespace element or a jabber:iq:oob namespace element as sp...
Definition oob.h:36
gloox::RegistrationHandler
A virtual interface that receives events from an Registration object.
Definition registrationhandler.h:81
gloox::RegistrationHandler::handleDataForm
virtual void handleDataForm(const JID &from, const DataForm &form)=0
gloox::RegistrationHandler::~RegistrationHandler
virtual ~RegistrationHandler()
Definition registrationhandler.h:86
gloox::RegistrationHandler::handleAlreadyRegistered
virtual void handleAlreadyRegistered(const JID &from)=0
gloox::RegistrationHandler::handleOOB
virtual void handleOOB(const JID &from, const OOB &oob)=0
gloox::RegistrationHandler::handleRegistrationResult
virtual void handleRegistrationResult(const JID &from, RegistrationResult regResult)=0
gloox::RegistrationHandler::handleRegistrationFields
virtual void handleRegistrationFields(const JID &from, int fields, std::string instructions)=0
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::RegistrationResult
RegistrationResult
Definition registrationhandler.h:33
gloox::RegistrationUnknownError
@ RegistrationUnknownError
Definition registrationhandler.h:67
gloox::RegistrationForbidden
@ RegistrationForbidden
Definition registrationhandler.h:50
gloox::RegistrationConflict
@ RegistrationConflict
Definition registrationhandler.h:37
gloox::RegistrationNotAllowed
@ RegistrationNotAllowed
Definition registrationhandler.h:62
gloox::RegistrationSuccess
@ RegistrationSuccess
Definition registrationhandler.h:34
gloox::RegistrationUnexpectedRequest
@ RegistrationUnexpectedRequest
Definition registrationhandler.h:54
gloox::RegistrationNotAuthorized
@ RegistrationNotAuthorized
Definition registrationhandler.h:38
gloox::RegistrationNotAcceptable
@ RegistrationNotAcceptable
Definition registrationhandler.h:36
gloox::RegistrationRequired
@ RegistrationRequired
Definition registrationhandler.h:52
gloox::RegistrationConstraint
@ RegistrationConstraint
Definition registrationhandler.h:64
gloox::RegistrationBadRequest
@ RegistrationBadRequest
Definition registrationhandler.h:43