summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-06-23 12:32:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-06-23 12:32:12 +0000
commit8788bb35e10ef5403a08388d33ed4ab2ff7d67df (patch)
treeb79e5efbfb02418b1276442a59e7722252cf39c8 /protocols/IcqOscarJ
parent05ccb4dcd0b507fb000426667ed3f25c0b93db2b (diff)
new helper applied instead of MS_DB_SETSETTINGRESIDENT
git-svn-id: http://svn.miranda-ng.org/main/trunk@5094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ')
-rw-r--r--protocols/IcqOscarJ/src/icq_db.cpp10
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp20
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h1
3 files changed, 10 insertions, 21 deletions
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp
index ed45b307db..65899ae703 100644
--- a/protocols/IcqOscarJ/src/icq_db.cpp
+++ b/protocols/IcqOscarJ/src/icq_db.cpp
@@ -29,16 +29,6 @@
// -----------------------------------------------------------------------------
#include "icqoscar.h"
-void CIcqProto::CreateResidentSetting(const char *szSetting)
-{
- char pszSetting[2*MAX_PATH];
-
- strcpy(pszSetting, m_szModuleName);
- strcat(pszSetting, "/");
- strcat(pszSetting, szSetting);
- CallService(MS_DB_SETSETTINGRESIDENT, 1, (WPARAM)pszSetting);
-}
-
int CIcqProto::getSetting(HANDLE hContact, const char *szSetting, DBVARIANT *dbv)
{
return db_get_s(hContact, m_szModuleName, szSetting, dbv, 0);
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index 9d388548ba..95ba89e838 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -111,16 +111,16 @@ CIcqProto::CIcqProto( const char* aProtoName, const TCHAR* aUserName ) :
m_avatarsMutex = new icq_critical_section();
// Initialize temporary DB settings
- CreateResidentSetting("Status"); // NOTE: XStatus cannot be temporary
- CreateResidentSetting("TemporaryVisible");
- CreateResidentSetting("TickTS");
- CreateResidentSetting("IdleTS");
- CreateResidentSetting("AwayTS");
- CreateResidentSetting("LogonTS");
- CreateResidentSetting("DCStatus");
- CreateResidentSetting("CapBuf"); //capabilities bufer
- CreateResidentSetting(DBSETTING_STATUS_NOTE_TIME);
- CreateResidentSetting(DBSETTING_STATUS_MOOD);
+ db_set_resident(m_szModuleName, "Status"); // NOTE: XStatus cannot be temporary
+ db_set_resident(m_szModuleName, "TemporaryVisible");
+ db_set_resident(m_szModuleName, "TickTS");
+ db_set_resident(m_szModuleName, "IdleTS");
+ db_set_resident(m_szModuleName, "AwayTS");
+ db_set_resident(m_szModuleName, "LogonTS");
+ db_set_resident(m_szModuleName, "DCStatus");
+ db_set_resident(m_szModuleName, "CapBuf"); //capabilities bufer
+ db_set_resident(m_szModuleName, DBSETTING_STATUS_NOTE_TIME);
+ db_set_resident(m_szModuleName, DBSETTING_STATUS_MOOD);
// Setup services
CreateProtoService(PS_CREATEACCMGRUI, &CIcqProto::OnCreateAccMgrUI );
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index a7f7ce8994..024a2eb1ab 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -430,7 +430,6 @@ struct CIcqProto : public PROTO_INTERFACE
//----| icq_db.cpp |------------------------------------------------------------------
HANDLE AddEvent(HANDLE hContact, WORD wType, DWORD dwTime, DWORD flags, DWORD cbBlob, PBYTE pBlob);
- void CreateResidentSetting(const char* szSetting);
HANDLE FindFirstContact();
HANDLE FindNextContact(HANDLE hContact);
int IsICQContact(HANDLE hContact);