From 54b79c7733c3005937f5ad5cd68672c2397493fe Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 30 Apr 2015 19:26:10 +0000 Subject: unified project for SkypeWeb protocol git-svn-id: http://svn.miranda-ng.org/main/trunk@13310 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/common.h | 108 ----------------------- protocols/SkypeWeb/src/http_request.h | 2 +- protocols/SkypeWeb/src/main.cpp | 2 +- protocols/SkypeWeb/src/request_queue.cpp | 2 +- protocols/SkypeWeb/src/requests/avatars.h | 2 +- protocols/SkypeWeb/src/skype_accounts.cpp | 2 +- protocols/SkypeWeb/src/skype_avatars.cpp | 2 +- protocols/SkypeWeb/src/skype_chatrooms.cpp | 2 +- protocols/SkypeWeb/src/skype_contacts.cpp | 2 +- protocols/SkypeWeb/src/skype_history_sync.cpp | 2 +- protocols/SkypeWeb/src/skype_icons.cpp | 2 +- protocols/SkypeWeb/src/skype_login.cpp | 2 +- protocols/SkypeWeb/src/skype_menus.cpp | 2 +- protocols/SkypeWeb/src/skype_messages.cpp | 2 +- protocols/SkypeWeb/src/skype_options.cpp | 2 +- protocols/SkypeWeb/src/skype_poll_processing.cpp | 2 +- protocols/SkypeWeb/src/skype_polling.cpp | 2 +- protocols/SkypeWeb/src/skype_profile.cpp | 2 +- protocols/SkypeWeb/src/skype_proto.cpp | 2 +- protocols/SkypeWeb/src/skype_request.cpp | 2 +- protocols/SkypeWeb/src/skype_search.cpp | 2 +- protocols/SkypeWeb/src/skype_trouter.cpp | 8 +- protocols/SkypeWeb/src/skype_utils.cpp | 2 +- protocols/SkypeWeb/src/stdafx.cpp | 18 ---- protocols/SkypeWeb/src/stdafx.cxx | 18 ++++ protocols/SkypeWeb/src/stdafx.h | 108 +++++++++++++++++++++++ 26 files changed, 151 insertions(+), 151 deletions(-) delete mode 100644 protocols/SkypeWeb/src/common.h delete mode 100644 protocols/SkypeWeb/src/stdafx.cpp create mode 100644 protocols/SkypeWeb/src/stdafx.cxx create mode 100644 protocols/SkypeWeb/src/stdafx.h (limited to 'protocols/SkypeWeb/src') diff --git a/protocols/SkypeWeb/src/common.h b/protocols/SkypeWeb/src/common.h deleted file mode 100644 index 6306328ee8..0000000000 --- a/protocols/SkypeWeb/src/common.h +++ /dev/null @@ -1,108 +0,0 @@ -/* -Copyright (c) 2015 Miranda NG project (http://miranda-ng.org) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef _COMMON_H_ -#define _COMMON_H_ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct CSkypeProto; - -#define SKYPE_ENDPOINTS_HOST "client-s.gateway.messenger.live.com" - -#include "version.h" -#include "resource.h" -#include "skype_icons.h" -#include "skype_menus.h" -#include "skype_dialogs.h" -#include "skype_options.h" -#include "http_request.h" -#include "requests\login.h" -#include "requests\profile.h" -#include "requests\contacts.h" -#include "requests\status.h" -#include "requests\endpoint.h" -#include "requests\capabilities.h" -#include "requests\subscriptions.h" -#include "requests\messages.h" -#include "requests\history.h" -#include "requests\poll.h" -#include "requests\avatars.h" -#include "requests\search.h" -#include "requests\chatrooms.h" -#include "requests\trouter.h" -#include "request_queue.h" -#include "skype_proto.h" - -extern HINSTANCE g_hInstance; - -#define MODULE "Skype" - -#define SKYPE_MAX_CONNECT_RETRIES 10 - -enum SKYPE_LOGIN_ERROR -{ - LOGIN_ERROR_UNKNOWN = 1001 -}; - -#define SKYPE_SETTINGS_ID "Skypename" -#define SKYPE_SETTINGS_PASSWORD "Password" -#define SKYPE_SETTINGS_GROUP "DefaultGroup" - -#define POLLING_ERRORS_LIMIT 3 - -#define SKYPE_DB_EVENT_TYPE_ACTION 10001 -#define SKYPE_DB_EVENT_TYPE_INCOMING_CALL 10002 -#endif //_COMMON_H_ \ No newline at end of file diff --git a/protocols/SkypeWeb/src/http_request.h b/protocols/SkypeWeb/src/http_request.h index ccc4972db1..e5456f87d2 100644 --- a/protocols/SkypeWeb/src/http_request.h +++ b/protocols/SkypeWeb/src/http_request.h @@ -253,7 +253,7 @@ public: if (!pData) { pData = Body.ToString(); - dataLength = mir_strlen(pData); + dataLength = (int)mir_strlen(pData); } char message[1024]; diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 5bef640a73..99f2f760cc 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" int hLangpack; XML_API xi; diff --git a/protocols/SkypeWeb/src/request_queue.cpp b/protocols/SkypeWeb/src/request_queue.cpp index e932dc363d..bcf90f3753 100644 --- a/protocols/SkypeWeb/src/request_queue.cpp +++ b/protocols/SkypeWeb/src/request_queue.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" RequestQueue::RequestQueue(HANDLE hConnection) : hConnection(hConnection), requests(1) diff --git a/protocols/SkypeWeb/src/requests/avatars.h b/protocols/SkypeWeb/src/requests/avatars.h index ad1c805335..dd8f970dd4 100644 --- a/protocols/SkypeWeb/src/requests/avatars.h +++ b/protocols/SkypeWeb/src/requests/avatars.h @@ -39,7 +39,7 @@ public: pData = (char*)mir_alloc(dataSize); memcpy(pData, data, dataSize); - dataLength = dataSize; + dataLength = (int)dataSize; } ~SetAvatarRequest() diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp index 7a83a93d78..7396bbc867 100644 --- a/protocols/SkypeWeb/src/skype_accounts.cpp +++ b/protocols/SkypeWeb/src/skype_accounts.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" LIST CSkypeProto::Accounts(1, CSkypeProto::CompareAccounts); diff --git a/protocols/SkypeWeb/src/skype_avatars.cpp b/protocols/SkypeWeb/src/skype_avatars.cpp index d6383878ad..6a0fc56ba3 100644 --- a/protocols/SkypeWeb/src/skype_avatars.cpp +++ b/protocols/SkypeWeb/src/skype_avatars.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" INT_PTR CSkypeProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam) { diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 40b706f070..24d77aef8d 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" void CSkypeProto::InitGroupChatModule() { diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 8d0c4c4366..a7ee562812 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" WORD CSkypeProto::GetContactStatus(MCONTACT hContact) { diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp index 1ba6e40ac3..532fa85b15 100644 --- a/protocols/SkypeWeb/src/skype_history_sync.cpp +++ b/protocols/SkypeWeb/src/skype_history_sync.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" /* HISTORY SYNC */ diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp index 5ff4c0453f..41852bcd7f 100644 --- a/protocols/SkypeWeb/src/skype_icons.cpp +++ b/protocols/SkypeWeb/src/skype_icons.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" IconInfo CSkypeProto::Icons[] = { diff --git a/protocols/SkypeWeb/src/skype_login.cpp b/protocols/SkypeWeb/src/skype_login.cpp index 21c1ed02e8..2b07079633 100644 --- a/protocols/SkypeWeb/src/skype_login.cpp +++ b/protocols/SkypeWeb/src/skype_login.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" void CSkypeProto::OnLoginFirst(const NETLIBHTTPREQUEST *response) { diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp index b953444a38..e2817bd55e 100644 --- a/protocols/SkypeWeb/src/skype_menus.cpp +++ b/protocols/SkypeWeb/src/skype_menus.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" HGENMENU CSkypeProto::ContactMenuItems[CMI_MAX]; diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 26ce4c644b..a1f5605f9b 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" MEVENT CSkypeProto::GetMessageFromDb(MCONTACT hContact, const char *messageId, LONGLONG timestamp) { diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp index b10ddb11bb..13e506428e 100644 --- a/protocols/SkypeWeb/src/skype_options.cpp +++ b/protocols/SkypeWeb/src/skype_options.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" CSkypeOptionsMain::CSkypeOptionsMain(CSkypeProto *proto, int idDialog) : CSkypeDlgBase(proto, idDialog, false), diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp index 8c44e94cdd..488bf66668 100644 --- a/protocols/SkypeWeb/src/skype_poll_processing.cpp +++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" void CSkypeProto::ProcessEndpointPresenceRes(JSONNODE *node) { diff --git a/protocols/SkypeWeb/src/skype_polling.cpp b/protocols/SkypeWeb/src/skype_polling.cpp index 0c42d62d1c..5c069c06a4 100644 --- a/protocols/SkypeWeb/src/skype_polling.cpp +++ b/protocols/SkypeWeb/src/skype_polling.cpp @@ -14,7 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" void CSkypeProto::ParsePollData(JSONNODE *data) { diff --git a/protocols/SkypeWeb/src/skype_profile.cpp b/protocols/SkypeWeb/src/skype_profile.cpp index 942ec87abf..6bc0f40da6 100644 --- a/protocols/SkypeWeb/src/skype_profile.cpp +++ b/protocols/SkypeWeb/src/skype_profile.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" std::map CSkypeProto::languages; diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 40d900b17e..b11462fdd4 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" CSkypeProto::CSkypeProto(const char* protoName, const TCHAR* userName) : PROTO(protoName, userName), password(NULL) diff --git a/protocols/SkypeWeb/src/skype_request.cpp b/protocols/SkypeWeb/src/skype_request.cpp index c688906a5f..4607087e71 100644 --- a/protocols/SkypeWeb/src/skype_request.cpp +++ b/protocols/SkypeWeb/src/skype_request.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" class SkypeResponseDelegate { diff --git a/protocols/SkypeWeb/src/skype_search.cpp b/protocols/SkypeWeb/src/skype_search.cpp index 366a3d41fb..3b026e0292 100644 --- a/protocols/SkypeWeb/src/skype_search.cpp +++ b/protocols/SkypeWeb/src/skype_search.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" HANDLE CSkypeProto::SearchBasic(const PROTOCHAR* id) { diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 169b2962f4..c3233cd60e 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -14,7 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" void CSkypeProto::OnCreateTrouter(const NETLIBHTTPREQUEST *response) { @@ -75,7 +75,7 @@ void CSkypeProto::OnGetTrouter(const NETLIBHTTPREQUEST *response) SendRequest(new RegisterTrouterRequest(TokenSecret, ptrA(getStringA("Trouter_url")))); } -void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST *response) +void CSkypeProto::OnHealth(const NETLIBHTTPREQUEST*) { ptrA socketIo(getStringA("Trouter_socketio")); ptrA connId(getStringA("Trouter_connId")); @@ -181,14 +181,14 @@ void CSkypeProto::TRouterThread(void*) debugLogA(__FUNCTION__": leaving"); } -INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM wParam, LPARAM lParam) +INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM, LPARAM lParam) { CLISTEVENT *cle = (CLISTEVENT*)lParam; NotifyEventHooks(m_hCallHook, (WPARAM)cle->hContact, (LPARAM)0); return 0; } -INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact) +INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM, LPARAM hContact) { CLISTEVENT *cle = NULL; while ((cle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, 0))) diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index be519b015b..2e7fb8c491 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "common.h" +#include "stdafx.h" bool CSkypeProto::IsOnline() { diff --git a/protocols/SkypeWeb/src/stdafx.cpp b/protocols/SkypeWeb/src/stdafx.cpp deleted file mode 100644 index c5fe5abaad..0000000000 --- a/protocols/SkypeWeb/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "common.h" \ No newline at end of file diff --git a/protocols/SkypeWeb/src/stdafx.cxx b/protocols/SkypeWeb/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/protocols/SkypeWeb/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "stdafx.h" \ No newline at end of file diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h new file mode 100644 index 0000000000..6306328ee8 --- /dev/null +++ b/protocols/SkypeWeb/src/stdafx.h @@ -0,0 +1,108 @@ +/* +Copyright (c) 2015 Miranda NG project (http://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef _COMMON_H_ +#define _COMMON_H_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct CSkypeProto; + +#define SKYPE_ENDPOINTS_HOST "client-s.gateway.messenger.live.com" + +#include "version.h" +#include "resource.h" +#include "skype_icons.h" +#include "skype_menus.h" +#include "skype_dialogs.h" +#include "skype_options.h" +#include "http_request.h" +#include "requests\login.h" +#include "requests\profile.h" +#include "requests\contacts.h" +#include "requests\status.h" +#include "requests\endpoint.h" +#include "requests\capabilities.h" +#include "requests\subscriptions.h" +#include "requests\messages.h" +#include "requests\history.h" +#include "requests\poll.h" +#include "requests\avatars.h" +#include "requests\search.h" +#include "requests\chatrooms.h" +#include "requests\trouter.h" +#include "request_queue.h" +#include "skype_proto.h" + +extern HINSTANCE g_hInstance; + +#define MODULE "Skype" + +#define SKYPE_MAX_CONNECT_RETRIES 10 + +enum SKYPE_LOGIN_ERROR +{ + LOGIN_ERROR_UNKNOWN = 1001 +}; + +#define SKYPE_SETTINGS_ID "Skypename" +#define SKYPE_SETTINGS_PASSWORD "Password" +#define SKYPE_SETTINGS_GROUP "DefaultGroup" + +#define POLLING_ERRORS_LIMIT 3 + +#define SKYPE_DB_EVENT_TYPE_ACTION 10001 +#define SKYPE_DB_EVENT_TYPE_INCOMING_CALL 10002 +#endif //_COMMON_H_ \ No newline at end of file -- cgit v1.2.3