summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-09-26 18:24:48 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-09-26 18:24:48 +0000
commitd9cd01de6dd3458ad806fdbe1d29108eda55b3e4 (patch)
tree2a3bc6b7e99911967f0177bde9e6f34b564525ed /protocols
parent596d5ab98574161befaf4b37513bbb905270e317 (diff)
git-svn-id: http://svn.miranda-ng.org/main/trunk@1665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Skype/Skype.vcxproj15
-rw-r--r--protocols/Skype/src/skype.cpp14
-rw-r--r--protocols/Skype/src/skype.h1
-rw-r--r--protocols/Skype/src/skype_proto.cpp10
-rw-r--r--protocols/Skype/src/skype_proto.h12
5 files changed, 30 insertions, 22 deletions
diff --git a/protocols/Skype/Skype.vcxproj b/protocols/Skype/Skype.vcxproj
index 175735e458..9f95fbf52a 100644
--- a/protocols/Skype/Skype.vcxproj
+++ b/protocols/Skype/Skype.vcxproj
@@ -45,7 +45,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;SKYPE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -72,13 +72,12 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeader>Use</PrecompiledHeader>
<Optimization>Full</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SKYPE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-
-<AdditionalIncludeDirectories>..\..\include;..\..\plugins\ExternalAPI;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\api;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\ipc;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\types;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading\win;..\..\SkypeKit\SDK\ipc\cpp;..\..\SkypeKit\SDK\ipc\cpp\VideoBuffers;..\..\SkypeKit\SDK\ipc\cpp\platform\se;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include\openssl;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\ctaocrypt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..\..\include;..\..\plugins\ExternalAPI;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\api;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\ipc;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\types;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading\win;..\..\SkypeKit\SDK\ipc\cpp;..\..\SkypeKit\SDK\ipc\cpp\VideoBuffers;..\..\SkypeKit\SDK\ipc\cpp\platform\se;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include\openssl;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\ctaocrypt\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>skype.h</PrecompiledHeaderFile>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
@@ -89,8 +88,7 @@
<OptimizeReferences>true</OptimizeReferences>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
-
-<AdditionalDependencies>$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cyassl_lib.lib;$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cyassl_lib.lib;$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -104,7 +102,10 @@
<ClInclude Include="src\resource.h" />
</ItemGroup>
<ItemGroup>
- <ClCompile Include="src\skype.cpp" />
+ <ClCompile Include="src\skype.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="src\skype_proto.cpp" />
</ItemGroup>
<ItemGroup>
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp
index 47e9ea0c5e..82df6a8da4 100644
--- a/protocols/Skype/src/skype.cpp
+++ b/protocols/Skype/src/skype.cpp
@@ -40,10 +40,9 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO
static CSkypeProto* SkypeProtoInit(const char* pszProtoName, const TCHAR* tszUserName)
{
- //CSkypeProto *ppro = new CSkypeProto(pszProtoName, tszUserName);
- //g_Instances.insert(ppro);
- //return ppro;
- return 0;
+ CSkypeProto *ppro = new CSkypeProto(pszProtoName, tszUserName);
+ g_Instances.insert(ppro);
+ return ppro;
}
static int SkypeProtoUninit(CSkypeProto* ppro)
@@ -55,14 +54,15 @@ static int SkypeProtoUninit(CSkypeProto* ppro)
extern "C" int __declspec(dllexport) Load(void)
{
- //mir_getLP(&pluginInfo);
+ mir_getLP(&pluginInfo);
- PROTOCOLDESCRIPTOR pd = { sizeof(pd) };
+ PROTOCOLDESCRIPTOR pd = {0};
+ pd.cbSize = sizeof(pd);
pd.szName = "Skype";
pd.type = PROTOTYPE_PROTOCOL;
pd.fnInit = (pfnInitProto)SkypeProtoInit;
pd.fnUninit = (pfnUninitProto)SkypeProtoUninit;
- CallService(MS_PROTO_REGISTERMODULE, 0, reinterpret_cast<LPARAM>(&pd));
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
return 0;
}
diff --git a/protocols/Skype/src/skype.h b/protocols/Skype/src/skype.h
index bc9dc36372..df4c355ef6 100644
--- a/protocols/Skype/src/skype.h
+++ b/protocols/Skype/src/skype.h
@@ -22,6 +22,7 @@
#include <m_protocols.h>
#include <m_protomod.h>
#include <m_protosvc.h>
+#include <m_protoint.h>
#include <m_skin.h>
#include <statusmodes.h>
#include <m_system.h>
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp
index b01329ca4e..97ebdc4f8c 100644
--- a/protocols/Skype/src/skype_proto.cpp
+++ b/protocols/Skype/src/skype_proto.cpp
@@ -43,4 +43,12 @@ void CSkypeProto::Log( const char* fmt, ... )
va_end(va);
CallService(MS_NETLIB_LOG, ( WPARAM )m_hNetlibUser, (LPARAM)msg);
-} \ No newline at end of file
+}
+
+void CSkypeProto::CreateProtoService(const char *szService, ServiceFunc serviceProc)
+{
+ char str[ MAXMODULELABELLENGTH ];
+ strcpy( str, m_szModuleName );
+ strcat( str, szService );
+ ::CreateServiceFunctionObj( str, ( MIRANDASERVICEOBJ )*( void** )&serviceProc, this );
+}
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h
index a4613fcb3b..405d2fa907 100644
--- a/protocols/Skype/src/skype_proto.h
+++ b/protocols/Skype/src/skype_proto.h
@@ -1,7 +1,5 @@
-#pragma once
-
-#include "skype.h"
-#include <m_protoint.h>
+struct CSkypeProto;
+typedef INT_PTR (__cdecl CSkypeProto::*ServiceFunc)(WPARAM, LPARAM);
struct CSkypeProto : public PROTO_INTERFACE, public MZeroedObject
{
@@ -10,7 +8,7 @@ public:
~CSkypeProto();
// PROTO_INTERFACE
- /*virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
@@ -55,10 +53,10 @@ public:
virtual int __cdecl UserIsTyping( HANDLE hContact, int type );
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );*/
+ virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
-protected:
HANDLE m_hNetlibUser;
void Log( const char* fmt, ... );
+ void CreateProtoService(const char* szService, ServiceFunc serviceProc);
}; \ No newline at end of file