registrationhandler.h

00001 /*
00002   Copyright (c) 2005-2009 by Jakob Schroeter <js@camaya.net>
00003   This file is part of the gloox library. http://camaya.net/gloox
00004 
00005   This software is distributed under a license. The full license
00006   agreement can be found in the file LICENSE in this distribution.
00007   This software may not be copied, modified, sold or distributed
00008   other than expressed in the named license agreement.
00009 
00010   This software is distributed without any warranty.
00011 */
00012 
00013 
00014 
00015 #ifndef REGISTRATIONHANDLER_H__
00016 #define REGISTRATIONHANDLER_H__
00017 
00018 #include "oob.h"
00019 
00020 #include <string>
00021 
00022 namespace gloox
00023 {
00024 
00025   class OOB;
00026   class JID;
00027   class DataForm;
00028 
00032   enum RegistrationResult
00033   {
00034     RegistrationSuccess = 0,           
00036     RegistrationNotAcceptable,         
00037     RegistrationConflict,              
00038     RegistrationNotAuthorized,         
00043     RegistrationBadRequest,            
00050     RegistrationForbidden,             
00052     RegistrationRequired,              
00054     RegistrationUnexpectedRequest,     
00062     RegistrationNotAllowed,            
00064     RegistrationUnknownError           
00065   };
00066 
00077   class GLOOX_API RegistrationHandler
00078   {
00079     public:
00083       virtual ~RegistrationHandler() {}
00084 
00092       virtual void handleRegistrationFields( const JID& from, int fields,
00093                                              std::string instructions ) = 0;
00094 
00099       virtual void handleAlreadyRegistered( const JID& from ) = 0;
00100 
00106       virtual void handleRegistrationResult( const JID& from, RegistrationResult regResult ) = 0;
00107 
00114       virtual void handleDataForm( const JID& from, const DataForm& form ) = 0;
00115 
00122       virtual void handleOOB( const JID& from, const OOB& oob ) = 0;
00123 
00124   };
00125 
00126 }
00127 
00128 #endif // REGISTRATIONHANDLER_H__
Generated on Tue Jun 8 23:37:54 2010 for gloox by  doxygen 1.6.3