Main Page | Class Hierarchy | Class List | File List | Class Members

CoreDb.h

00001 // tacppd database system support
00002 // (c) Copyright 2000-2005 by tacppd team and contributors
00003 // see http://tacppd.org for more information
00004 
00005 //  This program is free software; you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation; either version 2 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License
00016 //  along with this program; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // all comments which start from /** - this is comments for KDoc
00020 //  for classes
00021 //    @short [short description of the class]
00022 //    @author [class author]
00023 //    @version [class version]
00024 //    @see [references to other classes or methods]
00025 //  for methods
00026 //    @see [references]
00027 //    @return [sentence describing the return value]
00028 //    @exception [list the exeptions that could be thrown]
00029 //    @param [name id] [description]    - can be multiple
00030 
00031 #ifndef __CORE_DB_H__
00032 #define __CORE_DB_H__
00033 
00034 #include "global.h"
00035 
00036 namespace tacpp {
00037 
00039 //
00040 // databases list
00041 //
00042 
00043 // data fragment big, and it outside
00044 
00050 //class CoreDb : public md5, public Core_data {
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   //void add_trf();
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);//NfData*);
00168 };
00169 
00170 };
00171 
00172 #endif // __CORE_DB_H__

Generated on Thu Jul 21 23:09:45 2005 for tacppd.kdevelop by doxygen 1.3.5