diff options
author | George Hazan <george.hazan@gmail.com> | 2015-04-30 19:12:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-04-30 19:12:21 +0000 |
commit | 7e049d92bb13e8b6c67bc0c0c460c0c145545172 (patch) | |
tree | d5db0b8e0ed069ecbd98a4f94d3ea524d9a15f71 /protocols/Omegle/src | |
parent | 3cc290e219e05ce8d6cde0aa050e281301f010aa (diff) |
unified project for Omegle protocol
git-svn-id: http://svn.miranda-ng.org/main/trunk@13309 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src')
-rw-r--r-- | protocols/Omegle/src/chat.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/communication.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/connection.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/http.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/main.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/messages.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/process.cpp | 77 | ||||
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 16 | ||||
-rw-r--r-- | protocols/Omegle/src/stdafx.cxx (renamed from protocols/Omegle/src/stdafx.cpp) | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/stdafx.h (renamed from protocols/Omegle/src/common.h) | 0 | ||||
-rw-r--r-- | protocols/Omegle/src/theme.cpp | 2 | ||||
-rw-r--r-- | protocols/Omegle/src/utils.cpp | 2 |
13 files changed, 18 insertions, 95 deletions
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index 30f890858c..269c6d1731 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "common.h"
+#include "stdafx.h"
void OmegleProto::UpdateChat(const TCHAR *name, const TCHAR *message, bool addtolog)
{
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index d8b05df903..f6a027c5a4 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -19,7 +19,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "common.h"
+#include "stdafx.h"
http::response Omegle_client::flap( const int request_type, std::string* request_data, std::string* get_data )
{
diff --git a/protocols/Omegle/src/connection.cpp b/protocols/Omegle/src/connection.cpp index 0b94357f3a..12d8c3337c 100644 --- a/protocols/Omegle/src/connection.cpp +++ b/protocols/Omegle/src/connection.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
void OmegleProto::SignOn(void*)
{
diff --git a/protocols/Omegle/src/dialogs.cpp b/protocols/Omegle/src/dialogs.cpp index 727bd6254a..c2f13d2995 100644 --- a/protocols/Omegle/src/dialogs.cpp +++ b/protocols/Omegle/src/dialogs.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
static BOOL LoadDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting, BYTE bDef = 0)
{
diff --git a/protocols/Omegle/src/http.cpp b/protocols/Omegle/src/http.cpp index 01904cc8e7..3f42c3f67c 100644 --- a/protocols/Omegle/src/http.cpp +++ b/protocols/Omegle/src/http.cpp @@ -20,4 +20,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index 1e064b852a..bc4ce92aaf 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
// TODO: Make following as "globals" structure?
diff --git a/protocols/Omegle/src/messages.cpp b/protocols/Omegle/src/messages.cpp index 07aeef882c..893674de5b 100644 --- a/protocols/Omegle/src/messages.cpp +++ b/protocols/Omegle/src/messages.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
void OmegleProto::SendMsgWorker(void *p)
{
diff --git a/protocols/Omegle/src/process.cpp b/protocols/Omegle/src/process.cpp deleted file mode 100644 index 96c99db87f..0000000000 --- a/protocols/Omegle/src/process.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-15 Robert Pösel
-
-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, either version 2 of the License, or
-(at your option) any later version.
-
-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 <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "common.h"
-
-void OmegleProto::ProcessEvents( void* data )
-{
- if ( data == NULL )
- return;
-
- std::string* resp = (std::string*)data;
-
- if ( isOffline() )
- goto exit;
-
- LOG("***** Starting processing messages");
-
- CODE_BLOCK_TRY
-
- std::vector< Omegle_message* > messages;
-
- Omegle_json_parser* p = new Omegle_json_parser( this );
- p->parse_messages( data, &messages );
- delete p;
-
- for(std::vector<Omegle_message*>::size_type i=0; i<messages.size( ); i++)
- {
- LOG(" Got message: %s", messages[i]->message_text.c_str());
-
-/*
- PROTORECVEVENT recv = {};
- CCSDATA ccs = {};
-
- recv.flags = PREF_UTF;
- recv.szMessage = const_cast<char*>(messages[i]->message_text.c_str());
- recv.timestamp = static_cast<DWORD>(messages[i]->time);
-
- ccs.hContact = hContact;
- ccs.szProtoService = PSR_MESSAGE;
- ccs.wParam = ID_STATUS_ONLINE;
- ccs.lParam = reinterpret_cast<LPARAM>(&recv);
- CallService(MS_PROTO_CHAINRECV,0,reinterpret_cast<LPARAM>(&ccs));*/
-
- delete messages[i];
- }
- messages.clear();
-
- LOG("***** Messages processed");
-
- CODE_BLOCK_CATCH
-
- LOG("***** Error processing messages: %s", e.what());
-
- CODE_BLOCK_END
-
-exit:
- delete resp;
-}
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index ba156b0de6..d0ac1b3370 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) :
PROTO<OmegleProto>(proto_name, username)
@@ -78,7 +78,7 @@ OmegleProto::~OmegleProto( ) //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR OmegleProto::GetCaps( int type, MCONTACT hContact )
+DWORD_PTR OmegleProto::GetCaps(int type, MCONTACT)
{
switch(type) {
case PFLAGNUM_1:
@@ -160,13 +160,13 @@ int OmegleProto::OnEvent(PROTOEVENTTYPE event,WPARAM wParam,LPARAM lParam) //////////////////////////////////////////////////////////////////////////////
// EVENTS
-INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM wParam,LPARAM lParam)
+INT_PTR OmegleProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
{
return (INT_PTR)CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_OmegleACCOUNT),
- (HWND)lParam, OmegleAccountProc, (LPARAM)this );
+ (HWND)lParam, OmegleAccountProc, (LPARAM)this);
}
-int OmegleProto::OnModulesLoaded(WPARAM wParam,LPARAM lParam)
+int OmegleProto::OnModulesLoaded(WPARAM, LPARAM)
{
// Register group chat
GCREGISTER gcr = {sizeof(gcr)};
@@ -181,7 +181,7 @@ int OmegleProto::OnModulesLoaded(WPARAM wParam,LPARAM lParam) return 0;
}
-int OmegleProto::OnOptionsInit(WPARAM wParam,LPARAM lParam)
+int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = g_hInstance;
@@ -198,13 +198,13 @@ int OmegleProto::OnOptionsInit(WPARAM wParam,LPARAM lParam) return 0;
}
-int OmegleProto::OnPreShutdown(WPARAM wParam,LPARAM lParam)
+int OmegleProto::OnPreShutdown(WPARAM, LPARAM)
{
SetStatus( ID_STATUS_OFFLINE );
return 0;
}
-int OmegleProto::OnContactDeleted(WPARAM wparam,LPARAM)
+int OmegleProto::OnContactDeleted(WPARAM, LPARAM)
{
OnLeaveChat(NULL, NULL);
return 0;
diff --git a/protocols/Omegle/src/stdafx.cpp b/protocols/Omegle/src/stdafx.cxx index c5fe5abaad..6fb37564b7 100644 --- a/protocols/Omegle/src/stdafx.cpp +++ b/protocols/Omegle/src/stdafx.cxx @@ -15,4 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "common.h"
\ No newline at end of file +#include "stdafx.h"
\ No newline at end of file diff --git a/protocols/Omegle/src/common.h b/protocols/Omegle/src/stdafx.h index 3b6b8b66bb..3b6b8b66bb 100644 --- a/protocols/Omegle/src/common.h +++ b/protocols/Omegle/src/stdafx.h diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp index 8e34bc2397..145baf716c 100644 --- a/protocols/Omegle/src/theme.cpp +++ b/protocols/Omegle/src/theme.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
extern OBJLIST<OmegleProto> g_Instances;
diff --git a/protocols/Omegle/src/utils.cpp b/protocols/Omegle/src/utils.cpp index 9679f9f2ed..8e804585d5 100644 --- a/protocols/Omegle/src/utils.cpp +++ b/protocols/Omegle/src/utils.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "common.h"
+#include "stdafx.h"
std::string utils::url::encode(const std::string &s)
{
|