diff options
| author | George Hazan <ghazan@miranda.im> | 2018-06-18 17:55:24 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2018-06-18 17:55:24 +0300 |
| commit | c28759e7c9e63b1d092904b4299afdffec91bcdf (patch) | |
| tree | 2707a12eddda373f779c1369015e5fac9148902c /include | |
| parent | 422b84ef2a9ccb27f456e2818a778a8b21b99b3d (diff) | |
new functions to access mirandaboot.ini from all plugins:
Profile_GetSetting() - reads a string from mirandaboot.ini
Profile_GetSettingInt() - reads an integer from mirandaboot.ini
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_database.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/m_database.h b/include/m_database.h index 8f7e974b40..1e3dd69a85 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -463,6 +463,16 @@ EXTERN_C MIR_APP_DLL(void) Profile_SetDefault(const wchar_t *pwszPath); // Checks if a profile is opened
EXTERN_C MIR_APP_DLL(bool) Profile_CheckOpened(const wchar_t *pwszProfileName);
+// Read an option from mirandaboot.ini
+EXTERN_C MIR_APP_DLL(int) Profile_GetSettingInt(const wchar_t *pwszSetting, int iDefault = 0);
+EXTERN_C MIR_APP_DLL(bool) Profile_GetSetting(const wchar_t *pwszSetting, wchar_t *pwszBuf, size_t cbLen, const wchar_t *pwszDefault = nullptr);
+
+template <size_t _Size>
+bool Profile_GetSetting(const wchar_t *pwszSetting, wchar_t(&pwszBuf)[_Size], const wchar_t *pwszDefault = nullptr)
+{
+ return Profile_GetSetting(pwszSetting, pwszBuf, _Size, pwszDefault);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// Contact services
|
