connectionlistener.h

00001 /*
00002   Copyright (c) 2004-2005 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 #ifndef CONNECTIONLISTENER_H__
00015 #define CONNECTIONLISTENER_H__
00016 
00017 namespace gloox
00018 {
00019 
00025   class GLOOX_EXPORT ConnectionListener
00026   {
00027     public:
00028 
00032       enum ResourceBindError
00033       {
00034         RB_UNKNOWN_ERROR,                  
00035         RB_BAD_REQUEST,                    
00036         RB_NOT_ALLOWED,                    
00037         RB_CONFLICT                        
00038       };
00039 
00043       enum SessionCreateError
00044       {
00045         SC_UNKNOWN_ERROR,                  
00046         SC_INTERNAL_SERVER_ERROR,          
00047         SC_FORBIDDEN,                      
00048         SC_CONFLICT                        
00050       };
00051 
00055       virtual ~ConnectionListener() {};
00056 
00063       virtual void onConnect() = 0;
00064 
00074       virtual void onDisconnect( ConnectionError e ) = 0;
00075 
00080       virtual void onResourceBindError( ResourceBindError /*error*/ ) {};
00081 
00087       virtual void onSessionCreateError( SessionCreateError /*error*/ ) {};
00088 
00095       virtual bool onTLSConnect( const CertInfo& info ) = 0;
00096 
00097   };
00098 
00099 }
00100 
00101 #endif // CONNECTIONLISTENER_H__

Generated on Mon Jan 16 16:19:54 2006 for gloox by  doxygen 1.4.6