summaryrefslogtreecommitdiff
path: root/ychat-0.8.2/src/chat/sman.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:41 +0200
commit9cd3ccffd5372dfde3af478e3f832f18db4be3f1 (patch)
tree631c295a4a4a16b57502b847626763a279bf6df7 /ychat-0.8.2/src/chat/sman.h
parent13aaf70af703748fe096e0664c305cd202637ad2 (diff)
tagging tags
Diffstat (limited to 'ychat-0.8.2/src/chat/sman.h')
-rwxr-xr-xychat-0.8.2/src/chat/sman.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/ychat-0.8.2/src/chat/sman.h b/ychat-0.8.2/src/chat/sman.h
new file mode 100755
index 0000000..13fc45a
--- /dev/null
+++ b/ychat-0.8.2/src/chat/sman.h
@@ -0,0 +1,42 @@
+#include "../incl.h"
+
+#ifndef SMAN_H
+#define SMAN_H
+
+#include <cstdlib>
+
+#include "sess.h"
+#include "../maps/shashmap.h"
+#include "../monitor/dump.h"
+
+using namespace std;
+
+class sman : public shashmap<sess*>
+{
+private:
+ string generate_id( int i_len );
+ int i_session_count;
+
+ pthread_mutex_t mut_i_session_count;
+#ifdef NCURSES
+
+ void print_sessions();
+#endif
+
+public:
+ sman();
+ ~sman();
+ sess *get_session( string s_tmpid );
+ int get_session_count( );
+ sess *create_session( );
+ void destroy_session( string s_tmpid );
+#ifdef NCURSES
+
+ void print_init_ncurses();
+#endif
+
+};
+
+
+#endif
+