summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_std.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-09 22:02:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-09 22:02:18 +0000
commitd5d50b471277d5d69f59a8f29bf87201149ce191 (patch)
tree92d10ad5b0a1116ba08eca98cf025cb07578784e /protocols/JabberG/src/jabber_std.cpp
parent9dd56da9d9ccbce2f1e1539acb5cfcad7650916a (diff)
applied protocol helpers
git-svn-id: http://svn.miranda-ng.org/main/trunk@5305 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_std.cpp')
-rw-r--r--protocols/JabberG/src/jabber_std.cpp59
1 files changed, 4 insertions, 55 deletions
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp
index 4eff7b90c9..df45146891 100644
--- a/protocols/JabberG/src/jabber_std.cpp
+++ b/protocols/JabberG/src/jabber_std.cpp
@@ -30,16 +30,6 @@ void CJabberProto::JDeleteSetting(HANDLE hContact, const char* valueName)
db_unset(hContact, m_szModuleName, valueName);
}
-DWORD CJabberProto::JGetByte(HANDLE hContact, const char* valueName, int parDefltValue)
-{
- return db_get_b(hContact, m_szModuleName, valueName, parDefltValue);
-}
-
-DWORD CJabberProto::JGetDword(HANDLE hContact, const char* valueName, DWORD parDefltValue)
-{
- return db_get_dw(hContact, m_szModuleName, valueName, parDefltValue);
-}
-
int CJabberProto::JGetStaticString(const char* valueName, HANDLE hContact, char* dest, int dest_len)
{
DBVARIANT dbv;
@@ -62,15 +52,10 @@ int CJabberProto::JGetStringUtf(HANDLE hContact, char* valueName, DBVARIANT* dbv
return db_get_utf(hContact, m_szModuleName, valueName, dbv);
}
-int CJabberProto::JGetStringT(HANDLE hContact, char* valueName, DBVARIANT* dbv)
-{
- return db_get_ts(hContact, m_szModuleName, valueName, dbv);
-}
-
TCHAR *CJabberProto::JGetStringT(HANDLE hContact, char* valueName)
{
DBVARIANT dbv = {0};
- if (JGetStringT(hContact, valueName, &dbv))
+ if (getTString(hContact, valueName, &dbv))
return NULL;
TCHAR *res = mir_tstrdup(dbv.ptszVal);
@@ -86,7 +71,7 @@ TCHAR *CJabberProto::JGetStringT(HANDLE hContact, char* valueName, TCHAR *&out)
TCHAR *CJabberProto::JGetStringT(HANDLE hContact, char* valueName, TCHAR *buf, int size)
{
DBVARIANT dbv = {0};
- if (JGetStringT(hContact, valueName, &dbv))
+ if (getTString(hContact, valueName, &dbv))
return NULL;
lstrcpyn(buf, dbv.ptszVal, size);
@@ -94,53 +79,17 @@ TCHAR *CJabberProto::JGetStringT(HANDLE hContact, char* valueName, TCHAR *buf, i
return buf;
}
-WORD CJabberProto::JGetWord(HANDLE hContact, const char* valueName, int parDefltValue)
-{
- return db_get_w(hContact, m_szModuleName, valueName, parDefltValue);
-}
-
void CJabberProto::JLoginFailed(int errorCode)
{
*m_savedPassword = 0;
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, errorCode);
}
-/*
-DWORD CJabberProto::JSetByte(const char* valueName, int parValue)
-{
- return db_set_b(NULL, m_szModuleName, valueName, parValue);
-}
-*/
-DWORD CJabberProto::JSetByte(HANDLE hContact, const char* valueName, int parValue)
-{
- return db_set_b(hContact, m_szModuleName, valueName, parValue);
-}
-
-DWORD CJabberProto::JSetDword(HANDLE hContact, const char* valueName, DWORD parValue)
-{
- return db_set_dw(hContact, m_szModuleName, valueName, parValue);
-}
-
-DWORD CJabberProto::JSetString(HANDLE hContact, const char* valueName, const char* parValue)
-{
- return db_set_s(hContact, m_szModuleName, valueName, parValue);
-}
-
-DWORD CJabberProto::JSetStringT(HANDLE hContact, const char* valueName, const TCHAR *parValue)
-{
- return db_set_ts(hContact, m_szModuleName, valueName, parValue);
-}
-
DWORD CJabberProto::JSetStringUtf(HANDLE hContact, const char* valueName, const char* parValue)
{
return db_set_utf(hContact, m_szModuleName, valueName, parValue);
}
-DWORD CJabberProto::JSetWord(HANDLE hContact, const char* valueName, int parValue)
-{
- return db_set_w(hContact, m_szModuleName, valueName, parValue);
-}
-
// save/load crypted strings
void __forceinline sttCryptString(char *str)
{
@@ -166,7 +115,7 @@ DWORD CJabberProto::JSetStringCrypt(HANDLE hContact, char *valueName, const TCHA
{
char *tmp = mir_utf8encodeT(parValue);
sttCryptString(tmp);
- DWORD res = JSetString(hContact, valueName, tmp);
+ setString(hContact, valueName, tmp);
mir_free(tmp);
- return res;
+ return 0;
}