00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef __CORE_DB_H__
00032 #define __CORE_DB_H__
00033
00034 #include "global.h"
00035
00036 namespace tacpp {
00037
00039
00040
00041
00042
00043
00044
00050
00051 class CoreDb : public Core_data {
00054 list<TacDb*> tdb_;
00057 pthread_mutex_t Mutex_;
00060 void lock();
00063 void unlock();
00064 public:
00067 CoreDb(const string,const string);
00070 ~CoreDb();
00074 db_user get(const string);
00077 string direct_function_query(const char*);
00080 string get_table_name(const int);
00083 string get_table_mask(const int);
00086 string get_table_descr(const int);
00089 string get_field_name(const int,const int);
00092 string get_field_descr(const int,const int);
00095 string get_field_defv(const int,const int);
00098 int get_field_type(const int,const int);
00101 int get_field_num(const int);
00104 void add(const char*,unsigned int,const char*);
00107 void del(const char*,unsigned int,const char*);
00110 string load(const char*,unsigned int,const char*);
00113 string getmodulename(const char*,unsigned int,const char*);
00116 void modify_module(const char*,unsigned int,const char*,const char*);
00119 void modify2(const char*,unsigned int,const char*,const char*);
00122 void modify4(const char*,unsigned int,const char*,const char*);
00125 void modify5(const char*,unsigned int,const char*,const char*);
00128 void modify_shutdown(const char*,unsigned int,const char*,bool);
00131 string buildcfstr(int);
00134 string applycf(char * const*mask,const string cmdname,const list<string>paramList,Command * cmd=NULL)throw (CmdErr);
00137 string create_all();
00140 string del_data(string,list<string>,list<string>);
00143 string show_data(string,list<string>,list<string>);
00146 list<string> sshow_data(string,list<string>,list<string>);
00149 string add_data(string,list<string>,list<string>);
00152 string modify_data(string,list<string>,list<string>,list<string>,list<string>);
00155 void add_log(log_user*);
00158
00161 int open_nf();
00164 void close_nf(int);
00167 void add_nf(int,Bit32,Bit32,Bit32,time_t,time_t,unsigned long,unsigned long,int);
00168 };
00169
00170 };
00171
00172 #endif // __CORE_DB_H__