diff options
| author | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2013-04-06 13:14:42 +0200 |
| commit | 98eac951f8087b213f5850bd126dcb279db360a8 (patch) | |
| tree | c121f5c4df1aab847defa539990c1315bd5ba4a8 /sman.h | |
| parent | 0537da9d1e0f593130fc3967befb71e673b016bc (diff) | |
tagging ychat-0.6ychat-0.6
Diffstat (limited to 'sman.h')
| -rw-r--r-- | sman.h | 45 |
1 files changed, 45 insertions, 0 deletions
@@ -0,0 +1,45 @@ +#ifndef SMAN_H +#define SMAN_H + +#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 + +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 +}; + + +#endif + |
