From fda239b10a70dae8de6ef15455136dd2c296f3f2 Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Wed, 7 Jan 2015 22:55:13 +0100 Subject: Add locking to DataManager, remove unused C parts Change-Id: I33e8f96611bd9a6795bdd3fb588c20716bdb5929 Signed-off-by: Vojtech Bocek --- data.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'data.hpp') diff --git a/data.hpp b/data.hpp index df57f234a..e1ea738cc 100644 --- a/data.hpp +++ b/data.hpp @@ -38,9 +38,6 @@ public: static int GetValue(const string varName, float& value); static unsigned long long GetValue(const string varName, unsigned long long& value); - // This is a dangerous function. It will create the value if it doesn't exist so it has a valid c_str - static string& GetValueRef(const string varName); - // Helper functions static string GetStrValue(const string varName); static int GetIntValue(const string varName); @@ -62,16 +59,12 @@ public: static void ReadSettingsFile(void); static string GetCurrentStoragePath(void); - static string& CGetCurrentStoragePath(); static string GetSettingsStoragePath(void); - static string& CGetSettingsStoragePath(); protected: typedef pair TStrIntPair; - typedef pair TStrULLPair; typedef pair TNameValuePair; static map mValues; - static map mULLValues; static string mBackingFile; static int mInitialized; @@ -86,6 +79,7 @@ private: static void sanitize_device_id(char* device_id); static void get_device_id(void); + static pthread_mutex_t m_valuesLock; }; #endif // _DATAMANAGER_HPP_HEADER -- cgit v1.2.3