From 1f8d655dc9a8d09a06f638b3417f44b5e2c75e85 Mon Sep 17 00:00:00 2001 From: Alexander Gluzsky Date: Mon, 15 Oct 2012 03:50:19 +0000 Subject: Skype protocol ported (untested) git-svn-id: http://svn.miranda-ng.org/main/trunk@1943 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/!NotAdopted/Skype/Skype_protocol.sln | 6 +- plugins/!NotAdopted/Skype/Skype_protocol.vcxproj | 1205 ++++++++++++++++++++++ plugins/!NotAdopted/Skype/contacts.c | 18 +- plugins/!NotAdopted/Skype/gchat.c | 6 +- plugins/!NotAdopted/Skype/pthread.c | 27 +- plugins/!NotAdopted/Skype/pthread.h | 1 - plugins/!NotAdopted/Skype/skype.c | 103 +- plugins/!NotAdopted/Skype/skype.h | 33 +- plugins/!NotAdopted/Skype/skypeapi.c | 6 +- plugins/!NotAdopted/Skype/skypeopt.c | 16 +- plugins/!NotAdopted/Skype/voiceservice.c | 4 +- plugins/!NotAdopted/Skype/voiceservice.h | 2 +- 12 files changed, 1317 insertions(+), 110 deletions(-) mode change 100644 => 100755 plugins/!NotAdopted/Skype/Skype_protocol.sln create mode 100755 plugins/!NotAdopted/Skype/Skype_protocol.vcxproj mode change 100644 => 100755 plugins/!NotAdopted/Skype/contacts.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/gchat.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/pthread.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/pthread.h mode change 100644 => 100755 plugins/!NotAdopted/Skype/skype.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/skype.h mode change 100644 => 100755 plugins/!NotAdopted/Skype/skypeapi.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/skypeopt.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/voiceservice.c mode change 100644 => 100755 plugins/!NotAdopted/Skype/voiceservice.h (limited to 'plugins/!NotAdopted') diff --git a/plugins/!NotAdopted/Skype/Skype_protocol.sln b/plugins/!NotAdopted/Skype/Skype_protocol.sln old mode 100644 new mode 100755 index 0ea2547268..8f21435114 --- a/plugins/!NotAdopted/Skype/Skype_protocol.sln +++ b/plugins/!NotAdopted/Skype/Skype_protocol.sln @@ -1,7 +1,7 @@  -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Skype_protocol", "Skype_protocol.vcproj", "{5F9243AE-C6C9-4F42-B670-67A97767A50B}" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Skype_protocol", "Skype_protocol.vcxproj", "{5F9243AE-C6C9-4F42-B670-67A97767A50B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/plugins/!NotAdopted/Skype/Skype_protocol.vcxproj b/plugins/!NotAdopted/Skype/Skype_protocol.vcxproj new file mode 100755 index 0000000000..14d658a357 --- /dev/null +++ b/plugins/!NotAdopted/Skype/Skype_protocol.vcxproj @@ -0,0 +1,1205 @@ + + + + + ANSI Debug + Win32 + + + ANSI Debug + x64 + + + ANSI Release + Win32 + + + ANSI Release + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + x64 Debug + Win32 + + + x64 Debug + x64 + + + x64 Release + Win32 + + + x64 Release + x64 + + + + {5F9243AE-C6C9-4F42-B670-67A97767A50B} + Skype_protocol + + + + DynamicLibrary + false + MultiByte + true + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + Unicode + true + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + true + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + true + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + true + + + DynamicLibrary + false + Unicode + + + DynamicLibrary + false + Unicode + true + + + DynamicLibrary + false + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + $(Configuration)\ + $(Configuration)\ + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + $(Configuration)\ + $(Configuration)\ + false + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + false + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Disabled + _USE_32BIT_TIME_T;WIN32;_DEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + EditAndContinue + CompileAsC + X:\install\git\miranda\miranda_ng_svn\plugins\ExternalAPI;X:\install\git\miranda\miranda_ng_svn\include;%(AdditionalIncludeDirectories) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;mir_core.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX86 + X:\install\git\miranda\miranda_ng_svn\bin10\lib;%(AdditionalLibraryDirectories) + + + true + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + ProgramDatabase + CompileAsC + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX64 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Full + AnySuitable + true + Speed + true + true + _USE_32BIT_TIME_T;WIN32;NDEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX86 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Full + AnySuitable + true + Speed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX64 + + + true + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Disabled + _WIN64;_DEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + + + Level4 + true + EditAndContinue + CompileAsC + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX86 + + + true + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Disabled + _WIN64;_DEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + ProgramDatabase + CompileAsC + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX64 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Full + AnySuitable + true + Speed + true + true + _WIN64;NDEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX86 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Full + AnySuitable + true + Speed + true + true + _WIN64;NDEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX64 + + + true + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Disabled + _USE_32BIT_TIME_T;WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + EditAndContinue + CompileAsC + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX86 + + + true + + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + EnableFastChecks + MultiThreadedDebug + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + ProgramDatabase + CompileAsC + + + _DEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + true + $(OutDir)Skype.pdb + false + + + + + MachineX64 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + + + + + + + Full + AnySuitable + true + Speed + true + true + _USE_32BIT_TIME_T;WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX86 + + + true + + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + + + + + + + Full + AnySuitable + true + Speed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;SKYPE_PROTOCOL_EXPORTS;UNICODE;_UNICODE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + + + MultiThreaded + false + false + + + + + $(IntDir) + $(IntDir)vc90.pdb + Level4 + true + CompileAsC + + + NDEBUG;%(PreprocessorDefinitions) + 0x0000 + + + wsock32.lib;comctl32.lib;%(AdditionalDependencies) + $(OutDir)skype.dll + true + + + true + true + + + + + + + MachineX64 + + + true + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/plugins/!NotAdopted/Skype/contacts.c b/plugins/!NotAdopted/Skype/contacts.c old mode 100644 new mode 100755 index 45df24821f..bdd6571cc4 --- a/plugins/!NotAdopted/Skype/contacts.c +++ b/plugins/!NotAdopted/Skype/contacts.c @@ -158,26 +158,27 @@ HANDLE add_contextmenu(HANDLE hContact) { if (!HasVoiceService()) { mi=CallItem(); - hMenuCallItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + hMenuCallItem=Menu_AddContactMenuItem(&mi); + mi=HupItem(); - hMenuCallHangup=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM)&mi); + hMenuCallHangup=Menu_AddContactMenuItem(&mi); } mi=SkypeOutCallItem(); - hMenuSkypeOutCallItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + hMenuSkypeOutCallItem=Menu_AddContactMenuItem(&mi); if (!HasVoiceService()) { mi=HoldCallItem(); - hMenuHoldCallItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + hMenuHoldCallItem=Menu_AddContactMenuItem(&mi); } // We cannot use flag PF1_FILESEND for sending files, as Skype opens its own // sendfile-Dialog. mi=FileTransferItem(); - hMenuFileTransferItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + hMenuFileTransferItem=Menu_AddContactMenuItem(&mi); mi=ChatInitItem(); - hMenuChatInitItem=(HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + hMenuChatInitItem=Menu_AddContactMenuItem(&mi); ZeroMemory(&mi,sizeof(mi)); @@ -188,7 +189,7 @@ HANDLE add_contextmenu(HANDLE hContact) { mi.pszContactOwner=SKYPE_PROTONAME; mi.ptszName=LPGENT("Import Skype history"); mi.pszService=SKYPE_IMPORTHISTORY; - return (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM, 0,(LPARAM)&mi); + return Menu_AddContactMenuItem(&mi); } HANDLE add_mainmenu(void) { @@ -201,8 +202,7 @@ HANDLE add_mainmenu(void) { mi.pszContactOwner=SKYPE_PROTONAME; mi.ptszName=LPGENT("Add Skype contact"); mi.pszService=SKYPE_ADDUSER; - return (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM, (WPARAM)NULL,(LPARAM)&mi); - + return Menu_AddMainMenuItem(&mi); } int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { diff --git a/plugins/!NotAdopted/Skype/gchat.c b/plugins/!NotAdopted/Skype/gchat.c old mode 100644 new mode 100755 index 282e7834e2..bd3d2bb785 --- a/plugins/!NotAdopted/Skype/gchat.c +++ b/plugins/!NotAdopted/Skype/gchat.c @@ -151,7 +151,7 @@ static int AddChatContact(gchat_contacts *gc, char *who, TCHAR *pszRole) { gc->mJoinedCount++; } } - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); free_nonutf_tchar_string (twho); return i; } @@ -306,7 +306,7 @@ int __cdecl AddMembers(char *szSkypeMsg) { gce.ptszUID = gc->mJoinedContacts[i].who; CallService(MS_GC_EVENT, 0, (LPARAM)&gce); if (ci.pszVal) { - miranda_sys_free (ci.pszVal); + mir_free (ci.pszVal); ci.pszVal=NULL; } } @@ -585,7 +585,7 @@ static void KickUser (HANDLE hContact, GCHOOK *gch) RemChatContact (GetChat(gcd.ptszID), gch->ptszUID); DBFreeVariant(&dbv); } - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); } free (ptr); } diff --git a/plugins/!NotAdopted/Skype/pthread.c b/plugins/!NotAdopted/Skype/pthread.c old mode 100644 new mode 100755 index f9944257c2..95271125e8 --- a/plugins/!NotAdopted/Skype/pthread.c +++ b/plugins/!NotAdopted/Skype/pthread.c @@ -14,22 +14,22 @@ * and for answering some of my questions during development of this plugin. */ -#include "skype.h" +//#include "skype.h" /* Gena01 - added some defined to fix compilation with mingw gcc */ /* __try/__finally taken from abiword patch found on the web */ -#if 0 - #include -#else -#define __try -#define __except(x) if (0) /* don't execute handler */ -#define __finally - -#define _try __try -#define _except __except -#define _finally __finally -#endif +//#if 0 +// #include +///#else +//#define __try +//#define __except(x) if (0) /* don't execute handler */ +//#define __finally +//#define _try __try +//#define _except __except +//#define _finally __finally +//#endif +/* #include struct pthread_arg @@ -44,6 +44,7 @@ void pthread_r(struct pthread_arg *fa) void (*callercode) (void *) = fa->threadcode; void *arg = fa->arg; CallService(MS_SYSTEM_THREAD_PUSH, 0, 0); + Miranda_Terminated SetEvent(fa->hEvent); __try { callercode(arg); @@ -67,4 +68,4 @@ unsigned long pthread_create(pThreadFunc parFunc, void *arg) CloseHandle(fa.hEvent); return rc; } - +*/ diff --git a/plugins/!NotAdopted/Skype/pthread.h b/plugins/!NotAdopted/Skype/pthread.h old mode 100644 new mode 100755 index 1c9f3e3924..b8b6eb615e --- a/plugins/!NotAdopted/Skype/pthread.h +++ b/plugins/!NotAdopted/Skype/pthread.h @@ -16,7 +16,6 @@ #ifndef PTHREAD_H #define PTHREAD_H -unsigned long pthread_create(void (*threadcode) (void *), void *arg); typedef CRITICAL_SECTION pthread_mutex_t; #define pthread_mutex_init(pmutex) InitializeCriticalSection(pmutex) #define pthread_mutex_destroy(pmutex) DeleteCriticalSection(pmutex) diff --git a/plugins/!NotAdopted/Skype/skype.c b/plugins/!NotAdopted/Skype/skype.c old mode 100644 new mode 100755 index f229c5a6c3..11a78cceb4 --- a/plugins/!NotAdopted/Skype/skype.c +++ b/plugins/!NotAdopted/Skype/skype.c @@ -39,8 +39,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning (disable: 4706) // assignment within conditional expression -struct MM_INTERFACE mmi; - POPUPDATAT MessagePopup; // Exported Globals @@ -62,7 +60,6 @@ int hLangpack = 0; CRITICAL_SECTION RingAndEndcallMutex, QueryThreadMutex, TimeMutex; // Module Internal Globals -PLUGINLINK *pluginLink; HANDLE MessagePumpReady; HANDLE hChatEvent=NULL, hChatMenu=NULL; HANDLE hEvInitChat=NULL, hBuddyAdded=NULL; @@ -173,7 +170,6 @@ PLUGININFOEX pluginInfo = { "© 2004-2011 leecher - tweety", "http://developer.berlios.de/projects/mgoodies/", UNICODE_AWARE, - 0, //doesn't replace anything built-in { 0xa71f8335, 0x7b87, 0x4432, { 0xb8, 0xa3, 0x81, 0x47, 0x94, 0x31, 0xc6, 0xf5 } } // {A71F8335-7B87-4432-B8A3-81479431C6F5} }; @@ -189,7 +185,7 @@ void RegisterToDbeditorpp(void) CallService("DBEditorpp/RegisterSingleModule", (WPARAM)SKYPE_PROTONAME, 0); } -void RegisterToUpdate(void) +/*void RegisterToUpdate(void) { //Use for the Updater plugin if(ServiceExists(MS_UPDATE_REGISTER)) @@ -212,7 +208,7 @@ void RegisterToUpdate(void) update.szUpdateURL = update.szBetaUpdateURL; // FIXME!! update.szVersionURL = update.szBetaVersionURL; // FIXME update.pbVersionPrefix = update.pbBetaVersionPrefix; //FIXME -#else /* _WIN64 */ +#else #ifdef _UNICODE update.szBetaUpdateURL = "http://dose.0wnz.at/miranda/Skype/Skype_protocol_unicode.zip"; #else @@ -237,7 +233,7 @@ void RegisterToUpdate(void) CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update); } -} +}*/ /* * ShowMessage @@ -439,7 +435,8 @@ void BasicSearchThread(char *nick) { if (strncmp(cmd, "ERROR", 5)) { psr.cbSize=sizeof(psr); for (token=strtok_r(cmd+5, ", ", &nextoken); token; token=strtok_r(NULL, ", ", &nextoken)) { - psr.nick=psr.id=token; + TCHAR *t = mir_utf8decodeT(token), *_ptr = NULL; + psr.nick=psr.id=t; psr.lastName=NULL; psr.firstName=NULL; psr.email=NULL; @@ -447,16 +444,19 @@ void BasicSearchThread(char *nick) { // We cannot use strtok() to seperate first & last name here, // because we already use it for parsing the user list // So we use our own function - if (psr.lastName=strchr(ptr, ' ')) { + _ptr = mir_utf8decodeT(ptr); + if (psr.lastName=_tcschr(_ptr, ' ')) { *psr.lastName=0; psr.lastName++; LOG(("BasicSearchThread: lastName=%s", psr.lastName)); } - psr.firstName=ptr; + psr.firstName=_ptr; LOG(("BasicSearchThread: firstName=%s", psr.firstName)); } ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)hSearchThread, (LPARAM)(PROTOSEARCHRESULT*)&psr); if (ptr) free(ptr); + if(t) mir_free(t); + if(_ptr) mir_free(_ptr); } } else { OUT(cmd); @@ -858,7 +858,7 @@ void FirstLaunch(char *dummy) { LOG(("CheckIfApiIsResponding: Testing for PONG")); testfor("PONG", 2000); // Flush PONG from MsgQueue - pthread_create(( pThreadFunc )SkypeSystemInit, NULL); + forkthread(( pThreadFunc )SkypeSystemInit, 0, NULL); LOG (("FirstLaunch thread terminated gracefully.")); } @@ -889,7 +889,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { logoff_contacts(FALSE); HookEventsLoaded(); - RegisterToUpdate(); + //RegisterToUpdate(); RegisterToDbeditorpp(); VoiceServiceModulesLoaded(); GCInit(); @@ -939,7 +939,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { CreateDirectoryA(DefaultAvatarsFolder, NULL); } - pthread_create(( pThreadFunc )FirstLaunch, NULL); + forkthread(( pThreadFunc )FirstLaunch, 0, NULL); return 0; } @@ -1029,7 +1029,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { CallService(MS_GC_EVENT, 0, (LPARAM)&gce); RemChatContact (GetChat(gcd.ptszID), gce.ptszUID); free_nonutf_tchar_string((void*)gce.ptszStatus); - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); } free_nonutf_tchar_string((void*)gce.ptszUID); } @@ -1065,7 +1065,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { ci.hContact = find_contact(who); if (ci.hContact && !CallService(MS_CONTACT_GETCONTACTINFO,0,(LPARAM)&ci)) { gce.ptszText=_tcsdup(ci.pszVal); - miranda_sys_free (ci.pszVal); + mir_free (ci.pszVal); ci.pszVal = NULL; } else gce.ptszText=make_tchar_string((const unsigned char*)who); @@ -1087,7 +1087,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free (pszRole); } free((void*)gce.ptszText); - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); } free_nonutf_tchar_string((void*)gce.ptszUID); } @@ -1124,7 +1124,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free (ptr); } free_nonutf_tchar_string ((void*)gce.ptszUID); - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); } free_nonutf_tchar_string((void*)gcd.ptszID); if (!args.bDontMarkSeen) @@ -1172,7 +1172,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { CallServiceSync(MS_GC_EVENT, 0, (LPARAM)&gce); free_nonutf_tchar_string((void*)gce.ptszUID); - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); } if (gce.ptszText) free ((void*)gce.ptszText); } @@ -1279,7 +1279,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { #else utf8_encode (ci.pszVal, &pszUTFnick); #endif - miranda_sys_free (ci.pszVal); + mir_free (ci.pszVal); } } newlen = strlen(msgptr) + (pszUTFnick?strlen(pszUTFnick):0) + 9; @@ -1360,7 +1360,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { gce.dwFlags = GCEF_ADDTOLOG | GC_TCHAR; CallService(MS_GC_EVENT, 0, (LPARAM)&gce); MsgList_Add (pre.lParam, INVALID_HANDLE_VALUE); // Mark as groupchat - if (ci.pszVal) miranda_sys_free (ci.pszVal); + if (ci.pszVal) mir_free (ci.pszVal); free_nonutf_tchar_string((void*)gce.ptszUID); free_nonutf_tchar_string(gcd.ptszID); @@ -1826,7 +1826,7 @@ void LaunchSkypeAndSetStatusThread(void *newStatus) { ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus); if (ConnectToSkypeAPI(skype_path, 1)!=-1) { - pthread_create(( pThreadFunc )SkypeSystemInit, NULL); + forkthread(( pThreadFunc )SkypeSystemInit, 0, NULL); //InterlockedExchange((long *)&SkypeStatus, (int)newStatus); //ProtoBroadcastAck(SKYPE_PROTONAME, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, SkypeStatus); SetUserStatus(); @@ -1880,7 +1880,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (sstat!=ID_STATUS_CONNECTING && (oldstatus==ID_STATUS_OFFLINE || oldstatus==ID_STATUS_CONNECTING)) { SkypeInitialized=FALSE; - pthread_create(( pThreadFunc )SkypeSystemInit, NULL); + forkthread(( pThreadFunc )SkypeSystemInit, 0, NULL); } if (DBGetContactSettingByte(NULL, SKYPE_PROTONAME, "KeepState", 0)) RestoreUserStatus=TRUE; } @@ -1902,7 +1902,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) #ifdef SKYPEBUG_OFFLN if ((oldstatus==ID_STATUS_OFFLINE || oldstatus==ID_STATUS_CONNECTING) && SkypeStatus!=ID_STATUS_CONNECTING && SkypeStatus!=ID_STATUS_OFFLINE) - pthread_create(( pThreadFunc )SearchFriendsThread, NULL); + forkthread(( pThreadFunc )SearchFriendsThread, 0, NULL); #endif } #ifdef SKYPEBUG_OFFLN @@ -1960,7 +1960,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (strcmp(ptr, "BUDDYSTATUS")) { if (!strcmp(ptr, "RECEIVEDAUTHREQUEST")) { - pthread_create(( pThreadFunc )SearchUsersWaitingMyAuthorization, NULL); + forkthread(( pThreadFunc )SearchUsersWaitingMyAuthorization, 0, NULL); free (buf); break; } @@ -1978,7 +1978,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if((WORD)SkypeStatusToMiranda(ptr+13) != ID_STATUS_OFFLINE) { LOG(("WndProc Status is not offline so get user info")); - pthread_create(GetInfoThread, hContact); + forkthread(GetInfoThread, 0, hContact); } } } @@ -2169,7 +2169,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) { DBWriteContactSettingString(NULL, SKYPE_PROTONAME, SKYPE_NAME, szSkypeMsg+18); DBWriteContactSettingString(NULL, SKYPE_PROTONAME, "Nick", szSkypeMsg+18); - pthread_create(( pThreadFunc )GetDisplaynameThread, NULL); + forkthread(( pThreadFunc )GetDisplaynameThread, 0, NULL); } if (dbv.pszVal) DBFreeVariant(&dbv); } @@ -2187,7 +2187,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) { if (strncmp(ptr, " MEMBERS", 8) == 0) { LOG(("WndProc AddMembers")); - pthread_create(( pThreadFunc )AddMembersThread, _strdup(szSkypeMsg)); + forkthread(( pThreadFunc )AddMembersThread, 0, _strdup(szSkypeMsg)); } else if (strncmp(ptr, " FRIENDLYNAME ", 14) == 0) { // Chat session name @@ -2220,7 +2220,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) *ptr=' '; } else if (strncmp(ptr, " CHATMESSAGES ", 14) == 0) { - pthread_create(( pThreadFunc )MessageListProcessingThread, _strdup(ptr+14)); + forkthread(( pThreadFunc )MessageListProcessingThread, 0, _strdup(ptr+14)); break; } } @@ -2232,14 +2232,14 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) // context menu if (ptr=strstr(szSkypeMsg, " STATUS ")) { ptr[0]=0; ptr+=8; - if (!strcmp(ptr, "RINGING") || !strcmp(ptr, "ROUTING")) pthread_create(( pThreadFunc )RingThread, _strdup(szSkypeMsg)); + if (!strcmp(ptr, "RINGING") || !strcmp(ptr, "ROUTING")) forkthread(( pThreadFunc )RingThread, 0, _strdup(szSkypeMsg)); if (!strcmp(ptr, "FAILED") || !strcmp(ptr, "FINISHED") || !strcmp(ptr, "MISSED") || !strcmp(ptr, "REFUSED") || !strcmp(ptr, "BUSY") || !strcmp(ptr, "CANCELLED")) - pthread_create(( pThreadFunc )EndCallThread, _strdup(szSkypeMsg)); + forkthread(( pThreadFunc )EndCallThread, 0, _strdup(szSkypeMsg)); if (!strcmp(ptr, "ONHOLD") || !strcmp(ptr, "LOCALHOLD") || - !strcmp(ptr, "REMOTEHOLD")) pthread_create(( pThreadFunc )HoldCallThread, _strdup(szSkypeMsg)); - if (!strcmp(ptr, "INPROGRESS")) pthread_create(( pThreadFunc )ResumeCallThread, _strdup(szSkypeMsg)); + !strcmp(ptr, "REMOTEHOLD")) forkthread(( pThreadFunc )HoldCallThread, 0, _strdup(szSkypeMsg)); + if (!strcmp(ptr, "INPROGRESS")) forkthread(( pThreadFunc )ResumeCallThread, 0, _strdup(szSkypeMsg)); break; } else if ((!strstr(szSkypeMsg, "PARTNER_HANDLE") && !strstr(szSkypeMsg, "FROM_HANDLE")) && !strstr(szSkypeMsg, "TYPE")) break; @@ -2257,7 +2257,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) mi.pszContactOwner=SKYPE_PROTONAME; mi.pszName=Translate("Do a SkypeOut-call"); mi.pszService=SKYPEOUT_CALL; - CallService(MS_CLIST_ADDMAINMENUITEM, (WPARAM)NULL,(LPARAM)&mi); + Menu_AddMainMenuItem(&mi); } } else { @@ -2277,7 +2277,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) break; } LOG(("MessageListProcessingThread launched")); - pthread_create(( pThreadFunc )MessageListProcessingThread, _strdup(strchr(szSkypeMsg, ' ')+1)); + forkthread(( pThreadFunc )MessageListProcessingThread, 0, _strdup(strchr(szSkypeMsg, ' ')+1)); break; } if (!strncmp(szSkypeMsg, "MESSAGE", 7) || !strncmp(szSkypeMsg, "CHATMESSAGE", 11)) @@ -2305,7 +2305,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) strncpy (args->msgnum, pMsgNum, sizeof(args->msgnum)); args->getstatus=FALSE; //args->bIsRead = strncmp(ptr+8, "READ", 4) == 0; - pthread_create(( pThreadFunc )FetchMessageThreadSync, args); + forkthread(( pThreadFunc )FetchMessageThreadSync, 0, args); break; } } @@ -2455,7 +2455,7 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam) } else if (AttachStatus==-1) { - pthread_create(LaunchSkypeAndSetStatusThread, (void *)wParam); + forkthread(LaunchSkypeAndSetStatusThread, 0, (void *)wParam); return 0; } @@ -2493,7 +2493,7 @@ INT_PTR SkypeGetAwayMessage(WPARAM wParam,LPARAM lParam) UNREFERENCED_PARAMETER(wParam); - pthread_create( SkypeGetAwayMessageThread, ccs->hContact ); + forkthread( SkypeGetAwayMessageThread, 0, ccs->hContact ); return 1; } @@ -2664,7 +2664,7 @@ INT_PTR SkypeGetAvatarInfo(WPARAM wParam,LPARAM lParam) if (wParam & GAIF_FORCE) { // Request anyway - pthread_create(RetrieveUserAvatar, (void *) AI->hContact); + forkthread(RetrieveUserAvatar, 0, (void *) AI->hContact); return GAIR_WAITFOR; } @@ -2753,17 +2753,22 @@ INT_PTR SkypeGetInfo(WPARAM wParam,LPARAM lParam) { UNREFERENCED_PARAMETER(wParam); - pthread_create(GetInfoThread, ccs->hContact); + forkthread(GetInfoThread, 0, ccs->hContact); return 0; } INT_PTR SkypeAddToList(WPARAM wParam, LPARAM lParam) { PROTOSEARCHRESULT *psr=(PROTOSEARCHRESULT*)lParam; + char *name = NULL; + HANDLE ret = INVALID_HANDLE_VALUE; LOG(("SkypeAddToList Adding API function called")); if (psr->cbSize!=sizeof(PROTOSEARCHRESULT) || !psr->nick) return 0; LOG(("SkypeAddToList OK")); - return (INT_PTR)add_contact(psr->nick, wParam); + name = mir_utf8encodeT(psr->nick); + ret = add_contact(name, wParam); + mir_free(name); + return (INT_PTR)ret; } INT_PTR SkypeBasicSearch(WPARAM wParam, LPARAM lParam) { @@ -2771,7 +2776,7 @@ INT_PTR SkypeBasicSearch(WPARAM wParam, LPARAM lParam) { LOG(("SkypeBasicSearch %s", (char *)lParam)); if (!SkypeInitialized) return 0; - return (hSearchThread=pthread_create(( pThreadFunc )BasicSearchThread, _strdup((char *)lParam))); + return (hSearchThread=forkthread(( pThreadFunc )BasicSearchThread, 0, _strdup((char *)lParam))); } void MessageSendWatchThread(msgsendwt_arg *arg) { @@ -2845,7 +2850,7 @@ INT_PTR SkypeSendMessage(WPARAM wParam, LPARAM lParam) { if (psendarg) { psendarg->hContact = ccs->hContact; strcpy (psendarg->szId, szId); - pthread_create(MessageSendWatchThread, psendarg); + forkthread(MessageSendWatchThread, 0, psendarg); } else InterlockedDecrement (&sendwatchers); return 1; } else InterlockedDecrement (&sendwatchers); @@ -3238,12 +3243,12 @@ void __cdecl MsgPump (char *dummy) // DLL Stuff // -__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirVersion) +__declspec(dllexport) PLUGININFOEX* MirandaPluginInfo(DWORD mirVersion) { mirandaVersion = mirVersion; - pluginInfo.cbSize = sizeof(PLUGININFO); - return (PLUGININFO*) &pluginInfo; + pluginInfo.cbSize = sizeof(PLUGININFOEX); + return (PLUGININFOEX*) &pluginInfo; } __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirVersion) @@ -3278,7 +3283,7 @@ int PreShutdown(WPARAM wParam, LPARAM lParam) { return 0; } -int __declspec(dllexport) Load(PLUGINLINK *link) +int __declspec(dllexport) Load() { PROTOCOLDESCRIPTOR pd; DWORD Buffsize; @@ -3288,9 +3293,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link) WSADATA wsaData; char path[MAX_PATH]; - pluginLink = link; - mir_getMMI( &mmi ); - //mir_getLP(&pluginInfo); + mir_getLP(&pluginInfo); GetModuleFileNameA( hInst, path, sizeof( path )); _splitpath (path, NULL, NULL, SKYPE_PROTONAME, NULL); @@ -3399,7 +3402,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link) HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); // Startup Message-pump - pthread_create (( pThreadFunc )MsgPump, NULL); + forkthread (( pThreadFunc )MsgPump, 0, NULL); WaitForSingleObject(MessagePumpReady, INFINITE); return 0; } diff --git a/plugins/!NotAdopted/Skype/skype.h b/plugins/!NotAdopted/Skype/skype.h old mode 100644 new mode 100755 index 6439a24dc8..c34e26909a --- a/plugins/!NotAdopted/Skype/skype.h +++ b/plugins/!NotAdopted/Skype/skype.h @@ -25,23 +25,22 @@ #pragma warning (disable: 4100) // unreferenced formal parameter // Miranda Includes -#include "../../include/newpluginapi.h" -#include "../../include/m_utils.h" -#include "../../include/m_protosvc.h" -#include "../../include/m_protomod.h" -#include "../../include/m_skin.h" -#include "../../include/m_message.h" -#include "../../include/m_database.h" -#include "../../include/m_clist.h" -#include "../../include/m_system.h" -#include "sdk/m_updater.h" -#include "sdk/m_folders.h" -#include "../../include/m_options.h" -#include "../../include/m_langpack.h" -#include "../../include/m_userinfo.h" -#include "../../include/m_avatars.h" -#include "../../include/m_contacts.h" -#include "../../include/m_popup.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #pragma warning (pop) diff --git a/plugins/!NotAdopted/Skype/skypeapi.c b/plugins/!NotAdopted/Skype/skypeapi.c old mode 100644 new mode 100755 index e26be6e6d2..c6b0cef91a --- a/plugins/!NotAdopted/Skype/skypeapi.c +++ b/plugins/!NotAdopted/Skype/skypeapi.c @@ -29,7 +29,7 @@ extern HANDLE SkypeReady, SkypeMsgReceived, httbButton; extern UINT ControlAPIAttach, ControlAPIDiscover; extern LONG AttachStatus; extern HINSTANCE hInst; -extern PLUGININFO pluginInfo; +extern PLUGININFOEX pluginInfo; extern HANDLE hProtocolAvatarsFolder, hHookSkypeApiRcv; extern char DefaultAvatarsFolder[MAX_PATH+1], *pszProxyCallout, protocol, g_szProtoName[]; @@ -176,7 +176,7 @@ void sendThread(char *dummy) { } // Reconnect to Skype ResetEvent(SkypeReady); - pthread_create(LaunchSkypeAndSetStatusThread, (void *)ID_STATUS_ONLINE); + forkthread(LaunchSkypeAndSetStatusThread, 0, (void *)ID_STATUS_ONLINE); WaitForSingleObject (SkypeReady, 10000); // SendMessageTimeout(HWND_BROADCAST, ControlAPIDiscover, (WPARAM)g_hWnd, 0, SMTO_ABORTIFHUNG, 3000, NULL); } @@ -927,7 +927,7 @@ INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam) { if (wParam && !DBGetContactSettingString((HANDLE)wParam, SKYPE_PROTONAME, "CallId", &dbv)) { res=SkypeSend("SET %s STATUS FINISHED", dbv.pszVal); - pthread_create(( pThreadFunc )SkypeOutCallErrorCheck, _strdup(dbv.pszVal)); + forkthread(( pThreadFunc )SkypeOutCallErrorCheck, 0, _strdup(dbv.pszVal)); DBFreeVariant(&dbv); } else if (!CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_DIAL), NULL, DialDlgProc, (LPARAM)wParam)) return -1; return res; diff --git a/plugins/!NotAdopted/Skype/skypeopt.c b/plugins/!NotAdopted/Skype/skypeopt.c old mode 100644 new mode 100755 index 2dfc4faef5..9d781aebc7 --- a/plugins/!NotAdopted/Skype/skypeopt.c +++ b/plugins/!NotAdopted/Skype/skypeopt.c @@ -31,7 +31,7 @@ extern HINSTANCE hInst; -extern PLUGININFO pluginInfo; +extern PLUGININFOEX pluginInfo; extern char protocol, g_szProtoName[]; extern BOOL SkypeInitialized, bProtocolSet, bIsImoproxy; extern DWORD mirandaVersion; @@ -62,14 +62,14 @@ int RegisterOptions(WPARAM wParam, LPARAM lParam) { odp.pszTitle = SKYPE_PROTONAME; odp.pfnDlgProc = OptionsDlgProc; odp.flags = ODPF_BOLDGROUPS; - CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp); + Options_AddPage(wParam, &odp); if(PopupServiceExists) { odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUP); odp.pszGroup = "Popups"; odp.pfnDlgProc = OptPopupDlgProc; - CallService(MS_OPT_ADDPAGE, wParam, (LPARAM)&odp); + Options_AddPage(wParam, &odp); } return 0; @@ -472,7 +472,7 @@ INT_PTR CALLBACK OptionsAdvancedDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, for(i=0;i #pragma warning (push) #pragma warning (disable: 4100) // unreferenced formal parameter -#include "../../include/m_utils.h" +#include #pragma warning (pop) HANDLE hVoiceNotify = NULL; diff --git a/plugins/!NotAdopted/Skype/voiceservice.h b/plugins/!NotAdopted/Skype/voiceservice.h old mode 100644 new mode 100755 index bbb333ec4b..0ffbd6d9ca --- a/plugins/!NotAdopted/Skype/voiceservice.h +++ b/plugins/!NotAdopted/Skype/voiceservice.h @@ -3,7 +3,7 @@ #pragma warning (push) #pragma warning (disable: 4201) // nonstandard extension used : nameless struct/union -#include "sdk/m_voice.h" +#include #pragma warning (pop) BOOL HasVoiceService(); -- cgit v1.2.3