summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-03-15 16:02:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-03-15 16:02:06 +0300
commitec60bf5b0f03bfb4c310957e5eec9c17193c6c15 (patch)
tree8c57ad15e2435fedb24d12dfcb28dccbaf05c970
parent8b5bf4464597453a75453f1a0bac151372722250 (diff)
db_get_sm / getStringA / getWStringA / getUStringA/ getMStringA / getMStringW - missing szValue parameter added
-rw-r--r--include/m_database.h4
-rw-r--r--include/m_protoint.h46
-rw-r--r--include/newpluginapi.h40
-rw-r--r--libs/win32/mir_app.libbin202224 -> 202444 bytes
-rw-r--r--libs/win32/mir_core.libbin465770 -> 465794 bytes
-rw-r--r--libs/win64/mir_app.libbin197804 -> 198064 bytes
-rw-r--r--libs/win64/mir_core.libbin470688 -> 470718 bytes
-rw-r--r--protocols/JabberG/src/jabber_events.cpp2
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp2
-rw-r--r--protocols/Tox/src/tox_proto.cpp2
-rw-r--r--src/mir_app/src/mir_app.def40
-rw-r--r--src/mir_app/src/mir_app64.def40
-rw-r--r--src/mir_core/src/db.cpp12
-rw-r--r--src/mir_core/src/mir_core.def4
-rw-r--r--src/mir_core/src/mir_core64.def4
17 files changed, 100 insertions, 100 deletions
diff --git a/include/m_database.h b/include/m_database.h
index 094a0c57fa..0988d2a483 100644
--- a/include/m_database.h
+++ b/include/m_database.h
@@ -388,8 +388,8 @@ EXTERN_C MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModul
EXTERN_C MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr);
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);
-MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, const char *szModule, const char *szSetting);
+MIR_CORE_DLL(CMStringA) db_get_sm(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);
EXTERN_C MIR_CORE_DLL(int) db_get_static_utf(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 8eb162d807..ce815c6e97 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -134,30 +134,30 @@ public:
__forceinline INT_PTR getWString(MCONTACT hContact, const char *name, DBVARIANT *result) {
return db_get_s(hContact, m_szModuleName, name, result, DBVT_WCHAR); }
- __forceinline char* getStringA(const char *name) {
- return db_get_sa(NULL, m_szModuleName, name); }
- __forceinline char* getStringA(MCONTACT hContact, const char *name) {
- return db_get_sa(hContact, m_szModuleName, name); }
-
- __forceinline char* getUStringA(const char *name) {
- return db_get_utfa(NULL, m_szModuleName, name); }
- __forceinline char* getUStringA(MCONTACT hContact, const char *name) {
- return db_get_utfa(hContact, m_szModuleName, name); }
-
- __forceinline wchar_t* getWStringA(const char *name) {
- return db_get_wsa(NULL, m_szModuleName, name); }
- __forceinline wchar_t* getWStringA(MCONTACT hContact, const char *name) {
- return db_get_wsa(hContact, m_szModuleName, name); }
-
- __forceinline CMStringA getMStringA(const char *name) {
- return db_get_sm(NULL, m_szModuleName, name); }
- __forceinline CMStringA getMStringA(MCONTACT hContact, const char *name) {
- return db_get_sm(hContact, m_szModuleName, name); }
+ __forceinline char* getStringA(const char *name, const char *szValue = nullptr) {
+ return db_get_sa(NULL, m_szModuleName, name, szValue); }
+ __forceinline char* getStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr) {
+ return db_get_sa(hContact, m_szModuleName, name, szValue); }
+
+ __forceinline char* getUStringA(const char *name, const char *szValue = nullptr) {
+ return db_get_utfa(NULL, m_szModuleName, name, szValue); }
+ __forceinline char* getUStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr) {
+ return db_get_utfa(hContact, m_szModuleName, name, szValue); }
+
+ __forceinline wchar_t* getWStringA(const char *name, const wchar_t *szValue = nullptr) {
+ return db_get_wsa(NULL, m_szModuleName, name, szValue); }
+ __forceinline wchar_t* getWStringA(MCONTACT hContact, const char *name, const wchar_t *szValue = nullptr) {
+ return db_get_wsa(hContact, m_szModuleName, name, szValue); }
+
+ __forceinline CMStringA getMStringA(const char *name, const char *szValue = nullptr) {
+ return db_get_sm(NULL, m_szModuleName, name, szValue); }
+ __forceinline CMStringA getMStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr) {
+ return db_get_sm(hContact, m_szModuleName, name, szValue); }
- __forceinline CMStringW getMStringW(const char *name) {
- return db_get_wsm(NULL, m_szModuleName, name); }
- __forceinline CMStringW getMStringW(MCONTACT hContact, const char *name) {
- return db_get_wsm(hContact, m_szModuleName, name); }
+ __forceinline CMStringW getMStringW(const char *name, const wchar_t *szValue = nullptr) {
+ return db_get_wsm(NULL, m_szModuleName, name, szValue); }
+ __forceinline CMStringW getMStringW(MCONTACT hContact, const char *name, const wchar_t *szValue = nullptr) {
+ return db_get_wsm(hContact, m_szModuleName, name, szValue); }
__forceinline void setByte(const char *name, BYTE value) { db_set_b(NULL, m_szModuleName, name, value); }
__forceinline void setByte(MCONTACT hContact, const char *name, BYTE value) { db_set_b(hContact, m_szModuleName, name, value); }
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index ddbad6005a..a92164f2fe 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -306,49 +306,49 @@ public:
return db_get_ws(hContact, m_szModuleName, name, result);
}
- __forceinline CMStringA getMStringA(const char *name)
+ __forceinline CMStringA getMStringA(const char *name, const char *szValue = nullptr)
{
- return db_get_sm(0, m_szModuleName, name);
+ return db_get_sm(0, m_szModuleName, name, szValue);
}
- __forceinline CMStringA getMStringA(MCONTACT hContact, const char *name)
+ __forceinline CMStringA getMStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr)
{
- return db_get_sm(hContact, m_szModuleName, name);
+ return db_get_sm(hContact, m_szModuleName, name, szValue);
}
- __forceinline char* getStringA(const char *name)
+ __forceinline char* getStringA(const char *name, const char *szValue = nullptr)
{
- return db_get_sa(0, m_szModuleName, name);
+ return db_get_sa(0, m_szModuleName, name, szValue);
}
- __forceinline char* getStringA(MCONTACT hContact, const char *name)
+ __forceinline char* getStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr)
{
- return db_get_sa(hContact, m_szModuleName, name);
+ return db_get_sa(hContact, m_szModuleName, name, szValue);
}
- __forceinline char* getUStringA(const char *name)
+ __forceinline char* getUStringA(const char *name, const char *szValue = nullptr)
{
- return db_get_utfa(0, m_szModuleName, name);
+ return db_get_utfa(0, m_szModuleName, name, szValue);
}
- __forceinline char* getUStringA(MCONTACT hContact, const char *name)
+ __forceinline char* getUStringA(MCONTACT hContact, const char *name, const char *szValue = nullptr)
{
- return db_get_utfa(hContact, m_szModuleName, name);
+ return db_get_utfa(hContact, m_szModuleName, name, szValue);
}
- __forceinline wchar_t* getWStringA(const char *name)
+ __forceinline wchar_t* getWStringA(const char *name, const wchar_t *szValue = nullptr)
{
- return db_get_wsa(0, m_szModuleName, name);
+ return db_get_wsa(0, m_szModuleName, name, szValue);
}
- __forceinline wchar_t* getWStringA(MCONTACT hContact, const char *name)
+ __forceinline wchar_t* getWStringA(MCONTACT hContact, const char *name, const wchar_t *szValue = nullptr)
{
- return db_get_wsa(hContact, m_szModuleName, name);
+ return db_get_wsa(hContact, m_szModuleName, name, szValue);
}
- __forceinline CMStringW getMStringW(const char *name)
+ __forceinline CMStringW getMStringW(const char *name, const wchar_t *szValue = nullptr)
{
- return db_get_wsm(0, m_szModuleName, name);
+ return db_get_wsm(0, m_szModuleName, name, szValue);
}
- __forceinline CMStringW getMStringW(MCONTACT hContact, const char *name)
+ __forceinline CMStringW getMStringW(MCONTACT hContact, const char *name, const wchar_t *szValue = nullptr)
{
- return db_get_wsm(hContact, m_szModuleName, name);
+ return db_get_wsm(hContact, m_szModuleName, name, szValue);
}
__forceinline void setByte(const char *name, BYTE value)
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 43a7316556..7e81d2fb3f 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win32/mir_core.lib b/libs/win32/mir_core.lib
index edf9bb9311..abb6ab6c22 100644
--- a/libs/win32/mir_core.lib
+++ b/libs/win32/mir_core.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index 4479d1c9a3..47d6691a60 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_core.lib b/libs/win64/mir_core.lib
index 992a68bcda..f8e53b9646 100644
--- a/libs/win64/mir_core.lib
+++ b/libs/win64/mir_core.lib
Binary files differ
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp
index e6592e1705..23c2d1e931 100644
--- a/protocols/JabberG/src/jabber_events.cpp
+++ b/protocols/JabberG/src/jabber_events.cpp
@@ -144,7 +144,7 @@ void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact)
AddContactToRoster(jid, nick, T2Utf(ptrW(Clist_GetGroup(hContact))));
XmlNode xPresence("presence"); xPresence << XATTR("to", jid) << XATTR("type", "subscribe");
- ptrA myNick(getUStringA(0, "Nick"));
+ ptrA myNick(getUStringA("Nick"));
if (myNick != nullptr)
xPresence << XCHILD("nick", myNick) << XATTR("xmlns", JABBER_FEAT_NICK);
m_ThreadInfo->send(xPresence);
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index a66b530a67..3af128e858 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -130,7 +130,7 @@ struct JabberGcRecentInfo
m_nick = ppro->getUStringA(setting);
mir_snprintf(setting, "password_rcMuc_%d", iRecent);
- m_password = ppro->getUStringA(0, setting);
+ m_password = ppro->getUStringA(setting);
return m_room || m_server || m_nick || m_password;
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 36c2018ea3..abc46ca6a2 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -314,7 +314,7 @@ LBL_FatalError:
}
}
else {
- ptrA tszPassw(getUStringA(0, "Password"));
+ ptrA tszPassw(getUStringA("Password"));
if (tszPassw == nullptr) {
JLoginFailed(LOGINERR_BADUSERID);
debugLogA("Thread ended, password is not configured");
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index cdab9bc6cd..c11f15dc80 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -411,7 +411,7 @@ char* CSkypeProto::GetChatContactNick(const char *chat_id, const char *id, const
// Check if we have this contact in database
if (IsMe(id)) {
// Return my nick
- if (char *tname = getUStringA(NULL, "Nick"))
+ if (char *tname = getUStringA("Nick"))
return tname;
}
else {
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 728168ff62..62d7e3194a 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -79,7 +79,7 @@ INT_PTR CToxProto::GetCaps(int type, MCONTACT)
MCONTACT CToxProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
- ptrA myAddress(getStringA(NULL, TOX_SETTINGS_ID));
+ ptrA myAddress(getStringA(TOX_SETTINGS_ID));
if (strnicmp(psr->id.a, myAddress, TOX_PUBLIC_KEY_SIZE) == 0) {
ShowNotification(TranslateT("You cannot add yourself to your contact list"), 0);
return NULL;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 576ec9f176..017b3926b6 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -85,12 +85,12 @@ Button_SetSkin_IcoLib @24
?getDword@PROTO_INTERFACE@@QAEKPBDK@Z @88 NONAME
?getString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @89 NONAME
?getString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @90 NONAME
-?getStringA@PROTO_INTERFACE@@QAEPADIPBD@Z @91 NONAME
-?getStringA@PROTO_INTERFACE@@QAEPADPBD@Z @92 NONAME
+?getStringA@PROTO_INTERFACE@@QAEPADIPBD0@Z @91 NONAME
+?getStringA@PROTO_INTERFACE@@QAEPADPBD0@Z @92 NONAME
?getWString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @93 NONAME
?getWString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @94 NONAME
-?getWStringA@PROTO_INTERFACE@@QAEPA_WIPBD@Z @95 NONAME
-?getWStringA@PROTO_INTERFACE@@QAEPA_WPBD@Z @96 NONAME
+?getWStringA@PROTO_INTERFACE@@QAEPA_WIPBDPB_W@Z @95 NONAME
+?getWStringA@PROTO_INTERFACE@@QAEPA_WPBDPB_W@Z @96 NONAME
?getWord@PROTO_INTERFACE@@QAEHIPBDG@Z @97 NONAME
?getWord@PROTO_INTERFACE@@QAEHPBDG@Z @98 NONAME
?isChatRoom@PROTO_INTERFACE@@QAE_NI@Z @99 NONAME
@@ -439,12 +439,12 @@ Proto_GetAverageStatus @512
?getDword@CMPluginBase@@QAEKPBDH@Z @525 NONAME
?getString@CMPluginBase@@QAEHIPBDPAUDBVARIANT@@@Z @526 NONAME
?getString@CMPluginBase@@QAEHPBDPAUDBVARIANT@@@Z @527 NONAME
-?getStringA@CMPluginBase@@QAEPADIPBD@Z @528 NONAME
-?getStringA@CMPluginBase@@QAEPADPBD@Z @529 NONAME
+?getStringA@CMPluginBase@@QAEPADIPBD0@Z @528 NONAME
+?getStringA@CMPluginBase@@QAEPADPBD0@Z @529 NONAME
?getWString@CMPluginBase@@QAEHIPBDPAUDBVARIANT@@@Z @530 NONAME
?getWString@CMPluginBase@@QAEHPBDPAUDBVARIANT@@@Z @531 NONAME
-?getWStringA@CMPluginBase@@QAEPA_WIPBD@Z @532 NONAME
-?getWStringA@CMPluginBase@@QAEPA_WPBD@Z @533 NONAME
+?getWStringA@CMPluginBase@@QAEPA_WIPBDPB_W@Z @532 NONAME
+?getWStringA@CMPluginBase@@QAEPA_WPBDPB_W@Z @533 NONAME
?getWord@CMPluginBase@@QAEHIPBDH@Z @534 NONAME
?getWord@CMPluginBase@@QAEHPBDH@Z @535 NONAME
?setByte@CMPluginBase@@QAEXIPBDE@Z @536 NONAME
@@ -523,14 +523,14 @@ Contact_GetStatus @609
?OnContactDeleted@PROTO_INTERFACE@@UAEXI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UAEXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UAEXXZ @612 NONAME
-?getMStringA@CMPluginBase@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD@Z @613 NONAME
-?getMStringA@CMPluginBase@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PBD@Z @614 NONAME
-?getMStringA@PROTO_INTERFACE@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD@Z @615 NONAME
-?getMStringA@PROTO_INTERFACE@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PBD@Z @616 NONAME
-?getMStringW@CMPluginBase@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD@Z @617 NONAME
-?getMStringW@CMPluginBase@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PBD@Z @618 NONAME
-?getMStringW@PROTO_INTERFACE@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD@Z @619 NONAME
-?getMStringW@PROTO_INTERFACE@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PBD@Z @620 NONAME
+?getMStringA@CMPluginBase@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD0@Z @613 NONAME
+?getMStringA@CMPluginBase@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PBD0@Z @614 NONAME
+?getMStringA@PROTO_INTERFACE@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD0@Z @615 NONAME
+?getMStringA@PROTO_INTERFACE@@QAE?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PBD0@Z @616 NONAME
+?getMStringW@CMPluginBase@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBDPB_W@Z @617 NONAME
+?getMStringW@CMPluginBase@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PBDPB_W@Z @618 NONAME
+?getMStringW@PROTO_INTERFACE@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBDPB_W@Z @619 NONAME
+?getMStringW@PROTO_INTERFACE@@QAE?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PBDPB_W@Z @620 NONAME
??0PROTOACCOUNT@@QAE@PBD@Z @621 NONAME
??1PROTOACCOUNT@@QAE@XZ @622 NONAME
?addSound@CMPluginBase@@QAEHPBDPB_W11@Z @623 NONAME
@@ -646,10 +646,10 @@ db_mc_tryMeta @732
?getUString@CMPluginBase@@QAEHPBDPAUDBVARIANT@@@Z @734 NONAME
?getUString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @735 NONAME
?getUString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @736 NONAME
-?getUStringA@CMPluginBase@@QAEPADIPBD@Z @737 NONAME
-?getUStringA@CMPluginBase@@QAEPADPBD@Z @738 NONAME
-?getUStringA@PROTO_INTERFACE@@QAEPADIPBD@Z @739 NONAME
-?getUStringA@PROTO_INTERFACE@@QAEPADPBD@Z @740 NONAME
+?getUStringA@CMPluginBase@@QAEPADIPBD0@Z @737 NONAME
+?getUStringA@CMPluginBase@@QAEPADPBD0@Z @738 NONAME
+?getUStringA@PROTO_INTERFACE@@QAEPADIPBD0@Z @739 NONAME
+?getUStringA@PROTO_INTERFACE@@QAEPADPBD0@Z @740 NONAME
?setUString@PROTO_INTERFACE@@QAEXIPBD0@Z @741 NONAME
?setUString@PROTO_INTERFACE@@QAEXPBD0@Z @742 NONAME
?setUString@CMPluginBase@@QAEXIPBD0@Z @743 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index dc56f4d10f..9fc0ee75b4 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -85,12 +85,12 @@ Button_SetSkin_IcoLib @24
?getDword@PROTO_INTERFACE@@QEAAKPEBDK@Z @88 NONAME
?getString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @89 NONAME
?getString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @90 NONAME
-?getStringA@PROTO_INTERFACE@@QEAAPEADIPEBD@Z @91 NONAME
-?getStringA@PROTO_INTERFACE@@QEAAPEADPEBD@Z @92 NONAME
+?getStringA@PROTO_INTERFACE@@QEAAPEADIPEBD0@Z @91 NONAME
+?getStringA@PROTO_INTERFACE@@QEAAPEADPEBD0@Z @92 NONAME
?getWString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @93 NONAME
?getWString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @94 NONAME
-?getWStringA@PROTO_INTERFACE@@QEAAPEA_WIPEBD@Z @95 NONAME
-?getWStringA@PROTO_INTERFACE@@QEAAPEA_WPEBD@Z @96 NONAME
+?getWStringA@PROTO_INTERFACE@@QEAAPEA_WIPEBDPEB_W@Z @95 NONAME
+?getWStringA@PROTO_INTERFACE@@QEAAPEA_WPEBDPEB_W@Z @96 NONAME
?getWord@PROTO_INTERFACE@@QEAAHIPEBDG@Z @97 NONAME
?getWord@PROTO_INTERFACE@@QEAAHPEBDG@Z @98 NONAME
?isChatRoom@PROTO_INTERFACE@@QEAA_NI@Z @99 NONAME
@@ -439,12 +439,12 @@ Proto_GetAverageStatus @512
?getDword@CMPluginBase@@QEAAKPEBDH@Z @525 NONAME
?getString@CMPluginBase@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @526 NONAME
?getString@CMPluginBase@@QEAA_JPEBDPEAUDBVARIANT@@@Z @527 NONAME
-?getStringA@CMPluginBase@@QEAAPEADIPEBD@Z @528 NONAME
-?getStringA@CMPluginBase@@QEAAPEADPEBD@Z @529 NONAME
+?getStringA@CMPluginBase@@QEAAPEADIPEBD0@Z @528 NONAME
+?getStringA@CMPluginBase@@QEAAPEADPEBD0@Z @529 NONAME
?getWString@CMPluginBase@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @530 NONAME
?getWString@CMPluginBase@@QEAA_JPEBDPEAUDBVARIANT@@@Z @531 NONAME
-?getWStringA@CMPluginBase@@QEAAPEA_WIPEBD@Z @532 NONAME
-?getWStringA@CMPluginBase@@QEAAPEA_WPEBD@Z @533 NONAME
+?getWStringA@CMPluginBase@@QEAAPEA_WIPEBDPEB_W@Z @532 NONAME
+?getWStringA@CMPluginBase@@QEAAPEA_WPEBDPEB_W@Z @533 NONAME
?getWord@CMPluginBase@@QEAAHIPEBDH@Z @534 NONAME
?getWord@CMPluginBase@@QEAAHPEBDH@Z @535 NONAME
?setByte@CMPluginBase@@QEAAXIPEBDE@Z @536 NONAME
@@ -523,14 +523,14 @@ Contact_GetStatus @609
?OnContactDeleted@PROTO_INTERFACE@@UEAAXI@Z @610 NONAME
?OnBuildProtoMenu@PROTO_INTERFACE@@UEAAXXZ @611 NONAME
?OnErase@PROTO_INTERFACE@@UEAAXXZ @612 NONAME
-?getMStringA@CMPluginBase@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD@Z @613 NONAME
-?getMStringA@CMPluginBase@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PEBD@Z @614 NONAME
-?getMStringA@PROTO_INTERFACE@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD@Z @615 NONAME
-?getMStringA@PROTO_INTERFACE@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PEBD@Z @616 NONAME
-?getMStringW@CMPluginBase@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD@Z @617 NONAME
-?getMStringW@CMPluginBase@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PEBD@Z @618 NONAME
-?getMStringW@PROTO_INTERFACE@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD@Z @619 NONAME
-?getMStringW@PROTO_INTERFACE@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PEBD@Z @620 NONAME
+?getMStringA@CMPluginBase@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD0@Z @613 NONAME
+?getMStringA@CMPluginBase@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PEBD0@Z @614 NONAME
+?getMStringA@PROTO_INTERFACE@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD0@Z @615 NONAME
+?getMStringA@PROTO_INTERFACE@@QEAA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@PEBD0@Z @616 NONAME
+?getMStringW@CMPluginBase@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBDPEB_W@Z @617 NONAME
+?getMStringW@CMPluginBase@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PEBDPEB_W@Z @618 NONAME
+?getMStringW@PROTO_INTERFACE@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBDPEB_W@Z @619 NONAME
+?getMStringW@PROTO_INTERFACE@@QEAA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@PEBDPEB_W@Z @620 NONAME
??0PROTOACCOUNT@@QEAA@PEBD@Z @621 NONAME
??1PROTOACCOUNT@@QEAA@XZ @622 NONAME
?addSound@CMPluginBase@@QEAAHPEBDPEB_W11@Z @623 NONAME
@@ -646,10 +646,10 @@ db_mc_tryMeta @732
?getUString@CMPluginBase@@QEAA_JPEBDPEAUDBVARIANT@@@Z @734 NONAME
?getUString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @735 NONAME
?getUString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @736 NONAME
-?getUStringA@CMPluginBase@@QEAAPEADIPEBD@Z @737 NONAME
-?getUStringA@CMPluginBase@@QEAAPEADPEBD@Z @738 NONAME
-?getUStringA@PROTO_INTERFACE@@QEAAPEADIPEBD@Z @739 NONAME
-?getUStringA@PROTO_INTERFACE@@QEAAPEADPEBD@Z @740 NONAME
+?getUStringA@CMPluginBase@@QEAAPEADIPEBD0@Z @737 NONAME
+?getUStringA@CMPluginBase@@QEAAPEADPEBD0@Z @738 NONAME
+?getUStringA@PROTO_INTERFACE@@QEAAPEADIPEBD0@Z @739 NONAME
+?getUStringA@PROTO_INTERFACE@@QEAAPEADPEBD0@Z @740 NONAME
?setUString@PROTO_INTERFACE@@QEAAXIPEBD0@Z @741 NONAME
?setUString@PROTO_INTERFACE@@QEAAXPEBD0@Z @742 NONAME
?setUString@CMPluginBase@@QEAAXIPEBD0@Z @743 NONAME
diff --git a/src/mir_core/src/db.cpp b/src/mir_core/src/db.cpp
index 6a0f771945..9395366c29 100644
--- a/src/mir_core/src/db.cpp
+++ b/src/mir_core/src/db.cpp
@@ -196,26 +196,26 @@ MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const
return (szValue == nullptr) ? nullptr : mir_wstrdup(szValue);
}
-MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting)
+MIR_CORE_DLL(CMStringA) db_get_sm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const char *szValue)
{
if (currDb == nullptr)
- return CMStringA();
+ return (szValue == nullptr) ? CMStringA() : CMStringA(szValue);
DBVARIANT dbv = { DBVT_ASCIIZ };
if (currDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv))
- return CMStringA();
+ return (szValue == nullptr) ? CMStringA() : CMStringA(szValue);
return CMStringA(ptrA(dbv.pszVal));
}
-MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting)
+MIR_CORE_DLL(CMStringW) db_get_wsm(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, const wchar_t *szValue)
{
if (currDb == nullptr)
- return CMStringW();
+ return (szValue == nullptr) ? CMStringW() : CMStringW(szValue);
DBVARIANT dbv = { DBVT_WCHAR };
if (currDb->GetContactSettingStr(hContact, szModule, szSetting, &dbv))
- return CMStringW();
+ return (szValue == nullptr) ? CMStringW() : CMStringW(szValue);
return CMStringW(ptrW(dbv.pwszVal));
}
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def
index 50e1c5a66d..735cffd6f6 100644
--- a/src/mir_core/src/mir_core.def
+++ b/src/mir_core/src/mir_core.def
@@ -1042,8 +1042,8 @@ IsTerminalDisconnected @1245
??1CCtrlLabel@@UAE@XZ @1257 NONAME
??_7CCtrlLabel@@6B@ @1258 NONAME
CallObjectEventHook @1259
-?db_get_sm@@YG?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD0@Z @1260 NONAME
-?db_get_wsm@@YG?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD0@Z @1261 NONAME
+?db_get_sm@@YG?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPBD00@Z @1682 NONAME
+?db_get_wsm@@YG?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPBD0PB_W@Z @1683 NONAME
?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDEK@Z @1262 NONAME
?CreateLink@CDlgBase@@IAEXAAVCCtrlData@@PBDPA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AAEXXZ @1264 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def
index 298ed29c9c..9f5bddc8bb 100644
--- a/src/mir_core/src/mir_core64.def
+++ b/src/mir_core/src/mir_core64.def
@@ -1042,8 +1042,8 @@ IsTerminalDisconnected @1245
??1CCtrlLabel@@UEAA@XZ @1257 NONAME
??_7CCtrlLabel@@6B@ @1258 NONAME
CallObjectEventHook @1259
-?db_get_sm@@YA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD0@Z @1260 NONAME
-?db_get_wsm@@YA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD0@Z @1261 NONAME
+?db_get_sm@@YA?AV?$CMStringT@DV?$ChTraitsCRT@D@@@@IPEBD00@Z @1682 NONAME
+?db_get_wsm@@YA?AV?$CMStringT@_WV?$ChTraitsCRT@_W@@@@IPEBD0PEB_W@Z @1683 NONAME
?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDEK@Z @1262 NONAME
?CreateLink@CDlgBase@@IEAAXAEAVCCtrlData@@PEBDPEA_W@Z @1263 NONAME
?CheckRowCount@CCtrlPages@@AEAAXXZ @1264 NONAME