00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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 ) {};
00081
00087 virtual void onSessionCreateError( SessionCreateError ) {};
00088
00095 virtual bool onTLSConnect( const CertInfo& info ) = 0;
00096
00097 };
00098
00099 }
00100
00101 #endif // CONNECTIONLISTENER_H__