summaryrefslogtreecommitdiff
path: root/ychat-0.7.3/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.7.3/src/chat/sman.h
parent13aaf70af703748fe096e0664c305cd202637ad2 (diff)
tagging tags
Diffstat (limited to 'ychat-0.7.3/src/chat/sman.h')
-rwxr-xr-xychat-0.7.3/src/chat/sman.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/ychat-0.7.3/src/chat/sman.h b/ychat-0.7.3/src/chat/sman.h
new file mode 100755
index 0000000..1843aec
--- /dev/null
+++ b/ychat-0.7.3/src/chat/sman.h
@@ -0,0 +1,38 @@
+#include "../incl.h"
+
+#ifndef SMAN_H
+#define SMAN_H
+
+#include <cstdlib>
+
+#include "sess.h"
+#include "../maps/smap.h"
+
+using namespace std;
+
+class sman : private smap<sess*,string>
+{
+private:
+ string generate_id( int 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_id );
+ int get_session_count( );
+ sess *create_session( );
+ void destroy_session( string s_id );
+#ifdef NCURSES
+ void print_init_ncurses();
+#endif
+};
+
+
+#endif
+