summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:55:00 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-28 11:55:00 +0000
commitae3cee537d478fba0f32e561a12d62213a85a4d5 (patch)
tree9c724d25e3726acb53c6e55489804533a7c8a30b
parent2eb1daf5d940beac69c2cf9de0d27c74adb03a37 (diff)
- stubs for PROTO get* & set* functions removed from mir_core;
- helpers themselves made inline; - added missing helpers for getWStringA - removed completely obsolete DB header for ICQ git-svn-id: http://svn.miranda-ng.org/main/trunk@5507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--bin10/lib/mir_core.libbin53216 -> 47958 bytes
-rw-r--r--bin10/lib/mir_core64.libbin48528 -> 43842 bytes
-rw-r--r--bin11/lib/mir_core.libbin53216 -> 47958 bytes
-rw-r--r--bin11/lib/mir_core64.libbin48528 -> 43842 bytes
-rw-r--r--include/m_core.h36
-rw-r--r--include/m_protoint.h102
-rw-r--r--protocols/IcqOscarJ/icqoscar8_10.vcxproj1
-rw-r--r--protocols/IcqOscarJ/icqoscar8_10.vcxproj.filters3
-rw-r--r--protocols/IcqOscarJ/icqoscar8_11.vcxproj1
-rw-r--r--protocols/IcqOscarJ/icqoscar8_11.vcxproj.filters3
-rw-r--r--protocols/IcqOscarJ/src/icq_avatar.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_db.h42
-rw-r--r--protocols/IcqOscarJ/src/icqosc_svcs.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icqoscar.h1
-rw-r--r--src/mir_core/mir_core.def24
-rw-r--r--src/mir_core/protos.cpp98
16 files changed, 68 insertions, 247 deletions
diff --git a/bin10/lib/mir_core.lib b/bin10/lib/mir_core.lib
index addbbc4210..cd1176ba70 100644
--- a/bin10/lib/mir_core.lib
+++ b/bin10/lib/mir_core.lib
Binary files differ
diff --git a/bin10/lib/mir_core64.lib b/bin10/lib/mir_core64.lib
index d7095ec957..18a2a8f9a2 100644
--- a/bin10/lib/mir_core64.lib
+++ b/bin10/lib/mir_core64.lib
Binary files differ
diff --git a/bin11/lib/mir_core.lib b/bin11/lib/mir_core.lib
index 17ae6e9157..fa78e2495a 100644
--- a/bin11/lib/mir_core.lib
+++ b/bin11/lib/mir_core.lib
Binary files differ
diff --git a/bin11/lib/mir_core64.lib b/bin11/lib/mir_core64.lib
index 3deba6924b..4ab1a876e9 100644
--- a/bin11/lib/mir_core64.lib
+++ b/bin11/lib/mir_core64.lib
Binary files differ
diff --git a/include/m_core.h b/include/m_core.h
index 3167bc514b..b99bbbafb1 100644
--- a/include/m_core.h
+++ b/include/m_core.h
@@ -619,44 +619,8 @@ MIR_CORE_DLL(void) ProtoCreateService(struct PROTO_INTERFACE *pThis, const cha
typedef INT_PTR (__cdecl PROTO_INTERFACE::*ProtoServiceFuncParam)(WPARAM, LPARAM, LPARAM);
MIR_CORE_DLL(void) ProtoCreateServiceParam(struct PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam, LPARAM);
-
-MIR_CORE_DLL(bool) ProtoGetBool0(struct PROTO_INTERFACE *pThis, const char* name, bool defaultValue);
-MIR_CORE_DLL(bool) ProtoGetBool(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, bool defaultValue);
#endif
-MIR_CORE_DLL(int) ProtoGetByte0(struct PROTO_INTERFACE *pThis, const char* name, BYTE defaultValue);
-MIR_CORE_DLL(int) ProtoGetByte(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, BYTE defaultValue);
-
-MIR_CORE_DLL(DWORD) ProtoGetDword0(struct PROTO_INTERFACE *pThis, const char* name, DWORD defaultValue);
-MIR_CORE_DLL(DWORD) ProtoGetDword(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DWORD defaultValue);
-
-MIR_CORE_DLL(int) ProtoGetString0(struct PROTO_INTERFACE *pThis, const char* name, DBVARIANT* result);
-MIR_CORE_DLL(int) ProtoGetString(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DBVARIANT* result);
-
-MIR_CORE_DLL(int) ProtoGetTString0(struct PROTO_INTERFACE *pThis, const char* name, DBVARIANT* result);
-MIR_CORE_DLL(int) ProtoGetTString(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DBVARIANT* result);
-
-MIR_CORE_DLL(WORD) ProtoGetWord0(struct PROTO_INTERFACE *pThis, const char* name, WORD defaultValue);
-MIR_CORE_DLL(WORD) ProtoGetWord(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, WORD defaultValue);
-
-MIR_CORE_DLL(char*) ProtoGetStringA0(struct PROTO_INTERFACE *pThis, const char* setting);
-MIR_CORE_DLL(char*) ProtoGetStringA(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* setting);
-
-MIR_CORE_DLL(void) ProtoSetByte0(struct PROTO_INTERFACE *pThis, const char* name, BYTE value);
-MIR_CORE_DLL(void) ProtoSetByte(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, BYTE value);
-
-MIR_CORE_DLL(void) ProtoSetWord0(struct PROTO_INTERFACE *pThis, const char* name, WORD value);
-MIR_CORE_DLL(void) ProtoSetWord(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, WORD value);
-
-MIR_CORE_DLL(void) ProtoSetDword0(struct PROTO_INTERFACE *pThis, const char* name, DWORD value);
-MIR_CORE_DLL(void) ProtoSetDword(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DWORD value);
-
-MIR_CORE_DLL(void) ProtoSetString0(struct PROTO_INTERFACE *pThis, const char* name, const char* value);
-MIR_CORE_DLL(void) ProtoSetString(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, const char* value);
-
-MIR_CORE_DLL(void) ProtoSetTString0(struct PROTO_INTERFACE *pThis, const char* name, const TCHAR* value);
-MIR_CORE_DLL(void) ProtoSetTString(struct PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, const TCHAR* value);
-
///////////////////////////////////////////////////////////////////////////////
// sha1 functions
diff --git a/include/m_protoint.h b/include/m_protoint.h
index 1905f85a18..69aa6339b4 100644
--- a/include/m_protoint.h
+++ b/include/m_protoint.h
@@ -57,48 +57,78 @@ struct PROTO_INTERFACE : public MZeroedObject
//////////////////////////////////////////////////////////////////////////////////////
// Helpers
- __forceinline INT_PTR ProtoBroadcastAck(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
- { return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
+ __forceinline INT_PTR ProtoBroadcastAck(HANDLE hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam) {
+ return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
__forceinline INT_PTR delSetting(const char *name) { return db_unset(NULL, m_szModuleName, name); }
__forceinline INT_PTR delSetting(HANDLE hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
- __forceinline bool getBool(const char *name, bool defaultValue) { return ProtoGetBool0(this, name, defaultValue); }
- __forceinline bool getBool(HANDLE hContact, const char *name, bool defaultValue) { return ProtoGetBool(this, hContact, name, defaultValue); }
- __forceinline bool isChatRoom(HANDLE hContact) { return getBool(hContact, "ChatRoom", false); }
-
- __forceinline int getByte(const char *name, BYTE defaultValue) { return ProtoGetByte0(this, name, defaultValue); }
- __forceinline int getByte(HANDLE hContact, const char *name, BYTE defaultValue) { return ProtoGetByte(this, hContact, name, defaultValue); }
-
- __forceinline int getWord(const char *name, WORD defaultValue) { return ProtoGetWord0(this, name, defaultValue); }
- __forceinline int getWord(HANDLE hContact, const char *name, WORD defaultValue) { return ProtoGetWord(this, hContact, name, defaultValue); }
-
- __forceinline DWORD getDword(const char *name, DWORD defaultValue) { return ProtoGetDword0(this, name, defaultValue); }
- __forceinline DWORD getDword(HANDLE hContact, const char *name, DWORD defaultValue) { return ProtoGetDword(this, hContact, name, defaultValue); }
-
- __forceinline int getString(const char *name, DBVARIANT *result) { return ProtoGetString0(this, name, result); }
- __forceinline int getString(HANDLE hContact, const char *name, DBVARIANT *result) { return ProtoGetString(this, hContact, name, result); }
-
- __forceinline int getTString(const char *name, DBVARIANT *result) { return ProtoGetTString0(this, name, result); }
- __forceinline int getTString(HANDLE hContact, const char *name, DBVARIANT *result) { return ProtoGetTString(this, hContact, name, result); }
+ __forceinline bool getBool(const char *name, bool defaultValue) {
+ return db_get_b(NULL, m_szModuleName, name, defaultValue) != 0; }
+ __forceinline bool getBool(HANDLE hContact, const char *name, bool defaultValue) {
+ return db_get_b(hContact, m_szModuleName, name, defaultValue) != 0; }
- __forceinline char* getStringA(const char *name) { return ProtoGetStringA0(this, name); }
- __forceinline char* getStringA(HANDLE hContact, const char *name) { return ProtoGetStringA(this, hContact, name); }
-
- __forceinline void setByte(const char *name, BYTE value) { ProtoSetByte0(this, name, value); }
- __forceinline void setByte(HANDLE hContact, const char *name, BYTE value) { ProtoSetByte(this, hContact, name, value); }
-
- __forceinline void setWord(const char *name, WORD value) { ProtoSetWord0(this, name, value); }
- __forceinline void setWord(HANDLE hContact, const char *name, WORD value) { ProtoSetWord(this, hContact, name, value); }
-
- __forceinline void setDword(const char *name, DWORD value) { ProtoSetDword0(this, name, value); }
- __forceinline void setDword(HANDLE hContact, const char *name, DWORD value) { ProtoSetDword(this, hContact, name, value); }
-
- __forceinline void setString(const char *name, const char* value) { ProtoSetString0(this, name, value); }
- __forceinline void setString(HANDLE hContact, const char *name, const char* value) { ProtoSetString(this, hContact, name, value); }
+ __forceinline bool isChatRoom(HANDLE hContact) { return getBool(hContact, "ChatRoom", false); }
- __forceinline void setTString(const char *name, const TCHAR* value) { ProtoSetTString0(this, name, value); }
- __forceinline void setTString(HANDLE hContact, const char *name, const TCHAR* value) { ProtoSetTString(this, hContact, name, value); }
+ __forceinline int getByte(const char *name, BYTE defaultValue) {
+ return db_get_b(NULL, m_szModuleName, name, defaultValue); }
+ __forceinline int getByte(HANDLE hContact, const char *name, BYTE defaultValue) {
+ return db_get_b(hContact, m_szModuleName, name, defaultValue); }
+
+ __forceinline int getWord(const char *name, WORD defaultValue) {
+ return db_get_w(NULL, m_szModuleName, name, defaultValue); }
+ __forceinline int getWord(HANDLE hContact, const char *name, WORD defaultValue) {
+ return db_get_w(hContact, m_szModuleName, name, defaultValue); }
+
+ __forceinline DWORD getDword(const char *name, DWORD defaultValue) {
+ return db_get_dw(NULL, m_szModuleName, name, defaultValue); }
+ __forceinline DWORD getDword(HANDLE hContact, const char *name, DWORD defaultValue) {
+ return db_get_dw(hContact, m_szModuleName, name, defaultValue); }
+
+ __forceinline INT_PTR getString(const char *name, DBVARIANT *result) {
+ return db_get_s(NULL, m_szModuleName, name, result); }
+ __forceinline INT_PTR getString(HANDLE hContact, const char *name, DBVARIANT *result) {
+ return db_get_s(hContact, m_szModuleName, name, result); }
+
+ __forceinline INT_PTR getWString(const char *name, DBVARIANT *result) {
+ return db_get_ws(NULL, m_szModuleName, name, result); }
+ __forceinline INT_PTR getWString(HANDLE hContact, const char *name, DBVARIANT *result) {
+ return db_get_ws(hContact, m_szModuleName, name, result); }
+
+ __forceinline char* getStringA(const char *name) {
+ return db_get_sa(NULL, m_szModuleName, name); }
+ __forceinline char* getStringA(HANDLE hContact, const char *name) {
+ return db_get_sa(hContact, m_szModuleName, name); }
+
+ __forceinline WCHAR* getWStringA(const char *name) {
+ return db_get_wsa(NULL, m_szModuleName, name); }
+ __forceinline WCHAR* getWStringA(HANDLE hContact, const char *name) {
+ return db_get_wsa(hContact, m_szModuleName, name); }
+
+ __forceinline void setByte(const char *name, BYTE value) { db_set_b(NULL, m_szModuleName, name, value); }
+ __forceinline void setByte(HANDLE hContact, const char *name, BYTE value) { db_set_b(hContact, m_szModuleName, name, value); }
+
+ __forceinline void setWord(const char *name, WORD value) { db_set_w(NULL, m_szModuleName, name, value); }
+ __forceinline void setWord(HANDLE hContact, const char *name, WORD value) { db_set_w(hContact, m_szModuleName, name, value); }
+
+ __forceinline void setDword(const char *name, DWORD value) { db_set_dw(NULL, m_szModuleName, name, value); }
+ __forceinline void setDword(HANDLE hContact, const char *name, DWORD value) { db_set_dw(hContact, m_szModuleName, name, value); }
+
+ __forceinline void setString(const char *name, const char* value) { db_set_s(NULL, m_szModuleName, name, value); }
+ __forceinline void setString(HANDLE hContact, const char *name, const char* value) { db_set_s(hContact, m_szModuleName, name, value); }
+
+ __forceinline void setWString(const char *name, const WCHAR* value) { db_set_ws(NULL, m_szModuleName, name, value); }
+ __forceinline void setWString(HANDLE hContact, const char *name, const WCHAR* value) { db_set_ws(hContact, m_szModuleName, name, value); }
+
+ #if defined(_UNICODE)
+ #define getTString getWString
+ #define getTStringA getWStringA
+ #define setTString setWString
+ #else
+ #define getTString getString
+ #define getTStringA getStringA
+ #define setTString setString
+ #endif
//////////////////////////////////////////////////////////////////////////////////////
// Virtual functions
diff --git a/protocols/IcqOscarJ/icqoscar8_10.vcxproj b/protocols/IcqOscarJ/icqoscar8_10.vcxproj
index 15722e9ee4..5f2e6f2c8f 100644
--- a/protocols/IcqOscarJ/icqoscar8_10.vcxproj
+++ b/protocols/IcqOscarJ/icqoscar8_10.vcxproj
@@ -206,7 +206,6 @@
<ClInclude Include="src\icq_advsearch.h" />
<ClInclude Include="src\icq_avatar.h" />
<ClInclude Include="src\icq_constants.h" />
- <ClInclude Include="src\icq_db.h" />
<ClInclude Include="src\icq_direct.h" />
<ClInclude Include="src\icq_fieldnames.h" />
<ClInclude Include="src\icq_http.h" />
diff --git a/protocols/IcqOscarJ/icqoscar8_10.vcxproj.filters b/protocols/IcqOscarJ/icqoscar8_10.vcxproj.filters
index c91460a53f..af63692b9a 100644
--- a/protocols/IcqOscarJ/icqoscar8_10.vcxproj.filters
+++ b/protocols/IcqOscarJ/icqoscar8_10.vcxproj.filters
@@ -110,9 +110,6 @@
<ClInclude Include="src\changeinfo\changeinfo.h">
<Filter>Changeinfo</Filter>
</ClInclude>
- <ClInclude Include="src\icq_db.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resources.rc">
diff --git a/protocols/IcqOscarJ/icqoscar8_11.vcxproj b/protocols/IcqOscarJ/icqoscar8_11.vcxproj
index 128af1858f..dc1f2cd714 100644
--- a/protocols/IcqOscarJ/icqoscar8_11.vcxproj
+++ b/protocols/IcqOscarJ/icqoscar8_11.vcxproj
@@ -209,7 +209,6 @@
<ClInclude Include="src\icq_advsearch.h" />
<ClInclude Include="src\icq_avatar.h" />
<ClInclude Include="src\icq_constants.h" />
- <ClInclude Include="src\icq_db.h" />
<ClInclude Include="src\icq_direct.h" />
<ClInclude Include="src\icq_fieldnames.h" />
<ClInclude Include="src\icq_http.h" />
diff --git a/protocols/IcqOscarJ/icqoscar8_11.vcxproj.filters b/protocols/IcqOscarJ/icqoscar8_11.vcxproj.filters
index c91460a53f..af63692b9a 100644
--- a/protocols/IcqOscarJ/icqoscar8_11.vcxproj.filters
+++ b/protocols/IcqOscarJ/icqoscar8_11.vcxproj.filters
@@ -110,9 +110,6 @@
<ClInclude Include="src\changeinfo\changeinfo.h">
<Filter>Changeinfo</Filter>
</ClInclude>
- <ClInclude Include="src\icq_db.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="res\resources.rc">
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp
index d13cc23067..4058cf4649 100644
--- a/protocols/IcqOscarJ/src/icq_avatar.cpp
+++ b/protocols/IcqOscarJ/src/icq_avatar.cpp
@@ -1675,7 +1675,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, WORD wBufferLengt
{
TCHAR tmp[MAX_PATH * 2];
PathToRelativeT(tszImageFile, tmp);
- ppro->setSettingStringT(NULL, "AvatarFile", tmp);
+ ppro->setTString(NULL, "AvatarFile", tmp);
}
else
{ // contact's avatar set hash
diff --git a/protocols/IcqOscarJ/src/icq_db.h b/protocols/IcqOscarJ/src/icq_db.h
deleted file mode 100644
index 1a0266de74..0000000000
--- a/protocols/IcqOscarJ/src/icq_db.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// ---------------------------------------------------------------------------80
-// ICQ plugin for Miranda Instant Messenger
-// ________________________________________
-//
-// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
-// Copyright © 2001-2002 Jon Keating, Richard Hughes
-// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
-// Copyright © 2004-2010 Joe Kucera
-//
-// This program 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 2
-// of the License, or (at your option) any later version.
-//
-// This program 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 this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Describe me here please...
-//
-// -----------------------------------------------------------------------------
-#ifndef __ICQ_DB_H
-#define __ICQ_DB_H
-
-
-#ifdef _UNICODE
- #define getTString getSettingStringW
- #define setSettingStringT setTString
-#else
- #define getTString getString
- #define setSettingStringT setString
-#endif
-
-#endif /* __ICQ_DB_H */
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
index 40d6503022..8bd8195462 100644
--- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp
+++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp
@@ -598,7 +598,7 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM wParam, LPARAM lParam)
TCHAR tmp[MAX_PATH];
PathToRelativeT(tszMyFile, tmp);
- setSettingStringT(NULL, "AvatarFile", tmp);
+ setTString(NULL, "AvatarFile", tmp);
iRet = 0;
diff --git a/protocols/IcqOscarJ/src/icqoscar.h b/protocols/IcqOscarJ/src/icqoscar.h
index 1208d9524f..3699ed2d0d 100644
--- a/protocols/IcqOscarJ/src/icqoscar.h
+++ b/protocols/IcqOscarJ/src/icqoscar.h
@@ -98,7 +98,6 @@
#include "version.h"
#include "globals.h"
#include "i18n.h"
-#include "icq_db.h"
#include "cookies.h"
#include "icq_packet.h"
#include "utilities.h"
diff --git a/src/mir_core/mir_core.def b/src/mir_core/mir_core.def
index 1423a8a086..12960b2e08 100644
--- a/src/mir_core/mir_core.def
+++ b/src/mir_core/mir_core.def
@@ -174,27 +174,3 @@ ProtoHookEvent @171
ProtoCreateHookableEvent @172
ProtoForkThread @173
ProtoForkThreadEx @174
-ProtoGetBool0 @175
-ProtoGetBool @176
-ProtoGetByte0 @177
-ProtoGetByte @178
-ProtoGetDword0 @179
-ProtoGetDword @180
-ProtoGetString0 @181
-ProtoGetString @182
-ProtoGetTString0 @183
-ProtoGetTString @184
-ProtoGetWord0 @185
-ProtoGetWord @186
-ProtoGetStringA0 @187
-ProtoGetStringA @188
-ProtoSetByte0 @189
-ProtoSetByte @190
-ProtoSetWord0 @191
-ProtoSetWord @192
-ProtoSetDword0 @193
-ProtoSetDword @194
-ProtoSetString0 @195
-ProtoSetString @196
-ProtoSetTString0 @197
-ProtoSetTString @198
diff --git a/src/mir_core/protos.cpp b/src/mir_core/protos.cpp
index 8646deb338..098bf280d4 100644
--- a/src/mir_core/protos.cpp
+++ b/src/mir_core/protos.cpp
@@ -141,101 +141,3 @@ MIR_CORE_DLL(HANDLE) ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc p
UINT lthreadID;
return (HANDLE)::mir_forkthreadowner((pThreadFuncOwner) *(void**)&pFunc, pThis, param, threadID ? threadID : &lthreadID);
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-MIR_CORE_DLL(bool) ProtoGetBool0(PROTO_INTERFACE *pThis, const char* name, bool defaultValue)
-{ return db_get_b(NULL, pThis->m_szModuleName, name, defaultValue) != 0;
-}
-
-MIR_CORE_DLL(bool) ProtoGetBool(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, bool defaultValue)
-{ return db_get_b(hContact, pThis->m_szModuleName, name, defaultValue) != 0;
-}
-
-MIR_CORE_DLL(int) ProtoGetByte0(PROTO_INTERFACE *pThis, const char* name, BYTE defaultValue)
-{ return db_get_b(NULL, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(int) ProtoGetByte(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, BYTE defaultValue)
-{ return db_get_b(hContact, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(DWORD) ProtoGetDword0(PROTO_INTERFACE *pThis, const char* name, DWORD defaultValue)
-{ return db_get_dw(NULL, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(DWORD) ProtoGetDword(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DWORD defaultValue)
-{ return db_get_dw(hContact, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(int) ProtoGetString0(PROTO_INTERFACE *pThis, const char* name, DBVARIANT* result)
-{ return db_get_s(NULL, pThis->m_szModuleName, name, result);
-}
-
-MIR_CORE_DLL(int) ProtoGetString(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DBVARIANT* result)
-{ return db_get_s(hContact, pThis->m_szModuleName, name, result);
-}
-
-MIR_CORE_DLL(int) ProtoGetTString0(PROTO_INTERFACE *pThis, const char* name, DBVARIANT* result)
-{ return db_get_ts(NULL, pThis->m_szModuleName, name, result);
-}
-
-MIR_CORE_DLL(int) ProtoGetTString(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DBVARIANT* result)
-{ return db_get_ts(hContact, pThis->m_szModuleName, name, result);
-}
-
-MIR_CORE_DLL(WORD) ProtoGetWord0(PROTO_INTERFACE *pThis, const char* name, WORD defaultValue)
-{ return (WORD)db_get_w(NULL, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(WORD) ProtoGetWord(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, WORD defaultValue)
-{ return (WORD)db_get_w(hContact, pThis->m_szModuleName, name, defaultValue);
-}
-
-MIR_CORE_DLL(char*) ProtoGetStringA0(PROTO_INTERFACE *pThis, const char* setting)
-{ return db_get_sa(NULL, pThis->m_szModuleName, setting);
-}
-
-MIR_CORE_DLL(char*) ProtoGetStringA(PROTO_INTERFACE *pThis, HANDLE hContact, const char* setting)
-{ return db_get_sa(hContact, pThis->m_szModuleName, setting);
-}
-
-MIR_CORE_DLL(void) ProtoSetByte0(PROTO_INTERFACE *pThis, const char* name, BYTE value)
-{ db_set_b(NULL, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetByte(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, BYTE value)
-{ db_set_b(hContact, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetWord0(PROTO_INTERFACE *pThis, const char* name, WORD value)
-{ db_set_w(NULL, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetWord(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, WORD value)
-{ db_set_w(hContact, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetDword0(PROTO_INTERFACE *pThis, const char* name, DWORD value)
-{ db_set_dw(NULL, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetDword(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, DWORD value)
-{ db_set_dw(hContact, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetString0(PROTO_INTERFACE *pThis, const char* name, const char* value)
-{ db_set_s(NULL, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetString(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, const char* value)
-{ db_set_s(hContact, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetTString0(PROTO_INTERFACE *pThis, const char* name, const TCHAR* value)
-{ db_set_ts(NULL, pThis->m_szModuleName, name, value);
-}
-
-MIR_CORE_DLL(void) ProtoSetTString(PROTO_INTERFACE *pThis, HANDLE hContact, const char* name, const TCHAR* value)
-{ db_set_ts(hContact, pThis->m_szModuleName, name, value);
-}