summaryrefslogtreecommitdiff
path: root/src/configuration.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-21 21:08:20 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-21 21:17:31 +0300
commit4a4681e6994e3489d2ab0f32d2cb19d97a8b496e (patch)
treefd342a89f8db4982ac7004d4ba6036c5da8050a9 /src/configuration.h
parentc2d8a6fbeba27a125cf3e2581d762c8c58a8e6d1 (diff)
downloadplus-4a4681e6994e3489d2ab0f32d2cb19d97a8b496e.tar.gz
plus-4a4681e6994e3489d2ab0f32d2cb19d97a8b496e.tar.bz2
plus-4a4681e6994e3489d2ab0f32d2cb19d97a8b496e.tar.xz
plus-4a4681e6994e3489d2ab0f32d2cb19d97a8b496e.zip
Add ability to remove old unused keys from configuration file.
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 696ddcf3a..79fa9b5ba 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -192,6 +192,14 @@ class ConfigurationObject
return container;
}
+#ifdef DEBUG_CONFIG
+ void enableKeyLogging()
+ { mLogKeys = true; }
+
+ void setIsMain(bool b)
+ { mIsMain = b; }
+#endif
+
protected:
virtual void initFromXML(XmlNodePtr node);
virtual void writeToXML(XmlTextWriterPtr writer);
@@ -203,6 +211,11 @@ class ConfigurationObject
typedef std::list<ConfigurationObject *> ConfigurationList;
std::map<std::string, ConfigurationList> mContainerOptions;
+
+#ifdef DEBUG_CONFIG
+ bool mLogKeys;
+ bool mIsMain;
+#endif
};
/**
@@ -301,6 +314,8 @@ class Configuration : public ConfigurationObject
std::string getDirectory() const
{ return mDirectory; }
+ void removeOldKeys();
+
private:
/**
* Clean up the default values member.