aboutsummaryrefslogtreecommitdiff
path: root/Src/Wasabi/bfc/util/inifile.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Wasabi/bfc/util/inifile.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/Wasabi/bfc/util/inifile.h')
-rw-r--r--Src/Wasabi/bfc/util/inifile.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Src/Wasabi/bfc/util/inifile.h b/Src/Wasabi/bfc/util/inifile.h
new file mode 100644
index 00000000..6ce7b151
--- /dev/null
+++ b/Src/Wasabi/bfc/util/inifile.h
@@ -0,0 +1,28 @@
+#ifndef _INIFILE_H
+#define _INIFILE_H
+
+#include <bfc/string/StringW.h>
+
+class IniFile
+{
+public:
+ IniFile(const wchar_t *_filename);
+
+ void setString(const wchar_t *section, const wchar_t *tagname, const wchar_t *val);
+ wchar_t *getString(const wchar_t *section, const wchar_t *tagname, wchar_t *buf, int buflen, const wchar_t *default_val = L""); // returns buf
+ StringW getString(const wchar_t *section, const wchar_t *tagname, const wchar_t *default_val=L"");
+
+ void setInt(const wchar_t *section, const wchar_t *tagname, int val);
+ int getInt(const wchar_t *section, const wchar_t *tagname, int default_val = 0);
+
+ int getBool(const wchar_t *section, const wchar_t *tagname, int default_val = 0);
+ void setBool(const wchar_t *section, const wchar_t *tagname, int val);
+
+ GUID getGuid(const wchar_t *section, const wchar_t *tagname, GUID default_val = INVALID_GUID);
+ void setGuid(const wchar_t *section, const wchar_t *tagname, const GUID &val);
+
+private:
+ StringW filename;
+};
+
+#endif