summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-04-28 11:10:32 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-04-28 11:10:32 +0000
commit8c69cf74023323e9ace7cf76494bd1a0990da160 (patch)
tree0c63b18e2940f98d430d34afd268cb992cca2060
parent6c7c1bdcfd6c306a900c92ea0c2eca75fc662052 (diff)
small cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@4558 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/Skype/src/skype_database.cpp28
-rw-r--r--protocols/Skype/src/skype_dialogs.cpp38
-rw-r--r--protocols/Skype/src/skype_proto.cpp24
3 files changed, 48 insertions, 42 deletions
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp
index c384611c7b..96d09f9447 100644
--- a/protocols/Skype/src/skype_database.cpp
+++ b/protocols/Skype/src/skype_database.cpp
@@ -1,6 +1,6 @@
#include "skype_proto.h"
-bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, const char* guid, int flag)
+bool CSkypeProto::IsMessageInDB(HANDLE hContact, DWORD timestamp, const char *guid, int flag)
{
bool result = false;
@@ -58,12 +58,12 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact)
SEString data;
contact->GetPropReceivedAuthrequest(data);
- char* reason = ::mir_strdup(data);
+ char *reason = ::mir_strdup(data);
SEString last;
contact->GetFullname(data, last);
- char* firstName = ::mir_strdup(data);
- char* lastName = ::mir_strdup(last);
+ char *firstName = ::mir_strdup(data);
+ char *lastName = ::mir_strdup(last);
HANDLE hContact = this->AddContact(contact);
@@ -80,13 +80,19 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact)
PBYTE pBlob, pCurBlob;
pCurBlob = pBlob = (PBYTE)::mir_alloc(cbBlob);
- *((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD);
- *((PDWORD)pCurBlob) = (DWORD)hContact; pCurBlob += sizeof(DWORD);
- ::strcpy((char*)pCurBlob, nick); pCurBlob += ::strlen(nick) + 1;
- ::strcpy((char*)pCurBlob, firstName); pCurBlob += ::strlen(firstName) + 1;
- ::strcpy((char*)pCurBlob, lastName); pCurBlob += ::strlen(lastName) + 1;
- ::strcpy((char*)pCurBlob, sid); pCurBlob += ::strlen(sid) + 1;
- ::strcpy((char*)pCurBlob, reason);
+ *((PDWORD)pCurBlob) = 0;
+ pCurBlob += sizeof(DWORD);
+ *((PDWORD)pCurBlob) = (DWORD)hContact;
+ pCurBlob += sizeof(DWORD);
+ ::strcpy((char *)pCurBlob, nick);
+ pCurBlob += ::strlen(nick) + 1;
+ ::strcpy((char *)pCurBlob, firstName);
+ pCurBlob += ::strlen(firstName) + 1;
+ ::strcpy((char *)pCurBlob, lastName);
+ pCurBlob += ::strlen(lastName) + 1;
+ ::strcpy((char *)pCurBlob, sid);
+ pCurBlob += ::strlen(sid) + 1;
+ ::strcpy((char *)pCurBlob, reason);
this->AddDBEvent(hContact, EVENTTYPE_AUTHREQUEST, time(NULL), PREF_UTF, cbBlob, pBlob);
}
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp
index a766fca74d..33a37f4d09 100644
--- a/protocols/Skype/src/skype_dialogs.cpp
+++ b/protocols/Skype/src/skype_dialogs.cpp
@@ -2,7 +2,7 @@
INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- CSkypeProto *proto = reinterpret_cast<CSkypeProto*>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
+ CSkypeProto *proto = reinterpret_cast<CSkypeProto *>(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
switch (message)
{
@@ -10,7 +10,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR
{
::TranslateDialogDefault(hwnd);
- proto = (CSkypeProto*)lParam;
+ proto = (CSkypeProto *)lParam;
::SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
{
wchar_t *sid = ::db_get_wsa(NULL, proto->m_szModuleName, SKYPE_SETTINGS_LOGIN);
@@ -197,7 +197,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeMainOptionsProc(HWND hwnd, UINT message, WPAR
INT_PTR CALLBACK CSkypeProto::SkypePasswordRequestProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- PasswordRequestBoxParam *param = reinterpret_cast<PasswordRequestBoxParam*>(::GetWindowLongPtr(hwndDlg, GWLP_USERDATA));
+ PasswordRequestBoxParam *param = reinterpret_cast<PasswordRequestBoxParam *>(::GetWindowLongPtr(hwndDlg, GWLP_USERDATA));
switch (msg)
{
@@ -269,7 +269,7 @@ bool CSkypeProto::RequestPassword(PasswordRequestBoxParam &param)
INT_PTR CALLBACK CSkypeProto::SkypePasswordChangeProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- PasswordChangeBoxParam *param = reinterpret_cast<PasswordChangeBoxParam*>(::GetWindowLongPtr(hwndDlg, GWLP_USERDATA));
+ PasswordChangeBoxParam *param = reinterpret_cast<PasswordChangeBoxParam *>(::GetWindowLongPtr(hwndDlg, GWLP_USERDATA));
switch (msg)
{
@@ -279,13 +279,13 @@ INT_PTR CALLBACK CSkypeProto::SkypePasswordChangeProc(HWND hwndDlg, UINT msg, WP
param = (PasswordChangeBoxParam *)lParam;
::SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
{
- ::SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)CSkypeProto::IconList[0].Handle);
- ::SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)CSkypeProto::IconList[0].Handle);
+ ::SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)CSkypeProto::IconList[0].Handle);
+ ::SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)CSkypeProto::IconList[0].Handle);
}
break;
case WM_CLOSE:
- EndDialog(hwndDlg, 0);
+ ::EndDialog(hwndDlg, 0);
break;
case WM_COMMAND:
@@ -343,22 +343,22 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_PARAMCHANGED:
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (( PSHNOTIFY* )lParam )->lParam );
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, ((PSHNOTIFY *)lParam )->lParam);
break;
case PSN_INFOCHANGED:
{
- CSkypeProto* ppro = (CSkypeProto*)::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ CSkypeProto *ppro = (CSkypeProto *)::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (!ppro)
break;
- char* szProto;
+ char *szProto;
HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL)
szProto = ppro->m_szModuleName;
else
- szProto = (char*)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ szProto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (!szProto)
break;
@@ -429,12 +429,12 @@ INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_PARAMCHANGED:
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (( PSHNOTIFY* )lParam )->lParam );
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, ((PSHNOTIFY *)lParam)->lParam);
break;
case PSN_INFOCHANGED:
{
- CSkypeProto* ppro = (CSkypeProto*)::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ CSkypeProto *ppro = (CSkypeProto *)::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (!ppro)
break;
@@ -524,7 +524,7 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
HANDLE hContact = (HANDLE)lParam;
if (hContact) {
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
odp.pfnDlgProc = SkypeDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_SKYPE);
@@ -550,7 +550,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- param = (InviteChatParam*)lParam;
+ param = (InviteChatParam *)lParam;
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CCLIST);
SetWindowLongPtr(hwndClist, GWL_STYLE, GetWindowLongPtr(hwndClist, GWL_STYLE) & ~CLS_HIDEOFFLINE);
@@ -560,7 +560,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP
break;
case WM_CLOSE:
- EndDialog(hwndDlg, 0);
+ ::EndDialog(hwndDlg, 0);
break;
case WM_NCDESTROY:
@@ -570,7 +570,7 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP
case WM_NOTIFY:
{
- NMCLISTCONTROL* nmc = (NMCLISTCONTROL*)lParam;
+ NMCLISTCONTROL *nmc = (NMCLISTCONTROL *)lParam;
if (nmc->hdr.idFrom == IDC_CCLIST)
{
switch (nmc->hdr.code)
@@ -669,14 +669,14 @@ INT_PTR CALLBACK CSkypeProto::InviteToChatProc(HWND hwndDlg, UINT msg, WPARAM wP
param->ppro->JoinToChat(conversation);
}
if (chatID)
- EndDialog(hwndDlg, IDOK);
+ ::EndDialog(hwndDlg, IDOK);
else
param->ppro->ShowNotification(TranslateT("You did not select any contact"));
}
break;
case IDCANCEL:
- EndDialog(hwndDlg, IDCANCEL);
+ ::EndDialog(hwndDlg, IDCANCEL);
break;
}
}
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index cb7fcdfb4d..9b5dd72dd3 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -302,11 +302,11 @@ int __cdecl CSkypeProto::RecvMsg(HANDLE hContact, PROTORECVEVENT* pre)
//return ::Proto_RecvMessage(hContact, pre);
}
-int __cdecl CSkypeProto::RecvUrl( HANDLE hContact, PROTORECVEVENT* ) { return 0; }
+int __cdecl CSkypeProto::RecvUrl(HANDLE hContact, PROTORECVEVENT *) { return 0; }
-int __cdecl CSkypeProto::SendContacts( HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList ) { return 0; }
+int __cdecl CSkypeProto::SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE *hContactsList) { return 0; }
-HANDLE __cdecl CSkypeProto::SendFile( HANDLE hContact, const TCHAR* szDescription, TCHAR** ppszFiles )
+HANDLE __cdecl CSkypeProto::SendFile(HANDLE hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
if (this->IsOnline() && hContact && ppszFiles)
{
@@ -345,10 +345,10 @@ HANDLE __cdecl CSkypeProto::SendFile( HANDLE hContact, const TCHAR* szDescriptio
return 0;
}
-int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char* msg)
+int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char *msg)
{
SEStringList targets;
- wchar_t * sid = ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
+ wchar_t *sid = ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_LOGIN);
SEString identity = ::mir_u2a(sid);
targets.append(identity);
@@ -367,9 +367,9 @@ int __cdecl CSkypeProto::SendMsg(HANDLE hContact, int flags, const char* msg)
return 0;
}
-int __cdecl CSkypeProto::SendUrl( HANDLE hContact, int flags, const char* url ) { return 0; }
+int __cdecl CSkypeProto::SendUrl(HANDLE hContact, int flags, const char *url) { return 0; }
-int __cdecl CSkypeProto::SetApparentMode( HANDLE hContact, int mode ) { return 0; }
+int __cdecl CSkypeProto::SetApparentMode(HANDLE hContact, int mode) { return 0; }
int CSkypeProto::SetStatus(int new_status)
{
@@ -408,11 +408,11 @@ int CSkypeProto::SetStatus(int new_status)
}
HANDLE __cdecl CSkypeProto::GetAwayMsg(HANDLE hContact) { return 0; }
-int __cdecl CSkypeProto::RecvAwayMsg( HANDLE hContact, int mode, PROTORECVEVENT* evt ) { return 0; }
-int __cdecl CSkypeProto::SendAwayMsg( HANDLE hContact, HANDLE hProcess, const char* msg ) { return 0; }
-int __cdecl CSkypeProto::SetAwayMsg( int m_iStatus, const TCHAR* msg ) { return 0; }
+int __cdecl CSkypeProto::RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT *evt) { return 0; }
+int __cdecl CSkypeProto::SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char *msg) { return 0; }
+int __cdecl CSkypeProto::SetAwayMsg(int m_iStatus, const TCHAR *msg) { return 0; }
-int __cdecl CSkypeProto::UserIsTyping( HANDLE hContact, int type )
+int __cdecl CSkypeProto::UserIsTyping(HANDLE hContact, int type)
{
if (hContact && this->IsOnline() && this->m_iStatus != ID_STATUS_INVISIBLE)
{
@@ -445,7 +445,7 @@ int __cdecl CSkypeProto::UserIsTyping( HANDLE hContact, int type )
return 1;
}
-int __cdecl CSkypeProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
+int __cdecl CSkypeProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
{
switch (eventType)
{