registrationhandler.h

00001 /*
00002   Copyright (c) 2005-2006 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 <string>
00019 
00020 namespace gloox
00021 {
00022 
00023   class DataForm;
00024 
00035   class GLOOX_API RegistrationHandler
00036   {
00037     public:
00041       enum resultEnum
00042       {
00043         REGISTRATION_SUCCESS = 0,          
00045         REGISTRATION_NOT_ACCEPTABLE,       
00046         REGISTRATION_CONFLICT,             
00047         REGISTRATION_NOT_AUTHORIZED,       
00052         REGISTRATION_BAD_REQUEST,          
00059         REGISTRATION_FORBIDDEN,            
00061         REGISTRATION_REGISTRATION_REQUIRED,
00063         REGISTRATION_UNEXPECTED_REQUEST,   
00071         REGISTRATION_NOT_ALLOWED,          
00073         UNKNOWN_ERROR                      
00074       };
00075 
00079       virtual ~RegistrationHandler() {};
00080 
00088       virtual void handleRegistrationFields( const JID& from, int fields,
00089                                              std::string instructions ) = 0;
00090 
00095       virtual void handleAlreadyRegistered( const JID& from ) = 0;
00096 
00102       virtual void handleRegistrationResult( const JID& from, resultEnum result ) = 0;
00103 
00110       virtual void handleDataForm( const JID& from, const DataForm &form ) = 0;
00111 
00120       virtual void handleOOB( const JID& from, const std::string& url,
00121                               const std::string& desc ) = 0;
00122 
00123   };
00124 
00125 }
00126 
00127 #endif // REGISTRATIONHANDLER_H__

Generated on Tue May 1 14:20:20 2007 for gloox by  doxygen 1.5.1