summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-09 13:22:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-09 13:22:35 +0300
commitb95dc7e61ba02fdd12b1c11142db6c7aebfffd53 (patch)
tree2b2efc2027037c8da18e13f41d05971a8158876a /include
parentcb68e7ffd8d79f36797cbe4704d554d9bf01ac28 (diff)
db_get_usm / getMStringU - helpers to read UTF8 strings as CMStringA
Diffstat (limited to 'include')
-rw-r--r--include/m_database.h1
-rw-r--r--include/m_protoint.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/m_database.h b/include/m_database.h
index 1831946c67..c8921e59f0 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -388,6 +388,7 @@ EXTERN_C MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szMod
EXTERN_C MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr);
MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr);
+MIR_CORE_DLL(CMStringA) db_get_usm(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr);
MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *szValue = nullptr);
EXTERN_C MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest);
diff --git a/include/m_protoint.h b/include/m_protoint.h
index f4dbf2473a..55ff3a5949 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -162,6 +162,11 @@ public:
__forceinline CMStringA getMStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr) {
return db_get_sm(hContact, m_szModuleName, name, szValue); }
+ __forceinline CMStringA getMStringU(const char *name, const char *szValue = nullptr) {
+ return db_get_usm(0, m_szModuleName, name, szValue); }
+ __forceinline CMStringA getMStringU(MCONTACT hContact, const char *name, const char *szValue = nullptr) {
+ return db_get_usm(hContact, m_szModuleName, name, szValue); }
+
__forceinline CMStringW getMStringW(const char *name, const wchar_t *szValue = nullptr) {
return db_get_wsm(0, m_szModuleName, name, szValue); }
__forceinline CMStringW getMStringW(MCONTACT hContact, const char *name, const wchar_t *szValue = nullptr) {