diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-09 19:43:20 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-09 19:43:20 +0000 |
commit | 940231dc5a484b03a278900e1880aa083472b601 (patch) | |
tree | 65c5935e66e1cd86be3ed1f9d5fc41272972962c | |
parent | 8f20a72a0c38afd3a51be0af25fb5a3361ed99e7 (diff) |
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@4402 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/src/skype_account.cpp | 4 | ||||
-rw-r--r-- | protocols/Skype/src/skype_chat.cpp | 24 | ||||
-rw-r--r-- | protocols/Skype/src/skype_contacts.cpp | 14 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 12 | ||||
-rw-r--r-- | protocols/Skype/src/skype_events.cpp | 6 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.cpp | 10 | ||||
-rw-r--r-- | protocols/Skype/src/skype_settings.cpp | 24 | ||||
-rw-r--r-- | protocols/Skype/src/skype_utils.cpp | 2 |
8 files changed, 48 insertions, 48 deletions
diff --git a/protocols/Skype/src/skype_account.cpp b/protocols/Skype/src/skype_account.cpp index e4e2887481..3bbf06bab3 100644 --- a/protocols/Skype/src/skype_account.cpp +++ b/protocols/Skype/src/skype_account.cpp @@ -101,7 +101,7 @@ void __cdecl CSkypeProto::SignInAsync(void*) bool CSkypeProto::SignIn(int status)
{
- this->login = ::DBGetString(NULL, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
+ this->login = ::db_get_sa(NULL, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
if ( !this->login || !::strlen(this->login))
{
this->m_iStatus = ID_STATUS_OFFLINE;
@@ -119,7 +119,7 @@ bool CSkypeProto::SignIn(int status) ::mir_free(this->password);
this->password = NULL;
}
- this->password = ::DBGetString(NULL, this->m_szModuleName, SKYPE_SETTINGS_PASSWORD);
+ this->password = ::db_get_sa(NULL, this->m_szModuleName, SKYPE_SETTINGS_PASSWORD);
if ( !this->password || !::strlen(this->password))
{
if (this->password)
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index 8ca1abfa99..9f4979291d 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -22,7 +22,7 @@ char *CSkypeProto::Groups[] = bool CSkypeProto::IsChatRoom(HANDLE hContact)
{
- return ::DBGetContactSettingByte(hContact, this->m_szModuleName, "ChatRoom", 0) > 0;
+ return ::db_get_b(hContact, this->m_szModuleName, "ChatRoom", 0) > 0;
}
HANDLE CSkypeProto::GetChatRoomByID(const char *cid)
@@ -32,7 +32,7 @@ HANDLE CSkypeProto::GetChatRoomByID(const char *cid) {
if (this->IsProtoContact(hContact) && this->IsChatRoom(hContact))
{
- char *chatID = ::DBGetString(hContact, this->m_szModuleName, "ChatRoomID");
+ char *chatID = ::db_get_sa(hContact, this->m_szModuleName, "ChatRoomID");
if (chatID && ::strcmp(cid, chatID) == 0)
return hContact;
}
@@ -51,16 +51,16 @@ HANDLE CSkypeProto::AddChatRoomByID(const char* cid, const char* name, DWORD fla hContact = (HANDLE)::CallService(MS_DB_CONTACT_ADD, 0, 0);
::CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)this->m_szModuleName);
- ::DBWriteContactSettingByte(hContact, this->m_szModuleName, "ChatRoom", 1);
- ::DBWriteContactSettingString(hContact, this->m_szModuleName, "ChatRoomID", cid);
- ::DBWriteContactSettingString(hContact, this->m_szModuleName, "Nick", name);
- ::DBWriteContactSettingWord(hContact, this->m_szModuleName, "Status", ID_STATUS_OFFLINE);
- ::DBWriteContactSettingWord(hContact, this->m_szModuleName, "ApparentMode", ID_STATUS_OFFLINE);
+ ::db_set_b(hContact, this->m_szModuleName, "ChatRoom", 1);
+ ::db_set_s(hContact, this->m_szModuleName, "ChatRoomID", cid);
+ ::db_set_s(hContact, this->m_szModuleName, "Nick", name);
+ ::db_set_w(hContact, this->m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ ::db_set_w(hContact, this->m_szModuleName, "ApparentMode", ID_STATUS_OFFLINE);
- wchar_t *defaultGroup = ::DBGetStringW(NULL, "Chat", "AddToGroup");
+ wchar_t *defaultGroup = ::db_get_wsa(NULL, "Chat", "AddToGroup");
if (defaultGroup)
{
- ::DBWriteContactSettingWString(hContact, "CList", "Group", defaultGroup);
+ ::db_set_ws(hContact, "CList", "Group", defaultGroup);
}
}
@@ -127,7 +127,7 @@ void CSkypeProto::GetInviteContacts(HANDLE hItem, HWND hwndList, SEStringList &c }
else
{
- char *sid = ::DBGetString(hItem, this->m_szModuleName, "sid");
+ char *sid = ::db_get_sa(hItem, this->m_szModuleName, "sid");
if (sid) chatTargets.append(sid);
}
}
@@ -357,7 +357,7 @@ INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM) HANDLE hContact = (HANDLE)wParam;
if (hContact)
{
- this->JoinToChat(::DBGetString(hContact, this->m_szModuleName, "ChatRoomID"));
+ this->JoinToChat(::db_get_sa(hContact, this->m_szModuleName, "ChatRoomID"));
}
return 0;
@@ -368,7 +368,7 @@ INT_PTR __cdecl CSkypeProto::OnLeaveChat(WPARAM wParam, LPARAM) HANDLE hContact = (HANDLE)wParam;
if (hContact)
{
- char *cid = ::DBGetString(hContact, this->m_szModuleName, "ChatRoomID");
+ char *cid = ::db_get_sa(hContact, this->m_szModuleName, "ChatRoomID");
this->LeaveChat(cid);
::mir_free(cid);
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 2387a38fa2..acfa6a56e6 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -189,7 +189,7 @@ HANDLE CSkypeProto::GetContactBySid(const char *sid) {
if (this->IsProtoContact(hContact) && !this->IsChatRoom(hContact))
{
- char *contactSid = ::DBGetString(hContact, this->m_szModuleName, "sid");
+ char *contactSid = ::db_get_sa(hContact, this->m_szModuleName, "sid");
if (contactSid && ::strcmp(sid, contactSid) == 0)
return hContact;
}
@@ -227,8 +227,8 @@ HANDLE CSkypeProto::AddContactBySid(const char* sid, const char* nick, DWORD fla hContact = (HANDLE)::CallService(MS_DB_CONTACT_ADD, 0, 0);
::CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)this->m_szModuleName);
- ::DBWriteContactSettingString(hContact, this->m_szModuleName, "sid", sid);
- ::DBWriteContactSettingString(hContact, this->m_szModuleName, "Nick", nick);
+ ::db_set_s(hContact, this->m_szModuleName, "sid", sid);
+ ::db_set_s(hContact, this->m_szModuleName, "Nick", nick);
CContact::Ref contact;
if (this->skype->GetContact(sid, contact))
@@ -253,21 +253,21 @@ HANDLE CSkypeProto::AddContactBySid(const char* sid, const char* nick, DWORD fla else
{
this->SetSettingByte(hContact, "Auth", 1);
- ::DBDeleteContactSetting(hContact, this->m_szModuleName, "IsSkypeOut");
+ ::db_unset(hContact, this->m_szModuleName, "IsSkypeOut");
this->UpdateProfile(contact.fetch(), hContact);
if (flags & PALF_TEMPORARY)
{
- ::DBWriteContactSettingByte(hContact, "CList", "NotOnList", 1);
- ::DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);
+ ::db_set_b(hContact, "CList", "NotOnList", 1);
+ ::db_set_b(hContact, "CList", "Hidden", 1);
}
}
}
else
{
if ( !(flags & PALF_TEMPORARY))
- ::DBDeleteContactSetting(hContact, "CList", "NotOnList");
+ ::db_unset(hContact, "CList", "NotOnList");
}
return hContact;
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index e76034b5f6..3869441fc9 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -13,12 +13,12 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR proto = (CSkypeProto*)lParam;
::SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
{
- char *sid = ::DBGetString(NULL, proto->m_szModuleName, SKYPE_SETTINGS_LOGIN);
+ char *sid = ::db_get_sa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_LOGIN);
SetDlgItemTextA(hwnd, IDC_SL, sid);
::mir_free(sid);
}
{
- char *pwd = ::DBGetString(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD);
+ char *pwd = ::db_get_sa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD);
if (pwd)
{
@@ -137,13 +137,13 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR {
char data[128];
GetDlgItemTextA(hwnd, IDC_SL, data, SIZEOF(data));
- ::DBWriteContactSettingString(NULL, proto->m_szModuleName, "sid", data);
+ ::db_set_s(NULL, proto->m_szModuleName, "sid", data);
::mir_free(proto->login);
proto->login = ::mir_strdup(data);
GetDlgItemTextA(hwnd, IDC_PW, data, sizeof(data));
::CallService(MS_DB_CRYPT_ENCODESTRING, strlen(data), LPARAM((char*)data));
- ::DBWriteContactSettingString(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD, data);
+ ::db_set_s(NULL, proto->m_szModuleName, SKYPE_SETTINGS_PASSWORD, data);
HWND item = GetDlgItem(hwnd, IDC_PORT);
if (item)
@@ -578,7 +578,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP if (param->id)
{
HANDLE hContact = param->ppro->GetChatRoomByID(param->id);
- if (hContact && ::DBGetContactSettingWord(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ if (hContact && ::db_get_w(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
{
contacts = param->ppro->GetChatUsers(param->id);
}
@@ -594,7 +594,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP if (param->id)
{
HANDLE hContact = param->ppro->GetChatRoomByID(param->id);
- if (hContact && ::DBGetContactSettingWord(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ if (hContact && ::db_get_w(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
{
contacts = param->ppro->GetChatUsers(param->id);
}
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index ac29ab59e9..195b4b4696 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -35,7 +35,7 @@ int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam) {
if (this->IsChatRoom(hContact))
{
- char *chatID = ::DBGetString(hContact, this->m_szModuleName, "ChatRoomID");
+ char *chatID = ::db_get_sa(hContact, this->m_szModuleName, "ChatRoomID");
this->LeaveChat(chatID);
CConversation::Ref conversation;
@@ -89,7 +89,7 @@ void CSkypeProto::OnMessageSended(CConversation::Ref conversation, CMessage::Ref //this->SendChatMessage(cid, sid, ::mir_utf8decodeA(text));
- char *nick = (char *)::DBGetString(NULL, this->m_szModuleName, "Nick");
+ char *nick = (char *)::db_get_sa(NULL, this->m_szModuleName, "Nick");
if (::stricmp(nick, "") == 0)
{
nick = sid;
@@ -336,7 +336,7 @@ void CSkypeProto::OnMessage(CConversation::Ref conversation, CMessage::Ref messa char *cid = ::mir_strdup(data);
HANDLE hContact = this->GetChatRoomByID(cid);
- if ( !hContact || ::DBGetContactSettingWord(hContact, this->m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
+ if ( !hContact || ::db_get_w(hContact, this->m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
{
SEStringList empty;
this->StartChat(cid, empty);
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index 6b31760df7..3fc58b3cc2 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -274,12 +274,12 @@ HANDLE __cdecl CSkypeProto::SendFile( HANDLE hContact, const TCHAR* szDescriptio if (this->IsOnline() && hContact && ppszFiles)
{
SEStringList targets;
- char* sid = ::DBGetString(hContact, this->m_szModuleName, "sid");
+ char* sid = ::db_get_sa(hContact, this->m_szModuleName, "sid");
targets.append(sid);
CConversation::Ref conversation = CConversation::FindBySid(
this->skype,
- ::DBGetString(hContact, this->m_szModuleName, "sid"));
+ ::db_get_sa(hContact, this->m_szModuleName, "sid"));
conversation.fetch();
SEFilenameList fileList;
@@ -329,7 +329,7 @@ int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char* msg) CConversation::Ref conversation = CConversation::FindBySid(
this->skype,
- ::DBGetString(hContact, this->m_szModuleName, "sid"));
+ ::db_get_sa(hContact, this->m_szModuleName, "sid"));
if (conversation)
{
Message::Ref message;
@@ -417,11 +417,11 @@ int __cdecl CSkypeProto::UserIsTyping( HANDLE hContact, int type ) {
if (hContact && this->IsOnline() && this->m_iStatus != ID_STATUS_INVISIBLE)
{
- if (::strcmp(::DBGetString(hContact, this->m_szModuleName, "sid"), this->login) != 0)
+ if (::strcmp(::db_get_sa(hContact, this->m_szModuleName, "sid"), this->login) != 0)
{
CConversation::Ref conversation = CConversation::FindBySid(
this->skype,
- ::DBGetString(hContact, this->m_szModuleName, "sid"));
+ ::db_get_sa(hContact, this->m_szModuleName, "sid"));
if (conversation)
{
switch (type)
diff --git a/protocols/Skype/src/skype_settings.cpp b/protocols/Skype/src/skype_settings.cpp index 233867c510..4b4c7482c9 100644 --- a/protocols/Skype/src/skype_settings.cpp +++ b/protocols/Skype/src/skype_settings.cpp @@ -2,7 +2,7 @@ BYTE CSkypeProto::GetSettingByte(HANDLE hContact, const char *setting, BYTE errorValue)
{
- return ::DBGetContactSettingByte(hContact, this->m_szModuleName, setting, errorValue);
+ return ::db_get_b(hContact, this->m_szModuleName, setting, errorValue);
}
BYTE CSkypeProto::GetSettingByte(const char *setting, BYTE errorValue)
@@ -12,7 +12,7 @@ BYTE CSkypeProto::GetSettingByte(const char *setting, BYTE errorValue) WORD CSkypeProto::GetSettingWord(HANDLE hContact, const char *setting, WORD errorValue)
{
- return ::DBGetContactSettingWord(hContact, this->m_szModuleName, setting, errorValue);
+ return ::db_get_w(hContact, this->m_szModuleName, setting, errorValue);
}
WORD CSkypeProto::GetSettingWord(const char *setting, WORD errorValue)
@@ -22,7 +22,7 @@ WORD CSkypeProto::GetSettingWord(const char *setting, WORD errorValue) DWORD CSkypeProto::GetSettingDword(HANDLE hContact, const char *setting, DWORD errorValue)
{
- return ::DBGetContactSettingDword(hContact, this->m_szModuleName, setting, errorValue);
+ return ::db_get_dw(hContact, this->m_szModuleName, setting, errorValue);
}
DWORD CSkypeProto::GetSettingDword(const char *setting, DWORD errorValue)
@@ -35,10 +35,10 @@ wchar_t* CSkypeProto::GetSettingString(HANDLE hContact, const char *setting, wch DBVARIANT dbv = {0};
wchar_t* result = NULL;
- if ( !::DBGetContactSettingWString(hContact, this->m_szModuleName, setting, &dbv))
+ if ( !::db_get_ws(hContact, this->m_szModuleName, setting, &dbv))
{
result = ::mir_wstrdup(dbv.pwszVal);
- ::DBFreeVariant(&dbv);
+ ::db_free(&dbv);
}
else
{
@@ -58,10 +58,10 @@ char* CSkypeProto::GetDecodeSettingString(HANDLE hContact, const char *setting, DBVARIANT dbv = {0};
char* result = NULL;
- if ( !::DBGetContactSettingString(hContact, this->m_szModuleName, setting, &dbv))
+ if ( !::db_get_s(hContact, this->m_szModuleName, setting, &dbv))
{
result = ::mir_strdup(dbv.pszVal);
- ::DBFreeVariant(&dbv);
+ ::db_free(&dbv);
::CallService(
MS_DB_CRYPT_DECODESTRING,
@@ -77,7 +77,7 @@ char* CSkypeProto::GetDecodeSettingString(HANDLE hContact, const char *setting, bool CSkypeProto::SetSettingByte(HANDLE hContact, const char *setting, BYTE value)
{
- return !::DBWriteContactSettingByte(hContact, this->m_szModuleName, setting, value);
+ return !::db_set_b(hContact, this->m_szModuleName, setting, value);
}
bool CSkypeProto::SetSettingByte(const char *setting, BYTE errorValue)
@@ -87,7 +87,7 @@ bool CSkypeProto::SetSettingByte(const char *setting, BYTE errorValue) bool CSkypeProto::SetSettingWord(HANDLE hContact, const char *setting, WORD value)
{
- return !::DBWriteContactSettingWord(hContact, this->m_szModuleName, setting, value);
+ return !::db_set_w(hContact, this->m_szModuleName, setting, value);
}
bool CSkypeProto::SetSettingWord(const char *setting, WORD value)
@@ -97,7 +97,7 @@ bool CSkypeProto::SetSettingWord(const char *setting, WORD value) bool CSkypeProto::SetSettingDword(HANDLE hContact, const char *setting, DWORD value)
{
- return !::DBWriteContactSettingDword(hContact, this->m_szModuleName, setting, value);
+ return !::db_set_dw(hContact, this->m_szModuleName, setting, value);
}
bool CSkypeProto::SetSettingDword(const char *setting, DWORD value)
@@ -107,7 +107,7 @@ bool CSkypeProto::SetSettingDword(const char *setting, DWORD value) bool CSkypeProto::SetSettingString(HANDLE hContact, const char *szSetting, const wchar_t* value)
{
- return !::DBWriteContactSettingWString(hContact, this->m_szModuleName, szSetting, value);
+ return !::db_set_ws(hContact, this->m_szModuleName, szSetting, value);
}
bool CSkypeProto::SetSettingString(const char *szSetting, const wchar_t* value)
@@ -137,5 +137,5 @@ void CSkypeProto::DeleteSetting(const char *setting) void CSkypeProto::DeleteSetting(HANDLE hContact, const char *setting)
{
- ::DBDeleteContactSetting(hContact, this->m_szModuleName, setting);
+ ::db_unset(hContact, this->m_szModuleName, setting);
}
\ No newline at end of file diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index 66e334fbdd..03ddc08302 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -480,7 +480,7 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag {
if (::Miranda_Terminated()) return;
- if ( !::ServiceExists(MS_POPUP_ADDPOPUPT) || !::DBGetContactSettingByte(NULL, "PopUp", "ModuleIsEnabled", 1))
+ if ( !::ServiceExists(MS_POPUP_ADDPOPUPT) || !::db_get_b(NULL, "PopUp", "ModuleIsEnabled", 1))
::MessageBoxW(NULL, message, caption, MB_OK | flags);
else
{
|