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 class TCfgMgr;
00031 #ifndef CFGMGR_H
00032 #define CFGMGR_H
00033 #include <string>
00034 #include "SmartPtr.h"
00035 #include "DUID.h"
00036 #include "IfaceMgr.h"
00037
00038 using namespace std;
00039 class TCfgMgr
00040 {
00041 public:
00042 TCfgMgr(SmartPtr<TIfaceMgr> IfaceMgr);
00043 virtual TCfgMgr::~TCfgMgr();
00044
00045 bool compareConfigs(const string cfgFile, const string oldCfgFile);
00046 void copyFile(const string cfgFile, const string oldCfgFile);
00047 SmartPtr<TDUID> getDUID();
00048 void setWorkdir(std::string workdir);
00049 int getLogLevel();
00050 string getWorkDir();
00051 string getLogName();
00052
00053 protected:
00054 SmartPtr<TDUID> DUID;
00055 bool setDUID(const string duidFile);
00056 bool loadDUID(const string filename);
00057 bool generateDUID(const string duidFile,char * mac,int macLen, int macType);
00058 string Workdir;
00059 string LogName;
00060 int LogLevel;
00061 bool IsDone;
00062 SmartPtr<TIfaceMgr> IfaceMgr;
00063 private:
00064
00065 };
00066 #endif
00067