From 9cd3ccffd5372dfde3af478e3f832f18db4be3f1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 6 Apr 2013 13:14:41 +0200 Subject: tagging tags --- ychat-0.6/mman.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 ychat-0.6/mman.h (limited to 'ychat-0.6/mman.h') diff --git a/ychat-0.6/mman.h b/ychat-0.6/mman.h new file mode 100644 index 0000000..29b5a0a --- /dev/null +++ b/ychat-0.6/mman.h @@ -0,0 +1,38 @@ +#ifndef MMAN_H +#define MMAN_H + +#include +#include +#include +#include "glob.h" +#include "mcon.h" + +using namespace std; +class mman +{ +private: + vector mysql; + string s_host; + string s_user; + string s_pass; + string s_db; + unsigned int i_port; + int i_initial_connections; + int i_max_connections; + int i_used_connections; + + pthread_mutex_t mut_i_used_con; +public: + mman(int initial, int max); + ~mman(); + void init( string host, string user, string passwd, string db, unsigned int port = PRTMSQL ); + MYSQL *get_connection(); + MYSQL *new_connection( ); + void free_connection( MYSQL *msql ); +#ifdef NCURSES + void print_init_ncurses(); + void print_used_connections( bool b_refresh ); +#endif + +}; +#endif -- cgit v1.2.3