00001 #ifndef CONFIGURATION_H_ 00002 #define CONFIGURATION_H_ 00003 00004 #include "ConfigFile.h" 00005 #include "core/Node.h" 00006 #include "core/StaticRoute.h" 00007 #include <string> 00008 #include <vector> 00009 #include <list> 00010 00011 using namespace std; 00012 using namespace dtn::core; 00013 using namespace dtn::data; 00014 00015 namespace dtn 00016 { 00017 namespace daemon 00018 { 00022 class Configuration 00023 { 00024 private: 00025 Configuration(); 00026 ~Configuration(); 00027 00028 public: 00029 static Configuration &getInstance(); 00030 00031 string getLocalUri(); 00032 00033 vector<string> getNetList(); 00034 00035 string getNetType(const string name = "default"); 00036 unsigned int getNetPort(const string name = "default"); 00037 string getNetInterface(const string name = "default"); 00038 string getNetBroadcast(const string name = "default"); 00039 unsigned int getNetMTU(const string name = "default"); 00040 00041 void setConfigFile(ConfigFile &conf); 00042 00043 vector<Node> getStaticNodes(); 00044 list<StaticRoute> getStaticRoutes(); 00045 00046 unsigned int getStorageMaxSize(); 00047 bool doStorageMerge(); 00048 00049 list<Node> getFakeBroadcastNodes(); 00050 bool doFakeBroadcast(); 00051 00052 pair<double, double> getStaticPosition(); 00053 string getGPSHost(); 00054 unsigned int getGPSPort(); 00055 bool useGPSDaemon(); 00056 00057 bool useSQLiteStorage(); 00058 string getSQLiteDatabase(); 00059 bool doSQLiteFlush(); 00060 00061 private: 00062 ConfigFile m_conf; 00063 bool m_debug; 00064 00065 }; 00066 } 00067 } 00068 00069 #endif /*CONFIGURATION_H_*/
1.5.6