summaryrefslogtreecommitdiff
path: root/sman.h
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2013-04-06 13:14:44 +0200
committerPaul Buetow <paul@buetow.org>2013-04-06 13:14:44 +0200
commitca28c0e618890330d429c0dc12429255b20f0c90 (patch)
treeecc02da0184cf4e8bdba94dcdd831abdd1e51b3c /sman.h
parentb3a99e6e15af3be25394e66d1138bb2682f565c3 (diff)
tagging ychat-0.5.0ychat-0.5.0
Diffstat (limited to 'sman.h')
-rw-r--r--sman.h41
1 files changed, 14 insertions, 27 deletions
diff --git a/sman.h b/sman.h
index 5d32248..336bdf1 100644
--- a/sman.h
+++ b/sman.h
@@ -4,40 +4,27 @@
#include "incl.h"
#include "hmap.h"
#include "sess.h"
-#include "s_mutx.h"
-#include "s_ncur.h"
#include "s_tool.h"
#include "s_conf.h"
#include <cstdlib>
using namespace std;
-class sman
-{
-private:
- hmap<sess *, string> *sessions;
- string generate_id( int len );
- int session_count;
-
- pthread_mutex_t mut_sessions;
- pthread_mutex_t mut_session_count;
-#ifdef NCURSES
- void print_sessions();
-#endif
+class sman{
+
+ private:
+ hmap<sess *, string> *sessions;
+ string generateId( int len );
+ int sessioncount;
+ public:
+ sman();
+ ~sman();
+ sess *getSession( string s_id );
+ int getSessionCount( ) { return this->sessioncount; }
+ sess *createSession( );
+ void destroySession( string s_id );
+
-public:
- sman();
- ~sman();
- sess *get_session( string s_id );
- int get_session_count( )
- {
- return this->session_count;
- }
- sess *create_session( );
- void destroy_session( string s_id );
-#ifdef NCURSES
- void print_init_ncurses();
-#endif
};