summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r--protocols/VKontakte/src/main.cpp2
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/vk_avatars.cpp2
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp13
-rw-r--r--protocols/VKontakte/src/vk_files.cpp12
-rw-r--r--protocols/VKontakte/src/vk_options.cpp4
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp34
-rw-r--r--protocols/VKontakte/src/vk_proto.h4
-rw-r--r--protocols/VKontakte/src/vk_search.cpp4
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp13
10 files changed, 44 insertions, 48 deletions
diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp
index 5715acede3..82dcb9634f 100644
--- a/protocols/VKontakte/src/main.cpp
+++ b/protocols/VKontakte/src/main.cpp
@@ -45,7 +45,7 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD, LPVOID)
return TRUE;
}
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
}
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 46538b9b7f..3525ce9692 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -103,13 +103,13 @@ JSONNODE* CVkProto::CheckJsonResponse(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST
if (pRoot == NULL)
return NULL;
- if (!CheckJsonResult(pReq, reply, pRoot))
+ if (!CheckJsonResult(pReq, pRoot))
return NULL;
return json_get(pRoot, "response");
}
-bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply, JSONNODE *pNode)
+bool CVkProto::CheckJsonResult(AsyncHttpRequest *pReq, JSONNODE *pNode)
{
debugLogA("CVkProto::CheckJsonResult");
if (pNode == NULL)
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp
index 264c4924f2..51b8538a1c 100644
--- a/protocols/VKontakte/src/vk_avatars.cpp
+++ b/protocols/VKontakte/src/vk_avatars.cpp
@@ -71,7 +71,7 @@ void CVkProto::ReloadAvatarInfo(MCONTACT hContact)
SvcGetAvatarInfo(0, (LPARAM)&AI);
}
-INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM wParam, LPARAM lParam)
+INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM, LPARAM lParam)
{
PROTO_AVATAR_INFORMATIONT* AI = (PROTO_AVATAR_INFORMATIONT*)lParam;
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 457f475218..cfeb76894f 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -229,7 +229,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
for (int j = 0; j < cc->m_msgs.getCount(); j++) {
CVkChatMessage &p = cc->m_msgs[j];
- AppendChatMessage(cc, p.m_mid, p.m_uid, p.m_date, p.m_tszBody, p.m_bHistory);
+ AppendChatMessage(cc, p.m_uid, p.m_date, p.m_tszBody, p.m_bHistory);
}
cc->m_msgs.destroy();
}
@@ -244,7 +244,6 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
return;
int mid = json_as_int(json_get(pMsg, "id"));
- int isOut = json_as_int(json_get(pMsg, "out"));
int uid = json_as_int(json_get(pMsg, "user_id"));
int msgTime = json_as_int(json_get(pMsg, "date"));
@@ -258,7 +257,7 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
tszBody = mir_tstrdup(CMString(tszBody) + GetAttachmentDescr(pAttachments));
if (cc->m_bHistoryRead)
- AppendChatMessage(cc, mid, uid, msgTime, tszBody, bIsHistory);
+ AppendChatMessage(cc, uid, msgTime, tszBody, bIsHistory);
else {
CVkChatMessage *cm = cc->m_msgs.find((CVkChatMessage *)&mid);
if (cm == NULL)
@@ -271,7 +270,7 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
}
}
-void CVkProto::AppendChatMessage(CVkChatInfo *cc, int mid, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory)
+void CVkProto::AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory)
{
debugLogA("CVkProto::AppendChatMessage2");
CVkChatUser *cu = cc->m_users.find((CVkChatUser*)&uid);
@@ -387,7 +386,7 @@ void CVkProto::OnSendChatMsg(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
debugLogA("CVkProto::OnSendChatMsg %d", reply->resultCode);
if (reply->resultCode == 200) {
JSONROOT pRoot;
- JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
+ CheckJsonResponse(pReq, reply, pRoot);
}
}
@@ -559,7 +558,6 @@ void CVkProto::KickFromChat(int chat_id, int user_id, JSONNODE* pMsg)
debugLogA("CVkProto::KickFromChat (%d)", user_id);
MCONTACT chatContact = FindChat(chat_id);
- bool off = false;
if (chatContact)
if (getBool(chatContact, "off", false))
return;
@@ -580,8 +578,7 @@ void CVkProto::KickFromChat(int chat_id, int user_id, JSONNODE* pMsg)
else
msg += TranslateT("(Unknown contact)");
}
- else
- AppendChatMessage(chat_id, pMsg, false);
+ else AppendChatMessage(chat_id, pMsg, false);
MsgPopup(hContact, msg, TranslateT("Chat"));
setByte(cc->m_hContact, "kicked", 1);
diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp
index 23c6c9451e..f20fc3760d 100644
--- a/protocols/VKontakte/src/vk_files.cpp
+++ b/protocols/VKontakte/src/vk_files.cpp
@@ -17,11 +17,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-HANDLE CVkProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR *path) { return NULL; }
-int CVkProto::FileCancel(MCONTACT hContact, HANDLE hTransfer) { return 1; }
-int CVkProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR *reason) { return 1; }
-int CVkProto::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR **filename) { return 1; }
-int CVkProto::RecvFile(MCONTACT hContact, PROTORECVFILET *) { return 1; }
+HANDLE CVkProto::FileAllow(MCONTACT, HANDLE, const PROTOCHAR*) { return NULL; }
+int CVkProto::FileCancel(MCONTACT, HANDLE) { return 1; }
+int CVkProto::FileDeny(MCONTACT, HANDLE, const PROTOCHAR*) { return 1; }
+int CVkProto::FileResume(HANDLE, int*, const PROTOCHAR**) { return 1; }
+int CVkProto::RecvFile(MCONTACT, PROTORECVFILET *) { return 1; }
CVkFileUploadParam::CVkFileUploadParam(MCONTACT _hContact, const PROTOCHAR* _desc, PROTOCHAR** _files) :
hContact(_hContact), filetype(typeInvalid), atr(NULL), fname(NULL), iErrorCode(0)
@@ -250,7 +250,7 @@ void CVkProto::OnReciveUpload(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
}
JSONROOT pRoot;
- JSONNODE *pResponse = CheckJsonResponse(pReq, reply, pRoot);
+ CheckJsonResponse(pReq, reply, pRoot);
CMString server = json_as_string(json_get(pRoot, "server"));
CMString hash = json_as_string(json_get(pRoot, "hash"));
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 4c7d01ac7a..380e3a5d3e 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -86,7 +86,7 @@ INT_PTR CALLBACK VKAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
return FALSE;
}
-INT_PTR CVkProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam)
+INT_PTR CVkProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
{
return (INT_PTR)CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ACCMGRUI), (HWND)lParam, VKAccountProc, (LPARAM)this);
}
@@ -338,7 +338,7 @@ INT_PTR CALLBACK CVkProto::OptionsAdvProc(HWND hwndDlg, UINT uMsg, WPARAM wParam
return FALSE;
}
-int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
+int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.hInstance = hInst;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 38a9e274bb..e5a1ec9c14 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -98,7 +98,7 @@ CVkProto::~CVkProto()
vk_Instances.remove(this);
}
-int CVkProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
+int CVkProto::OnModulesLoaded(WPARAM, LPARAM)
{
// Chats
GCREGISTER gcr = { sizeof(gcr) };
@@ -353,7 +353,7 @@ void CVkProto::MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTi
//////////////////////////////////////////////////////////////////////////////
-int CVkProto::OnPreShutdown(WPARAM wParam, LPARAM lParam)
+int CVkProto::OnPreShutdown(WPARAM, LPARAM)
{
debugLogA("CVkProto::OnPreShutdown");
@@ -364,7 +364,7 @@ int CVkProto::OnPreShutdown(WPARAM wParam, LPARAM lParam)
//////////////////////////////////////////////////////////////////////////////
-DWORD_PTR CVkProto::GetCaps(int type, MCONTACT hContact)
+DWORD_PTR CVkProto::GetCaps(int type, MCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -548,7 +548,7 @@ int CVkProto::OnEvent(PROTOEVENTTYPE event, WPARAM wParam, LPARAM lParam)
//////////////////////////////////////////////////////////////////////////////
-MCONTACT CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CVkProto::AddToList(int, PROTOSEARCHRESULT* psr)
{
debugLogA("CVkProto::AddToList");
@@ -566,7 +566,7 @@ int CVkProto::AuthRequest(MCONTACT hContact,const PROTOCHAR* message)
debugLogA("CVkProto::AuthRequest");
if (!IsOnline())
return 1;
- bool bIsFriend = getByte(hContact, "Auth", -1)==0;
+
LONG userID = getDword(hContact, "ID", -1);
if ((userID == -1) || !hContact)
return 1;
@@ -632,7 +632,7 @@ int CVkProto::Authorize(HANDLE hDbEvent)
return AuthRequest(hContact, NULL);
}
-int CVkProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason)
+int CVkProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR*)
{
debugLogA("CVkProto::AuthDeny");
if (!IsOnline())
@@ -664,17 +664,17 @@ int CVkProto::UserIsTyping(MCONTACT hContact, int type)
return 1;
}
-MCONTACT CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT CVkProto::AddToListByEvent(int, int, HANDLE)
{
return NULL;
}
-int CVkProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::AuthRecv(MCONTACT, PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::GetInfo(MCONTACT hContact, int infoType)
+int CVkProto::GetInfo(MCONTACT hContact, int)
{
debugLogA("CVkProto::GetInfo");
LONG userID = getDword(hContact, "ID", -1);
@@ -684,42 +684,42 @@ int CVkProto::GetInfo(MCONTACT hContact, int infoType)
return 0;
}
-int CVkProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::RecvContacts(MCONTACT, PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::RecvUrl(MCONTACT, PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
+int CVkProto::SendContacts(MCONTACT, int, int, MCONTACT*)
{
return 1;
}
-int CVkProto::SendUrl(MCONTACT hContact,int flags,const char *url)
+int CVkProto::SendUrl(MCONTACT, int, const char*)
{
return 1;
}
-int CVkProto::SetApparentMode(MCONTACT hContact,int mode)
+int CVkProto::SetApparentMode(MCONTACT, int)
{
return 1;
}
-int CVkProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int CVkProto::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*)
{
return 1;
}
-HANDLE CVkProto::GetAwayMsg(MCONTACT hContact)
+HANDLE CVkProto::GetAwayMsg(MCONTACT)
{
return 0; // Status messages are disabled
}
-int CVkProto::SetAwayMsg(int status, const PROTOCHAR *msg)
+int CVkProto::SetAwayMsg(int, const PROTOCHAR*)
{
return 0; // Status messages are disabled
}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 168de24f92..5c7be266a0 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -413,7 +413,7 @@ private:
bool RunCaptchaForm(LPCSTR szUrl, CMStringA&);
bool AutoFillForm(char*, CMStringA&, CMStringA&);
- bool CheckJsonResult(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply, JSONNODE*);
+ bool CheckJsonResult(AsyncHttpRequest *pReq, JSONNODE*);
JSONNODE* CheckJsonResponse(AsyncHttpRequest *pReq, NETLIBHTTPREQUEST *reply, JSONROOT&);
bool ApplyCaptcha(AsyncHttpRequest *pReq, JSONNODE*);
@@ -482,7 +482,7 @@ private:
OBJLIST<CVkChatInfo> m_chats;
CVkChatInfo* AppendChat(int id, JSONNODE *pNode);
void AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory);
- void AppendChatMessage(CVkChatInfo *cc, int mid, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory);
+ void AppendChatMessage(CVkChatInfo *cc, int uid, int msgTime, LPCTSTR ptszBody, bool bIsHistory);
void RetrieveChatInfo(CVkChatInfo*);
void OnReceiveChatInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnSendChatMsg(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
diff --git a/protocols/VKontakte/src/vk_search.cpp b/protocols/VKontakte/src/vk_search.cpp
index ee756ada51..13a77d8632 100644
--- a/protocols/VKontakte/src/vk_search.cpp
+++ b/protocols/VKontakte/src/vk_search.cpp
@@ -17,8 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-HWND CVkProto::SearchAdvanced(HWND owner) { return NULL; }
-HWND CVkProto::CreateExtendedSearchUI(HWND owner) { return NULL; }
+HWND CVkProto::SearchAdvanced(HWND) { return NULL; }
+HWND CVkProto::CreateExtendedSearchUI(HWND) { return NULL; }
HANDLE CVkProto::SearchBasic(const PROTOCHAR* id)
{
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 320efa0a6f..2bb05aa571 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -57,14 +57,13 @@ static VOID CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
}
}
-static void CALLBACK VKSetTimer(void *pObject)
+static void CALLBACK VKSetTimer(void*)
{
CVkProto::m_timer = SetTimer(NULL, 0, 60000, TimerProc);
}
-static void CALLBACK VKUnsetTimer(void *pObject)
+static void CALLBACK VKUnsetTimer(void*)
{
- CVkProto *ppro = (CVkProto*)pObject;
if (CVkProto::m_timer)
KillTimer(NULL, CVkProto::m_timer);
CVkProto::m_timer = 0;
@@ -452,7 +451,7 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (json_as_int(json_get(pResponse, "freeoffline")))
for (int i = 0; i < arContacts.getCount(); i++) {
hContact = (MCONTACT)arContacts[i];
- if (getDword(hContact, "ID", -1) == m_myUserId)
+ if (getDword(hContact, "ID", -1) == (DWORD)m_myUserId)
continue;
if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
setWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -727,7 +726,6 @@ void CVkProto::OnReceiveDlgs(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq)
MarkMessagesRead(hContact);
}
else if (numUnread) {
- int mid = json_as_int(json_get(pDlg, "id"));
int uid = json_as_int(json_get(pDlg, "user_id"));
MCONTACT hContact = FindUser(uid, true);
GetServerHistory(hContact, 0, numUnread, 0, 0, true);
@@ -920,7 +918,7 @@ int CVkProto::PollServer()
retVal = -1;
debugLogA("Polling key expired, restarting polling thread");
}
- else if (CheckJsonResult(NULL, reply, pRoot)) {
+ else if (CheckJsonResult(NULL, pRoot)) {
m_pollingTs = mir_t2a(ptrT(json_as_string(json_get(pRoot, "ts"))));
JSONNODE *pUpdates = json_get(pRoot, "updates");
if (pUpdates != NULL)
@@ -1040,11 +1038,12 @@ void CVkProto::RetrieveStatusMusic(const CMString &StatusMsg)
<< VER_API);
}
-INT_PTR __cdecl CVkProto::SvcSetListeningTo(WPARAM wParam, LPARAM lParam)
+INT_PTR __cdecl CVkProto::SvcSetListeningTo(WPARAM, LPARAM lParam)
{
debugLogA("CVkProto::SvcSetListeningTo");
if (m_iMusicSendMetod == sendNone)
return 1;
+
LISTENINGTOINFO *pliInfo = (LISTENINGTOINFO*)lParam;
CMStringW wszListeningTo;
if (pliInfo == NULL || pliInfo->cbSize != sizeof(LISTENINGTOINFO))