ne7ssh_error.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef NE7SSH_ERROR_H
00016 #define NE7SSH_ERROR_H
00017
00018 #include <stdlib.h>
00019 #if !defined(WIN32) && !defined(__MINGW32__)
00020 # include <sys/select.h>
00021 #endif
00022
00023 #define MAX_ERROR_LEN 500
00024
00025 #include "ne7ssh_types.h"
00026 #include "ne7ssh_mutex.h"
00027
00031 class SSH_EXPORT Ne7sshError
00032 {
00033 private:
00034 uint16 memberCount;
00035 char popedErr[MAX_ERROR_LEN + 1];
00036 static Ne7ssh_Mutex mut;
00037
00041 struct Error
00042 {
00043 int32 channel;
00044 char* errorStr;
00045 } **ErrorBuffer;
00046
00052 bool deleteRecord (uint16 recID);
00053
00058 static bool lock ();
00059
00064 static bool unlock ();
00065
00066 public:
00070 Ne7sshError();
00071
00075 ~Ne7sshError();
00076
00083 bool push (int32 channel, const char* format, ...);
00084
00089 const char* pop ();
00090
00096 const char* pop (int32 channel);
00097
00102 bool deleteCoreMsgs ();
00103
00109 bool deleteChannel (int32 channel);
00110
00111 };
00112
00113 #endif