summaryrefslogtreecommitdiffstats
path: root/data.h
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2015-01-07 22:55:13 +0100
committerDees Troy <dees_troy@teamw.in>2015-01-09 23:12:47 +0100
commitfda239b10a70dae8de6ef15455136dd2c296f3f2 (patch)
tree7e544b48a9edb20a80460ff63c58b7bb0d40e1f9 /data.h
parentMerge "Use power button to go back in watch themes" into android-5.0 (diff)
downloadandroid_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar.gz
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar.bz2
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar.lz
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar.xz
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.tar.zst
android_bootable_recovery-fda239b10a70dae8de6ef15455136dd2c296f3f2.zip
Diffstat (limited to '')
-rw-r--r--data.h41
-rw-r--r--data.hpp8
2 files changed, 1 insertions, 48 deletions
diff --git a/data.h b/data.h
deleted file mode 100644
index 0ca9f4eb6..000000000
--- a/data.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Copyright 2012 bigbiff/Dees_Troy TeamWin
- This file is part of TWRP/TeamWin Recovery Project.
-
- TWRP is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- TWRP is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with TWRP. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _DATA_HEADER
-#define _DATA_HEADER
-
-int DataManager_ResetDefaults(void);
-void DataManager_LoadDefaults(void);
-int DataManager_LoadValues(const char* filename);
-int DataManager_Flush(void);
-const char* DataManager_GetStrValue(const char* varName);
-const char* DataManager_GetCurrentStoragePath(void);
-const char* DataManager_GetSettingsStoragePath(void);
-int DataManager_GetIntValue(const char* varName);
-
-int DataManager_SetStrValue(const char* varName, char* value);
-int DataManager_SetIntValue(const char* varName, int value);
-int DataManager_SetFloatValue(const char* varName, float value);
-
-int DataManager_ToggleIntValue(const char* varName);
-
-void DataManager_DumpValues(void);
-void DataManager_ReadSettingsFile(void);
-
-#endif // _DATA_HEADER
-
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<string, int> TStrIntPair;
- typedef pair<string, unsigned long long> TStrULLPair;
typedef pair<string, TStrIntPair> TNameValuePair;
static map<string, TStrIntPair> mValues;
- static map<string, TStrULLPair> 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