diff options
234 files changed, 0 insertions, 33316 deletions
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj deleted file mode 100644 index 98d9991c15..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj +++ /dev/null @@ -1,248 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>AdvancedAutoAway</ProjectName>
- <ProjectGuid>{66503A70-B1E8-4545-B4FF-2108DFB40C72}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11bd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="advancedautoaway.cpp" />
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="msgoptions.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h" />
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters deleted file mode 100644 index fc5daed232..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_10.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6b60d98e-019d-49ff-a906-9090232d9213}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{b2e98f78-44f0-4095-880b-46a0ede02428}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{2d794d19-0987-4aa7-940d-2378ba7e4fdb}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="advancedautoaway.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj deleted file mode 100644 index c1b9ee6adb..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj +++ /dev/null @@ -1,251 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>AdvancedAutoAway</ProjectName>
- <ProjectGuid>{66503A70-B1E8-4545-B4FF-2108DFB40C72}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11bd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="advancedautoaway.cpp" />
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="msgoptions.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h" />
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj.filters b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj.filters deleted file mode 100644 index fc5daed232..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_12.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6b60d98e-019d-49ff-a906-9090232d9213}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{b2e98f78-44f0-4095-880b-46a0ede02428}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{2d794d19-0987-4aa7-940d-2378ba7e4fdb}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="advancedautoaway.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj deleted file mode 100644 index e8467e23d8..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj +++ /dev/null @@ -1,251 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>AdvancedAutoAway</ProjectName>
- <ProjectGuid>{66503A70-B1E8-4545-B4FF-2108DFB40C72}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11bd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;ADVANCEDAUTOAWAY_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <AdditionalDependencies>UxTheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="advancedautoaway.cpp" />
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Use</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="msgoptions.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h" />
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj.filters b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj.filters deleted file mode 100644 index fc5daed232..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/AdvancedAutoAway_14.vcxproj.filters +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6b60d98e-019d-49ff-a906-9090232d9213}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{b2e98f78-44f0-4095-880b-46a0ede02428}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{2d794d19-0987-4aa7-940d-2378ba7e4fdb}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="advancedautoaway.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="msgoptions.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="advancedautoaway.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\useronli.ico">
- <Filter>Resource Files</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp deleted file mode 100644 index 021674ab22..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ /dev/null @@ -1,593 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
- Some code is copied from Miranda's AutoAway module
-*/
-#include "../commonstatus.h"
-#include "advancedautoaway.h"
-#include "../resource.h"
-#include <commctrl.h>
-
-#ifdef _DEBUG
- #define SECS_PER_MINUTE 20 /* speedup */
-#else
- #define SECS_PER_MINUTE 60 /* default I believe */
-#endif
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-int CompareSettings(const TAAAProtoSetting *p1, const TAAAProtoSetting *p2)
-{
- return mir_strcmp(p1->szName, p2->szName);
-}
-
-TAAAProtoSettingList autoAwaySettings(10, CompareSettings);
-
-TAAAProtoSetting::TAAAProtoSetting(PROTOACCOUNT *pa)
-{
- cbSize = sizeof(PROTOCOLSETTINGEX);
- szName = pa->szModuleName;
- tszAccName = pa->tszAccountName;
- lastStatus = status = originalStatusMode = ID_STATUS_CURRENT;
- szMsg = NULL;
- curState = ACTIVE;
- mStatus = FALSE;
-}
-
-TAAAProtoSetting::~TAAAProtoSetting()
-{
- free(szMsg);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-extern HANDLE hStateChangedEvent;
-
-static BOOL ignoreLockKeys = FALSE;
-static BOOL ignoreSysKeys = FALSE;
-static BOOL ignoreAltCombo = FALSE;
-static BOOL monitorMouse = TRUE;
-static BOOL monitorKeyboard = TRUE;
-static HWND confirmDialog;
-static int mouseStationaryTimer;
-HHOOK hMirandaMouseHook = NULL;
-HHOOK hMirandaKeyBoardHook = NULL;
-#pragma data_seg("Shared")
-DWORD lastInput = 0;
-POINT lastMousePos = {0};
-HHOOK hMouseHook = NULL;
-HHOOK hKeyBoardHook = NULL;
-#pragma data_seg()
-#pragma comment(linker, "/section:Shared,rws")
-DWORD lastMirandaInput = 0;
-static UINT_PTR hAutoAwayTimer;
-// prototypes
-extern DWORD StatusModeToProtoFlag(int status);
-extern int InitCommonStatus();
-static int HookWindowsHooks(int hookMiranda, int hookAll);
-static int UnhookWindowsHooks();
-static LRESULT CALLBACK MouseHookFunction(int code, WPARAM wParam, LPARAM lParam);
-static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam);
-static LRESULT CALLBACK MirandaMouseHookFunction(int code, WPARAM wParam, LPARAM lParam);
-static LRESULT CALLBACK MirandaKeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam);
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved);
-
-static VOID CALLBACK AutoAwayTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD dwTime);
-extern int AutoAwayOptInitialise(WPARAM wParam,LPARAM lParam);
-extern int AutoAwayMsgOptInitialise(WPARAM wParam,LPARAM lParam);
-extern int SetStatus(WPARAM wParam, LPARAM lParam);
-extern int ShowConfirmDialog(WPARAM wParam, LPARAM lParam);
-extern char *StatusModeToDbSetting(int status,const char *suffix);
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Load from DB
-
-void LoadOptions(TAAAProtoSettingList &loadSettings, BOOL override)
-{
- // if override is enabled, samesettings will be ignored (for options loading)
- int monitorMiranda = FALSE; // use windows hooks?
- int monitorAll = FALSE; // use windows hooks?
-
- if (!override)
- UnhookWindowsHooks();
- if (hAutoAwayTimer != 0)
- KillTimer(NULL, hAutoAwayTimer);
-
- ignoreLockKeys = db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE);
- ignoreSysKeys = db_get_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE);
- ignoreAltCombo = db_get_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE);
- monitorMouse = db_get_b(NULL, MODULENAME, SETTING_MONITORMOUSE, TRUE);
- monitorKeyboard = db_get_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, TRUE);
- lastInput = lastMirandaInput = GetTickCount();
-
- for (int i = 0; i < loadSettings.getCount(); i++) {
- char* protoName;
- if ((db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)) && !override)
- protoName = SETTING_ALL;
- else
- protoName = loadSettings[i].szName;
- LoadAutoAwaySetting(loadSettings[i], protoName);
- if (!override) {
- if (loadSettings[i].optionFlags & FLAG_MONITORMIRANDA)
- monitorMiranda = TRUE;
- else if (ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard))
- monitorAll = TRUE;
- }
- }
-
- if (db_get_b(NULL, "Idle", "AAEnable", 0))
- return;
-
- HookWindowsHooks(monitorMiranda, monitorAll);
- hAutoAwayTimer = SetTimer(NULL, 0, db_get_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5) * 1000, AutoAwayTimer);
-}
-
-int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char* protoName)
-{
- char setting[128];
- mir_snprintf(setting, "%s_OptionFlags", protoName);
- autoAwaySetting.optionFlags = db_get_w(NULL, MODULENAME, setting, FLAG_LV2ONINACTIVE | FLAG_RESET);
- mir_snprintf(setting, "%s_AwayTime", protoName);
- autoAwaySetting.awayTime = db_get_w(NULL, MODULENAME, setting, SETTING_AWAYTIME_DEFAULT);
- mir_snprintf(setting, "%s_NATime", protoName);
- autoAwaySetting.naTime = db_get_w(NULL, MODULENAME, setting, SETTING_NATIME_DEFAULT);
- mir_snprintf(setting, "%s_StatusFlags", protoName);
- autoAwaySetting.statusFlags = db_get_w(NULL, MODULENAME, setting, StatusModeToProtoFlag(ID_STATUS_ONLINE) | StatusModeToProtoFlag(ID_STATUS_FREECHAT));
-
- int flags;
- if (db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, 0))
- flags = 0xFFFFFF;
- else
- flags = CallProtoService(protoName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(protoName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
- mir_snprintf(setting, "%s_Lv1Status", protoName);
- autoAwaySetting.lv1Status = db_get_w(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_AWAY)) ? ID_STATUS_AWAY : ID_STATUS_OFFLINE);
- mir_snprintf(setting, "%s_Lv2Status", protoName);
- autoAwaySetting.lv2Status = db_get_w(NULL, MODULENAME, setting, (flags&StatusModeToProtoFlag(ID_STATUS_NA)) ? ID_STATUS_NA : ID_STATUS_OFFLINE);
-
- return 0;
-}
-
-static int ProcessProtoAck(WPARAM wParam, LPARAM lParam)
-{
- ACKDATA *ack = (ACKDATA*)lParam;
- if (ack->type != ACKTYPE_STATUS || ack->result != ACKRESULT_SUCCESS)
- return 0;
-
- log_debugA("ProcessProtoAck: ack->szModule: %s", ack->szModule);
- for (int i = 0; i < autoAwaySettings.getCount(); i++) {
- TAAAProtoSetting &p = autoAwaySettings[i];
- log_debugA("chk: %s", p.szName);
- if (!mir_strcmp(p.szName, ack->szModule)) {
- log_debugA("ack->szModule: %s p.statusChanged: %d", ack->szModule, p.statusChanged);
- if (!p.statusChanged)
- p.mStatus = TRUE;
-
- p.statusChanged = FALSE;
- }
- }
-
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Account control event
-
-int OnAccChanged(WPARAM wParam, LPARAM lParam)
-{
- PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
- switch (wParam) {
- case PRAC_ADDED:
- autoAwaySettings.insert(new TAAAProtoSetting(pa));
- break;
-
- case PRAC_REMOVED:
- for (int i = 0; i < autoAwaySettings.getCount(); i++) {
- if (!mir_strcmp(autoAwaySettings[i].szName, pa->szModuleName)) {
- autoAwaySettings.remove(i);
- break;
- }
- }
- break;
- }
-
- return 0;
-}
-
-static char* status2descr(int status)
-{
- switch (status) {
- case ACTIVE: return "ACTIVE";
- case STATUS1_SET: return "STATUS1_SET";
- case STATUS2_SET: return "STATUS2_SET";
- case SET_ORGSTATUS: return "SET_ORGSTATUS";
- case HIDDEN_ACTIVE: return "HIDDEN_ACTIVE";
- }
- return "ERROR";
-}
-
-static int changeState(TAAAProtoSetting &setting, STATES newState)
-{
- if (setting.curState == newState)
- return 0;
-
- setting.oldState = setting.curState;
- setting.curState = newState;
-
- log_debugA("%s state change: %s -> %s", setting.szName, status2descr(setting.oldState), status2descr(setting.curState));
-
- NotifyEventHooks(hStateChangedEvent, 0, (LPARAM)&setting);
- if (setting.curState != SET_ORGSTATUS && setting.curState != ACTIVE && setting.statusChanged) {
- /* change the awaymessage */
- if (setting.szMsg != NULL) {
- free(setting.szMsg);
- setting.szMsg = NULL;
- }
-
- if (db_get_b(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_MSGCUSTOM), FALSE)) {
- DBVARIANT dbv;
- if (!db_get_ws(NULL, MODULENAME, StatusModeToDbSetting(setting.status, SETTING_STATUSMSG), &dbv)) {
- setting.szMsg = wcsdup(dbv.ptszVal);
- db_free(&dbv);
- }
- }
- }
- else if (setting.szMsg != NULL) {
- free(setting.szMsg);
- setting.szMsg = NULL;
- }
-
- return 0;
-}
-
-static VOID CALLBACK AutoAwayTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime)
-{
- int statusChanged = FALSE;
- int confirm = FALSE;
-
- for (int i = 0; i < autoAwaySettings.getCount(); i++) {
- TAAAProtoSetting& aas = autoAwaySettings[i];
- aas.status = ID_STATUS_DISABLED;
-
- BOOL bTrigger = false;
-
- if (aas.optionFlags & FLAG_MONITORMIRANDA)
- mouseStationaryTimer = (GetTickCount() - lastMirandaInput) / 1000;
- else {
- LASTINPUTINFO ii = { sizeof(ii) };
- GetLastInputInfo(&ii);
- mouseStationaryTimer = (GetTickCount() - ii.dwTime) / 1000;
- }
-
- int sts1Time = aas.awayTime * SECS_PER_MINUTE;
- int sts2Time = aas.naTime * SECS_PER_MINUTE;
- int sts1setTime = aas.sts1setTimer == 0 ? 0 : (GetTickCount() - aas.sts1setTimer) / 1000;
- int currentMode = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
-
- if (aas.optionFlags & FLAG_ONSAVER)
- bTrigger |= IsScreenSaverRunning();
- if (aas.optionFlags & FLAG_ONLOCK)
- bTrigger |= IsWorkstationLocked();
- if (aas.optionFlags & FLAG_FULLSCREEN)
- bTrigger |= IsFullScreen();
-
- /* check states */
- if (aas.curState == ACTIVE) {
- if (((mouseStationaryTimer >= sts1Time && (aas.optionFlags & FLAG_ONMOUSE)) || bTrigger) && currentMode != aas.lv1Status && aas.statusFlags&StatusModeToProtoFlag(currentMode)) {
- /* from ACTIVE to STATUS1_SET */
- aas.lastStatus = aas.originalStatusMode = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- aas.status = aas.lv1Status;
- aas.sts1setTimer = GetTickCount();
- sts1setTime = 0;
- aas.statusChanged = statusChanged = TRUE;
- changeState(aas, STATUS1_SET);
- }
- else if (mouseStationaryTimer >= sts2Time && currentMode == aas.lv1Status && currentMode != aas.lv2Status && (aas.optionFlags & FLAG_SETNA) && (aas.statusFlags & StatusModeToProtoFlag(currentMode))) {
- /* from ACTIVE to STATUS2_SET */
- aas.lastStatus = aas.originalStatusMode = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- aas.status = aas.lv2Status;
- aas.statusChanged = statusChanged = TRUE;
- changeState(aas, STATUS2_SET);
- }
- }
-
- if (aas.curState == STATUS1_SET) {
- if ((mouseStationaryTimer < sts1Time && !bTrigger) && !(aas.optionFlags & FLAG_RESET)) {
- /* from STATUS1_SET to HIDDEN_ACTIVE */
- changeState(aas, HIDDEN_ACTIVE);
- aas.lastStatus = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- }
- else if (((mouseStationaryTimer < sts1Time) && !bTrigger) &&
- ((aas.optionFlags & FLAG_LV2ONINACTIVE) || (!(aas.optionFlags&FLAG_SETNA))) &&
- (aas.optionFlags & FLAG_RESET)) {
- /* from STATUS1_SET to SET_ORGSTATUS */
- changeState(aas, SET_ORGSTATUS);
- }
- else if ((aas.optionFlags & FLAG_SETNA) && sts1setTime >= sts2Time) {
- /* when set STATUS2, currentMode doesn't have to be in the selected status list (statusFlags) */
- /* from STATUS1_SET to STATUS2_SET */
- aas.lastStatus = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- aas.status = aas.lv2Status;
- aas.statusChanged = statusChanged = TRUE;
- changeState(aas, STATUS2_SET);
- }
- }
-
- if (aas.curState == STATUS2_SET) {
- if (mouseStationaryTimer < sts2Time && !bTrigger && (aas.optionFlags & FLAG_RESET)) {
- /* from STATUS2_SET to SET_ORGSTATUS */
- changeState(aas, SET_ORGSTATUS);
- }
- else if (mouseStationaryTimer < sts2Time && !bTrigger && !(aas.optionFlags & FLAG_RESET)) {
- /* from STATUS2_SET to HIDDEN_ACTIVE */
- /* Remember: after status1 is set, and "only on inactive" is NOT set, it implies !reset. */
- changeState(aas, HIDDEN_ACTIVE);
- aas.lastStatus = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- }
- }
-
- if (aas.curState == HIDDEN_ACTIVE) {
- if (aas.mStatus) {
- /* HIDDEN_ACTIVE to ACTIVE */
- //aas.statusChanged = FALSE;
- changeState(aas, ACTIVE);
- aas.sts1setTimer = 0;
- aas.mStatus = FALSE;
- }
- else if ((aas.optionFlags & FLAG_SETNA) && currentMode == aas.lv1Status &&
- currentMode != aas.lv2Status && (aas.statusFlags & StatusModeToProtoFlag(currentMode)) &&
- (mouseStationaryTimer >= sts2Time || (sts1setTime >= sts2Time && !(aas.optionFlags & FLAG_LV2ONINACTIVE)))) {
- /* HIDDEN_ACTIVE to STATUS2_SET */
- aas.lastStatus = aas.originalStatusMode = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- aas.status = aas.lv2Status;
- aas.statusChanged = statusChanged = TRUE;
- changeState(aas, STATUS2_SET);
- }
- }
- if (aas.curState == SET_ORGSTATUS) {
- /* SET_ORGSTATUS to ACTIVE */
- aas.lastStatus = CallProtoService(aas.szName, PS_GETSTATUS, 0, 0);
- aas.status = aas.originalStatusMode;
- confirm = (aas.optionFlags&FLAG_CONFIRM) ? TRUE : confirm;
- aas.statusChanged = statusChanged = TRUE;
- changeState(aas, ACTIVE);
- aas.sts1setTimer = 0;
- }
- autoAwaySettings[i].mStatus = FALSE;
- }
-
- if (confirm || statusChanged) {
- TAAAProtoSettingList ps = autoAwaySettings;
- for (int i = 0; i < ps.getCount(); i++) {
- if (ps[i].szMsg)
- ps[i].szMsg = wcsdup(ps[i].szMsg);
-
- if (ps[i].status == ID_STATUS_DISABLED)
- ps[i].szName = "";
- }
-
- if (confirm)
- confirmDialog = (HWND)CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&ps, db_get_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5));
- else if (statusChanged)
- CallService(MS_CS_SETSTATUSEX, (WPARAM)&ps, 0);
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Windows hooks
-
-static int HookWindowsHooks(int hookMiranda, int hookAll)
-{
- if (hookMiranda) {
- if (monitorKeyboard && hMirandaKeyBoardHook == NULL)
- hMirandaKeyBoardHook = SetWindowsHookEx(WH_KEYBOARD, MirandaKeyBoardHookFunction, NULL, GetCurrentThreadId());
- if (monitorMouse && hMirandaMouseHook == NULL)
- hMirandaMouseHook = SetWindowsHookEx(WH_MOUSE, MirandaMouseHookFunction, NULL, GetCurrentThreadId());
- }
- if (hookAll) {
- if (monitorKeyboard && hKeyBoardHook == NULL)
- hKeyBoardHook = SetWindowsHookEx(WH_KEYBOARD, KeyBoardHookFunction, 0, GetCurrentThreadId());
- if (monitorMouse && hMouseHook == NULL)
- hMouseHook = SetWindowsHookEx(WH_MOUSE, MouseHookFunction, 0, GetCurrentThreadId());
- }
-
- return 0;
-}
-
-static int UnhookWindowsHooks()
-{
- UnhookWindowsHookEx(hMouseHook);
- UnhookWindowsHookEx(hKeyBoardHook);
- UnhookWindowsHookEx(hMirandaMouseHook);
- UnhookWindowsHookEx(hMirandaKeyBoardHook);
-
- hMouseHook = hKeyBoardHook = hMirandaMouseHook = hMirandaKeyBoardHook = NULL;
- return 0;
-}
-
-static LRESULT CALLBACK MirandaMouseHookFunction(int code, WPARAM wParam, LPARAM lParam)
-{
- if (code >= 0) {
- PMOUSEHOOKSTRUCT mouseInfo = (PMOUSEHOOKSTRUCT)lParam;
- POINT pt = mouseInfo->pt;
-
- /* TioDuke's KeyBoardNotifyExt: only update if a Miranda window is focused */
- DWORD pid;
- GetWindowThreadProcessId(GetForegroundWindow(), &pid);
- if (pid != GetCurrentProcessId())
- return CallNextHookEx(hMirandaMouseHook, code, wParam, lParam);
-
- if (pt.x != lastMousePos.x || pt.y != lastMousePos.y) {
- lastMousePos = pt;
- lastMirandaInput = GetTickCount();
- }
- }
-
- return CallNextHookEx(hMirandaMouseHook, code, wParam, lParam);
-}
-
-static LRESULT CALLBACK MirandaKeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
-{
- if (code >= 0) {
- if (ignoreAltCombo) {
- if (((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
- ((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
- ((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
- ((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
- ((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
- ((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)))
- {
- return CallNextHookEx(hMirandaKeyBoardHook, code, wParam, lParam);
- }
- }
-
- switch (wParam) {
- case VK_NUMLOCK:
- case VK_CAPITAL:
- case VK_SCROLL:
- if (!ignoreLockKeys)
- lastMirandaInput = GetTickCount();
- break;
-
- case VK_TAB:
- case VK_SHIFT:
- case VK_CONTROL:
- case VK_MENU:
- case VK_ESCAPE:
- case VK_LWIN:
- case VK_RWIN:
- if (!ignoreSysKeys)
- lastMirandaInput = GetTickCount();
- break;
-
- default:
- lastMirandaInput = GetTickCount();
- break;
- }
- }
-
- return CallNextHookEx(hMirandaKeyBoardHook, code, wParam, lParam);
-}
-
-static LRESULT CALLBACK MouseHookFunction(int code, WPARAM wParam, LPARAM lParam)
-{
- if (code >= 0) {
- PMOUSEHOOKSTRUCT mouseInfo = (PMOUSEHOOKSTRUCT)lParam;
- POINT pt = mouseInfo->pt;
-
- /* TioDuke's KeyBoardNotifyExt: also grab clicks */
- if ((wParam >= WM_NCLBUTTONDOWN && wParam <= WM_NCXBUTTONDBLCLK && wParam != 0x00AA) || (wParam >= WM_LBUTTONDOWN && wParam <= WM_XBUTTONDBLCLK))
- lastInput = GetTickCount();
-
- if (pt.x != lastMousePos.x || pt.y != lastMousePos.y) {
- lastMousePos = pt;
- lastInput = GetTickCount();
- }
- }
-
- return CallNextHookEx(hMouseHook, code, wParam, lParam);
-}
-
-static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
-{
- if (code >= 0) {
- if (ignoreAltCombo) {
- if (((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
- ((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
- ((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
- ((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
- ((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
- ((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)))
- {
- return CallNextHookEx(hKeyBoardHook, code, wParam, lParam);
- }
- }
-
- switch (wParam) {
- case VK_NUMLOCK:
- case VK_CAPITAL:
- case VK_SCROLL:
- if (!ignoreLockKeys)
- lastInput = GetTickCount();
- break;
-
- case VK_TAB:
- case VK_SHIFT:
- case VK_CONTROL:
- case VK_MENU:
- case VK_ESCAPE:
- case VK_LWIN:
- case VK_RWIN:
- if (!ignoreSysKeys)
- lastInput = GetTickCount();
- break;
-
- default:
- lastInput = GetTickCount();
- break;
- }
- }
-
- return CallNextHookEx(hKeyBoardHook, code, wParam, lParam);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Inits & stuff
-
-static int AutoAwayShutdown(WPARAM wParam, LPARAM lParam)
-{
- KillTimer(NULL, hAutoAwayTimer);
-
-#ifdef TRIGGERPLUGIN
- DeInitTrigger();
-#endif
- UnhookWindowsHooks();
- DestroyHookableEvent(hStateChangedEvent);
-
- autoAwaySettings.destroy();
- return 0;
-}
-
-int CSModuleLoaded(WPARAM wParam, LPARAM lParam)
-{
- HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
- HookEvent(ME_OPT_INITIALISE, AutoAwayOptInitialise);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, AutoAwayShutdown);
- HookEvent(ME_PROTO_ACK, ProcessProtoAck);
- mouseStationaryTimer = 0;
- lastInput = lastMirandaInput = GetTickCount();
-
- ////////////////////////////////////////////////////////////////////////////////////////
-
- protoList = (OBJLIST<PROTOCOLSETTINGEX>*)&autoAwaySettings;
-
- int count;
- PROTOACCOUNT** protos;
- Proto_EnumAccounts(&count, &protos);
-
- for (int i = 0; i < count; i++)
- if (IsSuitableProto(protos[i]))
- autoAwaySettings.insert(new TAAAProtoSetting(protos[i]));
-
- ////////////////////////////////////////////////////////////////////////////////////////
-
- LoadOptions(autoAwaySettings, FALSE);
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.h b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.h deleted file mode 100644 index 4a96da2544..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/advancedautoaway.h +++ /dev/null @@ -1,93 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#ifndef __ADVANCED_AUTOAWAY_HEADER
-#define __ADVANCED_AUTOAWAY_HEADER
-
-#include <m_options.h>
-#include "version.h"
-
-#define SETTING_IGNLOCK "IgnoreLockKeys"
-#define SETTING_IGNSYSKEYS "IgnoreSysKeys"
-#define SETTING_IGNALTCOMBO "IgnoreAltCombo"
-#define SETTING_SAMESETTINGS "SameAutoAwaySettings"
-#define SETTING_ALL "ALLPROTOS"
-#define SETTING_MSGCUSTOM "Custom"
-#define SETTING_STATUSMSG "Msg"
-#define SETTING_CONFIRMDELAY "ConfirmTimeout"
-#define MODULENAME "AdvancedAutoAway"
-
-#define SETTING_AWAYTIME_DEFAULT 5
-#define SETTING_NATIME_DEFAULT 20
-#define SETTING_AWAYCHECKTIMEINSECS "CheckInterval"
-
-#define STATUS_RESET 1
-#define STATUS_AUTOAWAY 2
-#define STATUS_AUTONA 3
-
-#define SETTING_MONITORMOUSE "MonitorMouse"
-#define SETTING_MONITORKEYBOARD "MonitorKeyboard"
-
-#define FLAG_ONSAVER 0x0001 // db: set lv1 status on screensaver ?
-#define FLAG_ONMOUSE 0x0002 // db: set after inactivity ?
-#define FLAG_SETNA 0x0004 // db: set NA after xx of away time ?
-#define FLAG_CONFIRM 0x0008 // db: show confirm dialog ?
-#define FLAG_RESET 0x0010 // db: restore status ?
-#define FLAG_LV2ONINACTIVE 0x0020 // db: set lv2 only on inactivity
-#define FLAG_MONITORMIRANDA 0x0040 // db: monitor miranda activity only
-#define FLAG_ONLOCK 0x0080 // db: on work station lock
-#define FLAG_FULLSCREEN 0x0100 // db: on full screen
-
-struct TAAAProtoSetting : public PROTOCOLSETTINGEX, public MZeroedObject
-{
- TAAAProtoSetting(PROTOACCOUNT *pa);
- ~TAAAProtoSetting();
-
- int originalStatusMode;
- STATES
- oldState,
- curState;
- BOOL statusChanged; // AAA changed the status, don't update mStatus
- BOOL mStatus; // status changed manually or not ?
- int optionFlags, // db: see above
- awayTime, // db: time to wait for inactivity
- naTime, // db: time to wait after away is set
- statusFlags; // db: set lv1 status if this is original status
- WORD lv1Status, // db
- lv2Status; // db
- unsigned int sts1setTimer;
-};
-
-struct AAMSGSETTING
-{
- short useCustom;
- int status;
- char* msg;
-};
-
-extern HINSTANCE hInst;
-
-int CompareSettings( const TAAAProtoSetting *p1, const TAAAProtoSetting *p2 );
-
-typedef OBJLIST<TAAAProtoSetting> TAAAProtoSettingList;
-extern TAAAProtoSettingList autoAwaySettings;
-
-int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char *protoName);
-void LoadOptions(TAAAProtoSettingList &settings, BOOL override);
-
-#endif
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/fsm.jpg b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/fsm.jpg Binary files differdeleted file mode 100644 index 21066a3939..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/fsm.jpg +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/main.cpp b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/main.cpp deleted file mode 100644 index e271378c20..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/main.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
- Some code is copied from Miranda's AutoAway module
-*/
-
-#include "../commonstatus.h"
-#include "advancedautoaway.h"
-#include "../resource.h"
-
-HINSTANCE hInst;
-CLIST_INTERFACE *pcli;
-
-HANDLE hCSModuleLoadedHook;
-HANDLE hStateChangedEvent;
-int hLangpack = 0;
-
-int CSModuleLoaded(WPARAM wParam, LPARAM lParam);
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// dll entry point
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
-{
- if (fdwReason == DLL_PROCESS_ATTACH)
- hInst = hinstDLL;
-
- return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// returns plugin's extended information
-
-PLUGININFOEX pluginInfoEx={
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESC,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- { 0xf0fdf73a, 0x753d, 0x499d, { 0x8d, 0xba, 0x33, 0x6d, 0xb7, 0x9c, 0xdd, 0x41 } } // {F0FDF73A-753D-499d-8DBA-336DB79CDD41}
-};
-
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
-{
- return &pluginInfoEx;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// interfaces
-
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_AUTOAWAY, MIID_LAST };
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's entry point
-
-extern "C" __declspec(dllexport) int Load(void)
-{
- mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
-
- InitCommonStatus();
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, CSModuleLoaded);
- hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED);
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's exit point
-
-extern "C" __declspec(dllexport) int Unload(void)
-{
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/msgoptions.cpp deleted file mode 100644 index 9435d0db54..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/msgoptions.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#include "../commonstatus.h"
-#include "advancedautoaway.h"
-#include "../resource.h"
-
-extern char *StatusModeToDbSetting(int status,const char *suffix);
-
-void DisableDialog(HWND hwndDlg)
-{
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUS), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_RADUSECUSTOM), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_RADUSEMIRANDA), FALSE);
-}
-
-INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static AAMSGSETTING** settings;
- static int last, count;
-
- switch( msg ) {
- case WM_INITDIALOG:
- TranslateDialogDefault( hwndDlg );
- {
- ShowWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), ServiceExists(MS_VARS_SHOWHELP)?SW_SHOW:SW_HIDE);
- count = 0;
- last = -1;
-
- PROTOACCOUNT** proto;
- int protoCount = 0;
- Proto_EnumAccounts(&protoCount, &proto);
- if (protoCount <= 0)
- {
- DisableDialog(hwndDlg);
- break;
- }
-
- DWORD protoModeMsgFlags = 0;
- for (int i=0; i < protoCount; i++)
- if (CallProtoService(proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)
- protoModeMsgFlags |= CallProtoService( proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0 );
-
- if (protoModeMsgFlags == 0)
- {
- DisableDialog(hwndDlg);
- break;
- }
-
- settings = ( AAMSGSETTING** )malloc(sizeof(AAMSGSETTING*));
- count = 0;
- for (int i=0; i < _countof(statusModeList); i++ ) {
- if ( !( protoModeMsgFlags & Proto_Status2Flag( statusModeList[i] )))
- continue;
-
- int j = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)pcli->pfnGetStatusModeDescription(statusModeList[i], 0));
- SendDlgItemMessage( hwndDlg, IDC_STATUS, CB_SETITEMDATA, j, statusModeList[i] );
- settings = ( AAMSGSETTING** )realloc(settings, (count+1)*sizeof(AAMSGSETTING*));
- settings[count] = ( AAMSGSETTING* )malloc(sizeof(AAMSGSETTING));
- settings[count]->status = statusModeList[i];
-
- DBVARIANT dbv;
- if ( !db_get(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i],SETTING_STATUSMSG), &dbv)) {
- settings[count]->msg = ( char* )malloc(mir_strlen(dbv.pszVal) + 1);
- mir_strcpy(settings[count]->msg, dbv.pszVal);
- db_free(&dbv);
- }
- else settings[count]->msg = NULL;
-
- settings[count]->useCustom = db_get_b(NULL, MODULENAME, StatusModeToDbSetting(statusModeList[i], SETTING_MSGCUSTOM), FALSE);
- count += 1;
- }
- SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_SETCURSEL,0,0);
- SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
- }
- break;
-
- case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- switch(LOWORD(wParam)) {
- case IDC_RADUSEMIRANDA:
- CheckDlgButton(hwndDlg, IDC_RADUSECUSTOM, BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_RADUSEMIRANDA) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM));
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM));
- settings[SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_GETCURSEL,0,0)]->useCustom = IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM);
- break;
-
- case IDC_RADUSECUSTOM:
- CheckDlgButton(hwndDlg, IDC_RADUSEMIRANDA, BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM));
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM));
- settings[SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_GETCURSEL,0,0)]->useCustom = IsDlgButtonChecked(hwndDlg, IDC_RADUSECUSTOM);
- break;
-
- case IDC_STATUS:
- if ( HIWORD( wParam ) == CBN_SELCHANGE ) {
- int i = SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_GETCURSEL,0,0);
- int len = SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXTLENGTH, 0, 0);
- if ( last != -1 ) {
- if (settings[last]->msg == NULL)
- settings[last]->msg = ( char* )malloc(len+1);
- else
- settings[last]->msg = (char*)realloc(settings[last]->msg, len+1);
- GetDlgItemTextA(hwndDlg, IDC_STATUSMSG, settings[last]->msg, (len+1));
- }
-
- if (i != -1) {
- if (settings[i]->msg != NULL)
- SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, settings[i]->msg);
- else {
- ptrW msg((wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, settings[i]->status, 0));
- SetDlgItemText(hwndDlg, IDC_STATUSMSG, (msg != NULL) ? msg : L"");
- }
-
- if (settings[i]->useCustom) {
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), TRUE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), TRUE);
- CheckDlgButton(hwndDlg, IDC_RADUSECUSTOM, BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_RADUSEMIRANDA, BST_UNCHECKED);
- }
- else {
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), FALSE);
- CheckDlgButton(hwndDlg, IDC_RADUSEMIRANDA, BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_RADUSECUSTOM, BST_UNCHECKED);
- }
- }
- last = i;
- }
- break;
-
- case IDC_VARIABLESHELP:
- CallService(MS_VARS_SHOWHELP, (WPARAM)GetDlgItem(hwndDlg, IDC_STATUSMSG), 0);
- break;
- }
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
- for (int i=0; i < count; i++ ) {
- db_set_b(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
- if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (settings[i]->msg[0] != '\0'))
- db_set_s(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
- }
- break;
- }
- break;
-
- case WM_DESTROY:
- for (int i=0; i < count; i++ ) {
- free(settings[i]->msg);
- free(settings[i]);
- }
- free(settings);
- break;
- }
-
- return FALSE;
-}
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/options.cpp b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/options.cpp deleted file mode 100644 index 02516f3e9e..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/options.cpp +++ /dev/null @@ -1,526 +0,0 @@ -/*
-AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
-Copyright 2003-2006 P. Boon
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "advancedautoaway.h"
-#include "../resource.h"
-#include <commctrl.h>
-
-int LoadAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char* protoName);
-
-INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-static BOOL bSettingSame = FALSE;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Dialog service functions
-
-static int WriteAutoAwaySetting(TAAAProtoSetting &autoAwaySetting, char *protoName)
-{
- char setting[128];
- mir_snprintf(setting, "%s_OptionFlags", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.optionFlags);
- mir_snprintf(setting, "%s_AwayTime", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.awayTime);
- mir_snprintf(setting, "%s_NATime", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.naTime);
- mir_snprintf(setting, "%s_StatusFlags", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.statusFlags);
- mir_snprintf(setting, "%s_Lv1Status", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.lv1Status);
- mir_snprintf(setting, "%s_Lv2Status", protoName);
- db_set_w(NULL, MODULENAME, setting, (WORD)autoAwaySetting.lv2Status);
-
- return 0;
-}
-
-static void SetDialogItems(HWND hwndDlg, TAAAProtoSetting *setting)
-{
- bool bIsTimed = (setting->optionFlags & FLAG_ONMOUSE) != 0;
- bool bSetNA = (setting->optionFlags & FLAG_SETNA) != 0;
- bool bSaver = (setting->optionFlags & FLAG_ONSAVER) != 0;
- bool bFullScr = (setting->optionFlags & FLAG_FULLSCREEN) != 0;
-
- CheckDlgButton(hwndDlg, IDC_FULLSCREEN, bFullScr ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SCREENSAVE, bSaver ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_ONLOCK, (setting->optionFlags & FLAG_ONLOCK) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_TIMED, bIsTimed ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SETNA, bSetNA ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONFIRM, (setting->optionFlags & FLAG_CONFIRM) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_RESETSTATUS, (setting->optionFlags & FLAG_RESET) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MONITORMIRANDA, (setting->optionFlags & FLAG_MONITORMIRANDA) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LV2ONINACTIVE, (setting->optionFlags & FLAG_LV2ONINACTIVE) != 0 ? BST_CHECKED : BST_UNCHECKED);
-
- SetDlgItemInt(hwndDlg, IDC_AWAYTIME, setting->awayTime, FALSE);
- SetDlgItemInt(hwndDlg, IDC_NATIME, setting->naTime, FALSE);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETNA), bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LV2ONINACTIVE), bIsTimed && bSetNA);
- EnableWindow(GetDlgItem(hwndDlg, IDC_MONITORMIRANDA), bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_AWAYTIME), bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LV1AFTERSTR), bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LV1STATUS), bIsTimed || bSaver || bFullScr);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSLIST), bIsTimed || bSaver || bFullScr);
- EnableWindow(GetDlgItem(hwndDlg, IDC_RESETSTATUS), (bIsTimed || bSaver || bFullScr) && IsDlgButtonChecked(hwndDlg, IDC_LV2ONINACTIVE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CONFIRM), (bIsTimed || bSaver || bFullScr) && IsDlgButtonChecked(hwndDlg, IDC_LV2ONINACTIVE) && IsDlgButtonChecked(hwndDlg, IDC_RESETSTATUS));
- EnableWindow(GetDlgItem(hwndDlg, IDC_NATIME), bSetNA && bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETNASTR), bSetNA && bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETNASTR), bSetNA && bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LV2STATUS), bSetNA && bIsTimed);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOCOL), !bSettingSame);
-}
-
-static TAAAProtoSetting* GetSetting(HWND hwndDlg, TAAAProtoSetting *sameSetting)
-{
- if (bSettingSame)
- return sameSetting;
-
- int iItem = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_GETCURSEL, 0, 0);
- if (iItem == -1)
- return NULL;
-
- INT_PTR iData = (INT_PTR)SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_GETITEMDATA, iItem, 0);
- return (iData == -1) ? NULL : (TAAAProtoSetting*)iData;
-}
-
-static void SetDialogStatus(HWND hwndDlg, TAAAProtoSetting *sameSetting)
-{
- TAAAProtoSetting *setting = GetSetting(hwndDlg, sameSetting);
- if (setting == NULL)
- return;
-
- // create columns
- HWND hList = GetDlgItem(hwndDlg, IDC_STATUSLIST);
- ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
-
- LVCOLUMN lvCol = { 0 };
- lvCol.mask = LVCF_WIDTH | LVCF_TEXT;
- lvCol.pszText = TranslateT("Status");
- lvCol.cx = 118;
- ListView_InsertColumn(hList, 0, &lvCol);
-
- // get pointer to settings
- SetDialogItems(hwndDlg, setting);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Rules dialog window procedure
-
-static TAAAProtoSettingList optionSettings(10, CompareSettings);
-
-static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static TAAAProtoSetting* sameSetting;
- TAAAProtoSetting *setting;
- static int init;
-
- switch (msg) {
- case WM_INITDIALOG:
- init = TRUE;
- TranslateDialogDefault(hwndDlg);
-
- // copy the settings
- optionSettings = autoAwaySettings;
-
- sameSetting = (TAAAProtoSetting*)malloc(sizeof(TAAAProtoSetting));
- LoadAutoAwaySetting(*sameSetting, SETTING_ALL);
-
- // fill list from currentProtoSettings
- {
- for (int i = 0; i < optionSettings.getCount(); i++) {
- TAAAProtoSetting &p = optionSettings[i];
- int item = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)p.tszAccName);
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_SETITEMDATA, item, (LPARAM)&p);
- }
- }
- // set cursor to first protocol
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, CB_SETCURSEL, 0, 0);
-
- // status list
- SetDialogStatus(hwndDlg, sameSetting);
-
- SendMessage(hwndDlg, WM_COMMAND, (WPARAM)IDC_PROTOCOL, (LPARAM)0x11111111);
- init = FALSE;
- break;
-
- case WM_COMMAND:
- if ((HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED) && (HWND)lParam == GetFocus())
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- setting = GetSetting(hwndDlg, sameSetting);
- if (!setting)
- break;
-
- switch (LOWORD(wParam)) {
- case IDC_PROTOCOL:
- // status listview
- init = TRUE;
- {
- HWND hList = GetDlgItem(hwndDlg, IDC_STATUSLIST);
- ListView_DeleteAllItems(hList);
-
- int flags = 0;
- if (!bSettingSame)
- flags = CallProtoService(setting->szName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(setting->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
-
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
- lvItem.iItem = 0;
- lvItem.iSubItem = 0;
- for (int i = 0; i < _countof(statusModeList); i++) {
- if ((flags & statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
- lvItem.pszText = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
- lvItem.lParam = (LPARAM)statusModePf2List[i];
- ListView_InsertItem(hList, &lvItem);
- ListView_SetCheckState(hList, lvItem.iItem, setting->statusFlags & statusModePf2List[i] ? TRUE : FALSE);
- lvItem.iItem++;
- }
- }
- }
- init = FALSE;
- // status dropdown boxes
- {
- int flags = 0;
- if (!bSettingSame)
- flags = CallProtoService(setting->szName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(setting->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
-
- // clear box and add new status, loop status and check if compatible with proto
- SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_RESETCONTENT, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_RESETCONTENT, 0, 0);
- for (int i=0; i < _countof(statusModeList); i++) {
- if ((flags & statusModePf2List[i]) || statusModePf2List[i] == PF2_OFFLINE || bSettingSame) {
- wchar_t *statusMode = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
- int item = SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
- SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_SETITEMDATA, item, (LPARAM)statusModeList[i]);
- item = SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
- SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_SETITEMDATA, item, (LPARAM)statusModeList[i]);
- if (statusModeList[i] == setting->lv1Status) {
- SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_SETCURSEL, (WPARAM)item, 0);
- SetDlgItemText(hwndDlg, IDC_SETNASTR, CMStringW(FORMAT, TranslateT("minutes of %s mode"), statusMode));
- }
- if (statusModeList[i] == setting->lv2Status)
- SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_SETCURSEL, (WPARAM)item, 0);
- }
- }
- }
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_LV1STATUS:
- if (HIWORD(wParam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
-
- setting->lv1Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV1STATUS, CB_GETCURSEL, 0, 0), 0);
- SetDlgItemText(hwndDlg, IDC_SETNASTR, CMStringW(FORMAT, TranslateT("minutes of %s mode"), pcli->pfnGetStatusModeDescription(setting->lv1Status, 0)));
- break;
-
- case IDC_LV2STATUS:
- if (HIWORD(wParam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
-
- setting->lv2Status = (int)SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_LV2STATUS, CB_GETCURSEL, 0, 0), 0);
- break;
-
- case IDC_FULLSCREEN:
- setting->optionFlags ^= FLAG_FULLSCREEN;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_SCREENSAVE:
- setting->optionFlags ^= FLAG_ONSAVER;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_ONLOCK:
- setting->optionFlags ^= FLAG_ONLOCK;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_TIMED:
- setting->optionFlags ^= FLAG_ONMOUSE;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_SETNA:
- setting->optionFlags ^= FLAG_SETNA;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_AWAYTIME:
- setting->awayTime = GetDlgItemInt(hwndDlg,IDC_AWAYTIME, NULL, FALSE);
- break;
-
- case IDC_NATIME:
- setting->naTime = GetDlgItemInt(hwndDlg,IDC_NATIME, NULL, FALSE);
- break;
-
- case IDC_LV2ONINACTIVE:
- setting->optionFlags^=FLAG_LV2ONINACTIVE;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_CONFIRM:
- setting->optionFlags^=FLAG_CONFIRM;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_RESETSTATUS:
- setting->optionFlags^=FLAG_RESET;
- SetDialogItems(hwndDlg, setting);
- break;
-
- case IDC_MONITORMIRANDA:
- setting->optionFlags^=FLAG_MONITORMIRANDA;
- SetDialogItems(hwndDlg, setting);
- break;
- }
- break;
-
- case WM_SHOWWINDOW:
- init = TRUE;
-
- if (setting = GetSetting(hwndDlg, sameSetting))
- SetDialogItems(hwndDlg, setting);
-
- SendMessage(hwndDlg, WM_COMMAND, (WPARAM)IDC_PROTOCOL, (LPARAM)0x11111111);
- init = FALSE;
- break;
-
- case WM_NOTIFY:
- switch(((NMHDR*)lParam)->idFrom) {
- case IDC_STATUSLIST:
- if (init)
- break;
-
- switch(((NMHDR*)lParam)->code) {
- case LVN_ITEMCHANGED:
- NMLISTVIEW *nmlv = (NMLISTVIEW*)lParam;
- if (IsWindowVisible(GetDlgItem(hwndDlg, IDC_STATUSLIST)) && ((nmlv->uNewState ^ nmlv->uOldState) & LVIS_STATEIMAGEMASK)) {
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- if (setting = GetSetting(hwndDlg, sameSetting)) {
- HWND hList = GetDlgItem(hwndDlg, IDC_STATUSLIST);
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_PARAM;
- lvItem.iItem = nmlv->iItem;
- ListView_GetItem(hList, &lvItem);
- int pf2Status = lvItem.lParam;
- if (ListView_GetCheckState(hList, lvItem.iItem))
- setting->statusFlags |= pf2Status;
- else
- setting->statusFlags &= ~pf2Status;
- }
- }
- break;
- }
- break;
- }
-
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- if (bSettingSame)
- WriteAutoAwaySetting(*sameSetting, SETTING_ALL);
- else {
- for (int i=0; i < optionSettings.getCount(); i++ )
- WriteAutoAwaySetting(optionSettings[i], optionSettings[i].szName);
- }
- LoadOptions(autoAwaySettings, FALSE);
- }
- break;
-
- case WM_DESTROY:
- optionSettings.destroy();
- free(sameSetting);
- break;
- }
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// General options window procedure
-
-static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_IGNLOCK, db_get_b(NULL, MODULENAME, SETTING_IGNLOCK, FALSE) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_IGNSYSKEYS, db_get_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, FALSE) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_IGNALTCOMBO, db_get_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, FALSE) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, db_get_b(NULL, MODULENAME, SETTING_MONITORMOUSE, BST_CHECKED) != 0 ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, db_get_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, BST_CHECKED) != 0 ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, db_get_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, 5), FALSE);
- SetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, db_get_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, 5), FALSE);
- CheckDlgButton(hwndDlg, bSettingSame ? IDC_SAMESETTINGS : IDC_PERPROTOCOLSETTINGS, BST_CHECKED);
- ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), db_get_b(NULL, "Idle", "AAEnable", 0));
- break;
-
- case WM_SHOWWINDOW:
- ShowWindow(GetDlgItem(hwndDlg, IDC_IDLEWARNING), (db_get_b(NULL, "Idle", "AAEnable", 0)));
- break;
-
- case WM_COMMAND:
- if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus())
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- switch(LOWORD(wParam)) {
- case IDC_MONITORMOUSE:
- CheckDlgButton(hwndDlg, IDC_MONITORMOUSE, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE))&&(BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)))||(IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE)) ? BST_CHECKED : BST_UNCHECKED));
- break;
-
- case IDC_MONITORKEYBOARD:
- CheckDlgButton(hwndDlg, IDC_MONITORKEYBOARD, (((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE))&&(BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)))||(IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD)) ? BST_CHECKED : BST_UNCHECKED));
- break;
-
- case IDC_SAMESETTINGS:
- case IDC_PERPROTOCOLSETTINGS:
- bSettingSame = IsDlgButtonChecked(hwndDlg, IDC_SAMESETTINGS);
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY ) {
- db_set_b(NULL, MODULENAME, SETTING_IGNLOCK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNLOCK));
- db_set_b(NULL, MODULENAME, SETTING_IGNSYSKEYS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNSYSKEYS));
- db_set_b(NULL, MODULENAME, SETTING_IGNALTCOMBO, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_IGNALTCOMBO));
- db_set_b(NULL, MODULENAME, SETTING_SAMESETTINGS, (BYTE)bSettingSame);
- db_set_w(NULL, MODULENAME, SETTING_AWAYCHECKTIMEINSECS, (WORD)GetDlgItemInt(hwndDlg, IDC_AWAYCHECKTIMEINSECS, NULL, FALSE));
- db_set_w(NULL, MODULENAME, SETTING_CONFIRMDELAY, (WORD)GetDlgItemInt(hwndDlg, IDC_CONFIRMDELAY, NULL, FALSE));
- db_set_b(NULL, MODULENAME, SETTING_MONITORMOUSE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORMOUSE));
- db_set_b(NULL, MODULENAME, SETTING_MONITORKEYBOARD, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MONITORKEYBOARD));
- LoadOptions(autoAwaySettings, FALSE);
- }
- break;
- }
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Tab window procedure
-
-static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch(msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- RECT rcTabs, rcOptions, rcPage;
- bSettingSame = db_get_b(NULL, MODULENAME, SETTING_SAMESETTINGS, FALSE);
-
- // set tabs
- int tabCount = 0;
- HWND hTab = GetDlgItem(hwndDlg, IDC_TABS);
- GetWindowRect(hTab, &rcTabs);
- GetWindowRect(hwndDlg, &rcOptions);
-
- // general tab
- TCITEM tci = { 0 };
- tci.mask = TCIF_TEXT | TCIF_PARAM;
- tci.pszText = TranslateT("General");
- HWND hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_GENAUTOAWAY), hwndDlg, DlgProcAutoAwayGeneralOpts, (LPARAM)GetParent(hwndDlg));
- EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)hPage;
- GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
- ShowWindow(hPage, SW_HIDE);
- TabCtrl_InsertItem(hTab, tabCount++, &tci);
- HWND hShow = hPage;
-
- // rules tab
- tci.mask = TCIF_TEXT|TCIF_PARAM;
- tci.pszText = TranslateT("Rules");
- hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAY), hwndDlg, DlgProcAutoAwayRulesOpts, (LPARAM)GetParent(hwndDlg));
- EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)hPage;
- GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
- ShowWindow(hPage, SW_HIDE);
- TabCtrl_InsertItem(hTab, tabCount++, &tci);
-
- // messages tab
- tci.mask = TCIF_TEXT|TCIF_PARAM;
- tci.pszText = TranslateT("Status messages");
- hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_AUTOAWAYMSG), hwndDlg, DlgProcAutoAwayMsgOpts, (LPARAM)GetParent(hwndDlg));
- EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)hPage;
- GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right-rcTabs.left)-(rcPage.right-rcPage.left))/2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom-rcTabs.top)-(rcPage.bottom-rcPage.top))/2, rcPage.right-rcPage.left, rcPage.bottom-rcPage.top, TRUE);
- ShowWindow(hPage, SW_HIDE);
- TabCtrl_InsertItem(hTab, tabCount++, &tci);
-
- ShowWindow(hShow, SW_SHOW);
- }
- break;
-
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- if ((((NMHDR*)lParam)->idFrom == IDC_TABS)) {
- if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS)), &tci);
- ShowWindow((HWND)tci.lParam, SW_HIDE);
- }
- else if (((NMHDR*)lParam)->code == TCN_SELCHANGE) {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS)), &tci);
- ShowWindow((HWND)tci.lParam, SW_SHOW);
- }
- }
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- TCITEM tci;
- tci.mask = TCIF_PARAM;
- int count = TabCtrl_GetItemCount(GetDlgItem(hwndDlg, IDC_TABS));
- for (int i = 0; i < count; i++) {
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), i, &tci);
- SendMessage((HWND)tci.lParam, WM_NOTIFY, 0, lParam);
- }
- }
- break;
- }
-
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Options initialization procedure
-
-int AutoAwayOptInitialise(WPARAM wParam,LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.position = 1000000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
- odp.pszTitle = LPGEN("Auto Away");
- odp.pszGroup = LPGEN("Status");
- odp.pfnDlgProc = DlgProcAutoAwayTabs;
- odp.flags = ODPF_BOLDGROUPS;
- Options_AddPage(wParam, &odp);
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/version.h b/tools/_deprecated/StatusPlugins/AdvancedAutoAway/version.h deleted file mode 100644 index bda6bff95c..0000000000 --- a/tools/_deprecated/StatusPlugins/AdvancedAutoAway/version.h +++ /dev/null @@ -1,17 +0,0 @@ -// plugin version part
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 8
-#define __RELEASE_NUM 1
-#define __BUILD_NUM 1
-
-// other stuff for Version resource
-#include <stdver.h>
-
-// stuff that will be used in PluginInfo section and in Version resource
-#define __PLUGIN_NAME "Advanced Auto Away"
-#define __FILENAME "AdvancedAutoAway.dll"
-#define __DESC "An Auto Away module with some more options than the original."
-#define __AUTHOR "P Boon"
-#define __AUTHOREMAIL "unregistered@users.sourceforge.net"
-#define __AUTHORWEB "http://miranda-ng.org/p/AdvancedAutoAway/"
-#define __COPYRIGHT "© 2003-08 P. Boon, 2008-16 George Hazan"
diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus.txt b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus.txt deleted file mode 100644 index 55b3992487..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus.txt +++ /dev/null @@ -1,145 +0,0 @@ -KeepStatus plugin for Miranda IM v0.0.2.x
-unregistered@users.sourceforge.net
-
---- About ---
-
-KeepStatus, a connection checker, for use with (or without)
-StartupStatus and/or AdvancedAutoAway.
-
---- Usage ---
-
-There are two tabs in the options screen, one with basic options, and
-one with advanced options.
-
-The Basic Tab:
-
-[] Show popups, this will make use of the popup plugin to notify you
-in case of a connection loss or reconnect attempt.
-
-[] Check connection, with this option you can enable or disable the
-plugin.
-
-[count] Max. retries, in case connection is lost, this number of
-reconnect attempts will be made to restore the connection.
-
-[secs] Delay between retries, the number of seconds to wait before a
-new attempt is made.
-
-[] Don't reconnect if no internet connection seems available, if
-enabled, KS will not reconnect if Windows reports that no internet
-connection is available.
-
-[] Continuesly check for internet connection, if enables, KS will keep
-looking for a connection, either by asking Windows, or by pinging a
-host. You can specify multiple hosts by seperating them with
-spaces. If one host replies, a connection is assumed to be available.
-
-Note: All dial-up options are experimental. I cannot test these
-myself. Please let me know if you encounter problems with it (and you
-are willing to run some tests ;) )
-
-The Advanced Tab:
-
-[] Increase delay exponential, if enabled, the delay is multiplied by
-2 after each check. So checks are made at t=10, t=20, t=40, t=40,
-t=40, etc. if "Max. delay" = 40, "Initial delay" = 10, and connection
-was lost at t=0.
-
-[secs] Max. delay, the maximum delay allowed in case "increase delay
-exponential" is enabled.
-
-[secs] Max. protocol connecting time, -experimental-, this is the
-maximum number of seconds a protocol is allowed to be in the
-"connecting state" during a reconnect attempt. After this time, KS
-will force the protocol offline and make a new connection attempt.
-
-[] Ignore locked status of protocols, if enabled, KS will reconnect
-protocols in case of a global status change, even if they are locked
-by the clist (nicer/modern). You can enable this if protocols don't
-reconnect properly after a global status change using a clist that
-doesn't support locking.
-
-[] Set protocol offline before a connection attempt, this will force a
-protocol offline, before KS tries to restore its connection.
-
-[] Cancel all if a protocol connects from another location, this will
-not reconnect any of the protocols if one of them is connected from
-another location. The reason for this option is because not all
-protocols can detect a second login.
-
-[] Reconnect on APM resume, will reconnect you when you come back from
-standby or hibernation. If it for some reason fails, please try
-another clist.
-
-[] React on login errors, influences the way KS deals with login
-errors (default is to keep retrying). A login error can be "wrong
-password" or "server busy" for example.
-
-() Stop trying to reconnect, cancels reconnecting for the protocol.
-
-() Set delay to [secs], this will (possibly) increase the delay before
-a new attempt is made to restore the connection.
-
-Consider connection lost after [count] failed pings, tells KS how many
-ping attempts must fail before the connection should be considered
-"lost" and need to be restored.
-
-[secs] Continuously check interval, the delay between two pings.
-
---- Notes ---
-
-All options regarding dial-up connections are experimental.
-
---- Changelog ---
-
-0.0.2.92: - fixes for Miranda 0.8 (added MUID)
- - some minor fixes.
-
-0.0.2.85: - Different handling of timers
- - Partitial locked status support (full support requires changes in core)
- - Fix 'random' crash
-
-0.0.2.74: - A few more fixes
-
-0.0.2.73: - Fix when setting no status message
-
-0.0.2.72: - Fix options dialog glitch
-
-0.0.2.71: - Several bug fixes
- - Added options for continuously checking
- - Support for "protocol locking" by clist
- - Better NAS support (requires NAS v0.3.7.2 (build 2338; April 30, 2006))
- - Added more convenient service for developers MS_KS_ANNOUNCESTATUSCHANGE
- - Popups stay until next retry if delay is set to 0
- - Added option "Max. connecting time", see documentation
- - Added option to set protocol offline before reconnecting
- - Set global status when possible
- - Ping using ICMP instead of using InternetCheckConnection.
-
-0.0.2.4: - popups now show the icon of the first protocol that is about to be reconnected
- - added popup option to show additional info in popup
-
-0.0.2.3: - you can now change the delay when a login error occurs
-
-0.0.2.2: - many bugfixes (with great help of weinstock and ghazan)
- - added option to check internet connection by pinging
- - added more options for popups
- - added option to reconnect on APM resume (standby, hibernate)
-
-0.0.1.0: - doesn't reconnect when logged in from another location
- - Added: option reconnect on login failures
-
-0.0.0.4: - fixed: now also works with popups disabled. (thanks to Stefan Waldmann)
-
-0.0.0.3: - Added support for PluginUninstaller
- - bug fixes
-
-0.0.0.2: - Several bug fixes
- - Better menu handling
- - Fixed: Jabber/Tlen support (not in combination with (current) awaysys!)
-
-0.0.0.1: - First release without StartupStatus
-
---- Disclaimer ---
-
-If something terrible happens, don't blame me.
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj deleted file mode 100644 index ac91443e1c..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj +++ /dev/null @@ -1,226 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>KeepStatus</ProjectName>
- <ProjectGuid>{D548A54E-310B-4A86-A545-64BDD5748745}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11cd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <StringPooling>true</StringPooling>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="keepstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters deleted file mode 100644 index 9d4b6dcc2d..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_10.vcxproj.filters +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6fb49235-e0f0-4889-b5d7-c5f7a5b3a95f}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{be845fa0-70f3-4168-9620-2f231e2702af}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3795d706-cfb9-43c3-a967-b0759da5b8af}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="keepstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj deleted file mode 100644 index f79e8063b6..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj +++ /dev/null @@ -1,229 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>KeepStatus</ProjectName>
- <ProjectGuid>{D548A54E-310B-4A86-A545-64BDD5748745}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11cd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <StringPooling>true</StringPooling>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="keepstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj.filters b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj.filters deleted file mode 100644 index 9d4b6dcc2d..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_12.vcxproj.filters +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6fb49235-e0f0-4889-b5d7-c5f7a5b3a95f}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{be845fa0-70f3-4168-9620-2f231e2702af}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3795d706-cfb9-43c3-a967-b0759da5b8af}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="keepstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj deleted file mode 100644 index 52ab7ac406..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj +++ /dev/null @@ -1,229 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>KeepStatus</ProjectName>
- <ProjectGuid>{D548A54E-310B-4A86-A545-64BDD5748745}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11cd0000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <StringPooling>true</StringPooling>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <OptimizeReferences>true</OptimizeReferences>
- <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
- </Link>
- <Link>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>..\commonstatus.h</PrecompiledHeaderFile>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;KEEPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>ws2_32.lib;wininet.lib;UxTheme.lib;Iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11cd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp" />
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="keepstatus.h" />
- <ClInclude Include="..\resource.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj.filters b/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj.filters deleted file mode 100644 index 9d4b6dcc2d..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/KeepStatus_14.vcxproj.filters +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{6fb49235-e0f0-4889-b5d7-c5f7a5b3a95f}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{be845fa0-70f3-4168-9620-2f231e2702af}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3795d706-cfb9-43c3-a967-b0759da5b8af}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="keepstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="keepstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.cpp b/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.cpp deleted file mode 100644 index 54cb3028d4..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.cpp +++ /dev/null @@ -1,1209 +0,0 @@ -/* - KeepStatus Plugin for Miranda-IM (www.miranda-im.org) - Copyright 2003-2006 P. Boon - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include "../commonstatus.h" -#include "keepstatus.h" -#include "../resource.h" - -struct TimerInfo { - int timer; - int timeout; - BOOL restart; - int result; - HANDLE hEvent; -}; - -static mir_cs GenTimerCS, GenStatusCS, CheckContinueslyCS; - -static HANDLE hProtoAckHook = NULL; -static HANDLE hStatusChangeHook = NULL; -static HANDLE hCSStatusChangeHook = NULL; -static HANDLE hCSStatusChangeExHook = NULL; - -extern HANDLE hConnectionEvent; -extern PLUGININFOEX pluginInfoEx; - -static HWND hMessageWindow = NULL; - -static int CompareConnections(const TConnectionSettings *p1, const TConnectionSettings *p2) -{ - return mir_strcmp(p1->szName, p2->szName); -} - -static OBJLIST<TConnectionSettings> connectionSettings(10, CompareConnections); - -static UINT_PTR checkConnectionTimerId = 0; -static UINT_PTR afterCheckTimerId = 0; -static UINT_PTR processAckTimerId = 0; -static UINT_PTR checkContinTimerId = 0; -static UINT_PTR checkConnectingTimerId = 0; -static int retryCount = 0; -static BOOL bLastPingResult = TRUE; -// variables (options) -static int maxRetries = 0; -static int initDelay = 0; -static int currentDelay = 0; -static int maxDelay = 0; -static int ackDelay = 500; -static int increaseExponential = 0; -static int showConnectionPopups = 0; -// prototypes -static int StartTimer(int timer, int timeout, BOOL restart); -static int StopTimer(int timer); -int LoadMainOptions(); -static void GetCurrentConnectionSettings(); -static int AssignStatus(TConnectionSettings* connSetting, int status, int lastStatus, wchar_t *szMsg); -static int ProcessProtoAck(WPARAM wParam, LPARAM lParam); -static VOID CALLBACK CheckConnectingTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -static VOID CALLBACK CheckAckStatusTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -static int StatusChange(WPARAM wParam, LPARAM lParam); -static int CSStatusChange(WPARAM wParam, LPARAM lParam); -static int CSStatusChangeEx(WPARAM wParam, LPARAM lParam); -static VOID CALLBACK StatusChangeTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -static VOID CALLBACK CheckConnectionTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -static int StopChecking(); -static VOID CALLBACK AfterCheckTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -static void ContinueslyCheckFunction(void *arg); -static VOID CALLBACK CheckContinueslyTimer(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime); -INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam); - -static int ProcessPopup(int reason, LPARAM lParam); -static INT_PTR ShowPopup(wchar_t *msg, HICON hIcon); -LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); -static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); - -// options.c -extern int OptionsInit(WPARAM wparam, LPARAM); -extern int InitCommonStatus(); - -TConnectionSettings::TConnectionSettings(PROTOACCOUNT *pa) -{ - cbSize = sizeof(PROTOCOLSETTINGEX); - szName = pa->szModuleName; - tszAccName = pa->tszAccountName; - szMsg = NULL; - - int iStatus = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0); - AssignStatus(this, iStatus, iStatus, NULL); -} - -TConnectionSettings::~TConnectionSettings() -{ - if (szMsg != NULL) - free(szMsg); -} - -int LoadMainOptions() -{ - UnhookEvent(hProtoAckHook); - UnhookEvent(hStatusChangeHook); - UnhookEvent(hCSStatusChangeHook); - UnhookEvent(hCSStatusChangeExHook); - hProtoAckHook = hStatusChangeHook = hCSStatusChangeHook = hCSStatusChangeExHook = 0; - - if (IsWindow(hMessageWindow)) - DestroyWindow(hMessageWindow); - if (StartTimer(IDT_CHECKCONTIN, -1, FALSE)) { - WSACleanup(); - } - StopTimer(IDT_CHECKCONN | IDT_PROCESSACK | IDT_AFTERCHECK | IDT_CHECKCONTIN | IDT_CHECKCONNECTING); - - GetCurrentConnectionSettings(); - - if (db_get_b(NULL, MODULENAME, SETTING_CHECKCONNECTION, FALSE)) { - if (db_get_b(NULL, MODULENAME, SETTING_CONTCHECK, FALSE)) { - if (db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE)) { - WSADATA wsaData; - WSAStartup(MAKEWORD(2, 2), &wsaData); - } - StartTimer(IDT_CHECKCONTIN, 0, FALSE); - } - increaseExponential = db_get_b(NULL, MODULENAME, SETTING_INCREASEEXPONENTIAL, FALSE); - currentDelay = initDelay = 1000 * db_get_dw(NULL, MODULENAME, SETTING_INITDELAY, DEFAULT_INITDELAY); - maxDelay = 1000 * db_get_dw(NULL, MODULENAME, SETTING_MAXDELAY, DEFAULT_MAXDELAY); - maxRetries = db_get_b(NULL, MODULENAME, SETTING_MAXRETRIES, 0); - if (maxRetries == 0) - maxRetries = -1; - hProtoAckHook = HookEvent(ME_PROTO_ACK, ProcessProtoAck); - hStatusChangeHook = HookEvent(ME_CLIST_STATUSMODECHANGE, StatusChange); - if (ServiceExists(ME_CS_STATUSCHANGE)) - hCSStatusChangeHook = HookEvent(ME_CS_STATUSCHANGE, CSStatusChange); - hCSStatusChangeExHook = HookEvent(ME_CS_STATUSCHANGEEX, CSStatusChangeEx); - if (db_get_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, 0) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000)) { - if (!IsWindow(hMessageWindow)) { - hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); - SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc); - } - } - retryCount = 0; - } - - return 0; -} - -static void GetCurrentConnectionSettings() -{ - connectionSettings.destroy(); - - int count; - PROTOACCOUNT** protos; - Proto_EnumAccounts(&count, &protos); - - for (int i = 0; i < count; i++) - if (IsSuitableProto(protos[i])) - connectionSettings.insert(new TConnectionSettings(protos[i])); -} - -static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy() -{ - mir_cslock lck(GenStatusCS); - PROTOCOLSETTINGEX **ps = (PROTOCOLSETTINGEX**)malloc(connectionSettings.getCount()*sizeof(PROTOCOLSETTINGEX *)); - if (ps == NULL) { - return NULL; - } - for (int i = 0; i < connectionSettings.getCount(); i++) { - ps[i] = (PROTOCOLSETTINGEX*)calloc(1, sizeof(PROTOCOLSETTINGEX)); - if (ps[i] == NULL) { - free(ps); - return NULL; - } - - TConnectionSettings& cs = connectionSettings[i]; - ps[i]->cbSize = sizeof(PROTOCOLSETTINGEX); - ps[i]->lastStatus = cs.lastStatus; - ps[i]->status = cs.status; - ps[i]->szMsg = NULL; - ps[i]->szName = cs.szName; - ps[i]->tszAccName = cs.tszAccName; - } - - return ps; -} - -static void FreeProtoSettings(PROTOCOLSETTINGEX** ps) -{ - for (int i = 0; i < connectionSettings.getCount(); i++) { - if (ps[i]->szMsg != NULL) - free(ps[i]->szMsg); - free(ps[i]); - } - free(ps); -} - -static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, wchar_t *szMsg) -{ - if (status < MIN_STATUS || status > MAX_STATUS) - return -1; - - mir_cslock lck(GenStatusCS); - - char dbSetting[128]; - mir_snprintf(dbSetting, "%s_enabled", cs->szName); - cs->lastStatus = lastStatus == 0 ? cs->status : lastStatus; - if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) - cs->status = ID_STATUS_DISABLED; - else if (status == ID_STATUS_LAST) - cs->status = cs->lastStatus; - else - cs->status = status; - - log_infoA("KeepStatus: assigning status %d to %s", cs->status, cs->szName); - - if (szMsg != NULL && mir_wstrcmp(szMsg, cs->szMsg)) { - if (cs->szMsg != NULL) - free(cs->szMsg); - - cs->szMsg = wcsdup(szMsg); - } - else if (szMsg != cs->szMsg) { - if (cs->szMsg != NULL) - free(cs->szMsg); - - cs->szMsg = NULL; - } - return 0; -} - -static int GetStatus(const TConnectionSettings& cs) -{ - if (cs.status == ID_STATUS_CURRENT) - return CallProtoService(cs.szName, PS_GETSTATUS, 0, 0); - - return cs.status; -} - -static int SetCurrentStatus() -{ - PROTOCOLSETTINGEX **ps = GetCurrentProtoSettingsCopy(); - for (int i = 0; i < connectionSettings.getCount(); i++) { - int realStatus = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0); - if (ps[i]->status == ID_STATUS_DISABLED || ps[i]->status == realStatus) { // ignore this proto by removing it's name (not so nice) - ps[i]->szName = ""; - } - else if ((ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (db_get_b(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE))) { - // force offline before reconnecting - log_infoA("KeepStatus: Setting %s offline before making a new connection attempt", ps[i]->szName); - CallProtoService(ps[i]->szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0); - } - } - ProcessPopup(KS_CONN_STATE_RETRY, (LPARAM)ps); - INT_PTR ret = CallService(MS_CS_SETSTATUSEX, (WPARAM)&ps, 0); - FreeProtoSettings(ps); - - return ret; -} - -static int StatusChange(WPARAM wParam, LPARAM lParam) -{ - char* szProto = (char *)lParam; - if (szProto == NULL) { // global status change - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (GetStatus(cs) != ID_STATUS_DISABLED) - if (db_get_b(NULL, MODULENAME, SETTING_NOLOCKED, 0) || - !db_get_b(NULL, cs.szName, "LockMainStatus", 0)) - AssignStatus(&cs, wParam, 0, cs.szMsg); - } - } - else { - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (GetStatus(cs) != ID_STATUS_DISABLED && !mir_strcmp(cs.szName, szProto)) - AssignStatus(&cs, wParam, 0, cs.szMsg); - } - } - - return 0; -} - -static int CSStatusChange(WPARAM wParam, LPARAM) -{ - // the status was changed by commonstatus (old) - if (wParam != 0) { - PROTOCOLSETTING** protoSettings = *(PROTOCOLSETTING***)wParam; - - if (protoSettings == NULL) - return -1; - - for (int i = 0; i < connectionSettings.getCount(); i++) { - for (int j = 0; j < connectionSettings.getCount(); j++) { - if ((protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL)) - continue; - - if (!mir_strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) - if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED) - AssignStatus(&connectionSettings[j], protoSettings[i]->status, protoSettings[i]->lastStatus, connectionSettings[j].szMsg); - } - } - } - - return 0; -} - -static int CSStatusChangeEx(WPARAM wParam, LPARAM) -{ - // the status was changed by commonstatus (new) - if (wParam != 0) { - PROTOCOLSETTINGEX** protoSettings = *(PROTOCOLSETTINGEX***)wParam; - - if (protoSettings == NULL) - return -1; - - for (int i = 0; i < connectionSettings.getCount(); i++) { - for (int j = 0; j < connectionSettings.getCount(); j++) { - if ((protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL)) - continue; - if (!mir_strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) { - if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED) - AssignStatus(&connectionSettings[j], protoSettings[i]->status, protoSettings[i]->lastStatus, protoSettings[i]->szMsg); - } - } - } - } - - return 0; -} - -static int StartTimerFunction(int timer, int timeout, BOOL restart) -{ - int res = 0; - - mir_cslock lck(GenTimerCS); - log_debugA("StartTimer: %d, %d, %d", timer, timeout, restart); - log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId); - if (timer & IDT_PROCESSACK) { - res = (processAckTimerId == 0) ? 0 : 1; - if (((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart)) { - if (timeout != -1) { - if (restart) - KillTimer(NULL, processAckTimerId); - if (timeout == 0) - processAckTimerId = SetTimer(NULL, 0, ackDelay, CheckAckStatusTimer); - else - processAckTimerId = SetTimer(NULL, 0, timeout, CheckAckStatusTimer); - } - } - } - - if (timer & IDT_CHECKCONN) { - res = (checkConnectionTimerId == 0 ? 0 : 1) || res; - if ((checkConnectionTimerId == 0) || (restart)) { - if (timeout != -1) { - if (restart) - KillTimer(NULL, checkConnectionTimerId); - if (timeout == 0) - checkConnectionTimerId = SetTimer(NULL, 0, initDelay, CheckConnectionTimer); - else - checkConnectionTimerId = SetTimer(NULL, 0, timeout, CheckConnectionTimer); - } - } - } - - if (timer & IDT_AFTERCHECK) { - res = (afterCheckTimerId == 0 ? 0 : 1) || res; - if ((afterCheckTimerId == 0) || (restart)) { - if (timeout != -1) { - if (restart) - KillTimer(NULL, afterCheckTimerId); - if (timeout == 0) - afterCheckTimerId = SetTimer(NULL, 0, initDelay / 2, AfterCheckTimer); - else - afterCheckTimerId = SetTimer(NULL, 0, timeout, AfterCheckTimer); - } - } - } - - if (timer & IDT_CHECKCONTIN) { - res = (checkContinTimerId == 0 ? 0 : 1) || res; - if ((checkContinTimerId == 0) || (restart)) { - if (timeout != -1) { - if (restart) - KillTimer(NULL, checkContinTimerId); - if (timeout == 0) { - checkContinTimerId = SetTimer(NULL, 0, 1000 * db_get_dw(NULL, MODULENAME, SETTING_CNTDELAY, CHECKCONTIN_DELAY), CheckContinueslyTimer); - } - else - checkContinTimerId = SetTimer(NULL, 0, timeout, CheckContinueslyTimer); - } - } - } - - if (timer & IDT_CHECKCONNECTING) { - res = (checkConnectingTimerId == 0 ? 0 : 1) || res; - if ((checkConnectingTimerId == 0) || (restart)) { - if (timeout != -1) { - if (restart) - KillTimer(NULL, checkConnectingTimerId); - if (timeout == 0) { - timeout = initDelay / 2; - } - checkConnectingTimerId = SetTimer(NULL, 0, timeout, CheckConnectingTimer); - } - } - } - - log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId); - log_debugA("StartTimer done %d", res); - - return res; -} - -static VOID CALLBACK StartTimerApcProc(ULONG_PTR param) -{ - struct TimerInfo *ti = (struct TimerInfo *)param; - log_debugA("StartTimerApcProc %d %d %d", ti->timer, ti->timeout, ti->restart); - ti->result = StartTimerFunction(ti->timer, ti->timeout, ti->restart); - SetEvent(ti->hEvent); -} - -static int StartTimer(int timer, int timeout, BOOL restart) -{ - if (GetCurrentThreadId() == mainThreadId) - return StartTimerFunction(timer, timeout, restart); - - TimerInfo *ti = (TimerInfo*)calloc(1, sizeof(struct TimerInfo)); - ti->timer = timer; - ti->timeout = timeout; - ti->restart = restart; - ti->hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - QueueUserAPC(StartTimerApcProc, hMainThread, (ULONG_PTR)ti); - WaitForSingleObject(ti->hEvent, INFINITE); - CloseHandle(ti->hEvent); - int res = ti->result; - free(ti); - return res; -} - -static int StopTimer(int timer) -{ - int res = 0; - - mir_cslock lck(GenTimerCS); - log_debugA("StopTimer %d", timer); - log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId); - - if (timer & IDT_PROCESSACK) { - if (processAckTimerId == 0) - res = 0; - else { - KillTimer(NULL, processAckTimerId); - processAckTimerId = 0; - res = 1; - } - } - - if (timer & IDT_CHECKCONN) { - if (checkConnectionTimerId == 0) - res = 0 || res; - else { - KillTimer(NULL, checkConnectionTimerId); - checkConnectionTimerId = 0; - res = 1; - } - } - - if (timer & IDT_AFTERCHECK) { - if (afterCheckTimerId == 0) - res = 0 || res; - else { - KillTimer(NULL, afterCheckTimerId); - afterCheckTimerId = 0; - res = 1; - } - } - - if (timer & IDT_CHECKCONTIN) { - if (checkContinTimerId == 0) - res = 0 || res; - else { - KillTimer(NULL, checkContinTimerId); - checkContinTimerId = 0; - res = 1; - } - } - - if (timer & IDT_CHECKCONNECTING) { - if (checkConnectingTimerId == 0) - res = 0 || res; - else { - KillTimer(NULL, checkConnectingTimerId); - checkConnectingTimerId = 0; - res = 1; - } - } - - log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId); - log_debugA("StopTimer done %d", res); - - return res; -} - -static int ProcessProtoAck(WPARAM, LPARAM lParam) -{ - ACKDATA *ack = (ACKDATA*)lParam; - - if (ack->type != ACKTYPE_STATUS && ack->type != ACKTYPE_LOGIN) - return 0; - - char dbSetting[128]; - mir_snprintf(dbSetting, "%s_enabled", ack->szModule); - if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) - return 0; - - if (ack->type == ACKTYPE_STATUS && ack->result == ACKRESULT_SUCCESS) { - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(cs.szName, ack->szModule)) - cs.lastStatusAckTime = GetTickCount(); - } - StartTimer(IDT_PROCESSACK, 0, FALSE); - return 0; - } - - if (ack->type == ACKTYPE_LOGIN) { - if (ack->lParam == LOGINERR_OTHERLOCATION) { - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(ack->szModule, cs.szName)) { - AssignStatus(&cs, ID_STATUS_OFFLINE, 0, NULL); - if (db_get_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, 0)) { - StopTimer(IDT_PROCESSACK); - for (int j = 0; j < connectionSettings.getCount(); j++) { - AssignStatus(&connectionSettings[j], ID_STATUS_OFFLINE, 0, NULL); - } - } - - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_OTHERLOCATION, (LPARAM)cs.szName); - ProcessPopup(KS_CONN_STATE_OTHERLOCATION, (LPARAM)ack->szModule); - } - } - } - else if (ack->result == ACKRESULT_FAILED) { - // login failed - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_LOGINERROR, (LPARAM)ack->szModule); - switch (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING)) { - case LOGINERR_CANCEL: - { - log_infoA("KeepStatus: cancel on login error (%s)", ack->szModule); - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(ack->szModule, cs.szName)) - AssignStatus(&cs, ID_STATUS_OFFLINE, 0, NULL); - } - ProcessPopup(KS_CONN_STATE_LOGINERROR, (LPARAM)ack->szModule); - StopChecking(); - } - break; - - case LOGINERR_SETDELAY: - { - int newDelay = 1000 * db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY); - log_infoA("KeepStatus: set delay to %d on login error (%s)", newDelay / 1000, ack->szModule); - StartTimer(IDT_CHECKCONN, newDelay, TRUE); - } - ProcessPopup(KS_CONN_STATE_LOGINERROR, (LPARAM)ack->szModule); - break; - - default: - case LOGINERR_NOTHING: - StartTimer(IDT_PROCESSACK, 0, FALSE); - break; - } - } - } - - return 0; -} - -static VOID CALLBACK CheckConnectingTimer(HWND, UINT, UINT_PTR, DWORD) -{ - int maxConnectingTime; - - StopTimer(IDT_CHECKCONNECTING); - //log_debugA("KeepStatus: CheckConnectingTimer"); - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - - int curStatus = GetStatus(cs); - if (IsStatusConnecting(curStatus)) { // connecting - maxConnectingTime = db_get_dw(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0); - if (maxConnectingTime > 0) { - if ((unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime) / 1000)) { - // set offline - log_infoA("KeepStatus: %s is too long connecting; setting offline", cs.szName); - CallProtoService(cs.szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0); - } - } - } - } -} - -static VOID CALLBACK CheckAckStatusTimer(HWND, UINT, UINT_PTR, DWORD) -{ - int maxConnectingTime; - bool needChecking = false; - - StopTimer(IDT_PROCESSACK); - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - - int curStatus = GetStatus(cs); - int newStatus = CallProtoService(cs.szName, PS_GETSTATUS, 0, 0); - // ok, np - if (curStatus == ID_STATUS_CURRENT || curStatus == ID_STATUS_DISABLED || curStatus == newStatus || newStatus > MAX_STATUS) - continue; - - if (IsStatusConnecting(newStatus)) { // connecting - maxConnectingTime = db_get_dw(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0); - if (maxConnectingTime > 0) - StartTimer(IDT_CHECKCONNECTING, (maxConnectingTime * 1000 - (GetTickCount() - cs.lastStatusAckTime)), FALSE); - } - // keepstatus' administration was wrong! - else if (newStatus != ID_STATUS_OFFLINE) - AssignStatus(&cs, newStatus, 0, NULL); - - // connection lost - else if (newStatus == ID_STATUS_OFFLINE) {// start checking connection - if (!StartTimer(IDT_CHECKCONN, -1, FALSE)) { /* check if not already checking */ - needChecking = true; - log_infoA("KeepStatus: connection lost! (%s)", cs.szName); - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_LOST, (LPARAM)cs.szName); - ProcessPopup(KS_CONN_STATE_LOST, (LPARAM)cs.szName); - } - } - } - - if (needChecking) - StartTimer(IDT_CHECKCONN, initDelay, FALSE); -} - -static VOID CALLBACK CheckConnectionTimer(HWND, UINT, UINT_PTR, DWORD) -{ - int shouldBeStatus, realStatus; - HICON hIcon; - - log_debugA("CheckConnectionTimer"); - bool setStatus = false; - if (showConnectionPopups) - hIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); - - for (int i = 0; i < connectionSettings.getCount() && !setStatus; i++) { - TConnectionSettings& cs = connectionSettings[i]; - realStatus = CallProtoService(cs.szName, PS_GETSTATUS, 0, 0); - shouldBeStatus = GetStatus(cs); - if (shouldBeStatus == ID_STATUS_LAST) - shouldBeStatus = cs.lastStatus; - if (shouldBeStatus == ID_STATUS_DISABLED) - continue; - if ((shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) { - setStatus = true; - if (showConnectionPopups) - hIcon = Skin_LoadProtoIcon(cs.szName, ID_STATUS_OFFLINE); - } - } - - // one of the status was wrong - if (setStatus && (maxRetries == -1 || retryCount < maxRetries)) { - if (increaseExponential) - currentDelay = min(2 * currentDelay, maxDelay); - - if (((db_get_b(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult))) { - // no network - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_RETRYNOCONN, (LPARAM)retryCount + 1); - ProcessPopup(KS_CONN_STATE_RETRYNOCONN, 0); - } - else { - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_RETRY, (LPARAM)retryCount + 1); - /* set the status */ - SetCurrentStatus(); - } - retryCount += 1; - StartTimer(IDT_AFTERCHECK, min(currentDelay, AFTERCHECK_DELAY) / 2, FALSE); - StartTimer(IDT_CHECKCONN, currentDelay, TRUE); // restart this timer - } - else // all status set ok already, or stop checking - StopChecking(); - - log_debugA("CheckConnectionTimer done"); -} - -static int StopChecking() -{ - StopTimer(IDT_CHECKCONN | IDT_PROCESSACK | IDT_AFTERCHECK | IDT_CHECKCONNECTING); - - BOOL isOk = TRUE; - for (int i = 0; i < connectionSettings.getCount() && isOk; i++) { - TConnectionSettings& cs = connectionSettings[i]; - int curStatus = GetStatus(cs); - int newStatus = CallProtoService(cs.szName, PS_GETSTATUS, 0, 0); - if (newStatus != curStatus && curStatus != ID_STATUS_DISABLED) { - AssignStatus(&cs, newStatus, 0, NULL); - isOk = FALSE; - } - } - - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_STOPPEDCHECKING, (LPARAM)isOk); - ProcessPopup(KS_CONN_STATE_STOPPEDCHECKING, (LPARAM)isOk); - log_infoA("KeepStatus: stop checking (%s)", isOk ? "success" : "failure"); - retryCount = 0; - currentDelay = initDelay; - - return 0; -} - -static VOID CALLBACK AfterCheckTimer(HWND, UINT, UINT_PTR, DWORD) -{ - // after each connection check, this function is called to see if connection was recovered - StopTimer(IDT_AFTERCHECK); - - bool setStatus = false; - - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - int realStatus = CallProtoService(cs.szName, PS_GETSTATUS, 0, 0); - int shouldBeStatus = GetStatus(cs); - if (shouldBeStatus == ID_STATUS_LAST) // this should never happen - shouldBeStatus = cs.lastStatus; - if (shouldBeStatus == ID_STATUS_DISABLED) // (on ignoring proto) - continue; - if ((shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) - setStatus = true; - } - - if (!setStatus || retryCount == maxRetries) - StopChecking(); -} - -static void CheckContinueslyFunction(void *) -{ - Thread_SetName("KeepStatus: CheckContinueslyFunction"); - - static int pingFailures = 0; - - // one at the time is enough, do it the 'easy' way - mir_cslock lck(CheckContinueslyCS); - - // do a ping, even if reconnecting - bool doPing = false; - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - int shouldBeStatus = GetStatus(cs); - if (shouldBeStatus == ID_STATUS_LAST) - shouldBeStatus = cs.lastStatus; - - if (shouldBeStatus == ID_STATUS_DISABLED) - continue; - - if (shouldBeStatus != ID_STATUS_OFFLINE) { - log_debugA("CheckContinueslyFunction: %s should be %d", cs.szName, shouldBeStatus); - doPing = true; - } - } - - if (!doPing) { - log_debugA("CheckContinueslyFunction: All protocols should be offline, no need to check connection"); - return; - } - - BOOL ping = db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE); - if (ping) { - DBVARIANT dbv; - if (db_get(NULL, MODULENAME, SETTING_PINGHOST, &dbv)) - ping = FALSE; - else { - char *start, *end; - char host[MAX_PATH]; - DWORD *addr; - struct hostent *hostent; - char reply[sizeof(ICMP_ECHO_REPLY) + 8]; - - bLastPingResult = FALSE; - HANDLE hICMPFile = (HANDLE)IcmpCreateFile(); - if (hICMPFile == INVALID_HANDLE_VALUE) { - bLastPingResult = TRUE; - log_infoA("KeepStatus: icmp.dll error (2)"); - } - if (bLastPingResult == FALSE) { - start = dbv.pszVal; - while ((*start != '\0') && (!bLastPingResult)) { - end = start; - while ((*end != ' ') && (*end != '\0')) - end++; - memset(host, '\0', sizeof(host)); - strncpy(host, start, end - start); - hostent = gethostbyname(host); - if (hostent != NULL) { - addr = (DWORD *)(*hostent->h_addr_list); - bLastPingResult = (IcmpSendEcho(hICMPFile, *addr, 0, 0, NULL, reply, sizeof(ICMP_ECHO_REPLY) + 8, 5000) != 0); - - if (bLastPingResult) - pingFailures = 0; - else - pingFailures++; - - log_debugA("CheckContinueslyFunction: pinging %s (result: %d/%d)", host, bLastPingResult, pingFailures); - } - else log_debugA("CheckContinueslyFunction: unable to resolve %s", host); - - start = end; - while (*start == ' ') - start++; - } - } - IcmpCloseHandle(hICMPFile); - } - db_free(&dbv); - } - - if (StartTimer(IDT_CHECKCONN, -1, FALSE)) { - return; // already connecting, leave - } - - if (((!ping) && (!InternetGetConnectedState(NULL, 0))) || ((ping) && (!bLastPingResult) && (pingFailures >= db_get_w(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT)))) { - pingFailures = 0; - - int count; - PROTOACCOUNT** protos; - Proto_EnumAccounts(&count, &protos); - - for (int i = 0; i < count; i++) { - if (!IsSuitableProto(protos[i])) - continue; - - if (IsStatusConnecting(CallProtoService(protos[i]->szModuleName, PS_GETSTATUS, 0, 0))) { - log_debugA("CheckContinueslyFunction: %s is connecting", protos[i]->szModuleName); - continue; // connecting, leave alone - } - if (IsProtocolEnabledService(0, (LPARAM)protos[i]->szModuleName)) { - log_debugA("CheckContinueslyFunction: forcing %s offline", protos[i]->szModuleName); - CallProtoService(protos[i]->szModuleName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0); - } - } - if (StartTimer(IDT_CHECKCONN | IDT_PROCESSACK, -1, FALSE)) {// are our 'set offlines' noticed? - log_debugA("CheckContinueslyFunction: currently checking"); - return; - } - log_infoA("KeepStatus: connection lost! (continuesly check)"); - NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_LOST, 0); - ProcessPopup(KS_CONN_STATE_LOST, 0); - maxRetries = db_get_b(NULL, MODULENAME, SETTING_MAXRETRIES, 0); - if (maxRetries == 0) - maxRetries = -1; - StartTimer(IDT_CHECKCONN, initDelay, FALSE); - } -} - -static VOID CALLBACK CheckContinueslyTimer(HWND, UINT, UINT_PTR, DWORD) -{ - if (db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE)) - mir_forkthread(CheckContinueslyFunction, NULL); - else - CheckContinueslyFunction(NULL); -} - -// =============== popup ====================== -static wchar_t* GetHumanName(LPARAM lParam) -{ - PROTOACCOUNT *ProtoAccount = Proto_GetAccount((char*)lParam); - return (ProtoAccount != NULL) ? ProtoAccount->tszAccountName : TranslateT("Protocol"); -} - -static int ProcessPopup(int reason, LPARAM lParam) -{ - HICON hIcon = NULL; - wchar_t text[MAX_SECONDLINE]; - - if (!db_get_b(NULL, MODULENAME, SETTING_SHOWCONNECTIONPOPUPS, FALSE) || !ServiceExists(MS_POPUP_ADDPOPUPT)) - return -1; - - switch (reason) { - case KS_CONN_STATE_OTHERLOCATION: // lParam = 1 proto - if (!db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)) - return -1; - - hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); - mir_snwprintf(text, TranslateT("%s connected from another location"), GetHumanName(lParam)); - break; - - case KS_CONN_STATE_LOGINERROR: // lParam = 1 proto - if (!db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)) - return -1; - - hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); - if (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING) == LOGINERR_CANCEL) - mir_snwprintf(text, TranslateT("%s login error, cancel reconnecting"), GetHumanName(lParam)); - else if (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING) == LOGINERR_SETDELAY) - mir_snwprintf(text, TranslateT("%s login error (next retry (%d) in %d s)"), GetHumanName(lParam), retryCount + 1, db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY)); - else - return -1; - break; - - case KS_CONN_STATE_LOST: // lParam = 1 proto, or NULL - if (!db_get_b(NULL, MODULENAME, SETTING_PUCONNLOST, TRUE)) - return -1; - - if (lParam) { // Óêàçàòåëü íà èìÿ ìîäóëÿ. - hIcon = Skin_LoadProtoIcon((char*)lParam, SKINICON_STATUS_OFFLINE); - mir_snwprintf(text, TranslateT("%s status error (next retry (%d) in %d s)"), GetHumanName(lParam), retryCount + 1, currentDelay / 1000); - } - else mir_snwprintf(text, TranslateT("Status error (next retry (%d) in %d s)"), retryCount + 1, currentDelay / 1000); - break; - - case KS_CONN_STATE_RETRY: // lParam = PROTOCOLSETTINGEX** - if (!db_get_b(NULL, MODULENAME, SETTING_PUCONNRETRY, TRUE)) - return -1; - if (lParam) { - PROTOCOLSETTINGEX **ps = (PROTOCOLSETTINGEX **)lParam; - wchar_t protoInfoLine[512], protoInfo[MAX_SECONDLINE]; - memset(protoInfoLine, '\0', sizeof(protoInfoLine)); - memset(protoInfo, '\0', sizeof(protoInfo)); - mir_wstrcpy(protoInfo, L"\r\n"); - for (int i = 0; i < connectionSettings.getCount(); i++) { - if (mir_wstrlen(ps[i]->tszAccName) > 0 && mir_strlen(ps[i]->szName) > 0) { - if (db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { - mir_snwprintf(protoInfoLine, TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, 0)); - mir_wstrncat(protoInfo, protoInfoLine, _countof(protoInfo) - mir_wstrlen(protoInfo) - 1); - } - } - } - hIcon = Skin_LoadProtoIcon(ps[0]->szName, SKINICON_STATUS_OFFLINE); - - rtrimw(protoInfo); - if (retryCount == (maxRetries - 1)) - mir_snwprintf(text, TranslateT("Resetting status... (last try (%d))%s"), retryCount + 1, protoInfo); - else - mir_snwprintf(text, TranslateT("Resetting status... (next retry (%d) in %d s)%s"), retryCount + 2, currentDelay / 1000, protoInfo); - } - break; - - case KS_CONN_STATE_RETRYNOCONN: // lParam = NULL - if (!db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)) - return -1; - - if (retryCount == maxRetries - 1) - mir_snwprintf(text, TranslateT("No internet connection seems available... (last try (%d))"), retryCount + 1); - else - mir_snwprintf(text, TranslateT("No internet connection seems available... (next retry (%d) in %d s)"), retryCount + 2, currentDelay / 1000); - break; - - case KS_CONN_STATE_STOPPEDCHECKING: // lParam == BOOL succes - if (!db_get_b(NULL, MODULENAME, SETTING_PURESULT, TRUE)) - return -1; - - if (lParam) { - hIcon = Skin_LoadIcon(SKINICON_STATUS_ONLINE); - mir_snwprintf(text, TranslateT("Status was set ok")); - } - else mir_snwprintf(text, TranslateT("Giving up")); - break; - } - if (hIcon == NULL) - hIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE); - - log_info(L"KeepStatus: %s", text); - return ShowPopup(text, hIcon); -} - -static INT_PTR ShowPopup(wchar_t *msg, HICON hIcon) -{ - POPUPDATAT ppd = { 0 }; - ppd.lchIcon = hIcon; - wcsncpy(ppd.lptzContactName, TranslateT("KeepStatus"), MAX_CONTACTNAME); - wcsncpy(ppd.lptzText, msg, MAX_SECONDLINE); - if (db_get_b(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0)) { - ppd.colorBack = GetSysColor(COLOR_BTNFACE); - ppd.colorText = GetSysColor(COLOR_WINDOWTEXT); - } - else if (!db_get_b(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) { - ppd.colorBack = db_get_dw(NULL, MODULENAME, SETTING_POPUP_BACKCOLOR, 0xAAAAAA); - ppd.colorText = db_get_dw(NULL, MODULENAME, SETTING_POPUP_TEXTCOLOR, 0x0000CC); - } - ppd.PluginWindowProc = PopupDlgProc; - - switch (db_get_b(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) { - case POPUP_DELAYCUSTOM: - ppd.iSeconds = (int)db_get_dw(NULL, MODULENAME, SETTING_POPUP_TIMEOUT, 0); - if (ppd.iSeconds == 0) - ppd.iSeconds = currentDelay / 1000 - 1; - break; - - case POPUP_DELAYPERMANENT: - ppd.iSeconds = -1; - break; - - case POPUP_DELAYFROMPU: - default: - ppd.iSeconds = 0; - break; - } - return PUAddPopupT(&ppd); -} - -LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) { - case WM_CONTEXTMENU: // right - case WM_COMMAND: // left - switch (db_get_b(NULL, MODULENAME, - (message == WM_COMMAND) ? SETTING_POPUP_LEFTCLICK : SETTING_POPUP_RIGHTCLICK, - POPUP_ACT_CLOSEPOPUP)) { - case POPUP_ACT_CANCEL: - // cancel timer - StopChecking(); - PUDeletePopup(hWnd); - break; - - case POPUP_ACT_CLOSEPOPUP: - // close the popup - PUDeletePopup(hWnd); - break; - } - break; - } - - return DefWindowProc(hWnd, message, wParam, lParam); -} - -// =============== services =================== -INT_PTR StopReconnectingService(WPARAM, LPARAM) -{ - int ret = StartTimer(IDT_CHECKCONN | IDT_AFTERCHECK, -1, FALSE); - StopChecking(); - return ret; -} - -INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam) -{ - char *szProto = (char *)lParam; - if (szProto == NULL) - return -1; - - char dbSetting[128]; - mir_snprintf(dbSetting, "%s_enabled", szProto); - if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) // 'hard' disabled - return -1; - - int ret = -2; - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(szProto, cs.szName)) { - if (wParam) { - if (GetStatus(cs) == ID_STATUS_DISABLED) - AssignStatus(&cs, CallProtoService(cs.szName, PS_GETSTATUS, 0, 0), 0, NULL); - } - else AssignStatus(&cs, ID_STATUS_DISABLED, 0, NULL); - - ret = 0; - break; - } - } - return ret; -} - -INT_PTR IsProtocolEnabledService(WPARAM, LPARAM lParam) -{ - char *szProto = (char *)lParam; - - char dbSetting[128]; - mir_snprintf(dbSetting, "%s_enabled", szProto); - if (!db_get_b(NULL, MODULENAME, dbSetting, 1)) - return FALSE; - - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(szProto, cs.szName)) - return GetStatus(cs) != ID_STATUS_DISABLED; - } - - return FALSE; -} - -INT_PTR AnnounceStatusChangeService(WPARAM, LPARAM lParam) -{ - PROTOCOLSETTINGEX *newSituation = (PROTOCOLSETTINGEX *)lParam; - log_infoA("Another plugin announced a status change to %d for %s", newSituation->status, newSituation->szName == NULL ? "all" : newSituation->szName); - - for (int i = 0; i < connectionSettings.getCount(); i++) { - TConnectionSettings& cs = connectionSettings[i]; - if (!mir_strcmp(cs.szName, newSituation->szName)) - AssignStatus(&cs, newSituation->status, newSituation->lastStatus, newSituation->szMsg); - } - - return 0; -} - -// =============== window for suspend =============== - -static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM lParam) -{ - static PROTOCOLSETTINGEX** ps = NULL; - - switch (msg) { - case WM_POWERBROADCAST: - switch (wParam) { - case PBT_APMSUSPEND: - log_infoA("KeepStatus: suspend state detected: %08X %08X", wParam, lParam); - if (ps == NULL) { - ps = GetCurrentProtoSettingsCopy(); - for (int i = 0; i < connectionSettings.getCount(); i++) - EnableProtocolService(0, (LPARAM)ps[i]->szName); - - // set proto's offline, the clist will not try to reconnect in that case - CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0); - } - break; - - //case PBT_APMRESUMEAUTOMATIC: ? - case PBT_APMRESUMESUSPEND: - case PBT_APMRESUMECRITICAL: - log_infoA("KeepStatus: resume from suspend state"); - if (ps != NULL) { - for (int i = 0; i < connectionSettings.getCount(); i++) - AssignStatus(&connectionSettings[i], ps[i]->status, ps[i]->lastStatus, ps[i]->szMsg); - FreeProtoSettings(ps); - ps = NULL; - } - StartTimer(IDT_PROCESSACK, 0, FALSE); - break; - } - break; - - case WM_DESTROY: - if (ps != NULL) { - FreeProtoSettings(ps); - ps = NULL; - } - break; - } - - return TRUE; -} - -///////////////////////////////////////////////////////////////////////////////////////// -// Account control event - -int OnAccChanged(WPARAM wParam, LPARAM lParam) -{ - PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam; - switch (wParam) { - case PRAC_ADDED: - connectionSettings.insert(new TConnectionSettings(pa)); - break; - - case PRAC_REMOVED: - for (int i = 0; i < connectionSettings.getCount(); i++) { - if (!mir_strcmp(connectionSettings[i].szName, pa->szModuleName)) { - connectionSettings.remove(i); - break; - } - } - break; - } - return 0; -} - -// =============== init stuff ================= - -static int onShutdown(WPARAM, LPARAM) -{ - UnhookEvent(hStatusChangeHook); - UnhookEvent(hProtoAckHook); - UnhookEvent(hCSStatusChangeHook); - UnhookEvent(hCSStatusChangeExHook); - - StopTimer(IDT_CHECKCONN | IDT_PROCESSACK | IDT_AFTERCHECK | IDT_CHECKCONTIN); - if (IsWindow(hMessageWindow)) - DestroyWindow(hMessageWindow); - - connectionSettings.destroy(); - - return 0; -} - -int CSModuleLoaded(WPARAM, LPARAM) -{ - protoList = (OBJLIST<PROTOCOLSETTINGEX>*)&connectionSettings; - - hMessageWindow = NULL; - LoadMainOptions(); - - HookEvent(ME_OPT_INITIALISE, OptionsInit); - HookEvent(ME_SYSTEM_PRESHUTDOWN, onShutdown); - HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged); - return 0; -} diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.h b/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.h deleted file mode 100644 index bf9f3e48f8..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/keepstatus.h +++ /dev/null @@ -1,139 +0,0 @@ -/*
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __KEEPSTATUS_HEADER
-#define __KEEPSTATUS_HEADER
-
-#include <process.h>
-#include <winsock.h>
-#include <wininet.h>
-#include <ipexport.h>
-#include <Icmpapi.h>
-
-#include <m_options.h>
-#include <m_skin.h>
-#include <m_utils.h>
-#include "version.h"
-
-#define __FILENAME "KeepStatus.dll"
-#define MODULENAME "KeepStatus"
-#define SETTING_CHECKCONNECTION "CheckConnection"
-#define SETTING_MAXRETRIES "MaxRetries"
-#define SETTING_INCREASEEXPONENTIAL "IncreaseExponential"
-#define SETTING_INITDELAY "InitDelay"
-#define SETTING_MAXDELAY "MaxDelay"
-#define SETTING_SHOWCONNECTIONPOPUPS "ShowConnectionPopups"
-#define SETTING_CHKINET "CheckInet"
-#define SETTING_CNCOTHERLOC "CancelIfOtherLocation"
-#define SETTING_LOGINERR "OnLoginErr"
-#define SETTING_LOGINERR_DELAY "OnLoginErrDelay"
-#define SETTING_CONTCHECK "ContinueslyCheck"
-#define SETTING_BYPING "ByPingingHost"
-#define SETTING_PINGHOST "HostToPing"
-#define SETTING_CHECKAPMRESUME "CheckAPMResume"
-#define SETTING_FIRSTOFFLINE "FirstOffline"
-#define SETTING_NOLOCKED "NoLocked"
-#define SETTING_MAXCONNECTINGTIME "MaxConnectingTime"
-#define SETTING_PINGCOUNT "PingCount"
-#define DEFAULT_PINGCOUNT 1
-#define SETTING_CNTDELAY "CntDelay"
-#define STATUSCHANGEDELAY 500 // ms
-#define DEFAULT_MAXRETRIES 0
-#define DEFAULT_INITDELAY 10 // s
-#define DEFAULT_MAXDELAY 900 // s
-#define AFTERCHECK_DELAY 10000 //ms (divided by 2)
-#define CHECKCONTIN_DELAY 10 // s
-#define SETTING_POPUP_DELAYTYPE "PopupDelayType"
-#define SETTING_POPUP_USEWINCOLORS "PopupUseWinColors"
-#define SETTING_POPUP_USEDEFCOLORS "PopupUseDefColors"
-#define SETTING_POPUP_BACKCOLOR "PopupBackColor"
-#define SETTING_POPUP_TEXTCOLOR "PopupTextColor"
-#define SETTING_POPUP_TIMEOUT "PopupTimeout"
-#define SETTING_POPUP_LEFTCLICK "PopupLeftClickAction"
-#define SETTING_POPUP_RIGHTCLICK "PopupRightClickAction"
-#define SETTING_PUOTHER "PopupShowOther"
-#define SETTING_PUCONNLOST "PopupShowConnLost"
-#define SETTING_PUCONNRETRY "PopupShowConnRetry"
-#define SETTING_PURESULT "PopupShowResult"
-#define SETTING_PUSHOWEXTRA "PopupShowExtra"
-#define POPUP_ACT_NOTHING 0
-#define POPUP_ACT_CANCEL 1
-#define POPUP_ACT_CLOSEPOPUP 2
-#define POPUP_DELAYFROMPU 0
-#define POPUP_DELAYCUSTOM 1
-#define POPUP_DELAYPERMANENT 2
-#define LOGINERR_NOTHING 0
-#define LOGINERR_CANCEL 1
-#define LOGINERR_SETDELAY 2
-
-#define IDT_PROCESSACK 0x01
-#define IDT_CHECKCONN 0x02
-#define IDT_AFTERCHECK 0x04
-#define IDT_CHECKCONTIN 0x08
-#define IDT_CHECKCONNECTING 0x10
-
-#define KS_ISENABLED WM_APP + 10
-#define KS_ENABLEITEMS WM_APP + 11
-
-// action
-#define SETTING_ENABLECHECKING "EnableChecking"
-// trigger
-#define TRIGGERNAME "KeepStatus: Connection state change"
-#define TRIGGER_CONNLOST 0x01
-#define TRIGGER_LOGINERROR 0x02
-#define TRIGGER_OTHERLOC 0x04
-#define TRIGGER_CONNRETRY 0x08
-#define TRIGGER_CONNSUCCESS 0x10
-#define TRIGGER_CONNGIVEUP 0x20
-#define SETTING_TRIGGERON "TriggerOn"
-
-struct TConnectionSettings : public PROTOCOLSETTINGEX
-{
- TConnectionSettings(PROTOACCOUNT *pa);
- ~TConnectionSettings();
-
- int lastStatusAckTime; // the time the last status ack was received
-};
-
-/* old; replaced by PROTOCOLSETTINGEX see m_statusplugins.h */
-typedef struct {
- char *szName; // pointer to protocol modulename
- WORD status; // the status
- WORD lastStatus;// last status
-} PROTOCOLSETTING;
-
-/* old; replaced by ME_CS_STATUSCHANGE see m_statusplugins.h */
-// wParam = PROTOCOLSETTING**
-// lParam = 0
-#define ME_CS_STATUSCHANGE "CommonStatus/StatusChange"
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// main.cpp
-
-extern HINSTANCE hInst;
-extern HANDLE hMainThread;
-extern unsigned long mainThreadId;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// keepstatus.cpp
-
-int LoadMainOptions();
-LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
-
-#endif //__KEEPSTATUS_HEADER
diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/main.cpp b/tools/_deprecated/StatusPlugins/KeepStatus/main.cpp deleted file mode 100644 index b67757838d..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/main.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/*
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "../commonstatus.h"
-#include "keepstatus.h"
-#include "../resource.h"
-
-HANDLE hMainThread = 0;
-unsigned long mainThreadId = 0;
-int hLangpack = 0;
-
-HANDLE hCSModuleLoadedHook = NULL;
-
-HANDLE hConnectionEvent = NULL;
-HANDLE hStopRecon = NULL, hEnableProto = NULL, hIsProtoEnabled = NULL, hAnnounceStat = NULL;
-
-HINSTANCE hInst;
-CLIST_INTERFACE *pcli;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// dll entry point
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
-{
- hInst = hinstDLL;
- return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// returns plugin's extended information
-
-
-PLUGININFOEX pluginInfoEx = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESC,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- { 0xa5bb1b7a, 0xb7cd, 0x4cbb, { 0xa7, 0xdb, 0xce, 0xb4, 0xeb, 0x71, 0xda, 0x49 } } // {A5BB1B7A-B7CD-4cbb-A7DB-CEB4EB71DA49}
-};
-
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's entry point
-
-int CSModuleLoaded(WPARAM wParam, LPARAM lParam);
-
-INT_PTR StopReconnectingService(WPARAM wParam, LPARAM lParam);
-INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam);
-INT_PTR IsProtocolEnabledService(WPARAM wParam, LPARAM lParam);
-INT_PTR AnnounceStatusChangeService(WPARAM wParam, LPARAM lParam);
-
-extern "C" int __declspec(dllexport) Load(void)
-{
- mir_getLP(&pluginInfoEx);
- pcli = Clist_GetInterface();
-
- InitCommonStatus();
-
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, CSModuleLoaded);
-
- hConnectionEvent = CreateHookableEvent(ME_KS_CONNECTIONEVENT);
-
- hStopRecon = CreateServiceFunction(MS_KS_STOPRECONNECTING, StopReconnectingService);
- hEnableProto = CreateServiceFunction(MS_KS_ENABLEPROTOCOL, EnableProtocolService);
- hIsProtoEnabled = CreateServiceFunction(MS_KS_ISPROTOCOLENABLED, IsProtocolEnabledService);
- hAnnounceStat = CreateServiceFunction(MS_KS_ANNOUNCESTATUSCHANGE, AnnounceStatusChangeService);
-
- DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
- mainThreadId = GetCurrentThreadId();
-
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's exit point
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- DestroyHookableEvent(hConnectionEvent);
-
- UnhookEvent(hCSModuleLoadedHook);
-
- if (hMainThread)
- CloseHandle(hMainThread);
- DestroyServiceFunction(hStopRecon);
- DestroyServiceFunction(hEnableProto);
- DestroyServiceFunction(hIsProtoEnabled);
- DestroyServiceFunction(hAnnounceStat);
-
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/options.cpp b/tools/_deprecated/StatusPlugins/KeepStatus/options.cpp deleted file mode 100644 index 3a7328a2e3..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/options.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/*
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include "../commonstatus.h"
-#include "keepstatus.h"
-#include "../resource.h"
-
-// prototypes
-INT_PTR CALLBACK OptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- LVCOLUMN lvCol;
- LVITEM lvItem;
- DBVARIANT dbv;
-
- SetDlgItemInt(hwndDlg, IDC_MAXRETRIES, db_get_b(NULL, MODULENAME, SETTING_MAXRETRIES, DEFAULT_MAXRETRIES), FALSE);
- SetDlgItemInt(hwndDlg, IDC_INITDELAY, db_get_dw(NULL, MODULENAME, SETTING_INITDELAY, DEFAULT_INITDELAY), FALSE);
- CheckDlgButton(hwndDlg, IDC_CHECKCONNECTION, db_get_b(NULL, MODULENAME, SETTING_CHECKCONNECTION, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWCONNECTIONPOPUPS, (db_get_b(NULL, MODULENAME, SETTING_SHOWCONNECTIONPOPUPS, FALSE) && ServiceExists(MS_POPUP_SHOWMESSAGE)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CHKINET, db_get_b(NULL, MODULENAME, SETTING_CHKINET, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONTCHECK, db_get_b(NULL, MODULENAME, SETTING_CONTCHECK, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BYPING, db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- if (!db_get_s(NULL, MODULENAME, SETTING_PINGHOST, &dbv)) {
- SetDlgItemTextA(hwndDlg, IDC_PINGHOST, dbv.pszVal);
- db_free(&dbv);
- }
- // proto list
- HWND hList = GetDlgItem(hwndDlg, IDC_PROTOCOLLIST);
- ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES, LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES);
- memset(&lvCol, 0, sizeof(lvCol));
- lvCol.mask = LVCF_WIDTH | LVCF_TEXT;
- lvCol.pszText = TranslateT("Protocol");
- lvCol.cx = 118;
- ListView_InsertColumn(hList, 0, &lvCol);
- // fill the list
- memset(&lvItem, 0, sizeof(lvItem));
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
- lvItem.iItem = 0;
- lvItem.iSubItem = 0;
-
- int count;
- PROTOACCOUNT** protos;
- Proto_EnumAccounts(&count, &protos);
-
- for (int i = 0; i < count; i++) {
- if (!IsSuitableProto(protos[i]))
- continue;
-
- lvItem.pszText = protos[i]->tszAccountName;
- lvItem.lParam = (LPARAM)protos[i]->szModuleName;
- ListView_InsertItem(hList, &lvItem);
-
- char dbSetting[128];
- mir_snprintf(dbSetting, "%s_enabled", protos[i]->szModuleName);
- ListView_SetCheckState(hList, lvItem.iItem, db_get_b(NULL, MODULENAME, dbSetting, TRUE));
- lvItem.iItem++;
- }
- EnableWindow(GetDlgItem(hwndDlg, IDC_MAXRETRIES), IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCONNECTIONPOPUPS), ServiceExists(MS_POPUP_SHOWMESSAGE) && IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_INITDELAY), IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOCOLLIST), IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHKINET), IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CONTCHECK), IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_BYPING), (IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK) && IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION)) ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PINGHOST), (IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK)) && (IsDlgButtonChecked(hwndDlg, IDC_BYPING) && IsDlgButtonChecked(hwndDlg, IDC_CHECKCONNECTION)) ? TRUE : FALSE);
- }
- break;
-
- case WM_COMMAND:
- if (((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- // something changed
- switch (LOWORD(wParam)) {
- case IDC_CHECKCONNECTION:
- case IDC_CONTCHECK:
- case IDC_BYPING:
- EnableWindow(GetDlgItem(hwndDlg, IDC_MAXRETRIES), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_SHOWCONNECTIONPOPUPS), ServiceExists(MS_POPUP_SHOWMESSAGE) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_INITDELAY), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROTOCOLLIST), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHKINET), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CONTCHECK), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_BYPING), (IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0)) ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_PINGHOST), (IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK)) && (IsDlgButtonChecked(hwndDlg, IDC_BYPING) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0)) ? TRUE : FALSE);
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((NMHDR*)lParam)->idFrom == IDC_PROTOCOLLIST) {
- switch (((NMHDR*)lParam)->code) {
- case LVN_ITEMCHANGED:
- {
- NMLISTVIEW *nmlv = (NMLISTVIEW *)lParam;
- if (IsWindowVisible(GetDlgItem(hwndDlg, IDC_PROTOCOLLIST)) && ((nmlv->uNewState^nmlv->uOldState)&LVIS_STATEIMAGEMASK))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- break;
- }
- }
-
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- int i;
- LVITEM lvItem;
-
- db_set_b(NULL, MODULENAME, SETTING_MAXRETRIES, (BYTE)GetDlgItemInt(hwndDlg, IDC_MAXRETRIES, NULL, FALSE));
- db_set_b(NULL, MODULENAME, SETTING_CHECKCONNECTION, (BYTE)SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- db_set_b(NULL, MODULENAME, SETTING_SHOWCONNECTIONPOPUPS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWCONNECTIONPOPUPS));
- db_set_dw(NULL, MODULENAME, SETTING_INITDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_INITDELAY, NULL, FALSE));
- db_set_b(NULL, MODULENAME, SETTING_CHKINET, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CHKINET));
- db_set_b(NULL, MODULENAME, SETTING_CONTCHECK, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CONTCHECK));
- db_set_b(NULL, MODULENAME, SETTING_BYPING, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_BYPING));
- if (IsDlgButtonChecked(hwndDlg, IDC_BYPING)) {
- char *host;
-
- int len = SendDlgItemMessage(hwndDlg, IDC_PINGHOST, WM_GETTEXTLENGTH, 0, 0);
- if (len > 0) {
- host = (char*)malloc(len + 1);
- if (host != NULL) {
- memset(host, '\0', len + 1);
- GetDlgItemTextA(hwndDlg, IDC_PINGHOST, host, len + 1);
- db_set_s(NULL, MODULENAME, SETTING_PINGHOST, host);
- }
- }
- }
- HWND hList = GetDlgItem(hwndDlg, IDC_PROTOCOLLIST);
- memset(&lvItem, 0, sizeof(lvItem));
- lvItem.mask = LVIF_PARAM;
- for (i = 0; i < ListView_GetItemCount(hList); i++) {
- lvItem.iItem = i;
- lvItem.iSubItem = 0;
- ListView_GetItem(hList, &lvItem);
-
- char dbSetting[128];
- mir_snprintf(dbSetting, "%s_enabled", (char *)lvItem.lParam);
- db_set_b(NULL, MODULENAME, dbSetting, (BYTE)ListView_GetCheckState(hList, lvItem.iItem));
- }
- }
- break;
- }
-
- return 0;
-}
-
-static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG: {
- TranslateDialogDefault(hwndDlg);
- SetDlgItemInt(hwndDlg, IDC_MAXDELAY, db_get_dw(NULL, MODULENAME, SETTING_MAXDELAY, DEFAULT_MAXDELAY), FALSE);
- SetDlgItemInt(hwndDlg, IDC_MAXCONNECTINGTIME, db_get_dw(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0), FALSE);
- CheckDlgButton(hwndDlg, IDC_INCREASEEXPONENTIAL, db_get_b(NULL, MODULENAME, SETTING_INCREASEEXPONENTIAL, FALSE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CNCOTHERLOC, (db_get_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, FALSE) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOGINERR, db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING) == LOGINERR_NOTHING ? BST_UNCHECKED : BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_CHECKAPMRESUME, (db_get_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, FALSE) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_FIRSTOFFLINE, (db_get_b(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_NOLOCKED, (db_get_b(NULL, MODULENAME, SETTING_NOLOCKED, FALSE)) ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwndDlg, IDC_LOGINERR_DELAY, db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY), FALSE);
- SetDlgItemInt(hwndDlg, IDC_PINGCOUNT, db_get_w(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT), FALSE);
- SetDlgItemInt(hwndDlg, IDC_CNTDELAY, db_get_dw(NULL, MODULENAME, SETTING_CNTDELAY, CHECKCONTIN_DELAY), FALSE);
- switch (db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_CANCEL)) {
- case LOGINERR_SETDELAY:
- CheckRadioButton(hwndDlg, IDC_LOGINERR_CANCEL, IDC_LOGINERR_SETDELAY, IDC_LOGINERR_SETDELAY);
- break;
- default:
- case LOGINERR_CANCEL:
- CheckRadioButton(hwndDlg, IDC_LOGINERR_CANCEL, IDC_LOGINERR_SETDELAY, IDC_LOGINERR_CANCEL);
- break;
- }
- SendMessage(hwndDlg, KS_ENABLEITEMS, 0, 0);
- break;
- }
- case WM_COMMAND:
- if (((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- // something changed
- switch (LOWORD(wParam)) {
- case IDC_INCREASEEXPONENTIAL:
- case IDC_LOGINERR:
- SendMessage(hwndDlg, KS_ENABLEITEMS, 0, 0);
- break;
-
- case IDC_LOGINERR_CANCEL:
- case IDC_LOGINERR_SETDELAY:
- CheckRadioButton(hwndDlg, IDC_LOGINERR_CANCEL, IDC_LOGINERR_SETDELAY, LOWORD(wParam));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGINERR_DELAY), IsDlgButtonChecked(hwndDlg, IDC_LOGINERR_SETDELAY) && IsDlgButtonChecked(hwndDlg, IDC_LOGINERR) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- db_set_b(NULL, MODULENAME, SETTING_INCREASEEXPONENTIAL, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_INCREASEEXPONENTIAL));
- db_set_dw(NULL, MODULENAME, SETTING_MAXDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_MAXDELAY, NULL, FALSE));
- db_set_dw(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, (DWORD)GetDlgItemInt(hwndDlg, IDC_MAXCONNECTINGTIME, NULL, FALSE));
- db_set_b(NULL, MODULENAME, SETTING_FIRSTOFFLINE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_FIRSTOFFLINE));
- db_set_b(NULL, MODULENAME, SETTING_NOLOCKED, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOLOCKED));
- db_set_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CNCOTHERLOC));
- db_set_b(NULL, MODULENAME, SETTING_LOGINERR, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_LOGINERR));
- if (IsDlgButtonChecked(hwndDlg, IDC_LOGINERR)) {
- if (IsDlgButtonChecked(hwndDlg, IDC_LOGINERR_SETDELAY)) {
- db_set_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_SETDELAY);
- db_set_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, GetDlgItemInt(hwndDlg, IDC_LOGINERR_DELAY, NULL, FALSE));
- }
- else db_set_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_CANCEL);
- }
- else db_set_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING);
-
- db_set_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CHECKAPMRESUME));
- db_set_w(NULL, MODULENAME, SETTING_PINGCOUNT, (WORD)GetDlgItemInt(hwndDlg, IDC_PINGCOUNT, NULL, FALSE));
- db_set_dw(NULL, MODULENAME, SETTING_CNTDELAY, (DWORD)GetDlgItemInt(hwndDlg, IDC_CNTDELAY, NULL, FALSE) == 0 ? CHECKCONTIN_DELAY : GetDlgItemInt(hwndDlg, IDC_CNTDELAY, NULL, FALSE));
- }
- break;
-
- case KS_ENABLEITEMS:
- EnableWindow(GetDlgItem(hwndDlg, IDC_INCREASEEXPONENTIAL), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_MAXCONNECTINGTIME), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CNCOTHERLOC), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGINERR), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGINERR_SETDELAY), IsDlgButtonChecked(hwndDlg, IDC_LOGINERR) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGINERR_DELAY), IsDlgButtonChecked(hwndDlg, IDC_LOGINERR_SETDELAY) && IsDlgButtonChecked(hwndDlg, IDC_LOGINERR) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGINERR_CANCEL), IsDlgButtonChecked(hwndDlg, IDC_LOGINERR) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_MAXDELAY), (IsDlgButtonChecked(hwndDlg, IDC_INCREASEEXPONENTIAL) && SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0)) ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHECKAPMRESUME), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0) && (CallService(MS_SYSTEM_GETVERSION, 0, 0) >= 0x00040000));
- EnableWindow(GetDlgItem(hwndDlg, IDC_FIRSTOFFLINE), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_NOLOCKED), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CHECKCONNECTION, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_PINGCOUNT), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_BYPING, 0));
- EnableWindow(GetDlgItem(hwndDlg, IDC_CNTDELAY), SendMessage(GetParent(hwndDlg), KS_ISENABLED, (WPARAM)IDC_CONTCHECK, 0));
- break;
-
- case WM_SHOWWINDOW:
- if (wParam)
- SendMessage(hwndDlg, KS_ENABLEITEMS, 0, 0);
-
- break;
- }
-
- return 0;
-}
-
-static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static HWND hBasicTab;
-
- switch (msg) {
- case WM_INITDIALOG:
- {
- HWND hShow, hPage;
- RECT rcTabs, rcOptions, rcPage;
-
- TranslateDialogDefault(hwndDlg);
-
- // set tabs
- int tabCount = 0;
- HWND hTab = GetDlgItem(hwndDlg, IDC_TABS);
- GetWindowRect(hTab, &rcTabs);
- GetWindowRect(hwndDlg, &rcOptions);
-
- // basic tab
- TCITEM tci;
- memset(&tci, 0, sizeof(TCITEM));
- tci.mask = TCIF_TEXT | TCIF_PARAM;
- tci.pszText = TranslateT("Basic");
- hShow = hBasicTab = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_KS_BASIC), hwndDlg, DlgProcKSBasicOpts, (LPARAM)GetParent(hwndDlg));
- EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)hPage;
- GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right - rcTabs.left) - (rcPage.right - rcPage.left)) / 2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom - rcTabs.top) - (rcPage.bottom - rcPage.top)) / 2, rcPage.right - rcPage.left, rcPage.bottom - rcPage.top, TRUE);
- ShowWindow(hPage, SW_HIDE);
- TabCtrl_InsertItem(hTab, tabCount++, &tci);
-
- // advanced tab
- tci.mask = TCIF_TEXT | TCIF_PARAM;
- tci.pszText = TranslateT("Advanced");
- hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_OPT_KS_ADV), hwndDlg, DlgProcKSAdvOpts, (LPARAM)GetParent(hwndDlg));
- EnableThemeDialogTexture(hPage, ETDT_ENABLETAB);
-
- tci.lParam = (LPARAM)hPage;
- GetClientRect(hPage, &rcPage);
- MoveWindow(hPage, (rcTabs.left - rcOptions.left) + ((rcTabs.right - rcTabs.left) - (rcPage.right - rcPage.left)) / 2, 10 + (rcTabs.top - rcOptions.top) + ((rcTabs.bottom - rcTabs.top) - (rcPage.bottom - rcPage.top)) / 2, rcPage.right - rcPage.left, rcPage.bottom - rcPage.top, TRUE);
- ShowWindow(hPage, SW_HIDE);
- TabCtrl_InsertItem(hTab, tabCount++, &tci);
- ShowWindow(hShow, SW_SHOW);
- }
- break;
-
- case KS_ISENABLED:
- SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)IsDlgButtonChecked(hBasicTab, wParam));
- return TRUE;
-
- case PSM_CHANGED:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case WM_NOTIFY:
- if ((((NMHDR*)lParam)->idFrom == IDC_TABS)) {
- if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS)), &tci);
- ShowWindow((HWND)tci.lParam, SW_HIDE);
- }
- else if (((NMHDR*)lParam)->code == TCN_SELCHANGE) {
- TCITEM tci;
-
- tci.mask = TCIF_PARAM;
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TABS)), &tci);
- ShowWindow((HWND)tci.lParam, SW_SHOW);
- }
- }
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- TCITEM tci;
- int i, count;
-
- tci.mask = TCIF_PARAM;
- count = TabCtrl_GetItemCount(GetDlgItem(hwndDlg, IDC_TABS));
- for (i = 0; i < count; i++) {
- TabCtrl_GetItem(GetDlgItem(hwndDlg, IDC_TABS), i, &tci);
- SendMessage((HWND)tci.lParam, WM_NOTIFY, 0, lParam);
- }
- // let main reload options
- LoadMainOptions();
- }
- break;
- }
-
- return FALSE;
-}
-
-INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static bool bFreeze = false;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- bFreeze = true;
-
- // left action
- switch (db_get_b(NULL, MODULENAME, SETTING_POPUP_LEFTCLICK, POPUP_ACT_CANCEL)) {
- case POPUP_ACT_CLOSEPOPUP:
- CheckDlgButton(hwndDlg, IDC_LCLOSE, BST_CHECKED);
- break;
-
- case POPUP_ACT_CANCEL:
- CheckDlgButton(hwndDlg, IDC_LCANCEL, BST_CHECKED);
- break;
-
- case POPUP_ACT_NOTHING:
- default:
- CheckDlgButton(hwndDlg, IDC_LNOTHING, BST_CHECKED);
- break;
- }
- // right action
- switch (db_get_b(NULL, MODULENAME, SETTING_POPUP_RIGHTCLICK, POPUP_ACT_CANCEL)) {
- case POPUP_ACT_CLOSEPOPUP:
- CheckDlgButton(hwndDlg, IDC_RCLOSE, BST_CHECKED);
- break;
-
- case POPUP_ACT_CANCEL:
- CheckDlgButton(hwndDlg, IDC_RCANCEL, BST_CHECKED);
- break;
-
- case POPUP_ACT_NOTHING:
- default:
- CheckDlgButton(hwndDlg, IDC_RNOTHING, BST_CHECKED);
- break;
- }
- // delay
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYCUSTOM), ServiceExists(MS_POPUP_ADDPOPUPT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYFROMPU), ServiceExists(MS_POPUP_ADDPOPUPT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAYPERMANENT), ServiceExists(MS_POPUP_ADDPOPUPT));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT));
- switch (db_get_b(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU)) {
- case POPUP_DELAYCUSTOM:
- CheckDlgButton(hwndDlg, IDC_DELAYCUSTOM, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), ServiceExists(MS_POPUP_ADDPOPUPT));
- break;
-
- case POPUP_DELAYPERMANENT:
- CheckDlgButton(hwndDlg, IDC_DELAYPERMANENT, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), FALSE);
- break;
-
- case POPUP_DELAYFROMPU:
- default:
- CheckDlgButton(hwndDlg, IDC_DELAYFROMPU, BST_CHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), FALSE);
- break;
- }
- // delay
- SetDlgItemInt(hwndDlg, IDC_DELAY, db_get_dw(NULL, MODULENAME, SETTING_POPUP_TIMEOUT, 0), FALSE);
- // back color
- SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_SETCOLOUR, 0, db_get_dw(NULL, MODULENAME, SETTING_POPUP_BACKCOLOR, 0xAAAAAA));
- // text
- SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_SETCOLOUR, 0, db_get_dw(NULL, MODULENAME, SETTING_POPUP_TEXTCOLOR, 0x0000CC));
- // wincolors
- CheckDlgButton(hwndDlg, IDC_WINCOLORS, db_get_b(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0) ? BST_CHECKED : BST_UNCHECKED);
- // defaultcolors
- CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ((db_get_b(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))) ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
- // popup types
- CheckDlgButton(hwndDlg, IDC_PUCONNLOST, db_get_b(NULL, MODULENAME, SETTING_PUCONNLOST, TRUE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUOTHER, db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUCONNRETRY, db_get_b(NULL, MODULENAME, SETTING_PUCONNRETRY, TRUE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PURESULT, db_get_b(NULL, MODULENAME, SETTING_PURESULT, TRUE) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUSHOWEXTRA, db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE) ? BST_CHECKED : BST_UNCHECKED);
- bFreeze = false;
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_WINCOLORS:
- case IDC_DEFAULTCOLORS:
- EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_DELAYFROMPU:
- case IDC_DELAYPERMANENT:
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), FALSE);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_DELAYCUSTOM:
- EnableWindow(GetDlgItem(hwndDlg, IDC_DELAY), TRUE);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_BGCOLOR:
- case IDC_TEXTCOLOR:
- case IDC_DELAY:
- case IDC_LNOTHING:
- case IDC_LCLOSE:
- case IDC_LCANCEL:
- case IDC_RNOTHING:
- case IDC_RCLOSE:
- case IDC_RCANCEL:
- case IDC_PUCONNLOST:
- case IDC_PUOTHER:
- case IDC_PUCONNRETRY:
- case IDC_PURESULT:
- case IDC_PUSHOWEXTRA:
- if (!bFreeze)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_PREV:
- {
- POPUPDATAT ppd = { NULL };
-
- ppd.lchContact = NULL;
- ppd.lchIcon = Skin_LoadIcon(SKINICON_STATUS_OFFLINE);
- wcsncpy(ppd.lptzContactName, TranslateT("KeepStatus"), MAX_CONTACTNAME);
- wcsncpy(ppd.lptzText, TranslateT("You broke the Internet!"), MAX_SECONDLINE);
- if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))
- {
- ppd.colorBack = GetSysColor(COLOR_BTNFACE);
- ppd.colorText = GetSysColor(COLOR_WINDOWTEXT);
- }
- else if (IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))
- {
- ppd.colorBack = NULL;
- ppd.colorText = NULL;
- }
- else
- {
- ppd.colorBack = SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_GETCOLOUR, 0, 0);
- ppd.colorText = SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, 0);
- }
- ppd.PluginWindowProc = PopupDlgProc;
- ppd.PluginData = NULL;
- if (IsDlgButtonChecked(hwndDlg, IDC_DELAYFROMPU))
- {
- ppd.iSeconds = 0;
- }
- else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYCUSTOM))
- {
- ppd.iSeconds = GetDlgItemInt(hwndDlg, IDC_DELAY, NULL, FALSE);
- }
- else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYPERMANENT))
- {
- ppd.iSeconds = -1;
- }
- PUAddPopupT(&ppd);
- }
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- // left action
- if (IsDlgButtonChecked(hwndDlg, IDC_LNOTHING))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_LEFTCLICK, POPUP_ACT_NOTHING);
- else if (IsDlgButtonChecked(hwndDlg, IDC_LCLOSE))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_LEFTCLICK, POPUP_ACT_CLOSEPOPUP);
- else if (IsDlgButtonChecked(hwndDlg, IDC_LCANCEL))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_LEFTCLICK, POPUP_ACT_CANCEL);
- // right action
- if (IsDlgButtonChecked(hwndDlg, IDC_RNOTHING))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_RIGHTCLICK, POPUP_ACT_NOTHING);
- else if (IsDlgButtonChecked(hwndDlg, IDC_RCLOSE))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_RIGHTCLICK, POPUP_ACT_CLOSEPOPUP);
- else if (IsDlgButtonChecked(hwndDlg, IDC_RCANCEL))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_RIGHTCLICK, POPUP_ACT_CANCEL);
- // delay
- if (IsDlgButtonChecked(hwndDlg, IDC_DELAYFROMPU))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYFROMPU);
- else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYCUSTOM))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYCUSTOM);
- else if (IsDlgButtonChecked(hwndDlg, IDC_DELAYPERMANENT))
- db_set_b(NULL, MODULENAME, SETTING_POPUP_DELAYTYPE, POPUP_DELAYPERMANENT);
- // delay
- db_set_dw(NULL, MODULENAME, SETTING_POPUP_TIMEOUT, GetDlgItemInt(hwndDlg, IDC_DELAY, NULL, FALSE));
- // back color
- db_set_dw(NULL, MODULENAME, SETTING_POPUP_BACKCOLOR, SendDlgItemMessage(hwndDlg, IDC_BGCOLOR, CPM_GETCOLOUR, 0, 0));
- // text color
- db_set_dw(NULL, MODULENAME, SETTING_POPUP_TEXTCOLOR, SendDlgItemMessage(hwndDlg, IDC_TEXTCOLOR, CPM_GETCOLOUR, 0, 0));
- // use win
- db_set_b(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS));
- // use def
- db_set_b(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS));
- // store types
- db_set_b(NULL, MODULENAME, SETTING_PUCONNLOST, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PUCONNLOST));
- db_set_b(NULL, MODULENAME, SETTING_PUOTHER, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PUOTHER));
- db_set_b(NULL, MODULENAME, SETTING_PUCONNRETRY, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PUCONNRETRY));
- db_set_b(NULL, MODULENAME, SETTING_PURESULT, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PURESULT));
- db_set_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_PUSHOWEXTRA));
- }
- break;
- }
-
- return 0;
-}
-
-int OptionsInit(WPARAM wparam, LPARAM)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = hInst;
- odp.pwszGroup = LPGENW("Status");
- odp.pwszTitle = LPGENW("KeepStatus");
- odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS);
- odp.pfnDlgProc = DlgProcKsTabs;
- Options_AddPage(wparam, &odp);
-
- if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- memset(&odp, 0, sizeof(odp));
- odp.position = 150000000;
- odp.pwszGroup = LPGENW("Popups");
- odp.groupPosition = 910000000;
- odp.hInstance = hInst;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_PUOPT_KEEPSTATUS);
- odp.pwszTitle = LPGENW("KeepStatus");
- odp.pfnDlgProc = PopupOptDlgProc;
- odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
- Options_AddPage(wparam, &odp);
- }
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/KeepStatus/version.h b/tools/_deprecated/StatusPlugins/KeepStatus/version.h deleted file mode 100644 index 81672eb0d3..0000000000 --- a/tools/_deprecated/StatusPlugins/KeepStatus/version.h +++ /dev/null @@ -1,17 +0,0 @@ -// plugin version part
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 9
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 2
-
-// other stuff for Version resource
-#include <stdver.h>
-
-// stuff that will be used in PluginInfo section and in Version resource
-#define __PLUGIN_NAME "Keep status"
-#define __FILENAME "KeepStatus.dll"
-#define __DESC "KeepStatus, A connection checker, for use with (or without) StartupStatus and/or AdvancedAutoAway."
-#define __AUTHOR "P Boon"
-#define __AUTHOREMAIL "unregistered@users.sourceforge.net"
-#define __AUTHORWEB "http://miranda-ng.org/p/KeepStatus/"
-#define __COPYRIGHT "© 2003-08 P. Boon, 2008-16 George Hazan"
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus.rc b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus.rc deleted file mode 100644 index a7a2bebb2a..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus.rc +++ /dev/null @@ -1,70 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "..\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""winres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-IDI_TTBDOWN ICON "res\\ttbDown.ico"
-IDI_TTBUP ICON "res\\ttbUp.ico"
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj deleted file mode 100644 index 40f2155891..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj +++ /dev/null @@ -1,228 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>StartupStatus</ProjectName>
- <ProjectGuid>{1BD5E5B9-A750-4CF8-A370-0FBD40A92CB2}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin10\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- <ClCompile Include="profiles.cpp" />
- <ClCompile Include="startupstatus.cpp" />
- <ClCompile Include="toolbars.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- <ClInclude Include="startupstatus.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- <ResourceCompile Include="StartupStatus.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj.filters b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj.filters deleted file mode 100644 index 3078255c51..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_10.vcxproj.filters +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{05912809-2743-4a01-8ca7-689106a3141a}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{2f9d749c-d579-43b5-af4c-485fec64ddfa}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3731744d-2cbc-4ec4-bc69-7e184a77f957}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="profiles.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="startupstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="toolbars.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="startupstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="StartupStatus.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj deleted file mode 100644 index c664325d2f..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>StartupStatus</ProjectName>
- <ProjectGuid>{1BD5E5B9-A750-4CF8-A370-0FBD40A92CB2}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v120_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level3</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin12\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- <ClCompile Include="profiles.cpp" />
- <ClCompile Include="startupstatus.cpp" />
- <ClCompile Include="toolbars.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- <ClInclude Include="startupstatus.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- <ResourceCompile Include="StartupStatus.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj.filters b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj.filters deleted file mode 100644 index 3078255c51..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_12.vcxproj.filters +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{05912809-2743-4a01-8ca7-689106a3141a}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{2f9d749c-d579-43b5-af4c-485fec64ddfa}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3731744d-2cbc-4ec4-bc69-7e184a77f957}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="profiles.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="startupstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="toolbars.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="startupstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="StartupStatus.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj deleted file mode 100644 index 794b36247e..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj +++ /dev/null @@ -1,231 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>StartupStatus</ProjectName>
- <ProjectGuid>{1BD5E5B9-A750-4CF8-A370-0FBD40A92CB2}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>v140_xp</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
- <IgnoreImportLibrary>true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <BaseAddress>0x11bd0000</BaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>false</ExceptionHandling>
- <BufferSecurityCheck>false</BufferSecurityCheck>
- <FloatingPointModel>Fast</FloatingPointModel>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>Use</PrecompiledHeader>
- <PrecompiledHeaderFile>../commonstatus.h</PrecompiledHeaderFile>
- <AdditionalIncludeDirectories>..\..\..\include;..\..\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;STARTUPSTATUS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <WarningLevel>Level4</WarningLevel>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <Optimization>Disabled</Optimization>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <ExceptionHandling>false</ExceptionHandling>
- </ClCompile>
- <Link>
- <AdditionalDependencies>wininet.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <SubSystem>Windows</SubSystem>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <BaseAddress>0x11bd0000</BaseAddress>
- <AdditionalLibraryDirectories>$(ProfileDir)..\..\..\bin14\lib</AdditionalLibraryDirectories>
- </Link>
- <ResourceCompile>
- <AdditionalIncludeDirectories>..\..\..\include\msapi</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\stdafx.cpp">
- <PrecompiledHeader>Create</PrecompiledHeader>
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="..\commonstatus.cpp">
- <PrecompiledHeaderFile>commonstatus.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="main.cpp" />
- <ClCompile Include="options.cpp" />
- <ClCompile Include="profiles.cpp" />
- <ClCompile Include="startupstatus.cpp" />
- <ClCompile Include="toolbars.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h" />
- <ClInclude Include="..\resource.h" />
- <ClInclude Include="startupstatus.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc" />
- <ResourceCompile Include="..\version.rc" />
- <ResourceCompile Include="StartupStatus.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj.filters b/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj.filters deleted file mode 100644 index 3078255c51..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/StartupStatus_14.vcxproj.filters +++ /dev/null @@ -1,68 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{05912809-2743-4a01-8ca7-689106a3141a}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{2f9d749c-d579-43b5-af4c-485fec64ddfa}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{3731744d-2cbc-4ec4-bc69-7e184a77f957}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\commonstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\confirmdialog.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\helpers\gen_helpers.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="options.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="profiles.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="startupstatus.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="toolbars.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\commonstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="startupstatus.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="..\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="StartupStatus.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/main.cpp b/tools/_deprecated/StatusPlugins/StartupStatus/main.cpp deleted file mode 100644 index 9a3ceb3e84..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/main.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/*
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "startupstatus.h"
-
-
-static HANDLE
- hCSModuleLoadedHook,
- hGetProfileService,
- hGetProfileCountService,
- hGetProfileNameService;
-
-HINSTANCE hInst;
-
-int hLangpack = 0;
-CLIST_INTERFACE *pcli;
-
-int CSModuleLoaded( WPARAM, LPARAM );
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// dll entry point
-
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
-{
- hInst = hinstDLL;
- return TRUE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// returns plugin's extended information
-
-PLUGININFOEX pluginInfoEx={
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESC,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- { 0x4b733944, 0x5a70, 0x4b52, { 0xab, 0x2d, 0x68, 0xb1, 0xef, 0x38, 0xff, 0xe8 } } // {4B733944-5A70-4b52-AB2D-68B1EF38FFE8}
-};
-
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's entry point
-
-static INT_PTR SrvGetProfile( WPARAM wParam, LPARAM lParam )
-{ return GetProfile(( int )wParam, *(TSettingsList*)lParam );
-}
-
-extern "C" int __declspec(dllexport) Load(void)
-{
- mir_getLP( &pluginInfoEx );
- pcli = Clist_GetInterface();
-
- if ( db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) ||
- db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))
- db_set_w(NULL, "CList", "Status", (WORD)ID_STATUS_OFFLINE);
-
- // docking
- if (db_get_b(NULL, MODULENAME, SETTING_SETDOCKED, 0)) {
- int docked = db_get_b(NULL, MODULENAME, SETTING_DOCKED, DOCKED_NONE);
- if ( docked == DOCKED_LEFT || docked == DOCKED_RIGHT )
- docked = -docked;
-
- db_set_b(NULL, MODULE_CLIST, SETTING_DOCKED, (BYTE)docked);
- }
-
- // Create service functions; the get functions are created here; they don't rely on commonstatus
- hGetProfileService = CreateServiceFunction(MS_SS_GETPROFILE, SrvGetProfile);
- hGetProfileCountService = CreateServiceFunction(MS_SS_GETPROFILECOUNT, GetProfileCount);
- hGetProfileNameService = CreateServiceFunction(MS_SS_GETPROFILENAME, GetProfileName);
-
- LoadProfileModule();
-
- // protocols must be loaded first
- InitCommonStatus();
- hCSModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, CSModuleLoaded);
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// plugin's exit point
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- UnhookEvent(hCSModuleLoadedHook);
-
- DestroyServiceFunction(hGetProfileService);
- DestroyServiceFunction(hGetProfileCountService);
- DestroyServiceFunction(hGetProfileNameService);
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/options.cpp b/tools/_deprecated/StatusPlugins/StartupStatus/options.cpp deleted file mode 100644 index 87a969726b..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/options.cpp +++ /dev/null @@ -1,932 +0,0 @@ -/*
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "startupstatus.h"
-#include "../resource.h"
-
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-TSettingsList* GetCurrentProtoSettings()
-{
- int count;
- PROTOACCOUNT **protos;
- Proto_EnumAccounts(&count, &protos);
-
- TSettingsList *result = new TSettingsList(count, CompareSettings);
- if (result == NULL)
- return NULL;
-
- for (int i=0; i < count; i++)
- if ( IsSuitableProto(protos[i]))
- result->insert( new TSSSetting(protos[i]));
-
- return result;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Command line processing
-
-static char* GetStatusDesc(int status)
-{
- switch (status) {
- case ID_STATUS_AWAY: return "away";
- case ID_STATUS_NA: return "na";
- case ID_STATUS_DND: return "dnd";
- case ID_STATUS_OCCUPIED: return "occupied";
- case ID_STATUS_FREECHAT: return "freechat";
- case ID_STATUS_ONLINE: return "online";
- case ID_STATUS_OFFLINE: return "offline";
- case ID_STATUS_INVISIBLE: return "invisible";
- case ID_STATUS_ONTHEPHONE: return "onthephone";
- case ID_STATUS_OUTTOLUNCH: return "outtolunch";
- case ID_STATUS_LAST: return "last";
- }
- return "offline";
-}
-
-static char* GetCMDLArguments(TSettingsList& protoSettings)
-{
- if ( protoSettings.getCount() == NULL )
- return NULL;
-
- char *cmdl, *pnt;
- pnt = cmdl = ( char* )malloc(mir_strlen(protoSettings[0].szName) + mir_strlen(GetStatusDesc(protoSettings[0].status)) + 4);
-
- for (int i=0; i < protoSettings.getCount(); i++ ) {
- *pnt++ = '/';
- mir_strcpy(pnt, protoSettings[i].szName);
- pnt += mir_strlen(protoSettings[i].szName);
- *pnt++ = '=';
- mir_strcpy(pnt, GetStatusDesc(protoSettings[i].status));
- pnt += mir_strlen(GetStatusDesc(protoSettings[i].status));
- if (i != protoSettings.getCount()-1) {
- *pnt++ = ' ';
- *pnt++ = '\0';
- cmdl = ( char* )realloc(cmdl, mir_strlen(cmdl) + mir_strlen(protoSettings[i+1].szName) + mir_strlen(GetStatusDesc(protoSettings[i+1].status)) + 4);
- pnt = cmdl + mir_strlen(cmdl);
- } }
-
- if ( db_get_b( NULL, MODULENAME, SETTING_SHOWDIALOG, FALSE ) == TRUE ) {
- *pnt++ = ' ';
- *pnt++ = '\0';
- cmdl = ( char* )realloc(cmdl, mir_strlen(cmdl) + 12);
- pnt = cmdl + mir_strlen(cmdl);
- mir_strcpy(pnt, "/showdialog");
- pnt += 11;
- *pnt = '\0';
- }
-
- return cmdl;
-}
-
-static char* GetCMDL(TSettingsList& protoSettings)
-{
- char path[MAX_PATH];
- GetModuleFileNameA(NULL, path, MAX_PATH);
-
- char* cmdl = ( char* )malloc(mir_strlen(path) + 4);
- mir_snprintf(cmdl, mir_strlen(path) + 4, "\"%s\" ", path);
-
- char* args = GetCMDLArguments(protoSettings);
- if ( args ) {
- cmdl = ( char* )realloc(cmdl, mir_strlen(cmdl) + mir_strlen(args) + 1);
- mir_strcat(cmdl, args);
- free(args);
- }
- return cmdl;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Link processing
-
-static wchar_t* GetLinkDescription(TSettingsList& protoSettings)
-{
- if ( protoSettings.getCount() == 0 )
- return NULL;
-
- CMStringW result(SHORTCUT_DESC);
- for (int i=0; i < protoSettings.getCount(); i++) {
- TSSSetting &p = protoSettings[i];
-
- wchar_t *status;
- if ( p.status == ID_STATUS_LAST)
- status = TranslateT("<last>");
- else if (p.status == ID_STATUS_CURRENT)
- status = TranslateT("<current>");
- else if (p.status >= MIN_STATUS && p.status <= MAX_STATUS)
- status = pcli->pfnGetStatusModeDescription(p.status, 0);
- else
- status = NULL;
- if (status == NULL)
- status = TranslateT("<unknown>");
-
- result.AppendChar('\r');
- result.Append(p.tszAccName);
- result.AppendChar(':');
- result.AppendChar(' ');
- result.Append(status);
- }
-
- return mir_wstrndup(result, result.GetLength());
-}
-
-HRESULT CreateLink(TSettingsList& protoSettings)
-{
- wchar_t savePath[MAX_PATH];
- if (SHGetSpecialFolderPath(NULL, savePath, 0x10, FALSE))
- wcsncat_s(savePath, SHORTCUT_FILENAME, _countof(savePath) - mir_wstrlen(savePath));
- else
- mir_snwprintf(savePath, L".\\%s", SHORTCUT_FILENAME);
-
- // Get a pointer to the IShellLink interface.
- IShellLink *psl;
- HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, ( void** )&psl);
- if (SUCCEEDED(hres)) {
- char *args = GetCMDLArguments(protoSettings);
- wchar_t *desc = GetLinkDescription(protoSettings);
-
- // Set the path to the shortcut target, and add the
- // description.
- wchar_t path[MAX_PATH];
- GetModuleFileName(NULL, path, _countof(path));
- psl->SetPath(path);
- psl->SetDescription(desc);
- psl->SetArguments( _A2T(args));
-
- // Query IShellLink for the IPersistFile interface for saving the
- // shortcut in persistent storage.
- IPersistFile *ppf;
- hres = psl->QueryInterface(IID_IPersistFile, ( void** )&ppf);
-
- if (SUCCEEDED(hres)) {
- // Save the link by calling IPersistFile::Save.
- hres = ppf->Save(savePath, TRUE);
- ppf->Release();
- }
- psl->Release();
- free(args);
- free(desc);
- }
-
- return hres;
-}
-
-INT_PTR CALLBACK CmdlOptionsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
-{
- static TSettingsList* optionsProtoSettings;
-
- switch(msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- optionsProtoSettings = (TSettingsList*)lParam;
- char* cmdl = GetCMDL(*optionsProtoSettings);
- SetDlgItemTextA(hwndDlg, IDC_CMDL, cmdl);
- free(cmdl);
- }
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_COPY:
- if ( OpenClipboard( hwndDlg )) {
- EmptyClipboard();
-
- char cmdl[2048];
- GetDlgItemTextA(hwndDlg,IDC_CMDL, cmdl, _countof(cmdl));
- HGLOBAL cmdlGlob = GlobalAlloc(GMEM_MOVEABLE, sizeof(cmdl));
- if (cmdlGlob == NULL) {
- CloseClipboard();
- break;
- }
- LPTSTR cmdlStr = ( LPTSTR )GlobalLock(cmdlGlob);
- memcpy(cmdlStr, &cmdl, sizeof(cmdl));
- GlobalUnlock(cmdlGlob);
- SetClipboardData(CF_TEXT, cmdlGlob);
- CloseClipboard();
- }
- break;
-
- case IDC_SHORTCUT:
- CreateLink(*optionsProtoSettings);
- break;
-
- case IDC_OK:
- DestroyWindow(hwndDlg);
- break;
- }
- break;
-
- case WM_CLOSE:
- DestroyWindow(hwndDlg);
- break;
-
- case WM_DESTROY:
- delete optionsProtoSettings; optionsProtoSettings = 0;
- break;
- }
-
- return 0;
-}
-
-static INT_PTR CALLBACK StartupStatusOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
-{
- static BOOL bInitDone = FALSE;
-
- switch(msg) {
- case WM_INITDIALOG:
- bInitDone = FALSE;
-
- TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_SETPROFILE, db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OVERRIDE, db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWDIALOG, db_get_b(NULL, MODULENAME, SETTING_SHOWDIALOG, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SETWINSTATE, db_get_b(NULL, MODULENAME, SETTING_SETWINSTATE, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SETWINLOCATION, db_get_b(NULL, MODULENAME, SETTING_SETWINLOCATION, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SETDOCKED, db_get_b(NULL, MODULENAME, SETTING_SETDOCKED, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SETWINSIZE, db_get_b(NULL, MODULENAME, SETTING_SETWINSIZE, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_OFFLINECLOSE, db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 1) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTODIAL, db_get_b(NULL, MODULENAME, SETTING_AUTODIAL, 0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOHANGUP, db_get_b(NULL, MODULENAME, SETTING_AUTOHANGUP, 0) ? BST_CHECKED : BST_UNCHECKED);
- SetDlgItemInt(hwndDlg, IDC_SETPROFILEDELAY, db_get_dw(NULL, MODULENAME, SETTING_SETPROFILEDELAY, 500), FALSE);
- SetDlgItemInt(hwndDlg, IDC_DLGTIMEOUT, db_get_dw(NULL, MODULENAME, SETTING_DLGTIMEOUT, 5), FALSE);
- SetDlgItemInt(hwndDlg, IDC_XPOS, db_get_dw(NULL, MODULENAME, SETTING_XPOS, 0), TRUE);
- SetDlgItemInt(hwndDlg, IDC_YPOS, db_get_dw(NULL, MODULENAME, SETTING_YPOS, 0), TRUE);
- SetDlgItemInt(hwndDlg, IDC_WIDTH, db_get_dw(NULL, MODULENAME, SETTING_WIDTH, 0), FALSE);
- SetDlgItemInt(hwndDlg, IDC_HEIGHT, db_get_dw(NULL, MODULENAME, SETTING_HEIGHT, 0), FALSE);
- {
- int val = db_get_b(NULL, MODULENAME, SETTING_DOCKED, DOCKED_NONE);
- int item = SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("Left"));
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_LEFT);
- if (val == DOCKED_LEFT)
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
-
- item = SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("Right"));
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_RIGHT);
- if (val == DOCKED_RIGHT)
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
-
- item = SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_ADDSTRING, 0, (LPARAM)TranslateT("None"));
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETITEMDATA, (WPARAM)item, (LPARAM)DOCKED_NONE);
- if (val == DOCKED_NONE)
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_SETCURSEL, (WPARAM)item, 0);
- }
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILE), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE)||IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETPROFILEDELAY), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_OVERRIDE), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DLGTIMEOUT), IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINSTATE), IsDlgButtonChecked(hwndDlg, IDC_SETWINSTATE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_XPOS), IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_YPOS), IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION));
- SendMessage(hwndDlg, UM_REINITPROFILES, 0, 0);
- SendMessage(hwndDlg, UM_REINITDOCKED, 0, 0);
- SendMessage(hwndDlg, UM_REINITWINSTATE, 0, 0);
- SendMessage(hwndDlg, UM_REINITWINSIZE, 0, 0);
- SetTimer(hwndDlg, 0, 100, NULL);
- bInitDone = TRUE;
- break;
-
- case WM_TIMER:
- if ( BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION) && BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SETWINSIZE)) {
- SetDlgItemTextA(hwndDlg, IDC_CURWINSIZE, "");
- SetDlgItemTextA(hwndDlg, IDC_CURWINLOC, "");
- break;
- }
- else {
- wchar_t text[128];
- mir_snwprintf(text, TranslateT("size: %d x %d"),
- db_get_dw(NULL, MODULE_CLIST, SETTING_WIDTH, 0),
- db_get_dw(NULL, MODULE_CLIST, SETTING_HEIGHT, 0));
- SetDlgItemText(hwndDlg, IDC_CURWINSIZE, text);
-
- mir_snwprintf(text, TranslateT("loc: %d x %d"),
- db_get_dw(NULL, MODULE_CLIST, SETTING_XPOS, 0),
- db_get_dw(NULL, MODULE_CLIST, SETTING_YPOS, 0));
- SetDlgItemText(hwndDlg, IDC_CURWINLOC, text);
- }
- break;
-
- case UM_REINITPROFILES:
- // creates profile combo box according to 'dat'
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_RESETCONTENT, 0, 0);
- {
- int defProfile;
- int profileCount = GetProfileCount((WPARAM)&defProfile, 0);
- for ( int i=0; i < profileCount; i++ ) {
- wchar_t profileName[128];
- if ( GetProfileName(i, (LPARAM)profileName))
- continue;
-
- int item = SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_ADDSTRING, 0, (LPARAM)profileName);
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETITEMDATA, item, i);
- }
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETCURSEL, defProfile, 0);
- }
- break;
-
- case UM_REINITDOCKED:
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETDOCKED), db_get_b(NULL, MODULE_CLIST, SETTING_TOOLWINDOW, 1));
- if (!IsWindowEnabled(GetDlgItem(hwndDlg,IDC_SETDOCKED)))
- CheckDlgButton(hwndDlg, IDC_SETDOCKED, BST_UNCHECKED);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_DOCKED), IsDlgButtonChecked(hwndDlg, IDC_SETDOCKED));
- break;
-
- case UM_REINITWINSTATE:
- {
- int val = db_get_b(NULL, MODULENAME, SETTING_WINSTATE, SETTING_STATE_NORMAL);
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_RESETCONTENT, 0, 0);
-
- int item = SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Hidden"));
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETITEMDATA, item, (LPARAM)SETTING_STATE_HIDDEN);
- if (val == SETTING_STATE_HIDDEN)
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETCURSEL, item, 0);
-
- if (!db_get_b(NULL, MODULE_CLIST, SETTING_TOOLWINDOW, 0)) {
- item = SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Minimized"));
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETITEMDATA, item, SETTING_STATE_MINIMIZED);
- if (val == SETTING_STATE_MINIMIZED)
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETCURSEL, item, 0);
- }
- item = SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Normal"));
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETITEMDATA, item, SETTING_STATE_NORMAL);
- if ( val == SETTING_STATE_NORMAL || (val == SETTING_STATE_MINIMIZED) && db_get_b(NULL, MODULE_CLIST, SETTING_TOOLWINDOW, 0))
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_SETCURSEL, item, 0);
- }
- break;
-
- case UM_REINITWINSIZE:
- EnableWindow(GetDlgItem(hwndDlg, IDC_WIDTH), IsDlgButtonChecked(hwndDlg, IDC_SETWINSIZE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_HEIGHT), !db_get_b(NULL, MODULE_CLUI, SETTING_AUTOSIZE, 0)&&IsDlgButtonChecked(hwndDlg, IDC_SETWINSIZE));
-
- case WM_COMMAND:
- if ( HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == LBN_SELCHANGE || HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == EN_CHANGE )
- if ( bInitDone )
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- switch (LOWORD(wParam)) {
- case IDC_SETPROFILE:
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILE), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE)||IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETPROFILEDELAY), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE));
- EnableWindow(GetDlgItem(hwndDlg, IDC_OVERRIDE), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE));
- break;
- case IDC_SHOWDIALOG:
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILE), IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE)||IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DLGTIMEOUT), IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- break;
- case IDC_SETWINSTATE:
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINSTATE), IsDlgButtonChecked(hwndDlg, IDC_SETWINSTATE));
- break;
- case IDC_SETDOCKED:
- EnableWindow(GetDlgItem(hwndDlg, IDC_DOCKED), IsDlgButtonChecked(hwndDlg, IDC_SETDOCKED));
- break;
- case IDC_SETWINLOCATION:
- EnableWindow(GetDlgItem(hwndDlg, IDC_XPOS), IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION));
- EnableWindow(GetDlgItem(hwndDlg, IDC_YPOS), IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION));
- break;
- case IDC_SETWINSIZE:
- SendMessage(hwndDlg, UM_REINITWINSIZE, 0, 0);
- break;
- case IDC_SHOWCMDL:
- {
- int defProfile = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
-
- TSettingsList* ps = GetCurrentProtoSettings();
- if ( ps ) {
- GetProfile( defProfile, *ps );
- for ( int i=0; i < ps->getCount(); i++ )
- if ( (*ps)[i].szMsg != NULL )
- (*ps)[i].szMsg = wcsdup( (*ps)[i].szMsg );
-
- CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CMDLOPTIONS), hwndDlg, CmdlOptionsDlgProc, (LPARAM)ps);
- }
- break;
- }
- }
- break;
-
- case WM_SHOWWINDOW:
- if (wParam == FALSE)
- break;
-
- bInitDone = FALSE;
- SendMessage(hwndDlg, UM_REINITPROFILES, 0, 0);
- SendMessage(hwndDlg, UM_REINITDOCKED, 0, 0);
- SendMessage(hwndDlg, UM_REINITWINSTATE, 0, 0);
- SendMessage(hwndDlg, UM_REINITWINSIZE, 0, 0);
- bInitDone = TRUE;
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- int val;
-
- db_set_b(NULL, MODULENAME, SETTING_SETPROFILE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE));
- if (IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE))
- db_set_dw(NULL, MODULENAME, SETTING_SETPROFILEDELAY, GetDlgItemInt(hwndDlg, IDC_SETPROFILEDELAY, NULL, FALSE));
-
- if (IsDlgButtonChecked(hwndDlg, IDC_SETPROFILE) || IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG)) {
- val = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- db_set_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, (WORD)val);
- }
- db_set_b(NULL, MODULENAME, SETTING_OVERRIDE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_OVERRIDE));
- db_set_b(NULL, MODULENAME, SETTING_SHOWDIALOG, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG));
- if (IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG))
- db_set_dw(NULL, MODULENAME, SETTING_DLGTIMEOUT, GetDlgItemInt(hwndDlg, IDC_DLGTIMEOUT, NULL, FALSE));
-
- db_set_b(NULL, MODULENAME, SETTING_SETWINSTATE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SETWINSTATE));
- if (IsDlgButtonChecked(hwndDlg, IDC_SETWINSTATE)) {
- val = (int)SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_WINSTATE, CB_GETCURSEL, 0, 0), 0);
- db_set_b(NULL, MODULENAME, SETTING_WINSTATE, (BYTE)val);
- }
- db_set_b(NULL, MODULENAME, SETTING_SETDOCKED, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SETDOCKED));
- if (IsDlgButtonChecked(hwndDlg, IDC_SETDOCKED)) {
- val = (int)SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_DOCKED, CB_GETCURSEL, 0, 0), 0);
- db_set_b(NULL, MODULENAME, SETTING_DOCKED, (BYTE)val);
- }
- db_set_b(NULL, MODULENAME, SETTING_SETWINLOCATION, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION));
- if (IsDlgButtonChecked(hwndDlg, IDC_SETWINLOCATION)) {
- db_set_dw(NULL, MODULENAME, SETTING_XPOS, GetDlgItemInt(hwndDlg, IDC_XPOS, NULL, TRUE));
- db_set_dw(NULL, MODULENAME, SETTING_YPOS, GetDlgItemInt(hwndDlg, IDC_YPOS, NULL, TRUE));
- }
- db_set_b(NULL, MODULENAME, SETTING_SETWINSIZE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SETWINSIZE));
- if (IsDlgButtonChecked(hwndDlg, IDC_SETWINSIZE)) {
- db_set_dw(NULL, MODULENAME, SETTING_WIDTH, GetDlgItemInt(hwndDlg, IDC_WIDTH, NULL, FALSE));
- db_set_dw(NULL, MODULENAME, SETTING_HEIGHT, GetDlgItemInt(hwndDlg, IDC_HEIGHT, NULL, FALSE));
- }
- db_set_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_OFFLINECLOSE));
- db_set_b(NULL, MODULENAME, SETTING_AUTODIAL, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTODIAL));
- db_set_b(NULL, MODULENAME, SETTING_AUTOHANGUP, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_AUTOHANGUP));
- }
- break;
- }
-
- return FALSE;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// for db cleanup
-
-static int DeleteSetting(const char *szSetting, LPARAM lParam)
-{
- LIST<char> *p = (LIST<char> *)lParam;
- p->insert(mir_strdup(szSetting));
- return 0;
-}
-
-static int ClearDatabase(char* filter)
-{
- LIST<char> arSettings(10);
- db_enum_settings(NULL, DeleteSetting, MODULENAME, &arSettings);
-
- for (int i = 0; i < arSettings.getCount(); i++) {
- if ((filter == NULL) || (!strncmp(filter, arSettings[i], mir_strlen(filter))))
- db_unset(NULL, MODULENAME, arSettings[i]);
- mir_free(arSettings[i]);
- }
-
- if (filter == NULL)
- db_unset(NULL, "AutoAway", "Confirm");
-
- return 0;
-}
-
-
-static OBJLIST<PROFILEOPTIONS> arProfiles(5);
-
-INT_PTR CALLBACK addProfileDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static HWND hwndParent;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- hwndParent = (HWND)lParam;
- EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
- break;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_OK) {
- wchar_t profileName[128];
- GetDlgItemText(hwndDlg, IDC_PROFILENAME, profileName, _countof(profileName));
- SendMessage(hwndParent, UM_ADDPROFILE, 0, (LPARAM)profileName);
- // done and exit
- DestroyWindow(hwndDlg);
- }
- else if (LOWORD(wParam) == IDC_CANCEL) {
- DestroyWindow(hwndDlg);
- }
- else if (LOWORD(wParam) == IDC_PROFILENAME) {
- (SendDlgItemMessage(hwndDlg, IDC_PROFILENAME, EM_LINELENGTH, 0, 0) > 0) ? EnableWindow(GetDlgItem(hwndDlg, IDC_OK), TRUE) : EnableWindow(GetDlgItem(hwndDlg, IDC_OK), FALSE);
- }
- break;
-
- case WM_DESTROY:
- EnableWindow(hwndParent, TRUE);
- break;
- }
-
- return 0;
-}
-
-static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
-{
- static BOOL bNeedRebuildMenu = FALSE;
- static BOOL bInitDone = FALSE;
-
- switch(msg) {
- case WM_INITDIALOG:
- bInitDone = false;
-
- TranslateDialogDefault(hwndDlg);
- SetDlgItemText(hwndDlg, IDC_CREATEMMI, TranslateT("Create a status menu item"));
- {
- int defProfile;
- int profileCount = GetProfileCount((WPARAM)&defProfile, 0);
- if (profileCount == 0) {
- profileCount = 1;
- defProfile = 0;
- }
-
- for (int i=0; i < profileCount; i++) {
- PROFILEOPTIONS *ppo = new PROFILEOPTIONS;
- ppo->ps = GetCurrentProtoSettings();
- TSettingsList& ar = *ppo->ps;
-
- if ( GetProfile(i, ar) == -1) {
- /* create an empty profile */
- if (i == defProfile)
- ppo->tszName = mir_wstrdup( TranslateT("default"));
- else
- ppo->tszName = mir_wstrdup( TranslateT("unknown"));
- }
- else {
- for (int j=0; j < ar.getCount(); j++)
- if ( ar[j].szMsg != NULL)
- ar[j].szMsg = wcsdup( ar[j].szMsg );
-
- ppo->tszName = db_get_wsa(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME));
- if (ppo->tszName == NULL) {
- if (i == defProfile)
- ppo->tszName = mir_wstrdup( TranslateT("default"));
- else
- ppo->tszName = mir_wstrdup( TranslateT("unknown"));
- }
- ppo->createTtb = db_get_b(NULL, MODULENAME, OptName(i, SETTING_CREATETTBBUTTON), 0);
- ppo->showDialog = db_get_b(NULL, MODULENAME, OptName(i, SETTING_SHOWCONFIRMDIALOG), 0);
- ppo->createMmi = db_get_b(NULL, MODULENAME, OptName(i, SETTING_CREATEMMITEM), 0);
- ppo->inSubMenu = db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1);
- ppo->regHotkey = db_get_b(NULL, MODULENAME, OptName(i, SETTING_REGHOTKEY), 0);
- ppo->hotKey = db_get_w(NULL, MODULENAME, OptName(i, SETTING_HOTKEY), MAKEWORD((char)('0'+i), HOTKEYF_CONTROL|HOTKEYF_SHIFT));
- }
- arProfiles.insert(ppo);
- }
- if (hTTBModuleLoadedHook == NULL)
- EnableWindow(GetDlgItem(hwndDlg, IDC_CREATETTB), FALSE);
-
- SendMessage(hwndDlg, UM_REINITPROFILES, 0, 0);
- ShowWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), ServiceExists(MS_VARS_SHOWHELPEX)?SW_SHOW:SW_HIDE);
- bInitDone = true;
- }
- break;
-
- case UM_REINITPROFILES:
- bInitDone = false;
- {
- // creates profile combo box according to 'dat'
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_RESETCONTENT, 0, 0);
- for (int i=0; i < arProfiles.getCount(); i++ ) {
- int item = SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_ADDSTRING, 0, (LPARAM)arProfiles[i].tszName);
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETITEMDATA, (WPARAM)item, (LPARAM)i);
- }
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETCURSEL, 0, 0);
- SendMessage(hwndDlg, UM_SETPROFILE, 0, 0);
- }
- bInitDone = true;
- break;
-
- case UM_SETPROFILE:
- {
- int sel = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- CheckDlgButton(hwndDlg, IDC_CREATETTB, arProfiles[sel].createTtb ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWDIALOG, arProfiles[sel].showDialog ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CREATEMMI, arProfiles[sel].createMmi ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_INSUBMENU, arProfiles[sel].inSubMenu ? BST_CHECKED : BST_UNCHECKED);
- EnableWindow(GetDlgItem(hwndDlg, IDC_INSUBMENU), IsDlgButtonChecked(hwndDlg, IDC_CREATEMMI));
- CheckDlgButton(hwndDlg, IDC_REGHOTKEY, arProfiles[sel].regHotkey ? BST_CHECKED : BST_UNCHECKED);
- SendDlgItemMessage(hwndDlg, IDC_HOTKEY, HKM_SETHOTKEY, arProfiles[sel].hotKey, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_HOTKEY), IsDlgButtonChecked(hwndDlg, IDC_REGHOTKEY));
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_RESETCONTENT, 0, 0);
-
- // fill proto list
- TSettingsList& ar = *arProfiles[sel].ps;
- for ( int i=0; i < ar.getCount(); i++ ) {
- int item = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_ADDSTRING, 0, (LPARAM)ar[i].tszAccName );
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_SETITEMDATA, (WPARAM)item, (LPARAM)&ar[i]);
- }
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_SETCURSEL, 0, 0);
- SendMessage(hwndDlg, UM_SETPROTOCOL, 0, 0);
- }
- break;
-
- case UM_SETPROTOCOL:
- {
- int idx = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETCURSEL, 0, 0);
- if ( idx != -1 ) {
- // fill status box
- TSSSetting* ps = ( TSSSetting* )SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETITEMDATA, idx, 0);
-
- int flags = (CallProtoService(ps->szName, PS_GETCAPS, PFLAGNUM_2, 0))&~(CallProtoService(ps->szName, PS_GETCAPS, PFLAGNUM_5, 0));
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_RESETCONTENT, 0, 0);
- for ( int i=0; i < _countof(statusModeList); i++ ) {
- if ( (flags&statusModePf2List[i]) || (statusModeList[i] == ID_STATUS_OFFLINE)) {
- int item = SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_ADDSTRING, 0, (LPARAM)pcli->pfnGetStatusModeDescription(statusModeList[i], 0));
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETITEMDATA, (WPARAM)item, (LPARAM)statusModeList[i]);
- if (ps->status == statusModeList[i])
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETCURSEL, (WPARAM)item, 0);
- }
- }
-
- int item = SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_ADDSTRING, 0, (LPARAM)TranslateT("<current>"));
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETITEMDATA, (WPARAM)item, (LPARAM)ID_STATUS_CURRENT);
- if (ps->status == ID_STATUS_CURRENT)
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETCURSEL, (WPARAM)item, 0);
-
- item = SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_ADDSTRING, 0, (LPARAM)TranslateT("<last>"));
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETITEMDATA, (WPARAM)item, (LPARAM)ID_STATUS_LAST);
- if (ps->status == ID_STATUS_LAST)
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_SETCURSEL, (WPARAM)item, 0);
- }
-
- SendMessage(hwndDlg, UM_SETSTATUSMSG, 0, 0);
- }
- break;
-
- case UM_SETSTATUSMSG:
- {
- // set status message
- BOOL bStatusMsg = FALSE;
- int idx = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETCURSEL, 0, 0);
- if ( idx != -1 ) {
- TSSSetting* ps = ( TSSSetting* )SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETITEMDATA, idx, 0);
-
- CheckRadioButton(hwndDlg, IDC_MIRANDAMSG, IDC_CUSTOMMSG, ps->szMsg!=NULL?IDC_CUSTOMMSG:IDC_MIRANDAMSG);
- if (ps->szMsg != NULL)
- SetDlgItemText(hwndDlg, IDC_STATUSMSG, ps->szMsg);
-
- bStatusMsg = ( (((CallProtoService(ps->szName, PS_GETCAPS, PFLAGNUM_1, 0)&PF1_MODEMSGSEND&~PF1_INDIVMODEMSG)) &&
- (CallProtoService(ps->szName, PS_GETCAPS, PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST));
- }
- EnableWindow(GetDlgItem(hwndDlg, IDC_MIRANDAMSG), bStatusMsg);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMMSG), bStatusMsg);
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUSMSG), bStatusMsg&&IsDlgButtonChecked(hwndDlg, IDC_CUSTOMMSG));
- EnableWindow(GetDlgItem(hwndDlg, IDC_VARIABLESHELP), bStatusMsg&&IsDlgButtonChecked(hwndDlg, IDC_CUSTOMMSG));
- }
- break;
-
- case UM_ADDPROFILE:
- {
- wchar_t *tszName = (wchar_t*)lParam;
- if (tszName == NULL)
- break;
-
- PROFILEOPTIONS* ppo = new PROFILEOPTIONS;
- ppo->tszName = mir_wstrdup(tszName);
- ppo->ps = GetCurrentProtoSettings();
- arProfiles.insert(ppo);
-
- SendMessage(hwndDlg, UM_REINITPROFILES, 0, 0);
- }
- break;
-
- case UM_DELPROFILE: {
- // wparam == profile no
- int i=(int)wParam;
-
- if ( arProfiles.getCount() == 1) {
- MessageBox(NULL, TranslateT("At least one profile must exist"), TranslateT("StartupStatus"), MB_OK);
- break;
- }
-
- arProfiles.remove(i);
-
- int defProfile;
- GetProfileCount((WPARAM)&defProfile, 0);
- if (i == defProfile) {
- MessageBox(NULL, TranslateT("Your default profile will be changed"), TranslateT("StartupStatus"), MB_OK);
- db_set_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0);
- }
- SendMessage(hwndDlg, UM_REINITPROFILES, 0, 0);
- break;
- }
-
- case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()))
- if ( bInitDone )
- SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
-
- switch (LOWORD(wParam)) {
- case IDC_STATUS:
- if (HIWORD(wParam) == LBN_SELCHANGE) {
- int idx = SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETCURSEL, 0, 0);
- if ( idx != -1 ) {
- TSSSetting* ps = ( TSSSetting* )SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETITEMDATA, idx, 0);
- ps->status = (int)SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_STATUS, LB_GETCURSEL, 0, 0), 0);
- }
- SendMessage(hwndDlg, UM_SETSTATUSMSG, 0, 0);
- }
- break;
-
- case IDC_PROFILE:
- if (HIWORD(wParam) != CBN_SELCHANGE)
- break;
-
- SendMessage(hwndDlg, UM_SETPROFILE, 0, 0);
- break;
-
- case IDC_PROTOCOL:
- if (HIWORD(wParam) != LBN_SELCHANGE)
- break;
-
- SendMessage(hwndDlg, UM_SETPROTOCOL, 0, 0);
- break;
-
- case IDC_MIRANDAMSG:
- case IDC_CUSTOMMSG:
- {
- int len;
- TSSSetting* ps = ( TSSSetting* )SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETCURSEL, 0, 0), 0);
- if (ps->szMsg != NULL)
- free(ps->szMsg);
-
- ps->szMsg = NULL;
- if (IsDlgButtonChecked(hwndDlg, IDC_CUSTOMMSG)) {
- len = SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXTLENGTH, 0, 0);
- ps->szMsg = (wchar_t*)calloc(sizeof(wchar_t), len+1);
- GetDlgItemText(hwndDlg, IDC_STATUSMSG, ps->szMsg, (len + 1));
- }
- SendMessage(hwndDlg, UM_SETSTATUSMSG, 0, 0);
- }
- break;
-
- case IDC_STATUSMSG:
- if (HIWORD(wParam) == EN_CHANGE) {
- // update the status message in memory, this is done on each character tick, not nice
- // but it works
- TSSSetting* ps = ( TSSSetting* )SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROTOCOL, LB_GETCURSEL, 0, 0), 0);
- if (ps->szMsg != NULL) {
- if ( *ps->szMsg )
- free(ps->szMsg);
- ps->szMsg = NULL;
- }
- int len = SendDlgItemMessage(hwndDlg, IDC_STATUSMSG, WM_GETTEXTLENGTH, 0, 0);
- ps->szMsg = (wchar_t*)calloc(sizeof(wchar_t), len+1);
- GetDlgItemText(hwndDlg, IDC_STATUSMSG, ps->szMsg, (len + 1));
- }
- break;
-
- case IDC_CREATEMMI:
- EnableWindow(GetDlgItem(hwndDlg, IDC_INSUBMENU), IsDlgButtonChecked(hwndDlg, IDC_CREATEMMI));
- case IDC_INSUBMENU:
- bNeedRebuildMenu = TRUE;
- case IDC_REGHOTKEY:
- case IDC_CREATETTB:
- case IDC_SHOWDIALOG:
- {
- int sel = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- PROFILEOPTIONS& po = arProfiles[sel];
- po.createMmi = IsDlgButtonChecked(hwndDlg, IDC_CREATEMMI);
- po.inSubMenu = IsDlgButtonChecked(hwndDlg, IDC_INSUBMENU);
- po.createTtb = IsDlgButtonChecked(hwndDlg, IDC_CREATETTB);
- po.regHotkey = IsDlgButtonChecked(hwndDlg, IDC_REGHOTKEY);
- po.showDialog = IsDlgButtonChecked(hwndDlg, IDC_SHOWDIALOG);
- EnableWindow(GetDlgItem(hwndDlg, IDC_HOTKEY), IsDlgButtonChecked(hwndDlg, IDC_REGHOTKEY));
- }
- break;
-
- case IDC_HOTKEY:
- if (HIWORD(wParam) == EN_CHANGE) {
- int sel = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- arProfiles[sel].hotKey = (WORD)SendDlgItemMessage(hwndDlg, IDC_HOTKEY, HKM_GETHOTKEY, 0, 0);
- }
- break;
-
- case IDC_ADDPROFILE:
- // add a profile
- CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDPROFILE), hwndDlg, addProfileDlgProc, (LPARAM)hwndDlg);
- EnableWindow(hwndDlg, FALSE);
- break;
-
- case IDC_DELPROFILE:
- {
- int sel = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- SendMessage(hwndDlg, UM_DELPROFILE, (WPARAM)sel, 0);
- }
- break;
-
- case IDC_VARIABLESHELP:
- variables_showhelp(hwndDlg, IDC_STATUSMSG, VHF_INPUT|VHF_EXTRATEXT|VHF_HELP|VHF_FULLFILLSTRUCT|VHF_HIDESUBJECTTOKEN, NULL, "Protocol ID");
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- char setting[128];
- int oldCount = db_get_w(NULL, MODULENAME, SETTING_PROFILECOUNT, 0);
- for (int i=0; i < oldCount; i++) {
- mir_snprintf(setting, "%d_", i);
- ClearDatabase(setting);
- }
- for (int i=0; i < arProfiles.getCount(); i++) {
- PROFILEOPTIONS& po = arProfiles[i];
- db_set_b(NULL, MODULENAME, OptName(i, SETTING_SHOWCONFIRMDIALOG), po.showDialog);
- db_set_b(NULL, MODULENAME, OptName(i, SETTING_CREATETTBBUTTON), po.createTtb);
- db_set_b(NULL, MODULENAME, OptName(i, SETTING_CREATEMMITEM), po.createMmi);
- db_set_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), po.inSubMenu);
- db_set_b(NULL, MODULENAME, OptName(i, SETTING_REGHOTKEY), po.regHotkey);
- db_set_w(NULL, MODULENAME, OptName(i, SETTING_HOTKEY), po.hotKey);
- db_set_ws(NULL, MODULENAME, OptName(i, SETTING_PROFILENAME), po.tszName);
-
- TSettingsList& ar = *po.ps;
- for (int j=0; j < ar.getCount(); j++) {
- if ( ar[j].szMsg != NULL ) {
- mir_snprintf(setting, "%s_%s", ar[j].szName, SETTING_PROFILE_STSMSG);
- db_set_ws(NULL, MODULENAME, OptName(i, setting), ar[j].szMsg);
- }
- db_set_w(NULL, MODULENAME, OptName(i, ar[j].szName), ar[j].status);
- }
- }
- db_set_w(NULL, MODULENAME, SETTING_PROFILECOUNT, (WORD)arProfiles.getCount());
-
- // Rebuild status menu
- if (bNeedRebuildMenu)
- pcli->pfnReloadProtoMenus();
-
- LoadMainOptions();
- }
- break;
-
- case WM_DESTROY:
- arProfiles.destroy();
- break;
- }
-
- return 0;
-}
-
-int OptionsInit(WPARAM wparam,LPARAM)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = hInst;
- odp.pszGroup = LPGEN("Status");
- odp.pszTitle = LPGEN("StartupStatus");
- odp.flags = ODPF_BOLDGROUPS;
-
- odp.pszTab = LPGEN("General");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STARTUPSTATUS);
- odp.pfnDlgProc = StartupStatusOptDlgProc;
- Options_AddPage(wparam,&odp);
-
- odp.pszTab = LPGEN("Status profiles");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_STATUSPROFILES);
- odp.pfnDlgProc = StatusProfilesOptDlgProc;
- Options_AddPage(wparam,&odp);
- return 0;
-}
-
-char* OptName(int i, const char* setting)
-{
- static char buf[100];
- mir_snprintf(buf, "%d_%s", i, setting);
- return buf;
-}
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/profiles.cpp b/tools/_deprecated/StatusPlugins/StartupStatus/profiles.cpp deleted file mode 100644 index 51a4bccc71..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/profiles.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - StartupStatus Plugin for Miranda-IM (www.miranda-im.org) - Copyright 2003-2006 P. Boon - - 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, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ - -#include "../commonstatus.h" -#include "startupstatus.h" -#include "../resource.h" -#include <commctrl.h> - -#include <m_icolib.h> - -#define MAX_MMITEMS 6 - -extern HINSTANCE hInst; -extern int protoCount; - -static int menuprofiles[MAX_MMITEMS]; -static HANDLE hProfileServices[MAX_MMITEMS]; -static int mcount = 0; - -static PROFILECE *pce = NULL; -static int pceCount = 0; - -static UINT_PTR releaseTtbTimerId = 0; - -static HANDLE hTBModuleLoadedHook; -static HANDLE hLoadAndSetProfileService; -static HANDLE hMessageHook = NULL; - -static HWND hMessageWindow = NULL; -static HKINFO *hkInfo = NULL; -static int hkiCount = 0; - -static HANDLE* ttbButtons = NULL; -static int ttbButtonCount = 0; - -HANDLE hTTBModuleLoadedHook; - -static INT_PTR profileService(WPARAM, LPARAM, LPARAM param) -{ - LoadAndSetProfile((WPARAM)menuprofiles[param], 0); - return 0; -} - -static int CreateMainMenuItems(WPARAM, LPARAM) -{ - CMenuItem mi; - mi.position = 2000100000; - mi.flags = CMIF_UNICODE; - mcount = 0; - int count = GetProfileCount(0, 0); - for (int i = 0; i < count && mcount < MAX_MMITEMS; i++) { - wchar_t profilename[128]; - if (!db_get_b(NULL, MODULENAME, OptName(i, SETTING_CREATEMMITEM), 0) || GetProfileName(i, (LPARAM)profilename)) - continue; - - if (db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1) && !mi.root) { - mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000); - Menu_ConfigureItem(mi.root, MCI_OPT_UID, "1AB30D51-BABA-4B27-9288-1A12278BAD8D"); - } - - char servicename[128]; - mir_snprintf(servicename, "%s%d", MS_SS_MENUSETPROFILEPREFIX, mcount); - hProfileServices[mcount] = CreateServiceFunctionParam(servicename, profileService, mcount); - - mi.name.w = profilename; - mi.position = 2000100000 + mcount; - mi.pszService = servicename; - if (Menu_AddStatusMenuItem(&mi)) - menuprofiles[mcount++] = i; - } - - return 0; -} - -///////////////////////////////////////////////////////////////////////////////////////// - -INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam) -{ - int profile = (int)wParam; - if (profile < 0) // get default profile - profile = db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); - - int count = db_get_w(NULL, MODULENAME, SETTING_PROFILECOUNT, 0); - if (profile >= count && count > 0) - return -1; - - wchar_t* buf = (wchar_t*)lParam; - if (count == 0) { - wcsncpy(buf, TranslateT("default"), 128 - 1); - return 0; - } - - DBVARIANT dbv; - char setting[80]; - mir_snprintf(setting, "%d_%s", profile, SETTING_PROFILENAME); - if (db_get_ws(NULL, MODULENAME, setting, &dbv)) - return -1; - - wcsncpy(buf, dbv.ptszVal, 128 - 1); buf[127] = 0; - db_free(&dbv); - return 0; -} - -INT_PTR GetProfileCount(WPARAM wParam, LPARAM) -{ - int *def = (int*)wParam; - int count = db_get_w(NULL, MODULENAME, SETTING_PROFILECOUNT, 1); - if (def != 0) { - *def = db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); - if (*def >= count) - *def = 0; - } - - return count; -} - -wchar_t *GetStatusMessage(int profile, char *szProto) -{ - char dbSetting[80]; - DBVARIANT dbv; - - for (int i = 0; i < pceCount; i++) { - if ((pce[i].profile == profile) && (!mir_strcmp(pce[i].szProto, szProto))) { - mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); - if (!db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db - pce[i].msg = (wchar_t*)realloc(pce[i].msg, sizeof(wchar_t)*(mir_wstrlen(dbv.ptszVal) + 1)); - if (pce[i].msg != NULL) { - mir_wstrcpy(pce[i].msg, dbv.ptszVal); - } - db_free(&dbv); - } - else { - if (pce[i].msg != NULL) { - free(pce[i].msg); - pce[i].msg = NULL; - } - } - return pce[i].msg; - } - } - pce = (PROFILECE*)realloc(pce, (pceCount + 1)*sizeof(PROFILECE)); - if (pce == NULL) - return NULL; - - pce[pceCount].profile = profile; - pce[pceCount].szProto = _strdup(szProto); - pce[pceCount].msg = NULL; - mir_snprintf(dbSetting, "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); - if (!db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) { - pce[pceCount].msg = wcsdup(dbv.ptszVal); - db_free(&dbv); - } - pceCount++; - - return pce[pceCount - 1].msg; -} - -int GetProfile(int profile, TSettingsList& arSettings) -{ - if (profile < 0) // get default profile - profile = db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); - - int count = db_get_w(NULL, MODULENAME, SETTING_PROFILECOUNT, 0); - if (profile >= count && count > 0) - return -1; - - arSettings.destroy(); - - // if count == 0, continue so the default profile will be returned - PROTOACCOUNT** protos; - Proto_EnumAccounts(&count, &protos); - - for (int i = 0; i < count; i++) - if (IsSuitableProto(protos[i])) - arSettings.insert(new TSSSetting(profile, protos[i])); - - return (arSettings.getCount() == 0) ? -1 : 0; -} - -static void CALLBACK releaseTtbTimerFunction(HWND, UINT, UINT_PTR, DWORD) -{ - KillTimer(NULL, releaseTtbTimerId); - for (int i = 0; i < ttbButtonCount; i++) - CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)ttbButtons[i], 0); -} - -INT_PTR LoadAndSetProfile(WPARAM iProfileNo, LPARAM) -{ - // wParam == profile no. - int profile = (int)iProfileNo; - TSettingsList profileSettings(10, CompareSettings); - if (!GetProfile(profile, profileSettings)) { - profile = (profile >= 0) ? profile : db_get_w(NULL, MODULENAME, SETTING_DEFAULTPROFILE, 0); - - char setting[64]; - mir_snprintf(setting, "%d_%s", profile, SETTING_SHOWCONFIRMDIALOG); - if (!db_get_b(NULL, MODULENAME, setting, 0)) - CallService(MS_CS_SETSTATUSEX, (WPARAM)&profileSettings, 0); - else - CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&profileSettings, (LPARAM)db_get_dw(NULL, MODULENAME, SETTING_DLGTIMEOUT, 5)); - } - - // add timer here - if (hTTBModuleLoadedHook) - releaseTtbTimerId = SetTimer(NULL, 0, 100, releaseTtbTimerFunction); - - return 0; -} - -static UINT GetFsModifiers(WORD wHotKey) -{ - UINT fsm = 0; - if (HIBYTE(wHotKey)&HOTKEYF_ALT) - fsm |= MOD_ALT; - if (HIBYTE(wHotKey)&HOTKEYF_CONTROL) - fsm |= MOD_CONTROL; - if (HIBYTE(wHotKey)&HOTKEYF_SHIFT) - fsm |= MOD_SHIFT; - if (HIBYTE(wHotKey)&HOTKEYF_EXT) - fsm |= MOD_WIN; - - return fsm; -} - -static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM) -{ - if (msg == WM_HOTKEY) { - for (int i = 0; i < hkiCount; i++) - if ((int)hkInfo[i].id == wParam) - LoadAndSetProfile((WPARAM)hkInfo[i].profile, 0); - } - - return TRUE; -} - -static int UnregisterHotKeys() -{ - if (hkInfo != NULL) { - for (int i = 0; i < hkiCount; i++) { - UnregisterHotKey(hMessageWindow, (int)hkInfo[i].id); - GlobalDeleteAtom(hkInfo[i].id); - } - free(hkInfo); - } - DestroyWindow(hMessageWindow); - - hkiCount = 0; - hkInfo = NULL; - hMessageWindow = NULL; - - return 0; -} - -// assumes UnregisterHotKeys was called before -static int RegisterHotKeys() -{ - hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); - SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc); - - int count = GetProfileCount(0, 0); - for (int i = 0; i < count; i++) { - if (!db_get_b(NULL, MODULENAME, OptName(i, SETTING_REGHOTKEY), 0)) - continue; - - WORD wHotKey = db_get_w(NULL, MODULENAME, OptName(i, SETTING_HOTKEY), 0); - hkInfo = (HKINFO*)realloc(hkInfo, (hkiCount + 1)*sizeof(HKINFO)); - if (hkInfo == NULL) - return -1; - - char atomname[255]; - mir_snprintf(atomname, "StatusProfile_%d", i); - hkInfo[hkiCount].id = GlobalAddAtomA(atomname); - if (hkInfo[hkiCount].id == 0) - continue; - - hkInfo[hkiCount].profile = i; - hkiCount++; - RegisterHotKey(hMessageWindow, (int)hkInfo[hkiCount - 1].id, GetFsModifiers(wHotKey), LOBYTE(wHotKey)); - } - - if (hkiCount == 0) - UnregisterHotKeys(); - - return 0; -} - -int LoadMainOptions() -{ - if (hTTBModuleLoadedHook) { - RemoveTopToolbarButtons(); - CreateTopToolbarButtons(0, 0); - } - - UnregisterHotKeys(); - RegisterHotKeys(); - return 0; -} - -int LoadProfileModule() -{ - hLoadAndSetProfileService = CreateServiceFunction(MS_SS_LOADANDSETPROFILE, LoadAndSetProfile); - return 0; -} - -int InitProfileModule() -{ - hTTBModuleLoadedHook = HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButtons); - - HookEvent(ME_CLIST_PREBUILDSTATUSMENU, CreateMainMenuItems); - - CreateMainMenuItems(0, 0); - RegisterHotKeys(); - return 0; -} - -int DeinitProfilesModule() -{ - for (int i = 0; i < mcount; i++) - DestroyServiceFunction(hProfileServices[i]); - - if (pce) { - for (int i = 0; i < pceCount; i++) - free(pce[i].szProto); - free(pce); - } - - UnregisterHotKeys(); - RemoveTopToolbarButtons(); - - DestroyServiceFunction(hLoadAndSetProfileService); - return 0; -} diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbDown.ico b/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbDown.ico Binary files differdeleted file mode 100644 index 84e3269c89..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbDown.ico +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbUp.ico b/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbUp.ico Binary files differdeleted file mode 100644 index 150d8c3b0c..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/res/ttbUp.ico +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.cpp b/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.cpp deleted file mode 100644 index 3cf1f07b49..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.cpp +++ /dev/null @@ -1,487 +0,0 @@ -/*
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "startupstatus.h"
-
-static UINT_PTR setStatusTimerId = 0;
-
-int CompareSettings(const TSSSetting *p1, const TSSSetting *p2)
-{
- return mir_strcmp(p1->szName, p2->szName);
-}
-
-static TSettingsList startupSettings(10, CompareSettings);
-
-TSSSetting::TSSSetting(PROTOACCOUNT *pa)
-{
- cbSize = sizeof(PROTOCOLSETTINGEX);
- szName = pa->szModuleName;
- tszAccName = pa->tszAccountName;
- status = lastStatus = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0);
- szMsg = NULL;
-}
-
-TSSSetting::TSSSetting(int profile, PROTOACCOUNT *pa)
-{
- cbSize = sizeof(PROTOCOLSETTINGEX);
-
- // copy name
- szName = pa->szModuleName;
- tszAccName = pa->tszAccountName;
-
- // load status
- char setting[80];
- mir_snprintf(setting, "%d_%s", profile, pa->szModuleName);
- int iStatus = db_get_w(NULL, MODULENAME, setting, 0);
- if (iStatus < MIN_STATUS || iStatus > MAX_STATUS)
- iStatus = DEFAULT_STATUS;
- status = iStatus;
-
- // load last status
- mir_snprintf(setting, "%s%s", PREFIX_LAST, szName);
- iStatus = db_get_w(NULL, MODULENAME, setting, 0);
- if (iStatus < MIN_STATUS || iStatus > MAX_STATUS)
- iStatus = DEFAULT_STATUS;
- lastStatus = iStatus;
-
- szMsg = GetStatusMessage(profile, szName);
- if (szMsg)
- szMsg = wcsdup(szMsg);
-}
-
-TSSSetting::~TSSSetting()
-{
- free(szMsg);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-static HANDLE hProtoAckHook, hCSStatusChangeHook, hStatusChangeHook;
-
-static HWND hMessageWindow;
-
-static BYTE showDialogOnStartup = 0;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// command line options
-
-static PROTOCOLSETTINGEX* IsValidProtocol(TSettingsList& protoSettings, char* protoName)
-{
- for (int i = 0; i < protoSettings.getCount(); i++)
- if (!strncmp(protoSettings[i].szName, protoName, mir_strlen(protoSettings[i].szName)))
- return &protoSettings[i];
-
- return NULL;
-}
-
-static int IsValidStatusDesc(char* statusDesc)
-{
- if (!strncmp("away", statusDesc, 4))
- return ID_STATUS_AWAY;
- if (!strncmp("na", statusDesc, 2))
- return ID_STATUS_NA;
- if (!strncmp("dnd", statusDesc, 3))
- return ID_STATUS_DND;
- if (!strncmp("occupied", statusDesc, 8))
- return ID_STATUS_OCCUPIED;
- if (!strncmp("freechat", statusDesc, 8))
- return ID_STATUS_FREECHAT;
- if (!strncmp("online", statusDesc, 6))
- return ID_STATUS_ONLINE;
- if (!strncmp("offline", statusDesc, 7))
- return ID_STATUS_OFFLINE;
- if (!strncmp("invisible", statusDesc, 9))
- return ID_STATUS_INVISIBLE;
- if (!strncmp("onthephone", statusDesc, 10))
- return ID_STATUS_ONTHEPHONE;
- if (!strncmp("outtolunch", statusDesc, 10))
- return ID_STATUS_OUTTOLUNCH;
- if (!strncmp("last", statusDesc, 4))
- return ID_STATUS_LAST;
-
- return 0;
-}
-
-static void ProcessCommandLineOptions(TSettingsList& protoSettings)
-{
- if (protoSettings.getCount() == 0)
- return;
-
- char *cmdl = GetCommandLineA();
- while (*cmdl != '\0') {
- while (*cmdl != '/') {
- if (*cmdl == '\0')
- return;
-
- cmdl++;
- }
- if (*cmdl == '\0')
- return;
-
- cmdl++;
- if (!strncmp(cmdl, "showdialog", 10)) {
- showDialogOnStartup = TRUE;
- continue;
- }
- char *protoName = cmdl; // first protocol ?
- PROTOCOLSETTINGEX* protoSetting = IsValidProtocol(protoSettings, protoName);
- if (protoSetting != NULL) {
- while (*cmdl != '=') {
- if (*cmdl == '\0')
- return;
-
- cmdl++; // skip to status
- }
-
- if (*cmdl == '\0')
- return;
-
- cmdl++;
- char *statusDesc = cmdl;
- int status = IsValidStatusDesc(statusDesc);
- if (status != 0)
- protoSetting->status = status;
- }
- }
-}
-
-static void SetLastStatusMessages(TSettingsList &ps)
-{
- for (int i = 0; i < ps.getCount(); i++) {
- if (ps[i].status != ID_STATUS_LAST)
- continue;
-
- char dbSetting[128];
- mir_snprintf(dbSetting, "%s%s", PREFIX_LASTMSG, ps[i].szName);
-
- DBVARIANT dbv;
- if (ps[i].szMsg == NULL && !db_get_ws(NULL, MODULENAME, dbSetting, &dbv)) {
- ps[i].szMsg = wcsdup(dbv.ptszVal); // remember this won't be freed
- db_free(&dbv);
- }
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Account control event
-
-int OnAccChanged(WPARAM wParam, LPARAM lParam)
-{
- PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
- switch (wParam) {
- case PRAC_ADDED:
- startupSettings.insert(new TSSSetting(-1, pa));
- break;
-
- case PRAC_REMOVED:
- for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!mir_strcmp(startupSettings[i].szName, pa->szModuleName)) {
- startupSettings.remove(i);
- break;
- }
- }
- break;
- }
-
- return 0;
-}
-
-// 'allow override'
-static int ProcessProtoAck(WPARAM, LPARAM lParam)
-{
- // 'something' made a status change
- ACKDATA *ack = (ACKDATA*)lParam;
- if (ack->type != ACKTYPE_STATUS && ack->result != ACKRESULT_FAILED)
- return 0;
-
- if (!db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1) || startupSettings.getCount() == 0)
- return 0;
-
- for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!mir_strcmp(ack->szModule, startupSettings[i].szName)) {
- startupSettings[i].szName = "";
- log_debugA("StartupStatus: %s overridden by ME_PROTO_ACK, status will not be set", ack->szModule);
- }
- }
-
- return 0;
-}
-
-static int StatusChange(WPARAM, LPARAM lParam)
-{
- // change by menu
- if (!db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1) || startupSettings.getCount() == 0)
- return 0;
-
- char *szProto = (char *)lParam;
- if (szProto == NULL) { // global status change
- for (int i = 0; i < startupSettings.getCount(); i++) {
- startupSettings[i].szName = "";
- log_debugA("StartupStatus: all protos overridden by ME_CLIST_STATUSMODECHANGE, status will not be set");
- }
- }
- else {
- for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!mir_strcmp(startupSettings[i].szName, szProto)) {
- startupSettings[i].szName = "";
- log_debugA("StartupStatus: %s overridden by ME_CLIST_STATUSMODECHANGE, status will not be set", szProto);
- }
- }
- }
-
- return 0;
-}
-
-static int CSStatusChangeEx(WPARAM wParam, LPARAM)
-{
- // another status plugin made the change
- if (!db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1) || startupSettings.getCount() == 0)
- return 0;
-
- if (wParam != 0) {
- PROTOCOLSETTINGEX** ps = *(PROTOCOLSETTINGEX***)wParam;
- if (ps == NULL)
- return -1;
-
- for (int i = 0; i < startupSettings.getCount(); i++) {
- for (int j = 0; j < startupSettings.getCount(); j++) {
- if (ps[i]->szName == NULL || startupSettings[j].szName == NULL)
- continue;
-
- if (!mir_strcmp(ps[i]->szName, startupSettings[j].szName)) {
- log_debugA("StartupStatus: %s overridden by MS_CS_SETSTATUSEX, status will not be set", ps[i]->szName);
- // use a hack to disable this proto
- startupSettings[j].szName = "";
- }
- }
- }
- }
-
- return 0;
-}
-
-static void CALLBACK SetStatusTimed(HWND, UINT, UINT_PTR, DWORD)
-{
- KillTimer(NULL, setStatusTimerId);
- UnhookEvent(hProtoAckHook);
- UnhookEvent(hCSStatusChangeHook);
- UnhookEvent(hStatusChangeHook);
- CallService(MS_CS_SETSTATUSEX, (WPARAM)&startupSettings, 0);
-}
-
-static int OnOkToExit(WPARAM, LPARAM)
-{
- // save last protocolstatus
- int count;
- PROTOACCOUNT** protos;
- Proto_EnumAccounts(&count, &protos);
-
- for (int i = 0; i < count; i++) {
- PROTOACCOUNT *pa = protos[i];
- if (!IsSuitableProto(pa))
- continue;
-
- if (!Proto_GetAccount(pa->szModuleName))
- continue;
-
- char lastName[128], lastMsg[128];
- mir_snprintf(lastName, "%s%s", PREFIX_LAST, pa->szModuleName);
- db_set_w(NULL, MODULENAME, lastName, (WORD)CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0));
- mir_snprintf(lastMsg, "%s%s", PREFIX_LASTMSG, pa->szModuleName);
- db_unset(NULL, MODULENAME, lastMsg);
-
- if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG))
- continue;
-
- int status = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0);
- if (!(CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(status)))
- continue;
-
- // NewAwaySys
- if (ServiceExists(MS_NAS_GETSTATE)) {
- NAS_PROTOINFO npi = { sizeof(npi) };
- npi.szProto = pa->szModuleName;
- CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
- if (npi.szMsg == NULL) {
- npi.status = 0;
- npi.szProto = NULL;
- CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
- }
- if (npi.szMsg != NULL) {
- db_set_ws(NULL, MODULENAME, lastMsg, npi.tszMsg);
- mir_free(npi.tszMsg);
- }
- }
- }
-
- if (db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) || db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0)) {
- if (ServiceExists(MS_CLIST_SETSTATUSMODE))
- CallService(MS_CLIST_SETSTATUSMODE, ID_STATUS_OFFLINE, 0);
- else
- log_debugA("StartupStatus: MS_CLIST_SETSTATUSMODE not available!");
- }
-
- return 0;
-}
-
-static int OnShutdown(WPARAM, LPARAM)
-{
- DeinitProfilesModule();
-
- // set windowstate and docked for next startup
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINSTATE, 0)) {
- int state = db_get_b(NULL, MODULENAME, SETTING_WINSTATE, SETTING_STATE_NORMAL);
- HWND hClist = pcli->hwndContactList;
- BOOL isHidden = !IsWindowVisible(hClist);
- switch (state) {
- case SETTING_STATE_HIDDEN:
- // try to use services where possible
- if (!isHidden)
- pcli->pfnShowHide();
- break;
-
- case SETTING_STATE_MINIMIZED:
- if (!db_get_b(NULL, MODULE_CLIST, SETTING_TOOLWINDOW, 0))
- ShowWindow(hClist, SW_SHOWMINIMIZED);
- break;
-
- case SETTING_STATE_NORMAL:
- // try to use services where possible (that's what they're for)
- if (isHidden)
- pcli->pfnShowHide();
- break;
- }
- }
-
- // hangup
- if (db_get_b(NULL, MODULENAME, SETTING_AUTOHANGUP, 0))
- InternetAutodialHangup(0);
-
- int state = db_get_b(NULL, MODULENAME, SETTING_WINSTATE, SETTING_STATE_NORMAL);
- // set windowstate and docked for next startup
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINSTATE, 0))
- db_set_b(NULL, MODULE_CLIST, SETTING_WINSTATE, (BYTE)state);
-
- if (hMessageWindow)
- DestroyWindow(hMessageWindow);
-
- startupSettings.destroy();
- return 0;
-}
-
-/* Window proc for poweroff event */
-static DWORD CALLBACK MessageWndProc(HWND, UINT msg, WPARAM wParam, LPARAM)
-{
- switch (msg) {
- case WM_ENDSESSION:
- log_debugA("WM_ENDSESSION");
- if (wParam) {
- log_debugA("WM_ENDSESSION: calling exit");
- OnShutdown(0, 0);
- log_debugA("WM_ENDSESSION: exit called");
- }
- break;
- }
-
- return TRUE;
-}
-
-int CSModuleLoaded(WPARAM, LPARAM)
-{
- protoList = (OBJLIST<PROTOCOLSETTINGEX>*)&startupSettings;
-
- InitProfileModule();
-
- HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged);
- HookEvent(ME_OPT_INITIALISE, OptionsInit);
-
- /* shutdown hook for normal shutdown */
- HookEvent(ME_SYSTEM_OKTOEXIT, OnOkToExit);
- HookEvent(ME_SYSTEM_PRESHUTDOWN, OnShutdown);
- /* message window for poweroff */
- hMessageWindow = CreateWindowEx(0, L"STATIC", NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- SetWindowLongPtr(hMessageWindow, GWLP_WNDPROC, (LONG_PTR)MessageWndProc);
-
- GetProfile(-1, startupSettings);
-
- // override with cmdl
- ProcessCommandLineOptions(startupSettings);
- if (startupSettings.getCount() == 0)
- return 0;// no protocols are loaded
-
- SetLastStatusMessages(startupSettings);
- showDialogOnStartup = (showDialogOnStartup || db_get_b(NULL, MODULENAME, SETTING_SHOWDIALOG, 0));
-
- // dial
- if (showDialogOnStartup || db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1))
- if (db_get_b(NULL, MODULENAME, SETTING_AUTODIAL, 0))
- InternetAutodial(0, NULL);
-
- // set the status!
- if (showDialogOnStartup || db_get_b(NULL, MODULENAME, SETTING_SHOWDIALOG, 0))
- CallService(MS_CS_SHOWCONFIRMDLGEX, (WPARAM)&startupSettings, db_get_dw(NULL, MODULENAME, SETTING_DLGTIMEOUT, 5));
- else if (db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1)) {
- // set hooks for override
- if (db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1)) {
- hProtoAckHook = HookEvent(ME_PROTO_ACK, ProcessProtoAck);
- hCSStatusChangeHook = HookEvent(ME_CS_STATUSCHANGEEX, CSStatusChangeEx);
- hStatusChangeHook = HookEvent(ME_CLIST_STATUSMODECHANGE, StatusChange);
- }
- setStatusTimerId = SetTimer(NULL, 0, db_get_dw(NULL, MODULENAME, SETTING_SETPROFILEDELAY, 500), SetStatusTimed);
- }
-
- // win size and location
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINLOCATION, 0) || db_get_b(NULL, MODULENAME, SETTING_SETWINSIZE, 0)) {
- HWND hClist = pcli->hwndContactList;
-
- // store in db
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINLOCATION, 0)) {
- db_set_dw(NULL, MODULE_CLIST, SETTING_XPOS, db_get_dw(NULL, MODULENAME, SETTING_XPOS, 0));
- db_set_dw(NULL, MODULE_CLIST, SETTING_YPOS, db_get_dw(NULL, MODULENAME, SETTING_YPOS, 0));
- }
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINSIZE, 0)) {
- db_set_dw(NULL, MODULE_CLIST, SETTING_WIDTH, db_get_dw(NULL, MODULENAME, SETTING_WIDTH, 0));
- if (!db_get_b(NULL, MODULE_CLUI, SETTING_AUTOSIZE, 0))
- db_set_dw(NULL, MODULE_CLIST, SETTING_HEIGHT, db_get_dw(NULL, MODULENAME, SETTING_HEIGHT, 0));
- }
-
- WINDOWPLACEMENT wndpl = { sizeof(wndpl) };
- if (GetWindowPlacement(hClist, &wndpl)) {
- if (wndpl.showCmd == SW_SHOWNORMAL && !Clist_IsDocked()) {
- RECT rc;
- if (GetWindowRect(hClist, &rc)) {
- int x = rc.left;
- int y = rc.top;
- int width = rc.right - rc.left;
- int height = rc.bottom - rc.top;
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINLOCATION, 0)) {
- x = db_get_dw(NULL, MODULENAME, SETTING_XPOS, x);
- y = db_get_dw(NULL, MODULENAME, SETTING_YPOS, y);
- }
- if (db_get_b(NULL, MODULENAME, SETTING_SETWINSIZE, 0)) {
- width = db_get_dw(NULL, MODULENAME, SETTING_WIDTH, width);
- if (!db_get_b(NULL, MODULE_CLUI, SETTING_AUTOSIZE, 0))
- height = db_get_dw(NULL, MODULENAME, SETTING_HEIGHT, height);
- }
- MoveWindow(hClist, x, y, width, height, TRUE);
- } } } }
-
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.h b/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.h deleted file mode 100644 index 5303ab3468..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/startupstatus.h +++ /dev/null @@ -1,161 +0,0 @@ -/*
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-#ifndef __STARTUPSTATUSHEADER
-#define __STARTUPSTATUSHEADER
-
-#include <windows.h>
-#include <wininet.h>
-#include <m_options.h>
-#include <m_toptoolbar.h>
-#include "version.h"
-
-#define MODULENAME "StartupStatus"
-
-struct TSSSetting : public PROTOCOLSETTINGEX, public MZeroedObject
-{
- TSSSetting(PROTOACCOUNT *pa);
- TSSSetting(int profile, PROTOACCOUNT *pa);
- ~TSSSetting();
-};
-
-typedef OBJLIST<TSSSetting> TSettingsList;
-
-struct PROFILECE
-{
- int profile;
- char *szProto;
- wchar_t *msg;
-};
-
-struct PROFILEOPTIONS : public MZeroedObject
-{
- __inline ~PROFILEOPTIONS()
- {
- delete ps;
- mir_free(tszName);
- }
-
- wchar_t *tszName;
- TSettingsList* ps;
- BOOL showDialog;
- BOOL createTtb;
- BOOL createMmi;
- BOOL inSubMenu;
- BOOL regHotkey;
- WORD hotKey;
-};
-
-typedef struct {
- ATOM id;
- int profile;
-} HKINFO;
-
-#define UM_REINITPROFILES WM_USER + 1
-#define UM_SETPROFILE WM_USER + 2
-#define UM_SETPROTOCOL WM_USER + 3
-#define UM_SETSTATUSMSG WM_USER + 4
-#define UM_ADDPROFILE WM_USER + 5
-#define UM_DELPROFILE WM_USER + 6
-#define UM_REINITDOCKED WM_USER + 7
-#define UM_REINITWINSTATE WM_USER + 8
-#define UM_REINITWINSIZE WM_USER + 9
-
-#define CLUIINTM_REDRAW (WM_USER+100)
-
-#define MODULE_CLIST "CList"
-#define MODULE_CLUI "CLUI"
-#define SETTING_STATUS "Status"
-
-#define SETTING_SETWINSTATE "SetState"
-#define SETTING_WINSTATE "State"
-
-#define SETTING_SETDOCKED "SetDocked"
-#define SETTING_DOCKED "Docked"
-
-#define SETTING_SHOWDIALOG "ShowDialog"
-#define SETTING_OFFLINECLOSE "OfflineOnClose"
-#define SETTING_SETPROFILE "SetStatusOnStartup"
-#define SETTING_AUTODIAL "AutoDial"
-#define SETTING_AUTOHANGUP "AutoHangup"
-
-#define SETTING_TOOLWINDOW "ToolWindow"
-
-#define SETTING_OVERRIDE "AllowOverride"
-
-#define SETTING_SETWINLOCATION "SetWinLoc"
-#define SETTING_XPOS "x"
-#define SETTING_YPOS "y"
-
-#define SETTING_SETWINSIZE "SetWinSize"
-#define SETTING_WIDTH "Width"
-#define SETTING_HEIGHT "Height"
-#define SETTING_AUTOSIZE "AutoSize"
-
-#define SETTING_PROFILECOUNT "ProfileCount"
-#define SETTING_DEFAULTPROFILE "DefaultProfile"
-#define SETTING_PROFILENAME "ProfileName"
-#define SETTING_CREATETTBBUTTON "CreateTTBButton"
-#define SETTING_PROFILE_STSMSG "StatusMsg"
-#define SETTING_SHOWCONFIRMDIALOG "profile_ShowDialog"
-#define SETTING_CREATEMMITEM "CreateMMItem"
-#define SETTING_INSUBMENU "InSubMenu"
-#define SETTING_REGHOTKEY "RegHotKey"
-#define SETTING_HOTKEY "HotKey"
-#define SETTING_PROFILENO "ProfileNo"
-
-#define SETTING_SETPROFILEDELAY "SetStatusDelay"
-#define SETTING_DLGTIMEOUT "DialogTimeout"
-
-#define SHORTCUT_DESC L"Miranda NG"
-#define SHORTCUT_FILENAME L"\\Miranda NG.lnk"
-
-#define DOCKED_NONE 0
-#define DOCKED_LEFT 1
-#define DOCKED_RIGHT 2
-
-#define MS_SS_MENUSETPROFILEPREFIX "StartupStatus/SetProfile_"
-
-// options
-int OptionsInit(WPARAM wparam,LPARAM lparam);
-char* OptName(int i, const char* setting);
-
-// startupstatus
-int LoadMainOptions();
-
-int CompareSettings( const TSSSetting* p1, const TSSSetting* p2 );
-
-TSettingsList* GetCurrentProtoSettings();
-
-// profile
-int GetProfile(int profileID, TSettingsList& arSettings );
-wchar_t *GetStatusMessage(int profile, char *szProto);
-
-INT_PTR LoadAndSetProfile(WPARAM wParam, LPARAM lParam);
-INT_PTR GetProfileCount(WPARAM wParam, LPARAM lParam);
-INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam);
-
-extern HANDLE hTTBModuleLoadedHook;
-void RemoveTopToolbarButtons();
-int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam);
-
-int LoadProfileModule();
-int InitProfileModule();
-int DeinitProfilesModule();
-
-#endif //__STARTUPSTATUSHEADER
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/toolbars.cpp b/tools/_deprecated/StatusPlugins/StartupStatus/toolbars.cpp deleted file mode 100644 index acb76f5c28..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/toolbars.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/*
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "../commonstatus.h"
-#include "startupstatus.h"
-#include "../resource.h"
-#include <commctrl.h>
-
-#include <m_icolib.h>
-
-#define MAX_MMITEMS 6
-
-static LIST<void> ttbButtons(1);
-
-static IconItem iconList[] =
-{
- { LPGEN("Pressed toolbar icon"), "StartupStatus/TtbDown", IDI_TTBDOWN },
- { LPGEN("Released toolbar icon"), "StartupStatus/TtbUp", IDI_TTBUP },
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-void RemoveTopToolbarButtons()
-{
- for (int i=ttbButtons.getCount()-1; i >= 0; i--)
- CallService(MS_TTB_REMOVEBUTTON, (WPARAM)ttbButtons[i], 0);
- ttbButtons.destroy();
-}
-
-int CreateTopToolbarButtons(WPARAM, LPARAM)
-{
- if (iconList[0].hIcolib == NULL)
- Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList));
-
- int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0);
-
- TTBButton ttb = { 0 };
- ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
- ttb.pszService = MS_SS_LOADANDSETPROFILE;
- for (int i=0; i < profileCount; i++) {
- char setting[80];
- mir_snprintf(setting, "%d_%s", i, SETTING_CREATETTBBUTTON);
- if (!db_get_b(NULL, MODULENAME, setting, FALSE))
- continue;
-
- DBVARIANT dbv;
- mir_snprintf(setting, "%d_%s", i, SETTING_PROFILENAME);
- if (db_get(NULL, MODULENAME, setting, &dbv))
- continue;
-
- ttb.hIconHandleDn = iconList[0].hIcolib;
- ttb.hIconHandleUp = iconList[1].hIcolib;
- ttb.wParamDown = ttb.wParamUp = i;
- ttb.name = ttb.pszTooltipUp = dbv.pszVal;
- HANDLE ttbAddResult = TopToolbar_AddButton(&ttb);
- if (ttbAddResult)
- ttbButtons.insert(ttbAddResult);
- db_free(&dbv);
- }
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/StartupStatus/version.h b/tools/_deprecated/StatusPlugins/StartupStatus/version.h deleted file mode 100644 index 1760bbdcfb..0000000000 --- a/tools/_deprecated/StatusPlugins/StartupStatus/version.h +++ /dev/null @@ -1,23 +0,0 @@ -// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
-// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not
-// take effect within the version resource)
-// Do not forget to define symbol "_DEBUG" for resource compiler if you use debug configuration (in VisualStudio you can
-// find it under Project properties - Configuration properties - Resource - General - Preprocessor definitions)
-
-// plugin version part
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 8
-#define __RELEASE_NUM 0
-#define __BUILD_NUM 48
-
-// other stuff for Version resource
-#include <stdver.h>
-
-// stuff that will be used in PluginInfo section and in Version resource
-#define __PLUGIN_NAME "StartupStatus"
-#define __FILENAME "StartupStatus.dll"
-#define __DESC "StartupStatus, allows you to define the status Miranda should set on startup, configurable per protocol."
-#define __AUTHOR "P Boon"
-#define __AUTHOREMAIL "unregistered@users.sourceforge.net"
-#define __AUTHORWEB "http://miranda-ng.org/p/StartupStatus/"
-#define __COPYRIGHT "© 2003-08 P. Boon, 2008-16 George Hazan"
diff --git a/tools/_deprecated/StatusPlugins/commonstatus.cpp b/tools/_deprecated/StatusPlugins/commonstatus.cpp deleted file mode 100644 index 621f5f372c..0000000000 --- a/tools/_deprecated/StatusPlugins/commonstatus.cpp +++ /dev/null @@ -1,328 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "commonstatus.h"
-
-// handles for hooks and other Miranda thingies
-static HANDLE hCSStatusChangedExEvent;
-
-OBJLIST<PROTOCOLSETTINGEX> *protoList;
-
-// prototypes
-char* StatusModeToDbSetting(int status, const char *suffix);
-DWORD StatusModeToProtoFlag(int status);
-INT_PTR SetStatusEx(WPARAM wParam, LPARAM lParam);
-int InitCommonStatus();
-int GetProtoCount();
-
-// extern
-extern INT_PTR ShowConfirmDialogEx(WPARAM wParam, LPARAM lParam);
-
-// some helpers from awaymsg.c ================================================================
-char *StatusModeToDbSetting(int status, const char *suffix)
-{
- char *prefix;
- static char str[64];
-
- switch (status) {
- case ID_STATUS_AWAY: prefix = "Away"; break;
- case ID_STATUS_NA: prefix = "Na"; break;
- case ID_STATUS_DND: prefix = "Dnd"; break;
- case ID_STATUS_OCCUPIED: prefix = "Occupied"; break;
- case ID_STATUS_FREECHAT: prefix = "FreeChat"; break;
- case ID_STATUS_ONLINE: prefix = "On"; break;
- case ID_STATUS_OFFLINE: prefix = "Off"; break;
- case ID_STATUS_INVISIBLE: prefix = "Inv"; break;
- case ID_STATUS_ONTHEPHONE: prefix = "Otp"; break;
- case ID_STATUS_OUTTOLUNCH: prefix = "Otl"; break;
- default: return NULL;
- }
- mir_strcpy(str, prefix); mir_strcat(str, suffix);
- return str;
-}
-
-DWORD StatusModeToProtoFlag(int status)
-{
- // *not* the same as in core, <offline>
- switch (status) {
- case ID_STATUS_ONLINE: return PF2_ONLINE;
- case ID_STATUS_OFFLINE: return PF2_OFFLINE;
- case ID_STATUS_INVISIBLE: return PF2_INVISIBLE;
- case ID_STATUS_OUTTOLUNCH: return PF2_OUTTOLUNCH;
- case ID_STATUS_ONTHEPHONE: return PF2_ONTHEPHONE;
- case ID_STATUS_AWAY: return PF2_SHORTAWAY;
- case ID_STATUS_NA: return PF2_LONGAWAY;
- case ID_STATUS_OCCUPIED: return PF2_LIGHTDND;
- case ID_STATUS_DND: return PF2_HEAVYDND;
- case ID_STATUS_FREECHAT: return PF2_FREECHAT;
- }
- return 0;
-}
-
-int GetActualStatus(PROTOCOLSETTINGEX *protoSetting)
-{
- if (protoSetting->status == ID_STATUS_LAST) {
- if ((protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS))
- return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
- return protoSetting->lastStatus;
- }
- if (protoSetting->status == ID_STATUS_CURRENT)
- return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
-
- if ((protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH)) {
- log_debugA("invalid status detected: %d", protoSetting->status);
- return 0;
- }
- return protoSetting->status;
-}
-
-// helper, from core
-static wchar_t* GetDefaultMessage(int status)
-{
- switch (status) {
- case ID_STATUS_AWAY: return TranslateT("I've been away since %time%.");
- case ID_STATUS_NA: return TranslateT("Give it up, I'm not in!");
- case ID_STATUS_OCCUPIED: return TranslateT("Not right now.");
- case ID_STATUS_DND: return TranslateT("Give a guy some peace, would ya?");
- case ID_STATUS_FREECHAT: return TranslateT("I'm a chatbot!");
- case ID_STATUS_ONLINE: return TranslateT("Yep, I'm here.");
- case ID_STATUS_OFFLINE: return TranslateT("Nope, not here.");
- case ID_STATUS_INVISIBLE: return TranslateT("I'm hiding from the mafia.");
- case ID_STATUS_ONTHEPHONE: return TranslateT("That'll be the phone.");
- case ID_STATUS_OUTTOLUNCH: return TranslateT("Mmm... food.");
- case ID_STATUS_IDLE: return TranslateT("idleeeeeeee");
- }
- return NULL;
-}
-
-wchar_t* GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int newstatus)
-{
- if (ps->szMsg != NULL) {// custom message set
- log_infoA("CommonStatus: Status message set by calling plugin");
- return mir_wstrdup(ps->szMsg);
- }
-
- wchar_t *tMsg = (wchar_t*)CallService(MS_AWAYMSG_GETSTATUSMSGW, newstatus, (LPARAM)ps->szName);
- log_debugA("CommonStatus: Status message retrieved from general awaysys: %S", tMsg);
- return tMsg;
-}
-
-static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps)
-{
-
- int i, j, pstatus = 0, gstatus = 0;
-
- for (i = 0; i < protoList->getCount(); i++)
- if (ps[i]->szMsg != NULL && GetActualStatus(ps[i]) != ID_STATUS_OFFLINE)
- return 0;
-
- int count;
- PROTOACCOUNT **protos;
- Proto_EnumAccounts(&count, &protos);
-
- for (i = 0; i < count; i++) {
- if (!IsSuitableProto(protos[i]))
- continue;
-
- pstatus = 0;
- for (j = 0; j < protoList->getCount(); j++)
- if (!mir_strcmp(protos[i]->szModuleName, ps[j]->szName))
- pstatus = GetActualStatus(ps[j]);
-
- if (pstatus == 0)
- pstatus = CallProtoService(protos[i]->szModuleName, PS_GETSTATUS, 0, 0);
-
- if (db_get_b(NULL, protos[i]->szModuleName, "LockMainStatus", 0)) {
- // if proto is locked, pstatus must be the current status
- if (pstatus != CallProtoService(protos[i]->szModuleName, PS_GETSTATUS, 0, 0))
- return 0;
- }
- else {
- if (gstatus == 0)
- gstatus = pstatus;
-
- if (pstatus != gstatus)
- return 0;
- }
- }
-
- return gstatus;
-}
-
-static void SetStatusMsg(PROTOCOLSETTINGEX *ps, int newstatus)
-{
- wchar_t* tszMsg = GetDefaultStatusMessage(ps, newstatus);
- if (tszMsg) {
- /* replace the default vars in msg (I believe this is from core) */
- for (int j = 0; tszMsg[j]; j++) {
- if (tszMsg[j] != '%')
- continue;
-
- wchar_t substituteStr[128];
- if (!wcsnicmp(tszMsg + j, L"%time%", 6))
- GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOSECONDS, 0, 0, substituteStr, _countof(substituteStr));
- else if (!wcsnicmp(tszMsg + j, L"%date%", 6))
- GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, 0, 0, substituteStr, _countof(substituteStr));
- else
- continue;
-
- if (mir_wstrlen(substituteStr) > 6)
- tszMsg = (wchar_t*)mir_realloc(tszMsg, sizeof(wchar_t)*(mir_wstrlen(tszMsg) + 1 + mir_wstrlen(substituteStr) - 6));
- memmove(tszMsg + j + mir_wstrlen(substituteStr), tszMsg + j + 6, sizeof(wchar_t)*(mir_wstrlen(tszMsg) - j - 5));
- memcpy(tszMsg + j, substituteStr, sizeof(wchar_t)*mir_wstrlen(substituteStr));
- }
-
- wchar_t *szFormattedMsg = variables_parsedup(tszMsg, ps->tszAccName, NULL);
- if (szFormattedMsg != NULL) {
- mir_free(tszMsg);
- tszMsg = szFormattedMsg;
- }
- }
- log_debugA("CommonStatus sets status message for %s directly", ps->szName);
- CallProtoService(ps->szName, PS_SETAWAYMSG, newstatus, (LPARAM)tszMsg);
- mir_free(tszMsg);
-}
-
-INT_PTR SetStatusEx(WPARAM wParam, LPARAM)
-{
- PROTOCOLSETTINGEX** protoSettings = *(PROTOCOLSETTINGEX***)wParam;
- if (protoSettings == NULL)
- return -1;
-
- int globStatus = equalsGlobalStatus(protoSettings);
-
- // issue with setting global status;
- // things get messy because SRAway hooks ME_CLIST_STATUSMODECHANGE, so the status messages of SRAway and
- // commonstatus will clash
- NotifyEventHooks(hCSStatusChangedExEvent, (WPARAM)&protoSettings, protoList->getCount());
-
- // set all status messages first
- for (int i = 0; i < protoList->getCount(); i++) {
- char *szProto = protoSettings[i]->szName;
- if (!Proto_GetAccount(szProto)) {
- log_debugA("CommonStatus: %s is not loaded", szProto);
- continue;
- }
- // some checks
- int newstatus = GetActualStatus(protoSettings[i]);
- if (newstatus == 0) {
- log_debugA("CommonStatus: incorrect status for %s (%d)", szProto, protoSettings[i]->status);
- continue;
- }
- int oldstatus = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- // set last status
- protoSettings[i]->lastStatus = oldstatus;
- if (IsStatusConnecting(oldstatus)) {
- // ignore if connecting, but it didn't came this far if it did
- log_debugA("CommonStatus: %s is already connecting", szProto);
- continue;
- }
-
- // status checks
- long protoFlag = Proto_Status2Flag(newstatus);
- int b_Caps2 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0) & protoFlag;
- int b_Caps5 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_5, 0) & protoFlag;
- if (newstatus != ID_STATUS_OFFLINE && (!b_Caps2 || b_Caps5)) {
- // status and status message for this status not supported
- //log_debug("CommonStatus: status not supported %s", szProto);
- continue;
- }
-
- int b_Caps1 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG;
- int b_Caps3 = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0) & protoFlag;
- if (newstatus == oldstatus && (!b_Caps1 || !b_Caps3)) {
- // no status change and status messages are not supported
- //log_debug("CommonStatus: no change, %s (%d %d)", szProto, oldstatus, newstatus);
- continue;
- }
-
- // set status message first
- if (b_Caps1 && b_Caps3)
- SetStatusMsg(protoSettings[i], newstatus);
-
- // set the status
- if (newstatus != oldstatus /*&& !(b_Caps1 && b_Caps3 && ServiceExists(MS_NAS_SETSTATE))*/) {
- log_debugA("CommonStatus sets status for %s to %d", szProto, newstatus);
- CallProtoService(szProto, PS_SETSTATUS, newstatus, 0);
- }
- }
-
- if (globStatus != 0) {
- if (!ServiceExists(MS_CLIST_SETSTATUSMODE)) {
- log_debugA("CommonStatus: MS_CLIST_SETSTATUSMODE not available!");
- return -1;
- }
- log_debugA("CommonStatus: setting global status %u", globStatus);
- CallService(MS_CLIST_SETSTATUSMODE, globStatus, 0);
- }
-
- return 0;
-}
-
-static INT_PTR GetProtocolCountService(WPARAM, LPARAM)
-{
- return GetProtoCount();
-}
-
-bool IsSuitableProto(PROTOACCOUNT *pa)
-{
- return (pa == NULL) ? false : (pcli->pfnGetProtocolVisibility(pa->szModuleName) != 0);
-}
-
-int GetProtoCount()
-{
- int pCount = 0, count;
- PROTOACCOUNT **accs;
- Proto_EnumAccounts(&count, &accs);
-
- for (int i = 0; i < count; i++)
- if (IsSuitableProto(accs[i]))
- pCount++;
-
- return pCount;
-}
-
-static int CreateServices()
-{
- if (ServiceExists(MS_CS_SETSTATUSEX))
- return -1;
-
- hCSStatusChangedExEvent = CreateHookableEvent(ME_CS_STATUSCHANGEEX);
-
- CreateServiceFunction(MS_CS_SETSTATUSEX, SetStatusEx);
- CreateServiceFunction(MS_CS_SHOWCONFIRMDLGEX, ShowConfirmDialogEx);
- CreateServiceFunction(MS_CS_GETPROTOCOUNT, GetProtocolCountService);
- return 0;
-}
-
-static int onShutdown(WPARAM, LPARAM)
-{
- DestroyHookableEvent(hCSStatusChangedExEvent);
- return 0;
-}
-
-int InitCommonStatus()
-{
- if (!CreateServices())
- HookEvent(ME_SYSTEM_PRESHUTDOWN, onShutdown);
-
- return 0;
-}
diff --git a/tools/_deprecated/StatusPlugins/commonstatus.h b/tools/_deprecated/StatusPlugins/commonstatus.h deleted file mode 100644 index 2288cc0e34..0000000000 --- a/tools/_deprecated/StatusPlugins/commonstatus.h +++ /dev/null @@ -1,88 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef COMMONSTATUSHEADER
-#define COMMONSTATUSHEADER
-
-#define _CRT_SECURE_NO_WARNINGS
-
-#include <windows.h>
-#include <shlobj.h>
-#include <uxtheme.h>
-#include <stdio.h>
-
-#include <newpluginapi.h>
-#include <m_system.h>
-#include <m_system_cpp.h>
-#include <m_awaymsg.h>
-#include <m_database.h>
-#include <m_protosvc.h>
-#include <m_clist.h>
-#include <m_string.h>
-#include <m_langpack.h>
-#include <m_popup.h>
-#include <m_variables.h>
-#include <m_netlib.h>
-#include "m_statusplugins.h"
-#include <m_utils.h>
-#include <m_NewAwaySys.h>
-#include <win2k.h>
-
-#if defined( _WIN64 )
-#define __PLATFORM_NAME "64"
-#else
-#define __PLATFORM_NAME ""
-#endif
-
-#include "../helpers/gen_helpers.h"
-
-#define UM_STSMSGDLGCLOSED WM_APP+1
-#define UM_CLOSECONFIRMDLG WM_APP+2
-
-#define PREFIX_LAST "last_"
-#define PREFIX_LASTMSG "lastmsg_"
-#define DEFAULT_STATUS ID_STATUS_LAST
-#define ID_STATUS_LAST 40081 // doesn't interfere with ID_STATUS_IDLE, since we don't use it. However this *is* a good lesson not to do this again.
-#define ID_STATUS_CURRENT 40082
-#define ID_STATUS_DISABLED 41083 // this should not be send to setstatus(ex)
-#define MAX_STATUS ID_STATUS_CURRENT
-#define MIN_STATUS ID_STATUS_OFFLINE
-#define DEF_CLOSE_TIME 5 //secs
-#define PF2_OFFLINE 0x00000200
-static int statusModeList[] = { ID_STATUS_OFFLINE, ID_STATUS_ONLINE, ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND, ID_STATUS_FREECHAT, ID_STATUS_INVISIBLE, ID_STATUS_ONTHEPHONE, ID_STATUS_OUTTOLUNCH };
-static int statusModePf2List[] = { PF2_OFFLINE, PF2_ONLINE, PF2_SHORTAWAY, PF2_LONGAWAY, PF2_LIGHTDND, PF2_HEAVYDND, PF2_FREECHAT, PF2_INVISIBLE, PF2_ONTHEPHONE, PF2_OUTTOLUNCH };
-
-wchar_t *GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int status);
-int GetActualStatus(PROTOCOLSETTINGEX *protoSetting);
-int InitCommonStatus();
-bool IsSuitableProto(PROTOACCOUNT *pa);
-
-/* SimpleAway */
-
-// wParam = 0
-// lParam = 0
-// allways returns 1
-#define MS_SA_ISSARUNNING "SimpleAway/IsSARunning"
-
-extern HINSTANCE hInst;
-extern OBJLIST<PROTOCOLSETTINGEX>* protoList;
-
-#endif //COMMONSTATUSHEADER
diff --git a/tools/_deprecated/StatusPlugins/confirmdialog.cpp b/tools/_deprecated/StatusPlugins/confirmdialog.cpp deleted file mode 100644 index e19b1d0a55..0000000000 --- a/tools/_deprecated/StatusPlugins/confirmdialog.cpp +++ /dev/null @@ -1,426 +0,0 @@ -/*
- AdvancedAutoAway Plugin for Miranda-IM (www.miranda-im.org)
- KeepStatus Plugin for Miranda-IM (www.miranda-im.org)
- StartupStatus Plugin for Miranda-IM (www.miranda-im.org)
- Copyright 2003-2006 P. Boon
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include "commonstatus.h"
-#include "resource.h"
-
-#define TIMER_ID 1
-
-// variables
-static HWND win;
-static int timeOut;
-
-struct TConfirmSetting : public PROTOCOLSETTINGEX
-{
- TConfirmSetting(const PROTOCOLSETTINGEX& x)
- {
- memcpy(this, &x, sizeof(PROTOCOLSETTINGEX));
- if (szMsg)
- szMsg = wcsdup(szMsg);
- }
-
- ~TConfirmSetting()
- {
- free(szMsg);
- }
-};
-
-static int CompareSettings(const TConfirmSetting* p1, const TConfirmSetting* p2)
-{
- return mir_strcmp(p1->szName, p2->szName);
-}
-
-static OBJLIST<TConfirmSetting> *confirmSettings;
-
-static INT_PTR CALLBACK StatusMessageDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- static PROTOCOLSETTINGEX* protoSetting = NULL;
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- protoSetting = (PROTOCOLSETTINGEX *)lParam;
- if (protoSetting->szMsg == NULL) {
- wchar_t* smsg = GetDefaultStatusMessage(protoSetting, GetActualStatus(protoSetting));
- if (smsg != NULL) {
- SetDlgItemText(hwndDlg, IDC_STSMSG, smsg);
- mir_free(smsg);
- }
- }
- else SetDlgItemText(hwndDlg, IDC_STSMSG, protoSetting->szMsg);
-
- {
- wchar_t desc[512];
- mir_snwprintf(desc, TranslateT("Set %s message for %s."),
- pcli->pfnGetStatusModeDescription(GetActualStatus(protoSetting), 0), protoSetting->tszAccName);
- SetDlgItemText(hwndDlg, IDC_DESCRIPTION, desc);
- }
- break;
-
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_OK:
- {
- int len = SendDlgItemMessage(hwndDlg, IDC_STSMSG, WM_GETTEXTLENGTH, 0, 0);
- if (len > 0) {
- protoSetting->szMsg = (wchar_t*)realloc(protoSetting->szMsg, sizeof(wchar_t)*(len + 1));
- if (protoSetting->szMsg != NULL)
- GetDlgItemText(hwndDlg, IDC_STSMSG, protoSetting->szMsg, len + 1);
- }
- SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, TRUE, 0);
- EndDialog(hwndDlg, IDC_OK);
- }
- break;
-
- case IDC_CANCEL:
- SendMessage(GetParent(hwndDlg), UM_STSMSGDLGCLOSED, 0, 0);
- EndDialog(hwndDlg, IDC_CANCEL);
- break;
- }
- break;
- }
-
- return FALSE;
-}
-
-static int SetStatusList(HWND hwndDlg)
-{
- if (confirmSettings->getCount() == 0)
- return -1;
-
- HWND hList = GetDlgItem(hwndDlg, IDC_STARTUPLIST);
- wchar_t buf[100];
-
- // create items
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
-
- for (int i = 0; i < confirmSettings->getCount(); i++) {
- lvItem.pszText = (*confirmSettings)[i].tszAccName;
- if (ListView_GetItemCount(hList) < confirmSettings->getCount())
- ListView_InsertItem(hList, &lvItem);
-
- int actualStatus;
- switch ((*confirmSettings)[i].status) {
- case ID_STATUS_LAST: actualStatus = (*confirmSettings)[i].lastStatus; break;
- case ID_STATUS_CURRENT: actualStatus = CallProtoService((*confirmSettings)[i].szName, PS_GETSTATUS, 0, 0); break;
- default: actualStatus = (*confirmSettings)[i].status;
- }
- wchar_t* status = pcli->pfnGetStatusModeDescription(actualStatus, 0);
- switch ((*confirmSettings)[i].status) {
- case ID_STATUS_LAST:
- mir_snwprintf(buf, L"%s (%s)", TranslateT("<last>"), status);
- ListView_SetItemText(hList, lvItem.iItem, 1, buf);
- break;
- case ID_STATUS_CURRENT:
- mir_snwprintf(buf, L"%s (%s)", TranslateT("<current>"), status);
- ListView_SetItemText(hList, lvItem.iItem, 1, buf);
- break;
- default:
- ListView_SetItemText(hList, lvItem.iItem, 1, status);
- }
-
- // status message
- if (!((!((CallProtoService((*confirmSettings)[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService((*confirmSettings)[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))) {
- wchar_t *msg = GetDefaultStatusMessage(&(*confirmSettings)[i], actualStatus);
- if (msg != NULL) {
- wchar_t* fMsg = variables_parsedup(msg, (*confirmSettings)[i].tszAccName, NULL);
- ListView_SetItemText(hList, lvItem.iItem, 2, fMsg);
- mir_free(fMsg);
- mir_free(msg);
- }
- else ListView_SetItemText(hList, lvItem.iItem, 2, TranslateT("<n/a>"));
- }
- else ListView_SetItemText(hList, lvItem.iItem, 2, TranslateT("<n/a>"));
-
- ListView_SetColumnWidth(hList, 0, LVSCW_AUTOSIZE);
- ListView_SetColumnWidth(hList, 2, LVSCW_AUTOSIZE);
- lvItem.lParam = (LPARAM)&(*confirmSettings)[i];
- ListView_SetItem(hList, &lvItem);
- lvItem.iItem++;
- }
-
- // grey out status box
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUS), (ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), -1, LVNI_SELECTED) >= 0));
- return 0;
-}
-
-static INT_PTR CALLBACK ConfirmDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- HWND hList = GetDlgItem(hwndDlg, IDC_STARTUPLIST);
- SendMessage(hList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
-
- // create columns
- LVCOLUMN lvCol = { 0 };
- lvCol.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
- lvCol.pszText = TranslateT("Protocol");
- ListView_InsertColumn(hList, 0, &lvCol);
-
- lvCol.cx = 100;
- lvCol.pszText = TranslateT("Status");
- ListView_InsertColumn(hList, 1, &lvCol);
-
- lvCol.pszText = TranslateT("Message");
- ListView_InsertColumn(hList, 2, &lvCol);
- }
-
- // create items
- SetStatusList(hwndDlg);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- // fill profile combo box
- if (!ServiceExists(MS_SS_GETPROFILE))
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILE), FALSE);
- else {
- int defaultProfile;
- int profileCount = (int)CallService(MS_SS_GETPROFILECOUNT, (WPARAM)&defaultProfile, 0);
- for (int i = 0; i < profileCount; i++) {
- wchar_t profileName[128];
- CallService(MS_SS_GETPROFILENAME, i, (LPARAM)profileName);
- int item = SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_ADDSTRING, 0, (LPARAM)profileName);
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETITEMDATA, item, i);
- }
- if (profileCount == 0)
- EnableWindow(GetDlgItem(hwndDlg, IDC_PROFILE), FALSE);
- else
- SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_SETCURSEL, defaultProfile, 0);
- }
- // start timer
- if (timeOut > 0) {
- wchar_t text[32];
- mir_snwprintf(text, TranslateT("Closing in %d"), timeOut);
- SetDlgItemText(hwndDlg, IDC_CLOSE, text);
- SetTimer(hwndDlg, TIMER_ID, 1000, NULL);
- }
- return TRUE;
-
- case WM_TIMER:
- {
- wchar_t text[32];
- mir_snwprintf(text, TranslateT("Closing in %d"), timeOut - 1);
- SetDlgItemText(hwndDlg, IDC_CLOSE, text);
- if (timeOut <= 0) {
- KillTimer(hwndDlg, TIMER_ID);
- SendMessage(hwndDlg, UM_CLOSECONFIRMDLG, 0, 0);
- }
- else timeOut--;
- }
- break;
-
- case WM_COMMAND:
- // stop timer
- KillTimer(hwndDlg, TIMER_ID);
- SetDlgItemText(hwndDlg, IDC_CLOSE, TranslateT("Close"));
- if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK)) { // something clicked
- switch (LOWORD(wParam)) {
- case IDC_PROFILE:
- {
- int profile = (int)SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_PROFILE, CB_GETCURSEL, 0, 0), 0);
- for (int i = 0; i < confirmSettings->getCount(); i++)
- if ((*confirmSettings)[i].szMsg != NULL) {
- free((*confirmSettings)[i].szMsg);
- (*confirmSettings)[i].szMsg = NULL;
- }
-
- CallService(MS_SS_GETPROFILE, (WPARAM)profile, (LPARAM)confirmSettings);
- for (int i = 0; i < confirmSettings->getCount(); i++)
- if ((*confirmSettings)[i].szMsg != NULL) // we free this later, copy to our memory space
- (*confirmSettings)[i].szMsg = wcsdup((*confirmSettings)[i].szMsg);
-
- SetStatusList(hwndDlg);
- }
- break;
-
- case IDC_STATUS:
- {
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
- lvItem.iSubItem = 0;
- lvItem.iItem = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), -1, LVNI_SELECTED);
- if (lvItem.iItem == -1)
- break;
-
- ListView_GetItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), &lvItem);
- PROTOCOLSETTINGEX* proto = (PROTOCOLSETTINGEX*)lvItem.lParam;
- int actualStatus = proto->status = (int)SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_GETCURSEL, 0, 0), 0);
-
- // LAST STATUS
- if (proto->status == ID_STATUS_LAST) {
- wchar_t last[80];
- mir_snwprintf(last, L"%s (%s)", TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
- ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, last);
- actualStatus = proto->lastStatus;
- }
-
- // CURRENT STATUS
- else if (proto->status == ID_STATUS_CURRENT) {
- int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0);
- wchar_t current[80];
- mir_snwprintf(current, L"%s (%s)", TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
- ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, current);
- actualStatus = currentStatus;
- }
- else ListView_SetItemText(GetDlgItem(hwndDlg, IDC_STARTUPLIST), lvItem.iItem, 1, pcli->pfnGetStatusModeDescription(proto->status, 0));
-
- if ((!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- else if ((proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT))
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
- else
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), (CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus)) ? TRUE : FALSE);
- SetStatusList(hwndDlg);
- }
- break;
-
- case IDC_SETSTSMSG:
- {
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
- lvItem.iSubItem = 0;
- lvItem.iItem = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), -1, LVNI_SELECTED);
- if (lvItem.iItem == -1)
- break;
-
- ListView_GetItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), &lvItem);
- DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_SETSTSMSGDIALOG), hwndDlg, StatusMessageDlgProc, lvItem.lParam);
- }
- break;
-
- case IDC_CLOSE:
- SendMessage(hwndDlg, UM_CLOSECONFIRMDLG, 0, 0);
- break;
-
- case IDC_CANCEL:
- DestroyWindow(hwndDlg);
- break;
- }
- }
- break;
-
- case WM_NOTIFY:
- switch (((NMHDR*)lParam)->idFrom) {
- case IDC_STARTUPLIST:
- if (((NMHDR*)lParam)->code == NM_CLICK) {
- KillTimer(hwndDlg, TIMER_ID);
- SetDlgItemText(hwndDlg, IDC_CLOSE, TranslateT("Close"));
-
- LVITEM lvItem = { 0 };
- lvItem.mask = LVIF_TEXT | LVIF_PARAM;
- lvItem.iSubItem = 0;
- lvItem.iItem = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), -1, LVNI_SELECTED);
-
- if (ListView_GetItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), &lvItem) == FALSE) {
- SetStatusList(hwndDlg);
- break;
- }
-
- PROTOCOLSETTINGEX *proto = (PROTOCOLSETTINGEX*)lvItem.lParam;
- int flags = CallProtoService(proto->szName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0);
- // clear box and add new status, loop status and check if compatible with proto
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_RESETCONTENT, 0, 0);
- int actualStatus = proto->status;
-
- // last
- wchar_t buf[100];
- mir_snwprintf(buf, L"%s (%s)", TranslateT("<last>"), pcli->pfnGetStatusModeDescription(proto->lastStatus, 0));
- int item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)buf);
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, ID_STATUS_LAST);
- if (proto->status == ID_STATUS_LAST) {
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETCURSEL, item, 0);
- actualStatus = proto->lastStatus;
- }
-
- // current
- int currentStatus = CallProtoService(proto->szName, PS_GETSTATUS, 0, 0);
- mir_snwprintf(buf, L"%s (%s)", TranslateT("<current>"), pcli->pfnGetStatusModeDescription(currentStatus, 0));
- item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)buf);
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, ID_STATUS_CURRENT);
- if (proto->status == ID_STATUS_CURRENT) {
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETCURSEL, item, 0);
- actualStatus = currentStatus;
- }
-
- for (int i = 0; i < _countof(statusModeList); i++) {
- if (((flags & statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)& Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i]))))) {
- wchar_t *statusMode = pcli->pfnGetStatusModeDescription(statusModeList[i], 0);
- item = SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_ADDSTRING, 0, (LPARAM)statusMode);
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETITEMDATA, item, statusModeList[i]);
- if (statusModeList[i] == proto->status)
- SendDlgItemMessage(hwndDlg, IDC_STATUS, CB_SETCURSEL, item, 0);
- }
- }
-
- // enable status box
- EnableWindow(GetDlgItem(hwndDlg, IDC_STATUS), (ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_STARTUPLIST), -1, LVNI_SELECTED) >= 0));
- if ((!((CallProtoService(proto->szName, PS_GETCAPS, PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- else if (proto->status == ID_STATUS_LAST || proto->status == ID_STATUS_CURRENT)
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
- else
- EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), (CallProtoService(proto->szName, PS_GETCAPS, PFLAGNUM_3, 0) & Proto_Status2Flag(actualStatus)) ? TRUE : FALSE);
- }
- }
- break;
-
- case UM_STSMSGDLGCLOSED:
- SetStatusList(hwndDlg);
- break;
-
- case UM_CLOSECONFIRMDLG:
- CallService(MS_CS_SETSTATUSEX, (WPARAM)confirmSettings, 0);
- DestroyWindow(hwndDlg);
- break;
-
- case WM_DESTROY:
- delete confirmSettings; confirmSettings = 0;
- break;
- }
-
- return 0;
-}
-
-INT_PTR ShowConfirmDialogEx(WPARAM wParam, LPARAM lParam)
-{
- if (wParam == 0)
- return -1;
-
- delete confirmSettings;
- confirmSettings = new OBJLIST<TConfirmSetting>(10, CompareSettings);
-
- OBJLIST<PROTOCOLSETTINGEX>& param = *(OBJLIST<PROTOCOLSETTINGEX>*)wParam;
- for (int i = 0; i < param.getCount(); i++)
- confirmSettings->insert(new TConfirmSetting(param[i]));
-
- timeOut = lParam;
- if (timeOut < 0)
- timeOut = DEF_CLOSE_TIME;
-
- if (GetWindow(win, 0) == NULL) {
- win = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMDIALOG), NULL, ConfirmDlgProc, NULL);
- EnableWindow(win, TRUE);
- }
-
- return (INT_PTR)win;
-}
diff --git a/tools/_deprecated/StatusPlugins/copying.txt b/tools/_deprecated/StatusPlugins/copying.txt deleted file mode 100644 index cff645bda5..0000000000 --- a/tools/_deprecated/StatusPlugins/copying.txt +++ /dev/null @@ -1,346 +0,0 @@ - GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
diff --git a/tools/_deprecated/StatusPlugins/notick.ico b/tools/_deprecated/StatusPlugins/notick.ico Binary files differdeleted file mode 100644 index 7f93490642..0000000000 --- a/tools/_deprecated/StatusPlugins/notick.ico +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/notick1.ico b/tools/_deprecated/StatusPlugins/notick1.ico Binary files differdeleted file mode 100644 index 609504d614..0000000000 --- a/tools/_deprecated/StatusPlugins/notick1.ico +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/resource.h b/tools/_deprecated/StatusPlugins/resource.h deleted file mode 100644 index e64104da80..0000000000 --- a/tools/_deprecated/StatusPlugins/resource.h +++ /dev/null @@ -1,168 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by resource.rc
-//
-#define IDD_OPT_KEEPSTATUS 101
-#define IDD_OPT_KS_BASIC 101
-#define IDD_CONFIRMDIALOG 102
-#define IDD_OPT_AUTOAWAY 104
-#define IDD_CMDLOPTIONS 106
-#define IDD_ADDPROFILE 109
-#define IDD_OPT_STARTUPSTATUS 110
-#define IDD_PUOPT_KEEPSTATUS 113
-#define IDD_OPT_AUTOAWAYMSG 114
-#define IDI_TICK 117
-#define IDI_NOTICK 118
-#define IDD_OPT_GENAUTOAWAY 119
-#define IDD_OPT_KS_ACTION 120
-#define IDD_SETSTSMSGDIALOG 121
-#define IDD_OPT_STATUSPROFILES 123
-#define IDD_OPT_AAATABS 126
-#define IDD_OPT_TABS 126
-#define IDD_OPT_KS_ADV 127
-#define IDD_TRG_AAASTATECHANGE 128
-#define IDI_TTBDOWN 129
-#define IDI_TTBUP 130
-#define IDC_PROTOCOL 1000
-#define IDC_STATUS 1001
-#define IDC_PROFILE 1002
-#define IDC_STARTUPLIST 1008
-#define IDC_STATUSMSG 1008
-#define IDC_SETSTATUSONSTARTUP 1010
-#define IDC_SETPROFILE 1010
-#define IDC_SETWINDOW 1011
-#define IDC_SETWINSTATE 1011
-#define IDC_WINDOW 1012
-#define IDC_WINSTATE 1012
-#define IDC_CLOSE 1013
-#define IDC_SHOWDIALOG 1014
-#define IDC_OFFLINECLOSE 1016
-#define IDC_CONFIRM 1017
-#define IDC_SHOWCMDL 1018
-#define IDC_COPY 1019
-#define IDC_CMDL 1020
-#define IDC_OK 1021
-#define IDC_SHORTCUT 1022
-#define IDC_CHECKCONNECTION 1025
-#define IDC_MAXRETRIES 1026
-#define IDC_INITDELAY 1027
-#define IDC_SETSTATUSDELAY 1027
-#define IDC_SETPROFILEDELAY 1027
-#define IDC_DOCKED 1028
-#define IDC_SETDOCKED 1029
-#define IDC_MAXDELAY 1031
-#define IDC_INCREASEEXPONENTIAL 1032
-#define IDC_LNOTHING 1032
-#define IDC_LCLOSE 1033
-#define IDC_LV1STATUS 1035
-#define IDC_LV2STATUS 1036
-#define IDC_STATUSLIST 1037
-#define IDC_LV1AFTERSTR 1038
-#define IDC_SHOWCONNECTIONPOPUPS 1040
-#define IDC_ADDPROFILE 1041
-#define IDC_DELPROFILE 1042
-#define IDC_PROFILENAME 1043
-#define IDC_CANCEL 1044
-#define IDC_DEFAULTPROFILE 1045
-#define IDC_MONITORMIRANDA 1045
-#define IDC_WINCOLORS 1045
-#define IDC_CHKINET 1045
-#define IDC_IGNLOCK 1045
-#define IDC_CREATETTBBUTTONS 1046
-#define IDC_CREATETTB 1046
-#define IDC_PERPROTOCOLSETTINGS 1050
-#define IDC_SAMESETTINGS 1051
-#define IDC_RESETSTATUS 1052
-#define IDC_SETSTSMSG 1053
-#define IDC_DEFAULTCOLORS 1057
-#define IDC_ONLOCK 1057
-#define IDC_LOGINERR 1057
-#define IDC_LV2ONINACTIVE 1062
-#define IDC_CNCOTHERLOC 1062
-#define IDC_PUCONNLOST 1062
-#define IDC_DLGTIMEOUT 1063
-#define IDC_AWAYCHECKTIMEINSECS 1063
-#define IDC_STSMSG 1063
-#define IDC_PINGHOST 1063
-#define IDC_CONFIRMDELAY 1064
-#define IDC_PROTOCOLLIST 1066
-#define IDC_LCANCEL 1068
-#define IDC_RNOTHING 1069
-#define IDC_RCLOSE 1070
-#define IDC_RCANCEL 1071
-#define IDC_DELAY 1072
-#define IDC_BGCOLOR 1074
-#define IDC_TEXTCOLOR 1075
-#define IDC_PREV 1076
-#define IDC_LOGINERR_DELAY 1077
-#define IDC_PROTOLIST 1079
-#define IDC_ENABLECHECKING 1080
-#define IDC_DISABLECHECKING 1081
-#define IDC_IDLEWARNING 1084
-#define IDC_DESCRIPTION 1085
-#define IDC_CONTCHECK 1087
-#define IDC_BYPING 1088
-#define IDC_CHECKAPMRESUME 1089
-#define IDC_PUCONNRETRY 1090
-#define IDC_PURESULT 1091
-#define IDC_PUOTHER 1092
-#define IDC_DELAYFROMPU 1093
-#define IDC_DELAYCUSTOM 1094
-#define IDC_DELAYPERMANENT 1095
-#define IDC_LOGINERR_CANCEL 1096
-#define IDC_LOGINERR_SETDELAY 1097
-#define IDC_PUSHOWEXTRA 1098
-#define IDC_CREATEMMI 1100
-#define IDC_SETWINLOCATION 1104
-#define IDC_XPOS 1105
-#define IDC_YPOS 1106
-#define IDC_SETWINSIZE 1107
-#define IDC_WIDTH 1108
-#define IDC_HEIGHT 1109
-#define IDC_OVERRIDE 1111
-#define IDC_MIRANDAMSG 1112
-#define IDC_CUSTOMMSG 1113
-#define IDC_CURWINLOC 1114
-#define IDC_CURWINSIZE 1115
-#define IDC_HOTKEY 1116
-#define IDC_REGHOTKEY 1117
-#define IDC_VARIABLESHELP 1118
-#define IDC_AUTODIAL 1120
-#define IDC_AUTOHANGUP 1121
-#define IDC_MONITORKEYBOARD 1122
-#define IDC_MONITORMOUSE 1123
-#define IDC_IGNSYSKEYS 1124
-#define IDC_IGNALTCOMBO 1125
-#define IDC_FIRSTOFFLINE 1126
-#define IDC_INSUBMENU 1127
-#define IDC_MAXCONNECTINGTIME 1128
-#define IDC_TABS 1130
-#define IDC_NOLOCKED 1131
-#define IDC_PINGCOUNT 1132
-#define IDC_CNTDELAY 1133
-#define IDC_ENTERFIRST 1134
-#define IDC_ENTERSECOND 1135
-#define IDC_LEAVEFIRST 1136
-#define IDC_LEAVESECOND 1137
-#define IDC_BECOMEACTIVE 1138
-#define IDC_SCREENSAVE 1145
-#define IDC_TIMED 1146
-#define IDC_AWAYTIME 1147
-#define IDC_SETNA 1148
-#define IDC_NATIME 1149
-#define IDC_SCREENSAVE2 1150
-#define IDC_FULLSCREEN 1150
-#define IDC_RADUSEMIRANDA 1210
-#define IDC_RADUSECUSTOM 1212
-#define IDC_SETNASTR 1568
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 129
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1141
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/tools/_deprecated/StatusPlugins/resource.rc b/tools/_deprecated/StatusPlugins/resource.rc deleted file mode 100644 index 5553c4dbf6..0000000000 --- a/tools/_deprecated/StatusPlugins/resource.rc +++ /dev/null @@ -1,409 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// German (Germany) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
-LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
-#pragma code_page(1252)
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""winres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_OPT_KS_BASIC DIALOGEX 0, 0, 292, 224
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Check connection",IDC_CHECKCONNECTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,51,162,10
- EDITTEXT IDC_MAXRETRIES,21,70,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Maximum retries (0 - infinite)",IDC_STATIC,47,73,129,14
- GROUPBOX "Account connection",IDC_STATIC,3,32,286,116
- EDITTEXT IDC_INITDELAY,21,92,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Delay between retries (secs)",IDC_STATIC,47,95,130,17
- CONTROL "Show popups",IDC_SHOWCONNECTIONPOPUPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,12,269,10
- GROUPBOX "General",IDC_STATIC,3,0,286,30
- CONTROL "",IDC_PROTOCOLLIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,180,52,101,92
- CTEXT "Accounts to check",IDC_STATIC,180,41,96,8
- GROUPBOX "Dial-Up",IDC_STATIC,4,149,285,69
- CONTROL "Don't reconnect if no internet connection seems available",IDC_CHKINET,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,161,265,8
- CONTROL "Continuously check for internet connection",IDC_CONTCHECK,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,175,265,8
- CONTROL "Do so by pinging host",IDC_BYPING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,188,256,8
- EDITTEXT IDC_PINGHOST,36,198,237,14,ES_AUTOHSCROLL
-END
-
-IDD_CONFIRMDIALOG DIALOGEX 0, 0, 257, 121
-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-EXSTYLE WS_EX_CONTROLPARENT
-CAPTION "Confirm status"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "Close",IDC_CLOSE,7,100,59,14
- COMBOBOX IDC_STATUS,185,100,65,101,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "List1",IDC_STARTUPLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,23,243,74
- PUSHBUTTON "Cancel",IDC_CANCEL,69,100,59,14
- LTEXT "Profile",IDC_STATIC,7,9,116,8
- COMBOBOX IDC_PROFILE,185,7,65,89,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "Message",IDC_SETSTSMSG,131,100,50,14
-END
-
-IDD_OPT_AUTOAWAY DIALOGEX 0, 0, 284, 198
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- RTEXT "Account",IDC_STATIC,93,11,78,8
- COMBOBOX IDC_PROTOCOL,177,9,100,138,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- RTEXT "Set",IDC_STATIC,5,41,33,8
- COMBOBOX IDC_LV1STATUS,41,39,65,101,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "when full-screen mode is active",IDC_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,60,152,10
- CONTROL "when screen saver engages",IDC_SCREENSAVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,73,152,10
- CONTROL "when workstation is locked",IDC_ONLOCK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,86,153,10
- CONTROL "after",IDC_TIMED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,100,32,8
- EDITTEXT IDC_AWAYTIME,51,98,26,12,ES_AUTOHSCROLL
- LTEXT "minutes of inactivity",IDC_LV1AFTERSTR,82,100,87,8
- RTEXT "Set",IDC_STATIC,5,115,33,8
- COMBOBOX IDC_LV2STATUS,41,113,65,101,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "after",IDC_SETNA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,131,32,8
- EDITTEXT IDC_NATIME,51,129,26,12,ES_AUTOHSCROLL
- LTEXT "minutes of level 1 mode",IDC_SETNASTR,82,131,86,8
- CONTROL "only set when inactive",IDC_LV2ONINACTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,143,151,10
- CONTROL "Monitor Miranda's activity only",IDC_MONITORMIRANDA,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,155,168,12
- CONTROL "Reset status on return",IDC_RESETSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,168,168,11
- CONTROL "Confirm resetting status",IDC_CONFIRM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,181,168,10
- LTEXT "Only set if current status is",IDC_STATIC,180,42,95,8
- CONTROL "",IDC_STATUSLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,177,55,100,84
-END
-
-IDD_CMDLOPTIONS DIALOGEX 0, 0, 315, 82
-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-EXSTYLE WS_EX_CONTROLPARENT
-CAPTION "Command line"
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- DEFPUSHBUTTON "OK",IDC_OK,257,61,51,14
- PUSHBUTTON "Copy to clipboard",IDC_COPY,132,61,120,14
- EDITTEXT IDC_CMDL,7,19,301,35,ES_MULTILINE | ES_READONLY
- LTEXT "Command line:",IDC_STATIC,7,7,301,8
- PUSHBUTTON "Create shortcut",IDC_SHORTCUT,7,61,120,14
-END
-
-IDD_ADDPROFILE DIALOGEX 0, 0, 131, 60
-STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Add new profile"
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- DEFPUSHBUTTON "OK",IDC_OK,68,39,50,14
- PUSHBUTTON "Cancel",IDC_CANCEL,14,39,50,14
- EDITTEXT IDC_PROFILENAME,14,21,104,14,ES_AUTOHSCROLL
- LTEXT "Profile name",IDC_STATIC,11,11,55,8
-END
-
-IDD_OPT_STARTUPSTATUS DIALOGEX 0, 0, 305, 223
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_WINSTATE,209,34,80,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Set window state",IDC_SETWINSTATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,22,80,10
- CONTROL "Show dialog",IDC_SHOWDIALOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,71,127,10
- CONTROL "Set status to offline before exit",IDC_OFFLINECLOSE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,180,174,10
- PUSHBUTTON "Show CMDL",IDC_SHOWCMDL,14,194,53,14
- CONTROL "Activate status profile",IDC_SETPROFILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,20,89,10
- COMBOBOX IDC_DOCKED,209,64,80,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Set docked",IDC_SETDOCKED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,52,80,10
- GROUPBOX "Other",IDC_STATIC,7,166,182,50
- GROUPBOX "Status on startup",IDC_STATIC,7,7,182,102
- EDITTEXT IDC_SETPROFILEDELAY,57,35,28,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "ms",IDC_STATIC,88,37,13,8
- LTEXT "Set after",IDC_STATIC,26,37,28,8
- EDITTEXT IDC_DLGTIMEOUT,57,86,28,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Timeout",IDC_STATIC,26,89,30,8
- LTEXT "s",IDC_STATIC,88,89,12,8
- CONTROL "Set window location",IDC_SETWINLOCATION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,82,80,10
- LTEXT "Left",IDC_STATIC,214,97,35,8
- EDITTEXT IDC_XPOS,259,94,30,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Top",IDC_STATIC,214,113,35,8
- EDITTEXT IDC_YPOS,259,110,30,14,ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Set window size",IDC_SETWINSIZE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,209,140,80,10
- LTEXT "Width",IDC_STATIC,214,155,35,8
- EDITTEXT IDC_WIDTH,259,152,30,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Height",IDC_STATIC,214,171,35,8
- EDITTEXT IDC_HEIGHT,259,168,30,14,ES_AUTOHSCROLL | ES_NUMBER
- COMBOBOX IDC_PROFILE,105,19,78,92,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Allow override",IDC_OVERRIDE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,25,53,76,10
- LTEXT "Note: status profiles can be created in the 'Status profiles' options screen",IDC_STATIC,105,37,77,34
- LTEXT "",IDC_CURWINLOC,209,128,80,8
- LTEXT "",IDC_CURWINSIZE,209,186,80,8
- GROUPBOX "Window on startup",IDC_STATIC,194,7,104,209
- CONTROL "Automatically dial on startup",IDC_AUTODIAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,129,168,10
- CONTROL "Automatically hang up on exit",IDC_AUTOHANGUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,144,168,10
- GROUPBOX "Dial-up (experimental)",IDC_STATIC,7,113,182,49
-END
-
-IDD_PUOPT_KEEPSTATUS DIALOGEX 0, 0, 254, 223
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_BGCOLOR,"ColourPicker",WS_TABSTOP,15,19,35,14
- LTEXT "Background color",IDC_STATIC,59,23,66,8
- CONTROL "",IDC_TEXTCOLOR,"ColourPicker",WS_TABSTOP,15,37,35,14
- LTEXT "Text color",IDC_STATIC,59,41,66,8
- CONTROL "Use Windows colors",IDC_WINCOLORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,56,108,10
- CONTROL "Use default colors",IDC_DEFAULTCOLORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,66,107,10
- GROUPBOX "Delay",IDC_STATIC,137,7,110,52
- EDITTEXT IDC_DELAY,221,30,20,14,ES_AUTOHSCROLL | ES_NUMBER
- GROUPBOX "On left click",IDC_STATIC,7,84,103,51
- GROUPBOX "On right click",IDC_STATIC,137,84,101,51,WS_GROUP
- CONTROL "Do nothing",IDC_LNOTHING,"Button",BS_AUTORADIOBUTTON | WS_GROUP,15,96,80,10
- CONTROL "Close popup",IDC_LCLOSE,"Button",BS_AUTORADIOBUTTON,15,108,79,10
- CONTROL "Cancel reconnecting",IDC_LCANCEL,"Button",BS_AUTORADIOBUTTON,15,120,94,10
- CONTROL "Do nothing",IDC_RNOTHING,"Button",BS_AUTORADIOBUTTON | WS_GROUP,143,96,78,10
- CONTROL "Close popup",IDC_RCLOSE,"Button",BS_AUTORADIOBUTTON,143,108,78,10
- CONTROL "Cancel reconnecting",IDC_RCANCEL,"Button",BS_AUTORADIOBUTTON,143,120,94,10
- GROUPBOX "Colors",IDC_STATIC,7,7,126,73
- PUSHBUTTON "Preview",IDC_PREV,137,63,50,14
- GROUPBOX "Events",IDC_STATIC,7,140,240,76
- CONTROL "Show when connection is lost",IDC_PUCONNLOST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,153,226,10
- CONTROL "Show when a connection attempt is made",IDC_PUCONNRETRY,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,165,226,10
- CONTROL "Show when reconnection has finished",IDC_PURESULT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,177,226,10
- CONTROL "Show other messages",IDC_PUOTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,189,226,10
- CONTROL "From popup plugin",IDC_DELAYFROMPU,"Button",BS_AUTORADIOBUTTON | WS_GROUP,143,19,94,10
- CONTROL "Custom",IDC_DELAYCUSTOM,"Button",BS_AUTORADIOBUTTON,143,32,47,10
- CONTROL "Permanent",IDC_DELAYPERMANENT,"Button",BS_AUTORADIOBUTTON,143,45,50,10
- CONTROL "Show additional information in popups",IDC_PUSHOWEXTRA,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,201,226,10
-END
-
-IDD_OPT_AUTOAWAYMSG DIALOGEX 0, 0, 263, 153
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- COMBOBOX IDC_STATUS,12,19,240,97,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Use Miranda's message setting",IDC_RADUSEMIRANDA,"Button",BS_AUTORADIOBUTTON,23,56,165,10
- CONTROL "Use this message:",IDC_RADUSECUSTOM,"Button",BS_AUTORADIOBUTTON,23,69,165,10
- EDITTEXT IDC_STATUSMSG,33,82,219,50,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- LTEXT "Use %time% for the current time, %date% for the current date",IDC_STATIC,33,135,220,8
- PUSHBUTTON "Variables...",IDC_VARIABLESHELP,198,65,54,14,NOT WS_VISIBLE
-END
-
-IDD_OPT_GENAUTOAWAY DIALOGEX 0, 0, 258, 191
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Specify settings for each account",IDC_PERPROTOCOLSETTINGS,
- "Button",BS_AUTORADIOBUTTON,20,20,220,10
- CONTROL "Use same settings for all accounts",IDC_SAMESETTINGS,
- "Button",BS_AUTORADIOBUTTON,20,31,220,10
- CONTROL "Ignore Caps Lock, Num Lock and Scroll Lock keys",IDC_IGNLOCK,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,44,220,10
- LTEXT "Check interval (secs)",IDC_STATIC,21,125,133,8
- EDITTEXT IDC_AWAYCHECKTIMEINSECS,159,122,22,14,ES_AUTOHSCROLL
- LTEXT "Confirm dialog timeout (secs)",IDC_STATIC,21,142,133,8
- EDITTEXT IDC_CONFIRMDELAY,159,138,22,14,ES_AUTOHSCROLL
- CTEXT "You enabled ""Change my status mode to"" in the ""Idle"" options dialog, AdvancedAutoAway's options are ignored.",IDC_IDLEWARNING,7,164,244,20,NOT WS_VISIBLE
- CONTROL "Monitor keyboard activity",IDC_MONITORKEYBOARD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,77,220,10
- CONTROL "Monitor mouse activity",IDC_MONITORMOUSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,88,220,10
- CONTROL "Ignore CTRL, ALT, SHIFT, TAB, ESC and Windows keys",IDC_IGNSYSKEYS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,55,220,10
- CONTROL "Ignore any key combination with above keys",IDC_IGNALTCOMBO,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,66,220,10
-END
-
-IDD_OPT_KS_ACTION DIALOGEX 0, 0, 140, 162
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "",IDC_PROTOLIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | LVS_NOCOLUMNHEADER | WS_BORDER | WS_TABSTOP,16,63,100,72
- LTEXT "Accounts",IDC_STATIC,19,51,30,8
- CONTROL "Enable checking",IDC_ENABLECHECKING,"Button",BS_AUTORADIOBUTTON,16,17,69,10
- CONTROL "Disable checking",IDC_DISABLECHECKING,"Button",BS_AUTORADIOBUTTON,16,33,71,10
-END
-
-IDD_SETSTSMSGDIALOG DIALOG 0, 0, 240, 126
-STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Set status message"
-FONT 8, "MS Shell Dlg"
-BEGIN
- DEFPUSHBUTTON "OK",IDC_OK,183,105,50,14
- PUSHBUTTON "Cancel",IDC_CANCEL,127,105,50,14
- EDITTEXT IDC_STSMSG,7,19,226,79,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
- LTEXT "Set status message",IDC_DESCRIPTION,7,7,226,8
-END
-
-IDD_OPT_STATUSPROFILES DIALOGEX 0, 0, 305, 234
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "Account",IDC_STATIC,16,78,77,8
- LTEXT "Status",IDC_STATIC,156,78,77,8
- LISTBOX IDC_PROTOCOL,16,88,133,58,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- LISTBOX IDC_STATUS,156,88,133,58,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- LTEXT "Profile",IDC_STATIC,16,18,78,8
- PUSHBUTTON "Add...",IDC_ADDPROFILE,16,44,64,14
- PUSHBUTTON "Delete",IDC_DELPROFILE,81,44,67,14
- CONTROL "Create a TopToolBar button",IDC_CREATETTB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,27,135,10
- CONTROL "Show confirm dialog when loading",IDC_SHOWDIALOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,17,135,10
- COMBOBOX IDC_PROFILE,16,27,133,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- CONTROL "Create a main menu item",IDC_CREATEMMI,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,37,135,10
- EDITTEXT IDC_STATUSMSG,16,174,273,46,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN
- GROUPBOX "Status profiles",IDC_STATIC,7,7,291,220
- CONTROL "Use Miranda's message setting",IDC_MIRANDAMSG,"Button",BS_AUTORADIOBUTTON,16,150,195,10
- CONTROL "Use this message:",IDC_CUSTOMMSG,"Button",BS_AUTORADIOBUTTON,16,161,192,10
- CONTROL "HotKey1",IDC_HOTKEY,"msctls_hotkey32",WS_BORDER | WS_TABSTOP,105,63,111,14
- CONTROL "Hotkey",IDC_REGHOTKEY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,64,88,10
- PUSHBUTTON "Variables...",IDC_VARIABLESHELP,215,157,74,14,NOT WS_VISIBLE
- CONTROL "In submenu",IDC_INSUBMENU,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,169,47,119,10
-END
-
-IDD_OPT_TABS DIALOGEX 0, 0, 314, 250
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Tab1",IDC_TABS,"SysTabControl32",0x0,3,4,306,242
-END
-
-IDD_OPT_KS_ADV DIALOGEX 0, 0, 292, 224
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- EDITTEXT IDC_MAXDELAY,11,32,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Max. delay (secs)",IDC_STATIC,39,35,84,8
- CONTROL "Increase delay exponential",IDC_INCREASEEXPONENTIAL,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,14,263,10
- CONTROL "Cancel all if an account connects from another location",IDC_CNCOTHERLOC,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,96,234,10
- CONTROL "Reconnect on APM resume",IDC_CHECKAPMRESUME,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,108,234,10
- CONTROL "Stop trying to reconnect",IDC_LOGINERR_CANCEL,"Button",BS_AUTORADIOBUTTON,22,132,169,10
- CONTROL "Set delay to",IDC_LOGINERR_SETDELAY,"Button",BS_AUTORADIOBUTTON,22,143,110,12
- CONTROL "React on login errors",IDC_LOGINERR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,120,234,10
- EDITTEXT IDC_LOGINERR_DELAY,136,142,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "seconds",IDC_STATIC,164,145,77,8
- CONTROL "Set account offline before a connection attempt",IDC_FIRSTOFFLINE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,84,234,10
- EDITTEXT IDC_MAXCONNECTINGTIME,127,32,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Max. account connecting time (secs)",IDC_STATIC,154,35,121,19
- GROUPBOX "Timers",IDC_STATIC,3,2,284,54
- GROUPBOX "Reconnecting",IDC_STATIC,4,58,283,106
- CONTROL "Ignore locked status of accounts",IDC_NOLOCKED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,72,234,10
- GROUPBOX "Dial-Up",IDC_STATIC,5,166,282,51
- LTEXT "Consider connection lost after",IDC_STATIC,12,180,122,8
- EDITTEXT IDC_PINGCOUNT,135,177,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "failed pings",IDC_STATIC,160,180,101,8
- EDITTEXT IDC_CNTDELAY,11,193,22,14,ES_AUTOHSCROLL | ES_NUMBER
- LTEXT "Continuously check interval (secs)",IDC_STATIC,36,196,160,8
-END
-
-IDD_TRG_AAASTATECHANGE DIALOGEX 0, 0, 212, 144
-STYLE DS_SETFONT | DS_3DLOOK | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Entering first auto-away status",IDC_ENTERFIRST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,24,110,10
- CONTROL "Entering second auto-away status",IDC_ENTERSECOND,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,37,123,10
- CONTROL "Leaving first auto-away status",IDC_LEAVEFIRST,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,50,109,10
- CONTROL "Leaving second auto-away status",IDC_LEAVESECOND,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,63,122,10
- CONTROL "Becoming active without status change",IDC_BECOMEACTIVE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,76,140,10
- GROUPBOX "Pre-conditions",IDC_STATIC,7,7,198,89
- GROUPBOX "TriggerData",IDC_STATIC,7,97,198,40
- LTEXT "Status: The status the account will change to\r\nAccount: The account changing state",IDC_STATIC,19,111,177,18
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_OPT_KS_BASIC, DIALOG
- BEGIN
- END
-
- IDD_OPT_AUTOAWAY, DIALOG
- BEGIN
- END
-
- IDD_OPT_TABS, DIALOG
- BEGIN
- BOTTOMMARGIN, 248
- END
-
- IDD_OPT_KS_ADV, DIALOG
- BEGIN
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // German (Germany) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/tools/_deprecated/StatusPlugins/stdafx.cpp b/tools/_deprecated/StatusPlugins/stdafx.cpp deleted file mode 100644 index 8adbd4ce11..0000000000 --- a/tools/_deprecated/StatusPlugins/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/*
-Copyright (C) 2012-16 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 <http://www.gnu.org/licenses/>.
-*/
-
-#include "commonstatus.h"
\ No newline at end of file diff --git a/tools/_deprecated/StatusPlugins/useronli.ico b/tools/_deprecated/StatusPlugins/useronli.ico Binary files differdeleted file mode 100644 index 2760c47d5c..0000000000 --- a/tools/_deprecated/StatusPlugins/useronli.ico +++ /dev/null diff --git a/tools/_deprecated/StatusPlugins/version.rc b/tools/_deprecated/StatusPlugins/version.rc deleted file mode 100644 index 312430aa29..0000000000 --- a/tools/_deprecated/StatusPlugins/version.rc +++ /dev/null @@ -1,43 +0,0 @@ -#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-#include "version.h"
-#include "winres.h"
-
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#endif //_WIN32
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION __FILEVERSION_STRING
- PRODUCTVERSION __FILEVERSION_STRING
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-//#else
-// FILEFLAGS 0x0L
-#endif
-
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0" // LOCALE_NEUTRAL<<16 + 1200 (ANSI - Unicode)
- BEGIN
- VALUE "Author", __AUTHOR
- VALUE "FileDescription", __DESC
- VALUE "InternalName", __PLUGIN_NAME
- VALUE "LegalCopyright", __COPYRIGHT
- VALUE "OriginalFilename", __FILENAME
- VALUE "FileVersion", __VERSION_STRING
- VALUE "ProductName", "Miranda NG"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", /*LOCALE_NEUTRAL from WinNT.h */ 0x0, 1200
- END
-END
diff --git a/tools/_deprecated/Yahoo/Yahoo.vcxproj b/tools/_deprecated/Yahoo/Yahoo.vcxproj deleted file mode 100644 index 3dc25057f3..0000000000 --- a/tools/_deprecated/Yahoo/Yahoo.vcxproj +++ /dev/null @@ -1,41 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>Yahoo</ProjectName>
- <ProjectGuid>{E42870DB-9FED-44E7-9C93-4E64D0C87F51}</ProjectGuid>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
- </ImportGroup>
- <ItemDefinitionGroup>
- <ClCompile>
- <PreprocessorDefinitions>HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="src\libyahoo2\*.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\libyahoo2\*.h" />
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/Yahoo/Yahoo.vcxproj.filters b/tools/_deprecated/Yahoo/Yahoo.vcxproj.filters deleted file mode 100644 index de5ad9f66c..0000000000 --- a/tools/_deprecated/Yahoo/Yahoo.vcxproj.filters +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/Yahoo/docs/License.txt b/tools/_deprecated/Yahoo/docs/License.txt deleted file mode 100644 index 7f1161073d..0000000000 --- a/tools/_deprecated/Yahoo/docs/License.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/tools/_deprecated/Yahoo/docs/ReadMe.txt b/tools/_deprecated/Yahoo/docs/ReadMe.txt deleted file mode 100644 index 4c3c50b6b9..0000000000 --- a/tools/_deprecated/Yahoo/docs/ReadMe.txt +++ /dev/null @@ -1,49 +0,0 @@ -=================================================================================
-Yahoo 0.3.0.9 plugin for Miranda IM
-
-Copyright (C) 2003-6 Gennady Feldman (aka Gena01)
-Copyright (C) 2003-4 Laurent Marechal (aka Peorth)
-
-Thanks to the Miranda developers for their code contributions, suggestions, ideas
-and support.
-
-Download: http://www.miranda-im.org/download/details.php?action=viewfile&id=1248
-Support: http://forums.miranda-im.org/
-To report Bugs: http://bugs.miranda-im.org/
-
-=================================================================================
-
-Table of Contents:
-
-1. What's New
-2. Installation
-3. Troubleshooting
-
- * * *
-
-1. What's New:
---------------
-+ Complete avatar support.
-+ Yahoo Calendar integration. (links in Main Menu)
-+ Yahoo Calendar Reminders via IM now work. (You need to have Popup plugin installed)
-x Lots of other fixes and improvements.
-
-2. Installation:
-----------------
-a. Close Miranda if you have it open.
-b. Extract the zip file into a temporary folder.
-c. Copy yahoo.dll to Miranda\Plugins folder.
-d. Start Miranda.
-e. Open Options->Network->Yahoo and enter your login information.
-f. If you have the popup plugin:
- Go into the Options->Popups->Yahoo menu of Miranda and set your preferences.
-
-3. Troubleshooting:
--------------------
-a. Check your settings/options. Make sure they are set properly.
-b. If some weird stuff or crashes happen try to disable other plugins and minimize
- the list of plugins that might cause the problem.
-c. Check your firewall logs/settings. In some cases it could be a blocked connection by the
- firewall/proxy that's causing the problem.
-d. Enable "Network Log" and try to browse through it.
-e. If you can't figure it out post a thread in the forums [see link above for Support]
diff --git a/tools/_deprecated/Yahoo/docs/features.txt b/tools/_deprecated/Yahoo/docs/features.txt deleted file mode 100644 index a110af643c..0000000000 --- a/tools/_deprecated/Yahoo/docs/features.txt +++ /dev/null @@ -1,93 +0,0 @@ -This is a list of features that are/might/will be possible with the current
-LibYahoo2 library. Not all of them are implemented or will be implemented.
-Some (like conferencing or chat) need to have some support into Miranda core
-and this will not be implemented until this support will be present.
-
-The following list is borrowed from the official libyahoo2 site
- (http://libyahoo2.sourceforge.net/)
-
-[D] Implemented in the plugin
-[P] Part implemented in the plugin
-[-] Not used/possible/implemented in Miranda at 'this' time
-[ ] Not yet implemented
-
-Note that some Yahoo feature are already existing under Miranda and
-so are not in the plugin. In this list this will be shown as 'in the
-plugin'
-
-[D] Messaging:
-[D] Sending messages (UTF-8 supported via LibYhaoo2)
-[D] Send typing notification
-[D] Receive typing notification
-
-[P] Buddy list management:
-[D] Add buddies
-[D] Remove buddies
-[-] Change buddy group
-[D] Ignore buddy
-[D] Unignore buddy
-[D] Reject buddy
-[D] Buddy status updates
-[-] Group renaming
-
-[P] Yahoo Address book support
-[D] Loading Yahoo Address Book
-[ ] Don't load the whole YAB every time. Only track changes.
-[ ] Parse lots of new YAB fields. (We only support a small subset)
-[ ] Update YAB according to current miranda database settings.(Like Nick, etc)
-[ ] Delete YAB entry when removing a buddy from our buddy list.(Optionally?)
-[ ] Create new YAB entry when adding a new buddy to buddy list.
-
-[D] Changing Status:
-[D] Regular status messages
-[D] Custom away/non-away status messages
-
-[-] Conferencing:
-[-] Create new conference
-[-] Join existing conference
-[-] Invite members to join existing conference
-[-] Decline joining a conference
-[-] Leave a conference
-[-] Send message to conference
-
-[-] Yahoo Chat
-[-] List chatrooms
-[-] Join/leave a chatroom
-[-] Chat :)
-
-[-] Webcam support
-[-] Support for viewing other people's webcams
-[-] Support for broadcasting webcam images
-
-[P] File Transfer:
-[ ] Send file directly to another client
-[D] Send file via Yahoo file transfer server
-[D] Receive files via Yahoo file transfer server
-[D] Receive files directly from another client
-
-[D] Mail Notification
-
-[-] Identities
-[-] Activate/Deactivate an identity
-[-] Send messages from a particular identity
-[-] Conferencing with a particular identity
-
-[P] Avatar Support
-[D] Receive avatars from your buddies.
-[D] Set your own avatar
-[ ] Flash avatars [Receive/Set]
-
-[P] Stealth Settings
-[D] Hide your own online status from certain buddies.
-[ ] Show yourself online to certain buddies while being invisible to everybody else.
-
-[D] ServerSide IgnoreList
-[D] Add yahoo id to server ignore list.
-[D] Remove yahoo id from server ignore list.
-[D] Drop IMs from ignored contacts.
-
-[D] Yahoo Calendar support
-[D] Yahoo Calendar link in main menu w/ auto-login
-[D] Yahoo Calendar Reminders via IM.
-
-libyahoo2 does not yet have support for Voice messages, nor for IMvironments.
diff --git a/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj b/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj deleted file mode 100644 index 28987eb485..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>Proto_Yahoo</ProjectName>
- <ProjectGuid>{BFEBA9D5-CAB7-42C0-BE0B-0888A7A458AB}</ProjectGuid>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\..\build\vc.common\icons.props" />
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj.filters b/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj.filters deleted file mode 100644 index e39f86d5d6..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/Proto_Yahoo.vcxproj.filters +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\..\build\vc.common\common.filters" />
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Away.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Away.ico Binary files differdeleted file mode 100644 index e3eb13d0ca..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Away.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/DND.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/DND.ico Binary files differdeleted file mode 100644 index 9293111894..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/DND.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Invisible.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Invisible.ico Binary files differdeleted file mode 100644 index 6408d2411d..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Lunch.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Lunch.ico Binary files differdeleted file mode 100644 index 91868389c9..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/NA.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/NA.ico Binary files differdeleted file mode 100644 index 848466bf33..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/NA.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Occupied.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Occupied.ico Binary files differdeleted file mode 100644 index 5a57e27fda..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Offline.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Offline.ico Binary files differdeleted file mode 100644 index c2a67ca6b6..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Offline.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Online.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Online.ico Binary files differdeleted file mode 100644 index 61c3f6a143..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Online.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Phone.ico b/tools/_deprecated/Yahoo/proto_yahoo/res/Phone.ico Binary files differdeleted file mode 100644 index 3688089d10..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Phone.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/proto_yahoo/res/Proto_Yahoo.rc b/tools/_deprecated/Yahoo/proto_yahoo/res/Proto_Yahoo.rc deleted file mode 100644 index 7998ae5e55..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/res/Proto_Yahoo.rc +++ /dev/null @@ -1,77 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "..\src\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Russian (Russia) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
-LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\src\\resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_ICON1 ICON "Offline.ico"
-IDI_ICON2 ICON "Online.ico"
-IDI_ICON3 ICON "Away.ico"
-IDI_ICON4 ICON "Invisible.ico"
-IDI_ICON5 ICON "NA.ico"
-IDI_ICON6 ICON "DND.ico"
-IDI_ICON7 ICON "Occupied.ico"
-IDI_ICON8 ICON "Lunch.ico"
-IDI_ICON9 ICON "Phone.ico"
-#endif // Russian (Russia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/tools/_deprecated/Yahoo/proto_yahoo/src/resource.h b/tools/_deprecated/Yahoo/proto_yahoo/src/resource.h deleted file mode 100644 index 5f47793a2c..0000000000 --- a/tools/_deprecated/Yahoo/proto_yahoo/src/resource.h +++ /dev/null @@ -1,24 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by Proto_Yahoo.rc
-//
-#define IDI_ICON1 105
-#define IDI_ICON2 104
-#define IDI_ICON3 128
-#define IDI_ICON4 130
-#define IDI_ICON5 131
-#define IDI_ICON6 158
-#define IDI_ICON7 159
-#define IDI_ICON8 1003
-#define IDI_ICON9 1002
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 110
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/tools/_deprecated/Yahoo/res/Yahoo.rc b/tools/_deprecated/Yahoo/res/Yahoo.rc deleted file mode 100644 index 550b71ab65..0000000000 --- a/tools/_deprecated/Yahoo/res/Yahoo.rc +++ /dev/null @@ -1,227 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "winres.h" -#include "..\src\resource.h" -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_OPT_YAHOO DIALOGEX 0, 0, 296, 220 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Yahoo",IDC_STYAHOOGROUP,8,10,280,72 - RTEXT "ID:",IDC_STATIC,16,20,52,8 - EDITTEXT IDC_HANDLE,72,18,100,12,ES_AUTOHSCROLL - RTEXT "Password:",IDC_STATIC,16,36,52,8 - EDITTEXT IDC_PASSWORD,72,34,100,12,ES_PASSWORD | ES_AUTOHSCROLL - RTEXT "Nick:",IDC_STATIC,16,52,52,8 - EDITTEXT IDC_NICK,72,50,100,12,ES_AUTOHSCROLL - CONTROL "Create a new Yahoo account using the Yahoo website",IDC_NEWYAHOOACCOUNTLINK, - "Hyperlink",WS_TABSTOP,21,66,208,8 - GROUPBOX "Expert",IDC_STATIC,8,84,280,80 - CONTROL "Use Yahoo Address Book (YAB)",IDC_USE_YAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,104,260,10 - CONTROL "Show Avatars",IDC_SHOW_AVATARS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,114,260,10 - CONTROL "Auto login to Yahoo Website(s)",IDC_MAIL_AUTOLOGIN, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,124,260,10 - CONTROL "Display Yahoo notifications",IDC_DISABLEYAHOOMAIL, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,134,260,10 - CONTROL "Show Errors",IDC_SHOW_ERRORS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,16,144,260,10 -END - -IDD_YAHOOACCOUNT DIALOGEX 0, 0, 186, 134 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "ID:",IDC_STATIC,0,0,53,12 - EDITTEXT IDC_HANDLE,54,0,131,12,ES_AUTOHSCROLL - LTEXT "Password:",IDC_STATIC,0,16,53,12 - EDITTEXT IDC_PASSWORD,54,16,131,12,ES_PASSWORD | ES_AUTOHSCROLL - CONTROL "Create a new Yahoo account",IDC_NEWYAHOOACCOUNTLINK, - "Hyperlink",WS_TABSTOP,0,48,174,12 -END - -IDD_OPT_YAHOO_CONNECTION DIALOGEX 0, 0, 296, 220 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Connection Settings",IDC_STATIC,8,10,280,72 - LTEXT "Login server:",IDC_STATIC,16,26,52,10 - EDITTEXT IDC_LOGINSERVER,68,24,168,12,ES_AUTOHSCROLL - LTEXT "Port:",IDC_STATIC,16,42,25,10 - EDITTEXT IDC_YAHOOPORT,68,40,29,12,ES_AUTOHSCROLL | ES_NUMBER - PUSHBUTTON "Reset",IDC_RESETSERVER,244,24,40,12 -END - -IDD_OPT_YAHOO_IGNORE DIALOGEX 0, 0, 296, 220 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - GROUPBOX "Yahoo Ignore List",IDC_STIGNGROUP,8,10,280,210 - CONTROL "Ignore anyone who is not on my Yahoo buddy list",IDC_OPT_IGN_UNKNOWN, - "Button",BS_AUTORADIOBUTTON,16,20,232,10 - CONTROL "Ignore only the people below:",IDC_OPT_IGN_LIST,"Button",BS_AUTORADIOBUTTON,16,36,232,10 - EDITTEXT IDC_YIGN_EDIT,16,53,232,13,ES_AUTOHSCROLL - PUSHBUTTON "&Add",IDC_IGN_ADD,250,52,34,12 - LISTBOX IDC_YIGN_LIST,16,68,232,150,LBS_SORT | LBS_HASSTRINGS | WS_VSCROLL - PUSHBUTTON "&Remove",IDC_IGN_REMOVE,250,202,34,12 -END - -IDD_SETCUSTSTAT DIALOGEX 0, 0, 187, 51 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Set Custom Status" -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - EDITTEXT IDC_CUSTSTAT,5,5,177,12,ES_AUTOHSCROLL - CONTROL "Show as busy",IDC_CUSTSTATBUSY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,5,21,120,10 - DEFPUSHBUTTON "OK",IDOK,36,34,50,14 - PUSHBUTTON "Cancel",IDCANCEL,102,34,50,14 -END - -IDD_SEARCHUSER DIALOGEX 0, 0, 109, 148 -STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - LTEXT "ID:",IDC_STATIC,0,1,97,8 - EDITTEXT IDC_SEARCH_ID,0,10,105,15,ES_AUTOHSCROLL - LTEXT "Protocol:",IDC_STATIC,0,31,97,38 - COMBOBOX IDC_SEARCH_PROTOCOL,0,40,105,75,CBS_DROPDOWNLIST | WS_TABSTOP -END - -IDD_USER_INFO DIALOGEX 0, 0, 221, 132 -STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD -EXSTYLE WS_EX_CONTROLPARENT -FONT 8, "MS Shell Dlg", 0, 0, 0x1 -BEGIN - LTEXT "ID:",IDC_STATIC,5,5,71,8 - EDITTEXT IDC_SEARCH_ID,74,5,143,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - LTEXT "Protocol:",IDC_STATIC,5,18,71,8 - EDITTEXT IDC_SEARCH_PROTOCOL,74,18,143,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - LTEXT "Client:",IDC_STATIC,5,31,71,8 - EDITTEXT IDC_NFO_CLIENT,74,31,143,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER -END - -IDD_CHATROOM_INVITE_REQ DIALOGEX 0, 0, 177, 147 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION -EXSTYLE WS_EX_TOPMOST | WS_EX_WINDOWEDGE -CAPTION "Chat Room Invitation Request" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - DEFPUSHBUTTON "&Join",IDOK,77,128,46,14 - PUSHBUTTON "&Deny",IDCANCEL,125,128,45,14 - LTEXT "Denial Message",IDC_STATIC,7,73,162,9 - EDITTEXT IDC_MSG2,5,83,166,40,ES_MULTILINE | ES_AUTOHSCROLL | WS_VSCROLL | WS_HSCROLL - LTEXT "Invitation Message",IDC_STATIC,6,21,165,9 - EDITTEXT IDC_MSG,6,31,166,40,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | WS_HSCROLL - LTEXT "Host",IDC_STATIC,5,7,73,8 - CTEXT "",IDC_SCREENNAME,80,5,93,12,SS_SUNKEN -END - -IDD_CHATROOM_INVITE DIALOGEX 0, 0, 302, 125 -STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU -EXSTYLE WS_EX_TOPMOST -CAPTION "Invite Buddy To Chat Room" -FONT 8, "MS Shell Dlg", 0, 0, 0x0 -BEGIN - LTEXT "Screen Name",IDC_STATIC,154,31,43,9 - PUSHBUTTON "&Invite",IDOK,165,107,46,14 - PUSHBUTTON "&Cancel",IDCANCEL,234,107,45,14 - LTEXT "Invitation reason",IDC_STATIC,155,58,60,9 - EDITTEXT IDC_MSG,154,68,140,32,ES_MULTILINE | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL - CONTROL "",IDC_CCLIST,"CListControl",WS_TABSTOP | 0x16f,7,4,141,117,WS_EX_CLIENTEDGE - EDITTEXT IDC_EDITSCR,154,41,93,12,ES_AUTOHSCROLL - PUSHBUTTON "Add",IDC_ADDSCR,247,40,49,14 - CTEXT "",IDC_ROOMNAME,154,10,140,11,0,WS_EX_STATICEDGE -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_YAHOO ICON "yahoo.ico" -IDI_INBOX ICON "inbox.ico" -IDI_PROFILE ICON "profile.ico" -IDI_REFRESH ICON "refresh.ico" -IDI_YAB ICON "address_book.ico" -IDI_SET_STATUS ICON "set_status.ico" -IDI_CALENDAR ICON "calendar.ico" - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "..\\src\\resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_CHATROOM_INVITE_REQ, DIALOG - BEGIN - BOTTOMMARGIN, 142 - END - - IDD_CHATROOM_INVITE, DIALOG - BEGIN - RIGHTMARGIN, 300 - TOPMARGIN, 4 - BOTTOMMARGIN, 121 - END -END -#endif // APSTUDIO_INVOKED - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/tools/_deprecated/Yahoo/res/address_book.ico b/tools/_deprecated/Yahoo/res/address_book.ico Binary files differdeleted file mode 100644 index 1a2893d4cd..0000000000 --- a/tools/_deprecated/Yahoo/res/address_book.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/calendar.ico b/tools/_deprecated/Yahoo/res/calendar.ico Binary files differdeleted file mode 100644 index c64b55e91f..0000000000 --- a/tools/_deprecated/Yahoo/res/calendar.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/inbox.ico b/tools/_deprecated/Yahoo/res/inbox.ico Binary files differdeleted file mode 100644 index 7a5e461f6f..0000000000 --- a/tools/_deprecated/Yahoo/res/inbox.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/invite.ico b/tools/_deprecated/Yahoo/res/invite.ico Binary files differdeleted file mode 100644 index 25bd23be86..0000000000 --- a/tools/_deprecated/Yahoo/res/invite.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/profile.ico b/tools/_deprecated/Yahoo/res/profile.ico Binary files differdeleted file mode 100644 index 2056f57798..0000000000 --- a/tools/_deprecated/Yahoo/res/profile.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/refresh.ico b/tools/_deprecated/Yahoo/res/refresh.ico Binary files differdeleted file mode 100644 index feadf04bf2..0000000000 --- a/tools/_deprecated/Yahoo/res/refresh.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/set_status.ico b/tools/_deprecated/Yahoo/res/set_status.ico Binary files differdeleted file mode 100644 index 5935225452..0000000000 --- a/tools/_deprecated/Yahoo/res/set_status.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/res/version.rc b/tools/_deprecated/Yahoo/res/version.rc deleted file mode 100644 index de48098be2..0000000000 --- a/tools/_deprecated/Yahoo/res/version.rc +++ /dev/null @@ -1,39 +0,0 @@ -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - -#include <windows.h> -#include "..\src\version.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION __FILEVERSION_STRING - PRODUCTVERSION __FILEVERSION_STRING - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "000004b0" - BEGIN - VALUE "CompanyName", "Gennady Feldman" - VALUE "FileDescription", "Miranda Yahoo plugin" - VALUE "FileVersion", __VERSION_STRING - VALUE "InternalName", "yahoo" - VALUE "LegalCopyright", "Copyright (C) 2003-2006 Gennady Feldman" - VALUE "OriginalFilename", "yahoo.dll" - VALUE "ProductName", "Miranda" - VALUE "ProductVersion", __VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0, 1200 - END -END diff --git a/tools/_deprecated/Yahoo/res/yahoo.ico b/tools/_deprecated/Yahoo/res/yahoo.ico Binary files differdeleted file mode 100644 index 1d559e0676..0000000000 --- a/tools/_deprecated/Yahoo/res/yahoo.ico +++ /dev/null diff --git a/tools/_deprecated/Yahoo/src/avatar.cpp b/tools/_deprecated/Yahoo/src/avatar.cpp deleted file mode 100644 index e57a331c0c..0000000000 --- a/tools/_deprecated/Yahoo/src/avatar.cpp +++ /dev/null @@ -1,855 +0,0 @@ -/*
-* $Id: avatar.cpp 14178 2012-03-11 15:02:54Z borkra $
-*
-* myYahoo Miranda Plugin
-*
-* Authors: Gennady Feldman (aka Gena01)
-* Laurent Marechal (aka Peorth)
-*
-* This code is under GPL and is based on AIM, MSN and Miranda source code.
-* I want to thank Robert Rainwater and George Hazan for their code and support
-* and for answering some of my questions during development of this plugin.
-*/
-
-#include "stdafx.h"
-
-#include <sys/stat.h>
-
-#include <m_langpack.h>
-#include "m_folders.h"
-#include "avatar.h"
-#include "resource.h"
-
- // 31 bit hash function - this is based on g_string_hash function from glib
-int YAHOO_avt_hash(const char *key, DWORD len)
-{
- // Thank you Pidgin and Kopete devs. It seems that both clients are using this code now.
- const unsigned char *p = (const unsigned char *)key;
- int checksum = 0, g, i = len;
-
- while (i--) {
- checksum = (checksum << 4) + *p++;
-
- if ((g = (checksum & 0xf0000000)) != 0)
- checksum ^= g >> 23;
-
- checksum &= ~g;
- }
-
- return checksum;
-}
-
-/**************** Send Avatar ********************/
-
-void upload_avt(int, INT_PTR fd, int error, void *data)
-{
- yahoo_file_info *sf = (yahoo_file_info*)data;
- unsigned long size = 0;
- char buf[1024];
- int rw; /* */
-
- if (fd < 1 || error) {
- LOG(("[get_fd] Connect Failed!"));
- return;
- }
-
- HANDLE myhFile = CreateFileA(sf->filename,
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
- 0);
-
- if (myhFile == INVALID_HANDLE_VALUE) {
- LOG(("[get_fd] Can't open file for reading?!"));
- return;
- }
-
- LOG(("Sending file: %s size: %ld", sf->filename, sf->filesize));
-
- do {
- DWORD dwRead;
- rw = ReadFile(myhFile, buf, sizeof(buf), &dwRead, NULL);
-
- if (rw != 0) {
- rw = Netlib_Send((HANDLE)fd, buf, dwRead, MSG_NODUMP);
-
- if (rw < 1) {
- LOG(("Upload Failed. Send error?"));
- break;
- }
-
- size += rw;
- }
- } while (rw >= 0 && size < sf->filesize);
-
- CloseHandle(myhFile);
-
- do {
- rw = Netlib_Recv((HANDLE)fd, buf, sizeof(buf), 0);
- LOG(("Got: %d bytes", rw));
- } while (rw > 0);
-
- LOG(("File send complete!"));
-}
-
-void __cdecl CYahooProto::send_avt_thread(void *psf)
-{
- yahoo_file_info *sf = (yahoo_file_info*)psf;
- if (sf == NULL) {
- debugLogA("[yahoo_send_avt_thread] SF IS NULL!!!");
- return;
- }
-
- setByte("AvatarUL", 1);
- yahoo_send_avatar(m_id, sf->filename, sf->filesize, &upload_avt, sf);
-
- free(sf->filename);
- free(sf);
-
- if (getByte("AvatarUL", 1) == 1)
- setByte("AvatarUL", 0);
-}
-
-void CYahooProto::SendAvatar(const wchar_t *szFile)
-{
- struct _stat statbuf;
- if (_wstat(szFile, &statbuf) != 0) {
- LOG(("[YAHOO_SendAvatar] Error reading File information?!"));
- return;
- }
-
- yahoo_file_info *sf = y_new(yahoo_file_info, 1);
- sf->filesize = statbuf.st_size;
-
- wchar_t tszFilename[MAX_PATH];
- wcsncpy(tszFilename, szFile, _countof(tszFilename) - 1);
- GetShortPathNameW(szFile, tszFilename, _countof(tszFilename));
- char szFilename[MAX_PATH];
- WideCharToMultiByte(CP_ACP, 0, tszFilename, -1, szFilename, MAX_PATH, 0, 0);
- sf->filename = strdup(szFilename);
-
- debugLogA("[Uploading avatar] filename: %s size: %ld", sf->filename, sf->filesize);
-
- ForkThread(&CYahooProto::send_avt_thread, sf);
-}
-
-struct avatar_info
-{
- char *who;
- char *pic_url;
- int cksum;
-};
-
-void __cdecl CYahooProto::recv_avatarthread(void *pavt)
-{
- avatar_info *avt = (avatar_info*)pavt;
- int error = 0;
- wchar_t buf[4096];
-
- if (avt == NULL) {
- debugLogA("AVT IS NULL!!!");
- return;
- }
-
- if (!m_bLoggedIn) {
- debugLogA("We are not logged in!!!");
- return;
- }
-
- // ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
-
- LOG(("yahoo_recv_avatarthread who:%s url:%s checksum: %d", avt->who, avt->pic_url, avt->cksum));
-
- MCONTACT hContact = getbuddyH(avt->who);
-
- if (!hContact) {
- LOG(("ERROR: Can't find buddy: %s", avt->who));
- error = 1;
- }
- else if (!error) {
- setDword(hContact, "PictCK", avt->cksum);
- setDword(hContact, "PictLoading", 1);
- }
-
- if (!error) {
-
- NETLIBHTTPREQUEST nlhr = { 0 }, *nlhrReply;
-
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType = REQUEST_GET;
- nlhr.flags = NLHRF_NODUMP;
- nlhr.szUrl = avt->pic_url;
-
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)m_hNetlibUser, (LPARAM)&nlhr);
-
- if (nlhrReply) {
-
- if (nlhrReply->resultCode != 200) {
- LOG(("Update server returned '%d' instead of 200. It also sent the following: %s", nlhrReply->resultCode, nlhrReply->szResultDescr));
- // make sure it's a real problem and not a problem w/ our connection
- yahoo_send_picture_info(m_id, avt->who, 3, avt->pic_url, avt->cksum);
- error = 1;
- }
- else if (nlhrReply->dataLength < 1 || nlhrReply->pData == NULL) {
- LOG(("No data??? Got %d bytes.", nlhrReply->dataLength));
- error = 1;
- }
- else {
- GetAvatarFileName(hContact, buf, 1024, getByte(hContact, "AvatarType", 0));
- DeleteFile(buf);
-
- LOG(("Saving file: %s size: %u", buf, nlhrReply->dataLength));
- HANDLE myhFile = CreateFile(buf,
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
-
- if (myhFile != INVALID_HANDLE_VALUE) {
- DWORD c;
-
- WriteFile(myhFile, nlhrReply->pData, nlhrReply->dataLength, &c, NULL);
- CloseHandle(myhFile);
-
- setDword(hContact, "PictLastCheck", 0);
- }
- else {
- LOG(("Can not open file for writing: %s", buf));
- error = 1;
- }
- }
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
- }
- }
-
- if (getDword(hContact, "PictCK", 0) != avt->cksum) {
- LOG(("WARNING: Checksum updated during download?!"));
- error = 1; /* don't use this one? */
- }
-
- setDword(hContact, "PictLoading", 0);
- LOG(("File download complete!?"));
-
- if (error)
- buf[0] = '\0';
-
- free(avt->who);
- free(avt->pic_url);
- free(avt);
-
- PROTO_AVATAR_INFORMATION ai;
- ai.format = PA_FORMAT_PNG;
- ai.hContact = hContact;
- wcsncpy_s(ai.filename, buf, _TRUNCATE);
-
- if (error)
- setDword(hContact, "PictCK", 0);
-
- ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, !error ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, (HANDLE)&ai, 0);
-}
-
-void CYahooProto::ext_got_picture(const char*, const char *who, const char *pic_url, int cksum, int type)
-{
- MCONTACT hContact = 0;
-
- LOG(("[ext_yahoo_got_picture] for %s with url %s (checksum: %d) type: %d", who, pic_url, cksum, type));
-
- /*
- Type:
-
- 1 - Send Avatar Info
- 2 - Got Avatar Info
- 3 - YIM6 didn't like my avatar? Expired? We need to invalidate and re-load
- */
- switch (type) {
- case 1:
- {
- DBVARIANT dbv;
-
- /* need to send avatar info */
- if (!getByte("ShowAvatars", 1)) {
- LOG(("[ext_yahoo_got_picture] We are not using/showing avatars!"));
- yahoo_send_picture_update(m_id, who, 0); // no avatar (disabled)
- return;
- }
-
- LOG(("[ext_yahoo_got_picture] Getting ready to send info!"));
- /* need to read CheckSum */
- int savedSum = getDword("AvatarHash", 0);
- if (savedSum) {
- if (!getString("AvatarURL", &dbv)) {
- LOG(("[ext_yahoo_got_picture] Sending url: %s checksum: %d to '%s'!", dbv.pszVal, savedSum, who));
- //void yahoo_send_picture_info(int id, const char *me, const char *who, const char *pic_url, int savedSum)
- yahoo_send_picture_info(m_id, who, 2, dbv.pszVal, savedSum);
- db_free(&dbv);
- break;
- }
- else
- LOG(("No AvatarURL???"));
-
- /*
- * Try to re-upload the avatar
- */
- if (getByte("AvatarUL", 0) != 1) {
- // NO avatar URL??
- if (!getWString("AvatarFile", &dbv)) {
- struct _stat statbuf;
- if (_wstat(dbv.ptszVal, &statbuf) != 0) {
- LOG(("[ext_yahoo_got_picture] Avatar File Missing? Can't find file: %s", dbv.ptszVal));
- }
- else {
- setString("AvatarInv", who);
- SendAvatar(dbv.ptszVal);
- }
-
- db_free(&dbv);
- }
- else LOG(("[ext_yahoo_got_picture] No Local Avatar File??? "));
- }
- else LOG(("[ext_yahoo_got_picture] Another avatar upload in progress?"));
- }
- }
- break;
- case 2:
- // We got Avatar Info for our buddy.
- if (!getByte("ShowAvatars", 1)) {
- LOG(("[ext_yahoo_got_picture] We are not using/showing avatars!"));
- return;
- }
-
- // got avatar info, so set miranda up
- hContact = getbuddyH(who);
- if (!hContact) {
- LOG(("[ext_yahoo_got_picture] Buddy not on my buddy list?."));
- return;
- }
-
- if (!cksum && pic_url) {
- const char *chk = strstr(pic_url, "chksum=");
- if (chk)
- cksum = strtol(chk + 7, NULL, 10);
- }
-
- if (!cksum || cksum == -1) {
- LOG(("[ext_yahoo_got_picture] Resetting avatar."));
- setDword(hContact, "PictCK", 0);
- reset_avatar(hContact);
- }
- else {
- if (pic_url == NULL) {
- LOG(("[ext_yahoo_got_picture] WARNING: Empty URL for avatar?"));
- return;
- }
-
- wchar_t z[1024];
- GetAvatarFileName(hContact, z, 1024, getByte(hContact, "AvatarType", 0));
-
- if (getDword(hContact, "PictCK", 0) != cksum || _waccess(z, 0) != 0) {
-
- debugLogA("[ext_yahoo_got_picture] Checksums don't match or avatar file is missing. Current: %d, New: %d",
- getDword(hContact, "PictCK", 0), cksum);
-
- avatar_info *avt = (avatar_info*)malloc(sizeof(avatar_info));
- avt->who = strdup(who);
- avt->pic_url = strdup(pic_url);
- avt->cksum = cksum;
-
- ForkThread(&CYahooProto::recv_avatarthread, avt);
- }
- }
-
- break;
- case 3:
- // Our Avatar is not good anymore? Need to re-upload??
- /* who, pic_url, cksum */
- {
- int mcksum = 0;
- DBVARIANT dbv;
-
- /* need to send avatar info */
- if (!getByte("ShowAvatars", 1)) {
- LOG(("[ext_yahoo_got_picture] We are not using/showing avatars!"));
- yahoo_send_picture_update(m_id, who, 0); // no avatar (disabled)
- return;
- }
-
- LOG(("[ext_yahoo_got_picture] Getting ready to send info!"));
- /* need to read CheckSum */
- mcksum = getDword("AvatarHash", 0);
- if (mcksum == 0) {
- /* this should NEVER Happen??? */
- LOG(("[ext_yahoo_got_picture] No personal checksum? and Invalidate?!"));
- yahoo_send_picture_update(m_id, who, 0); // no avatar (disabled)
- return;
- }
-
- LOG(("[ext_yahoo_got_picture] My Checksum: %d", mcksum));
-
- if (!getString("AvatarURL", &dbv)) {
- if (mir_strcmpi(pic_url, dbv.pszVal) == 0) {
- DBVARIANT dbv2;
- /*time_t ts;
- DWORD ae;*/
-
- if (mcksum != cksum)
- LOG(("[ext_yahoo_got_picture] WARNING: Checksums don't match!"));
-
- /*time(&ts);
- ae = getDword("AvatarExpires", 0);
-
- if (ae != 0 && ae > (ts - 300)) {
- LOG(("[ext_yahoo_got_picture] Current Time: %lu Expires: %lu ", ts, ae));
- LOG(("[ext_yahoo_got_picture] We just reuploaded! Stop screwing with Yahoo FT. "));
-
- // don't leak stuff
- db_free(&dbv);
-
- break;
- }*/
-
- LOG(("[ext_yahoo_got_picture] Buddy: %s told us this is bad??Expired??. Re-uploading", who));
- delSetting("AvatarURL");
-
- if (!getWString("AvatarFile", &dbv2)) {
- setString("AvatarInv", who);
- SendAvatar(dbv2.ptszVal);
- db_free(&dbv2);
- }
- else {
- LOG(("[ext_yahoo_got_picture] No Local Avatar File??? "));
- }
- }
- else {
- LOG(("[ext_yahoo_got_picture] URL doesn't match? Tell them the right thing!!!"));
- yahoo_send_picture_info(m_id, who, 2, dbv.pszVal, mcksum);
- }
- // don't leak stuff
- db_free(&dbv);
- }
- else {
- LOG(("[ext_yahoo_got_picture] no AvatarURL?"));
- }
- }
- break;
- default:
- LOG(("[ext_yahoo_got_picture] Unknown request/packet type exiting!"));
- }
-
- LOG(("ext_yahoo_got_picture exiting"));
-}
-
-void CYahooProto::ext_got_picture_checksum(const char*, const char *who, int cksum)
-{
- LOG(("ext_yahoo_got_picture_checksum for %s checksum: %d", who, cksum));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL) {
- LOG(("Buddy Not Found. Skipping avatar update"));
- return;
- }
-
- /* Last thing check the checksum and request new one if we need to */
- if (!cksum || cksum == -1) {
- setDword(hContact, "PictCK", 0);
- reset_avatar(hContact);
- }
- else {
- if (getDword(hContact, "PictCK", 0) != cksum) {
- // Now save the new checksum. No rush requesting new avatar yet.
- setDword(hContact, "PictCK", cksum);
-
- // Need to delete the Avatar File!!
- wchar_t szFile[MAX_PATH];
- GetAvatarFileName(hContact, szFile, _countof(szFile) - 1, 0);
- DeleteFile(szFile);
-
- // Reset the avatar and cleanup.
- reset_avatar(hContact);
-
- // Request new avatar here... (might also want to check the sharing status?)
-
- if (getByte("ShareAvatar", 0) == 2)
- request_avatar(who);
- }
- }
-}
-
-void CYahooProto::ext_got_picture_update(const char*, const char *who, int buddy_icon)
-{
- LOG(("ext_got_picture_update for %s buddy_icon: %d", who, buddy_icon));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL) {
- LOG(("Buddy Not Found. Skipping avatar update"));
- return;
- }
-
- setByte(hContact, "AvatarType", buddy_icon);
-
- /* Last thing check the checksum and request new one if we need to */
- reset_avatar(hContact);
-}
-
-void CYahooProto::ext_got_picture_status(const char*, const char *who, int buddy_icon)
-{
- MCONTACT hContact = 0;
-
- LOG(("ext_yahoo_got_picture_status for %s buddy_icon: %d", who, buddy_icon));
-
- hContact = getbuddyH(who);
- if (hContact == NULL) {
- LOG(("Buddy Not Found. Skipping avatar update"));
- return;
- }
-
- setByte(hContact, "AvatarType", buddy_icon);
-
- /* Last thing check the checksum and request new one if we need to */
- reset_avatar(hContact);
-}
-
-void CYahooProto::ext_got_picture_upload(const char*, const char *url, unsigned int ts)
-{
- int cksum = 0;
- DBVARIANT dbv;
-
- LOG(("[ext_yahoo_got_picture_upload] url: %s timestamp: %d", url, ts));
-
- if (!url) {
- LOG(("[ext_yahoo_got_picture_upload] Problem with upload?"));
- return;
- }
-
-
- cksum = getDword("TMPAvatarHash", 0);
- if (cksum != 0) {
- LOG(("[ext_yahoo_got_picture_upload] Updating Checksum to: %d", cksum));
- setDword("AvatarHash", cksum);
- delSetting("TMPAvatarHash");
-
- // This is only meant for message sessions, but we don't got those in miranda yet
- //YAHOO_bcast_picture_checksum(cksum);
- yahoo_send_picture_checksum(m_id, NULL, cksum);
-
- // need to tell the stupid Yahoo that our icon updated
- //YAHOO_bcast_picture_update(2);
- }
- else
- cksum = getDword("AvatarHash", 0);
-
- setString("AvatarURL", url);
- //YAHOO_SetDword("AvatarExpires", ts);
-
- if (!getString("AvatarInv", &dbv)) {
- LOG(("[ext_yahoo_got_picture_upload] Buddy: %s told us this is bad??", dbv.pszVal));
-
- LOG(("[ext_yahoo_got_picture] Sending url: %s checksum: %d to '%s'!", url, cksum, dbv.pszVal));
- //void yahoo_send_picture_info(int id, const char *me, const char *who, const char *pic_url, int cksum)
- yahoo_send_picture_info(m_id, dbv.pszVal, 2, url, cksum);
-
- delSetting("AvatarInv");
- db_free(&dbv);
- }
-}
-
-void CYahooProto::ext_got_avatar_share(int buddy_icon)
-{
- LOG(("[ext_yahoo_got_avatar_share] buddy icon: %d", buddy_icon));
-
- setByte("ShareAvatar", buddy_icon);
-}
-
-void CYahooProto::reset_avatar(MCONTACT hContact)
-{
- LOG(("[YAHOO_RESET_AVATAR]"));
-
- ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
-}
-
-void CYahooProto::request_avatar(const char* who)
-{
- if (!getByte("ShowAvatars", 1)) {
- LOG(("Avatars disabled, but available for: %s", who));
- return;
- }
-
- MCONTACT hContact = getbuddyH(who);
-
- if (!hContact)
- return;
-
- time_t cur_time;
- time(&cur_time);
- time_t last_chk = getDword(hContact, "PictLastCheck", 0);
-
- /*
- * time() - in seconds ( 60*60 = 1 hour)
- */
- if (getDword(hContact, "PictCK", 0) == 0 || last_chk == 0 || (cur_time - last_chk) > 60) {
- setDword(hContact, "PictLastCheck", (DWORD)cur_time);
- LOG(("Requesting Avatar for: %s", who));
- yahoo_request_buddy_avatar(m_id, who);
- }
- else LOG(("Avatar Not Available for: %s Last Check: %ld Current: %ld (Flood Check in Effect)", who, last_chk, cur_time));
-}
-
-void CYahooProto::GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, int cbLen, int type)
-{
- int tPathLen = mir_snwprintf(pszDest, cbLen, L"%s\\%S", VARSW(L"%miranda_avatarcache%"), m_szModuleName);
-
- if (_waccess(pszDest, 0))
- CreateDirectoryTreeW(pszDest);
-
- if (hContact != NULL) {
- int ck_sum = getDword(hContact, "PictCK", 0);
- tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%lX", ck_sum);
- }
- else
- tPathLen += mir_snwprintf(pszDest + tPathLen, cbLen - tPathLen, L"\\%S avatar", m_szModuleName);
-
- wcsncpy_s((pszDest + tPathLen), (cbLen - tPathLen), (type == 1 ? L".swf" : L".png"), _TRUNCATE);
-}
-
-INT_PTR __cdecl CYahooProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam)
-{
- PROTO_AVATAR_INFORMATION* pai = (PROTO_AVATAR_INFORMATION*)lParam;
- DBVARIANT dbv;
- int avtType;
-
- if (!getString(pai->hContact, YAHOO_LOGINID, &dbv)) {
- debugLogA("[YAHOO_GETAVATARINFO] For: %s", dbv.pszVal);
- db_free(&dbv);
- }
- else {
- debugLogA("[YAHOO_GETAVATARINFO]");
- }
-
- if (!getByte("ShowAvatars", 1) || !m_bLoggedIn) {
- debugLogA("[YAHOO_GETAVATARINFO] %s", m_bLoggedIn ? "We are not using/showing avatars!" : "We are not logged in. Can't load avatars now!");
-
- return GAIR_NOAVATAR;
- }
-
- avtType = getByte(pai->hContact, "AvatarType", 0);
- debugLogA("[YAHOO_GETAVATARINFO] Avatar Type: %d", avtType);
-
- if (avtType != 2) {
- if (avtType != 0)
- debugLogA("[YAHOO_GETAVATARINFO] Not handling this type yet!");
-
- return GAIR_NOAVATAR;
- }
-
- if (getDword(pai->hContact, "PictCK", 0) == 0)
- return GAIR_NOAVATAR;
-
- GetAvatarFileName(pai->hContact, pai->filename, _countof(pai->filename), getByte(pai->hContact, "AvatarType", 0));
- pai->format = PA_FORMAT_PNG;
- debugLogA("[YAHOO_GETAVATARINFO] filename: %s", pai->filename);
-
- if (_waccess(pai->filename, 0) == 0)
- return GAIR_SUCCESS;
-
- if ((wParam & GAIF_FORCE) != 0 && pai->hContact != NULL) {
- /* need to request it again? */
- if (getDword(pai->hContact, "PictLoading", 0) != 0 &&
- (time(NULL) - getDword(pai->hContact, "PictLastCheck", 0) < 500)) {
- debugLogA("[YAHOO_GETAVATARINFO] Waiting for avatar to load!");
- return GAIR_WAITFOR;
- }
- else if (m_bLoggedIn) {
- ptrA szId(getStringA(pai->hContact, YAHOO_LOGINID));
- if (szId != NULL) {
- debugLogA("[YAHOO_GETAVATARINFO] Requesting avatar!");
- request_avatar(szId);
- return GAIR_WAITFOR;
- }
- else debugLogA("[YAHOO_GETAVATARINFO] Can't retrieve user id?!");
- }
- }
-
- debugLogA("[YAHOO_GETAVATARINFO] NO AVATAR???");
- return GAIR_NOAVATAR;
-}
-
-/*
- * --=[ AVS / LoadAvatars API/Services ]=--
- */
-INT_PTR __cdecl CYahooProto::GetAvatarCaps(WPARAM wParam, LPARAM lParam)
-{
- int res = 0;
-
- switch (wParam) {
- case AF_MAXSIZE:
- LOG(("[YahooGetAvatarCaps] AF_MAXSIZE"));
-
- ((POINT*)lParam)->x = 96;
- ((POINT*)lParam)->y = 96;
-
- break;
-
- case AF_PROPORTION:
- LOG(("[YahooGetAvatarCaps] AF_PROPORTION"));
-
- res = PIP_NONE;
- break;
-
- case AF_FORMATSUPPORTED:
- LOG(("[YahooGetAvatarCaps] AF_FORMATSUPPORTED"));
- res = lParam == PA_FORMAT_PNG;
- break;
-
- case AF_ENABLED:
- LOG(("[YahooGetAvatarCaps] AF_ENABLED"));
-
- res = (getByte("ShowAvatars", 1)) ? 1 : 0;
- break;
-
- case AF_DONTNEEDDELAYS:
- res = 1; /* don't need to delay avatar loading */
- break;
-
- case AF_MAXFILESIZE:
- res = 0; /* no max filesize for now */
- break;
-
- case AF_DELAYAFTERFAIL:
- res = 15 * 60 * 1000; /* 15 mins */
- break;
-
- default:
- LOG(("[YahooGetAvatarCaps] Unknown: %d", wParam));
- }
-
- return res;
-}
-
-/*
-Service: /GetMyAvatar
-wParam=(char *)Buffer to file name
-lParam=(int)Buffer size
-return=0 on success, else on error
-*/
-INT_PTR __cdecl CYahooProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
-{
- wchar_t *buffer = (wchar_t*)wParam;
- int size = (int)lParam;
-
- debugLogA("[YahooGetMyAvatar]");
-
- if (buffer == NULL || size <= 0)
- return -1;
-
- if (!getByte("ShowAvatars", 1))
- return -2;
-
- DBVARIANT dbv;
- int ret = -3;
-
- if (getDword("AvatarHash", 0)) {
- if (!getWString("AvatarFile", &dbv)) {
- if (_waccess(dbv.ptszVal, 0) == 0) {
- mir_wstrncpy(buffer, dbv.ptszVal, size - 1);
- buffer[size - 1] = '\0';
-
- ret = 0;
- }
- db_free(&dbv);
- }
- }
-
- return ret;
-}
-
-/*
-#define PS_SETMYAVATAR "/SetMyAvatar"
-wParam=0
-lParam=(const char *)Avatar file name
-return=0 for sucess
-*/
-
-INT_PTR __cdecl CYahooProto::SetMyAvatar(WPARAM, LPARAM lParam)
-{
- wchar_t* tszFile = (wchar_t*)lParam;
- wchar_t tszMyFile[MAX_PATH + 1];
-
- GetAvatarFileName(NULL, tszMyFile, MAX_PATH, 2);
-
- if (tszFile == NULL) {
- debugLogA("[Deleting Avatar Info]");
-
- /* remove ALL our Avatar Info Keys */
- delSetting("AvatarFile");
- delSetting("AvatarHash");
- delSetting("AvatarURL");
- delSetting("AvatarTS");
-
- /* Send a Yahoo packet saying we don't got an avatar anymore */
- yahoo_send_picture_status(m_id, 0);
-
- setByte("ShareAvatar", 0);
-
- DeleteFile(tszMyFile);
- }
- else {
- HANDLE hFile = CreateFile(tszFile,
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
- 0);
-
- if (hFile == INVALID_HANDLE_VALUE)
- return 1;
-
- DWORD dwPngSize = GetFileSize(hFile, NULL);
- BYTE *pResult = (BYTE*)malloc(dwPngSize);
- if (pResult == NULL) {
- CloseHandle(hFile);
- return 2;
- }
-
- DWORD dw;
- ReadFile(hFile, pResult, dwPngSize, &dw, NULL);
- CloseHandle(hFile);
-
- hFile = CreateFile(tszMyFile,
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL,
- OPEN_ALWAYS,
- FILE_ATTRIBUTE_NORMAL, 0);
- if (hFile == INVALID_HANDLE_VALUE)
- return 1;
-
- WriteFile(hFile, pResult, dwPngSize, &dw, NULL);
- SetEndOfFile(hFile);
- CloseHandle(hFile);
-
- unsigned int hash = YAHOO_avt_hash((const char*)pResult, dwPngSize);
- free(pResult);
-
- if (hash) {
- LOG(("[YAHOO_SetAvatar] File: '%s' CK: %d", tszMyFile, hash));
-
- /* now check and make sure we don't reupload same thing over again */
- if (hash != getDword("AvatarHash", 0)) {
- setWString("AvatarFile", tszMyFile);
- setDword("TMPAvatarHash", hash);
-
- /* Set Sharing to ON if it's OFF */
- if (getByte("ShareAvatar", 0) != 2) {
- setByte("ShareAvatar", 2);
- yahoo_send_picture_status(m_id, 2);
- }
-
- SendAvatar(tszMyFile);
- }
- else LOG(("[YAHOO_SetAvatar] Same checksum and avatar on YahooFT. Not Reuploading."));
- }
- }
-
- return 0;
-}
diff --git a/tools/_deprecated/Yahoo/src/avatar.h b/tools/_deprecated/Yahoo/src/avatar.h deleted file mode 100644 index 57bf6e6e8f..0000000000 --- a/tools/_deprecated/Yahoo/src/avatar.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * $Id: avatar.h 8461 2008-10-23 14:39:20Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_AVATAR_H_
-#define _YAHOO_AVATAR_H_
-
-#include <m_avatars.h>
-
-void YAHOO_request_avatar(const char* who); -void GetAvatarFileName(HANDLE hContact, char* pszDest, int cbLen, int type);
- -void YAHOO_SendAvatar(const char *szFile);
- -void YAHOO_set_avatar(int buddy_icon);
- -int YAHOO_SaveBitmapAsAvatar( HBITMAP hBitmap, const char* szFileName );
- -HBITMAP YAHOO_StretchBitmap( HBITMAP hBitmap );
-
-void yahoo_reset_avatar(HANDLE hContact);
- -HBITMAP YAHOO_SetAvatar(const char *szFile); -
-void YAHOO_get_avatar(const char *who, const char *pic_url, long cksum);
-
-/**
- * AVS Services - loadavatars.dll uses these to get the info from us
- */
-int YahooGetAvatarCaps(WPARAM wParam, LPARAM lParam);
-
-int YahooGetAvatarInfo(WPARAM wParam,LPARAM lParam);
-
-int YahooGetMyAvatar(WPARAM wParam, LPARAM lParam);
-
-int YahooSetMyAvatar(WPARAM wParam, LPARAM lParam);
-
-/**
- * Callbacks for libyahoo2
- */
-void ext_yahoo_got_picture(int id, const char *me, const char *who, const char *pic_url, int cksum, int type);
-
-void ext_yahoo_got_picture_checksum(int id, const char *me, const char *who, int cksum);
-
-void ext_yahoo_got_picture_update(int id, const char *me, const char *who, int buddy_icon);
-
-void ext_yahoo_got_picture_status(int id, const char *me, const char *who, int buddy_icon);
-
-void ext_yahoo_got_picture_upload(int id, const char *me, const char *url,unsigned int ts);
-
-void ext_yahoo_got_avatar_share(int id, int buddy_icon);
-#endif
diff --git a/tools/_deprecated/Yahoo/src/chat.cpp b/tools/_deprecated/Yahoo/src/chat.cpp deleted file mode 100644 index afb1fafd94..0000000000 --- a/tools/_deprecated/Yahoo/src/chat.cpp +++ /dev/null @@ -1,595 +0,0 @@ -/*
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- * Boris Krasnovskiy (aka borkra)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-#include "resource.h"
-#include <m_protosvc.h>
-#include <m_langpack.h>
-#include <m_message.h>
-#include <m_chat.h>
-#include <m_userinfo.h>
-#include <m_history.h>
-
-struct InviteChatParam
-{
- char* room;
- CYahooProto* ppro;
-
-
- InviteChatParam(const char* room, CYahooProto* ppro)
- : room(strdup(room)), ppro(ppro) {}
-
- ~InviteChatParam()
- { free(room); }
-};
-
-struct InviteChatReqParam
-{
- char* room;
- char* who;
- wchar_t* msg;
- CYahooProto* ppro;
-
- InviteChatReqParam(const char* room, const char* who, const char* msg, CYahooProto* ppro)
- : room(mir_strdup(room)), who(mir_strdup(who)), msg(mir_utf8decodeW(msg)), ppro(ppro) {}
-
- ~InviteChatReqParam()
- { mir_free(room); mir_free(who); mir_free(msg); }
-};
-
-INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-
-void ext_yahoo_conf_userdecline(int id, const char*, const char *who, const char *room, const char *msg)
-{
- wchar_t info[1024];
- wchar_t *whot = mir_utf8decodeW(who);
- wchar_t *msgt = mir_utf8decodeW(msg);
- mir_snwprintf(info, TranslateT("%s denied invitation with message: %s"), whot, msgt ? msgt : L"");
- GETPROTOBYID(id)->ChatEvent(room, who, GC_EVENT_INFORMATION, info);
- mir_free(msgt);
- mir_free(whot);
-}
-
-void ext_yahoo_conf_userjoin(int id, const char*, const char *who, const char *room)
-{
- CYahooProto* ppro = getProtoById(id);
- if (!ppro) return;
-
- CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
- if (!cm) return;
- for (YList *l = cm->members; l; l = l->next) {
- if (!mir_strcmp(who, (char*)l->data))
- return;
- }
-
- cm->members = y_list_append(cm->members, strdup(who));
- ppro->ChatEvent(room, who, GC_EVENT_JOIN);
-}
-
-void ext_yahoo_conf_userleave(int id, const char*, const char *who, const char *room)
-{
- CYahooProto* ppro = getProtoById(id);
- if (!ppro) return;
-
- CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
- if (!cm) return;
-
- for (YList *l = cm->members; l; l = l->next) {
- if (mir_strcmp((char*)l->data, who) == 0) {
- free(l->data);
- y_list_remove_link(cm->members, l);
- y_list_free_1(l);
- break;
- }
- }
-
- ppro->ChatEvent(room, who, GC_EVENT_PART);
-}
-
-void ext_yahoo_conf_message(int id, const char*, const char *who, const char *room, const char *msg, int utf8)
-{
- wchar_t *msgt = utf8 ? mir_utf8decodeW(msg) : mir_a2u(msg);
- GETPROTOBYID(id)->ChatEvent(room, who, GC_EVENT_MESSAGE, msgt);
- mir_free(msgt);
-}
-
-/* chat handlers */
-void ext_yahoo_chat_cat_xml(int, const char*)
-{}
-
-void ext_yahoo_chat_join(int, const char*, const char*, const char*, YList *members, INT_PTR)
-{
- for (YList *l = members; l; l = l->next) free(l->data);
- y_list_free(members);
-}
-
-void ext_yahoo_chat_userjoin(int, const char*, const char*, yahoo_chat_member*)
-{}
-
-void ext_yahoo_chat_userleave(int, const char*, const char*, const char*)
-{}
-
-void ext_yahoo_chat_message(int, const char*, const char*, const char*, const char*, int, int)
-{}
-
-void ext_yahoo_chat_yahoologout(int, const char*)
-{
- LOG(("got chat logout"));
-}
-
-void ext_yahoo_chat_yahooerror(int, const char*)
-{
- LOG(("got chat error"));
-}
-
-static const COLORREF crCols[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
-
-void CYahooProto::ChatRegister(void)
-{
- GCREGISTER gcr = {};
- gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR;
- gcr.nColors = 16;
- gcr.pColors = (COLORREF*)crCols;
- gcr.ptszDispName = m_tszUserName;
- gcr.pszModule = m_szModuleName;
- Chat_Register(&gcr);
-
- HookProtoEvent(ME_GC_EVENT, &CYahooProto::OnGCEventHook);
- HookProtoEvent(ME_GC_BUILDMENU, &CYahooProto::OnGCMenuHook);
-}
-
-void CYahooProto::ChatStart(const char* room)
-{
- ptrW idt(mir_a2u(room));
- Chat_NewSession(GCW_CHATROOM, m_szModuleName, idt, idt);
-
- Chat_AddGroup(m_szModuleName, idt, TranslateT("Me"));
- Chat_AddGroup(m_szModuleName, idt, TranslateT("Others"));
-
- Chat_Control(m_szModuleName, idt, SESSION_INITDONE);
- Chat_Control(m_szModuleName, idt, SESSION_ONLINE);
- Chat_Control(m_szModuleName, idt, WINDOW_VISIBLE);
-}
-
-void CYahooProto::ChatLeave(const char* room)
-{
- ptrW idt(mir_a2u(room));
- Chat_Control(m_szModuleName, idt, SESSION_OFFLINE);
- Chat_Terminate(m_szModuleName, idt, true);
-}
-
-void CYahooProto::ChatLeaveAll(void)
-{
- for (int i = 0; i < m_chatrooms.getCount(); ++i)
- ChatLeave(m_chatrooms[i].name);
-}
-
-void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const wchar_t* msg)
-{
- wchar_t* idt = mir_a2u(room);
- wchar_t* snt = mir_a2u(who);
-
- MCONTACT hContact = getbuddyH(who);
- wchar_t* nick = hContact ? (wchar_t*)pcli->pfnGetContactDisplayName(WPARAM(hContact), 0) : snt;
-
- GCDEST gcd = { m_szModuleName, idt, evt };
- GCEVENT gce = { &gcd };
- gce.dwFlags = GCEF_ADDTOLOG;
- gce.ptszNick = nick;
- gce.ptszUID = snt;
- gce.bIsMe = _stricmp(who, m_yahoo_id) == 0;
- gce.ptszStatus = gce.bIsMe ? TranslateT("Me") : TranslateT("Others");
- gce.ptszText = msg;
- gce.time = time(NULL);
- Chat_Event(&gce);
-
- mir_free(snt);
- mir_free(idt);
-}
-
-int __cdecl CYahooProto::OnGCEventHook(WPARAM, LPARAM lParam)
-{
- GCHOOK *gch = (GCHOOK*)lParam;
- if (!gch) return 1;
-
- if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0;
-
- char *room = mir_u2a(gch->pDest->ptszID);
- char *who = mir_u2a(gch->ptszUID);
-
- switch (gch->pDest->iType) {
- case GC_SESSION_TERMINATE:
- {
- ChatRoom *cm = m_chatrooms.find((ChatRoom*)&room);
- if (cm) {
- yahoo_conference_logoff(m_id, NULL, cm->members, room);
- m_chatrooms.remove((ChatRoom*)&room);
- }
- }
- break;
-
- case GC_USER_MESSAGE:
- if (gch->ptszText && gch->ptszText[0]) {
- ChatRoom *cm = m_chatrooms.find((ChatRoom*)&room);
- if (cm)
- yahoo_conference_message(m_id, NULL, cm->members, room, T2Utf(gch->ptszText), 1);
- }
- break;
-
- case GC_USER_CHANMGR:
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
- LPARAM(new InviteChatParam(room, this)));
- break;
-
- case GC_USER_PRIVMESS:
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)getbuddyH(who));
- break;
-
- case GC_USER_LOGMENU:
- switch (gch->dwData) {
- case 10:
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL, InviteToChatDialog,
- LPARAM(new InviteChatParam(room, this)));
- break;
-
- case 20:
- ChatLeave(room);
- break;
- }
- break;
-
- case GC_USER_NICKLISTMENU:
- switch (gch->dwData) {
- case 10:
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)getbuddyH(who));
- break;
-
- case 20:
- CallService(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)getbuddyH(who));
- break;
-
- case 110:
- ChatLeave(room);
- break;
- }
- break;
-
- case GC_USER_TYPNOTIFY:
- break;
- }
- mir_free(who);
- mir_free(room);
-
- return 0;
-}
-
-int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam)
-{
- GCMENUITEMS *gcmi = (GCMENUITEMS*)lParam;
-
- if (gcmi == NULL || _stricmp(gcmi->pszModule, m_szModuleName)) return 0;
-
- if (gcmi->Type == MENU_ON_LOG) {
- static const gc_item Items[] =
- {
- { TranslateT("&Invite user..."), 10, MENU_ITEM, FALSE },
- { TranslateT("&Leave chat session"), 20, MENU_ITEM, FALSE }
- };
- gcmi->nItems = _countof(Items);
- gcmi->Item = (gc_item*)Items;
- }
- else if (gcmi->Type == MENU_ON_NICKLIST) {
- char* id = mir_u2a(gcmi->pszUID);
- if (!_stricmp(m_yahoo_id, id)) {
- static const gc_item Items[] =
- {
- { TranslateT("User &details"), 10, MENU_ITEM, FALSE },
- { TranslateT("User &history"), 20, MENU_ITEM, FALSE },
- { L"", 100, MENU_SEPARATOR, FALSE },
- { TranslateT("&Leave chat session"), 110, MENU_ITEM, FALSE }
- };
- gcmi->nItems = _countof(Items);
- gcmi->Item = (gc_item*)Items;
- }
- else {
- static const gc_item Items[] =
- {
- { TranslateT("User &details"), 10, MENU_ITEM, FALSE },
- { TranslateT("User &history"), 20, MENU_ITEM, FALSE }
- };
- gcmi->nItems = _countof(Items);
- gcmi->Item = (gc_item*)Items;
- }
- mir_free(id);
- }
-
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Invite to chat dialog
-
-static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, char* room, CYahooProto* ppro, wchar_t *msg)
-{
- bool root = !hItem;
- if (root)
- hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
-
- while (hItem) {
- if (IsHContactGroup(hItem)) {
- MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
- if (hItemT)
- clist_chat_invite_send(hItemT, hwndList, who, room, ppro, msg);
- }
- else {
- int chk = SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
- if (chk) {
- if (IsHContactInfo(hItem)) {
- wchar_t buf[128] = L"";
- SendMessage(hwndList, CLM_GETITEMTEXT, (WPARAM)hItem, (LPARAM)buf);
-
- who = y_list_append(who, mir_u2a(buf));
- }
- else {
- DBVARIANT dbv;
- if (!ppro->getString(hItem, YAHOO_LOGINID, &dbv))
- who = y_list_append(who, dbv.pszVal);
- }
- }
- }
- hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
- }
-
- if (root && who) {
- T2Utf msg8(msg);
- CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
- if (cm) {
- for (YList *l = who; l; l = l->next)
- yahoo_conference_addinvite(ppro->m_id, NULL, (char*)l->data, room, cm->members, msg8);
- }
- else yahoo_conference_invite(ppro->m_id, NULL, who, room, msg8);
-
- for (YList *l = who; l; l = l->next) mir_free(l->data);
- y_list_free(who);
- }
-}
-
-static void ClistValidateContact(MCONTACT hItem, HWND hwndList, CYahooProto* ppro)
-{
- if (!ppro->IsMyContact(hItem) || ppro->isChatRoom(hItem) ||
- ppro->getWord(hItem, "Status", ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE)
- SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
-}
-
-static void ClistChatPrepare(MCONTACT hItem, HWND hwndList, CYahooProto* ppro)
-{
- if (hItem == NULL)
- hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
-
- while (hItem) {
- MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
-
- if (IsHContactGroup(hItem)) {
- MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
- if (hItemT)
- ClistChatPrepare(hItemT, hwndList, ppro);
- }
- else if (IsHContactContact(hItem))
- ClistValidateContact(hItem, hwndList, ppro);
-
- hItem = hItemN;
- }
-}
-
-INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- InviteChatParam* param = (InviteChatParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (uMsg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- param = (InviteChatParam*)lParam;
-
- Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(IDI_YAHOO));
-
- SetDlgItemTextA(hwndDlg, IDC_ROOMNAME, param->room);
- SetDlgItemText(hwndDlg, IDC_MSG, TranslateT("Join My Conference..."));
- break;
-
- case WM_CLOSE:
- EndDialog(hwndDlg, 0);
- break;
-
- case WM_NCDESTROY:
- Window_FreeIcon_IcoLib(hwndDlg);
- delete param;
- break;
-
- case WM_NOTIFY:
- {
- NMCLISTCONTROL* nmc = (NMCLISTCONTROL*)lParam;
- if (nmc->hdr.idFrom == IDC_CCLIST) {
- switch (nmc->hdr.code) {
- case CLN_NEWCONTACT:
- if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- ClistValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
- break;
-
- case CLN_LISTREBUILT:
- if (param)
- ClistChatPrepare(NULL, nmc->hdr.hwndFrom, param->ppro);
- break;
- }
- }
- }
- break;
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam)) {
- case IDC_ADDSCR:
- if (param->ppro->m_bLoggedIn) {
- wchar_t sn[64];
- GetDlgItemText(hwndDlg, IDC_EDITSCR, sn, _countof(sn));
-
- CLCINFOITEM cii = { 0 };
- cii.cbSize = sizeof(cii);
- cii.flags = CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS;
- cii.pszText = sn;
-
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CCLIST, CLM_ADDINFOITEM, 0, (LPARAM)&cii);
- SendDlgItemMessage(hwndDlg, IDC_CCLIST, CLM_SETCHECKMARK, (LPARAM)hItem, 1);
- }
- break;
-
- case IDOK:
- {
- wchar_t msg[1024];
- GetDlgItemText(hwndDlg, IDC_MSG, msg, _countof(msg));
-
- HWND hwndList = GetDlgItem(hwndDlg, IDC_CCLIST);
- YList *who = NULL;
- clist_chat_invite_send(NULL, hwndList, who, param->room, param->ppro, msg);
-
- EndDialog(hwndDlg, IDOK);
- PostMessage(hwndDlg, WM_DESTROY, 0, 0);
- }
- break;
-
- case IDCANCEL:
- EndDialog(hwndDlg, IDCANCEL);
- PostMessage(hwndDlg, WM_DESTROY, 0, 0);
- break;
- }
- }
- break;
- }
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Chat request dialog
-
-INT_PTR CALLBACK ChatRequestDialog(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- InviteChatReqParam* param = (InviteChatReqParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (uMsg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- param = (InviteChatReqParam*)lParam;
-
- Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(IDI_YAHOO));
-
- SetDlgItemTextA(hwndDlg, IDC_SCREENNAME, param->who);
- SetDlgItemText(hwndDlg, IDC_MSG, param->msg);
- SetDlgItemText(hwndDlg, IDC_MSG2, TranslateT("No, thank you..."));
- break;
-
- case WM_CLOSE:
- DestroyWindow(hwndDlg);
- break;
-
- case WM_NCDESTROY:
- Window_FreeIcon_IcoLib(hwndDlg);
- delete param;
- break;
-
- case WM_COMMAND:
- {
- CYahooProto::ChatRoom *cm = param->ppro->m_chatrooms.find((CYahooProto::ChatRoom*)¶m->room);
- switch (LOWORD(wParam)) {
- case IDOK:
- if (cm) {
- param->ppro->ChatStart(param->room);
-
- for (YList *l = cm->members; l; l = l->next)
- param->ppro->ChatEvent(param->room, (char*)l->data, GC_EVENT_JOIN);
-
- yahoo_conference_logon(param->ppro->m_id, NULL, cm->members, param->room);
- }
- DestroyWindow(hwndDlg);
- break;
-
- case IDCANCEL:
- if (cm) {
- wchar_t msg[1024];
- GetDlgItemText(hwndDlg, IDC_MSG2, msg, _countof(msg));
- yahoo_conference_decline(param->ppro->m_id, NULL, cm->members, param->room, T2Utf(msg));
-
- param->ppro->m_chatrooms.remove((CYahooProto::ChatRoom*)¶m->room);
- }
- DestroyWindow(hwndDlg);
- break;
- }
- }
- break;
- }
- return FALSE;
-}
-
-INT_PTR __cdecl CYahooProto::CreateConference(WPARAM /*wParam*/, LPARAM /*lParam*/)
-{
- char room[128];
- mir_snprintf(room, "%s-%u", m_yahoo_id, time(NULL));
-
- InviteChatParam* param = new InviteChatParam(room, this);
- DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE), NULL,
- InviteToChatDialog, LPARAM(param));
- return 0;
-}
-
-void CALLBACK ConferenceRequestCB(PVOID pParam)
-{
- CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_CHATROOM_INVITE_REQ), NULL, ChatRequestDialog, (LPARAM)pParam);
-}
-
-/* Conference handlers */
-void ext_yahoo_got_conf_invite(int id, const char *me, const char *who, const char *room, const char *msg, YList *members)
-{
- char z[1024];
- mir_snprintf(z, Translate("[miranda] Got conference invite to room: %s with msg: %s"), room ? room : "", msg ? msg : "");
- LOG(("[ext_yahoo_got_conf_invite] %s", z));
-
- CYahooProto* ppro = getProtoById(id);
- if (!ppro) return;
-
- bool freeList = true;
- CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
- if (!cm) {
- if (mir_strcmp(who, me)) {
- cm = new CYahooProto::ChatRoom(room, members);
- ppro->m_chatrooms.insert(cm);
-
- InviteChatReqParam* req = new InviteChatReqParam(room, who, msg, ppro);
- CallFunctionAsync(ConferenceRequestCB, req);
- freeList = false;
- }
- else {
- cm = new CYahooProto::ChatRoom(room, NULL);
- ppro->m_chatrooms.insert(cm);
- ppro->ChatStart(room);
-
- yahoo_conference_logon(id, NULL, members, room);
- }
- }
-
- if (freeList) {
- for (YList *l = members; l; l = l->next) free(l->data);
- y_list_free(members);
- }
-}
diff --git a/tools/_deprecated/Yahoo/src/chat.h b/tools/_deprecated/Yahoo/src/chat.h deleted file mode 100644 index 87d8cf3028..0000000000 --- a/tools/_deprecated/Yahoo/src/chat.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * $Id: chat.h 9334 2009-04-04 21:56:36Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_CHAT_H_
-#define _YAHOO_CHAT_H_
-
-/* Conference handlers */
-void ext_yahoo_got_conf_invite(int id, const char *me, const char *who, const char *room, const char *msg, YList *members);
-
-void ext_yahoo_conf_userdecline(int id, const char *me, const char *who, const char *room, const char *msg);
-
-void ext_yahoo_conf_userjoin(int id, const char *me, const char *who, const char *room);
-
-void ext_yahoo_conf_userleave(int id, const char *me, const char *who, const char *room);
-
-void ext_yahoo_conf_message(int id, const char *me, const char *who, const char *room, const char *msg, int utf8);
-
-/* chat handlers */
-void ext_yahoo_chat_cat_xml(int id, const char *xml);
-
-void ext_yahoo_chat_join(int id, const char *me, const char *room, const char * topic, YList *members, INT_PTR fd);
-
-void ext_yahoo_chat_userjoin(int id, const char *me, const char *room, struct yahoo_chat_member *who);
-
-void ext_yahoo_chat_userleave(int id, const char *me, const char *room, const char *who);
-
-void ext_yahoo_chat_message(int id, const char *me, const char *who, const char *room, const char *msg, int msgtype, int utf8);
-
-void ext_yahoo_chat_yahoologout(int id, const char *me);
-
-void ext_yahoo_chat_yahooerror(int id, const char *me);
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/file_transfer.cpp b/tools/_deprecated/Yahoo/src/file_transfer.cpp deleted file mode 100644 index 099c78235c..0000000000 --- a/tools/_deprecated/Yahoo/src/file_transfer.cpp +++ /dev/null @@ -1,821 +0,0 @@ -/*
-* $Id: file_transfer.cpp 13893 2011-10-23 19:29:28Z borkra $
-*
-* myYahoo Miranda Plugin
-*
-* Authors: Gennady Feldman (aka Gena01)
-* Laurent Marechal (aka Peorth)
-*
-* This code is under GPL and is based on AIM, MSN and Miranda source code.
-* I want to thank Robert Rainwater and George Hazan for their code and support
-* and for answering some of my questions during development of this plugin.
-*/
-
-#include <time.h>
-#include <sys/stat.h>
-
-#include "stdafx.h"
-#include <m_protosvc.h>
-#include "file_transfer.h"
-
-YList *file_transfers = NULL;
-
-static y_filetransfer* new_ft(CYahooProto* ppro, int id, MCONTACT hContact, const char *who, const char *msg,
- const char *url, const char *ft_token, int y7, YList *fs, int sending)
-{
- LOG(("[new_ft] id: %d, who: %s, msg: %s, ft_token: %s, y7: %d, sending: %d", id, who, msg, ft_token, y7, sending));
-
- y_filetransfer* ft = (y_filetransfer*)calloc(1, sizeof(y_filetransfer));
- ft->ppro = ppro;
- ft->id = id;
- ft->who = strdup(who);
- ft->hWaitEvent = INVALID_HANDLE_VALUE;
-
- ft->hContact = hContact;
- ft->files = fs;
-
- ft->url = (url == NULL) ? NULL : strdup(url);
- ft->ftoken = (ft_token == NULL) ? NULL : strdup(ft_token);
- ft->msg = (msg != NULL) ? strdup(msg) : strdup("[no description given]");
-
- ft->cancel = 0;
- ft->y7 = y7;
-
- ft->hWaitEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
-
- ft->pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- ft->pfts.hContact = hContact;
- ft->pfts.flags = PFTS_UNICODE;
- ft->pfts.flags |= (sending != 0) ? PFTS_SENDING : PFTS_RECEIVING;
-
- ft->pfts.tszWorkingDir = NULL;
- ft->pfts.currentFileTime = 0;
-
- ft->pfts.totalFiles = y_list_length(fs);
-
- ft->pfts.ptszFiles = (wchar_t**)mir_calloc(ft->pfts.totalFiles * sizeof(wchar_t *));
- ft->pfts.totalBytes = 0;
-
- int i = 0;
- for (YList *l = fs; l; l = l->next) {
- yahoo_file_info *fi = (yahoo_file_info*)l->data;
-
- ft->pfts.ptszFiles[i++] = mir_utf8decodeW(fi->filename);
- ft->pfts.totalBytes += fi->filesize;
- }
-
- ft->pfts.currentFileNumber = 0;
-
- yahoo_file_info *fi = (yahoo_file_info*)fs->data;
- ft->pfts.tszCurrentFile = wcsdup(ft->pfts.ptszFiles[ft->pfts.currentFileNumber]);
- ft->pfts.currentFileSize = fi->filesize;
-
- file_transfers = y_list_prepend(file_transfers, ft);
-
- LOG(("[/new_ft]"));
-
- return ft;
-}
-
-y_filetransfer* find_ft(const char *ft_token, const char *who)
-{
- LOG(("[find_ft] Searching for: %s", ft_token));
-
- for (YList *l = file_transfers; l; l = y_list_next(l)) {
- y_filetransfer *f = (y_filetransfer*)l->data;
- if (mir_strcmp(f->ftoken, ft_token) == 0 && mir_strcmp(f->who, who) == 0) {
- LOG(("[find_ft] Got it!"));
- return f;
- }
- }
-
- LOG(("[find_ft] FT not found?"));
- return NULL;
-}
-
-static void free_ft(y_filetransfer *ft)
-{
- LOG(("[free_ft] token: %s", ft->ftoken));
-
- for (YList *l = file_transfers; l; l = y_list_next(l)) {
- if (l->data == ft) {
- LOG(("[free_ft] Ft found and removed from the list"));
- file_transfers = y_list_remove_link(file_transfers, l);
- y_list_free_1(l);
- break;
- }
- }
-
- if (ft->hWaitEvent != INVALID_HANDLE_VALUE)
- CloseHandle(ft->hWaitEvent);
-
- FREE(ft->who);
- FREE(ft->msg);
- FREE(ft->url);
- FREE(ft->ftoken);
- FREE(ft->relay);
-
- LOG(("[free_ft] About to free the File List."));
-
- while (ft->files) {
- YList *tmp = ft->files;
- yahoo_file_info *c = (yahoo_file_info*)ft->files->data;
- FREE(c->filename);
- FREE(c);
- ft->files = y_list_remove_link(ft->files, ft->files);
- y_list_free_1(tmp);
- }
-
- LOG(("[free_ft] About to free PFTS."));
-
- for (int i = 0; i < ft->pfts.totalFiles; i++)
- mir_free(ft->pfts.ptszFiles[i]);
-
- mir_free(ft->pfts.ptszFiles);
- FREE(ft->pfts.tszCurrentFile);
- FREE(ft->pfts.tszWorkingDir);
- FREE(ft);
-
- LOG(("[/free_ft]"));
-}
-
-static void upload_file(int, INT_PTR fd, int error, void *data)
-{
- y_filetransfer *sf = (y_filetransfer*)data;
- yahoo_file_info *fi = (yahoo_file_info *)sf->files->data;
- char buf[1024];
- unsigned long size = 0;
- DWORD dw = 0;
- int rw = 0;
-
- if (fd < 0) {
- LOG(("[get_fd] Connect Failed!"));
- error = 1;
- }
-
- if (!error) {
- HANDLE myhFile = CreateFile(sf->pfts.tszCurrentFile,
- GENERIC_READ,
- FILE_SHARE_READ | FILE_SHARE_WRITE,
- NULL,
- OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
- 0);
-
- if (myhFile != INVALID_HANDLE_VALUE) {
- DWORD lNotify = GetTickCount();
-
- LOG(("proto: %s, hContact: %p", sf->ppro->m_szModuleName, sf->hContact));
-
- LOG(("Sending file: %s", fi->filename));
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, sf, 0);
-
- do {
- ReadFile(myhFile, buf, sizeof(buf), &dw, NULL);
-
- if (dw) {
- rw = Netlib_Send((HANDLE)fd, buf, dw, MSG_NODUMP);
-
- if (rw < 1) {
- LOG(("Upload Failed. Send error? Got: %d", rw));
- error = 1;
- break;
- }
- else
- size += rw;
-
- if (GetTickCount() >= lNotify + 500 || rw < 1024 || size == fi->filesize) {
- LOG(("DOING UI Notify. Got %lu/%lu", size, fi->filesize));
- sf->pfts.totalProgress = size;
- sf->pfts.currentFileProgress = size;
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_DATA, sf, (LPARAM)& sf->pfts);
- lNotify = GetTickCount();
- }
-
- }
-
- if (sf->cancel) {
- LOG(("Upload Cancelled! "));
- error = 1;
- break;
- }
- } while (rw > 0 && dw > 0 && !error);
-
- CloseHandle(myhFile);
-
- sf->pfts.totalProgress = size;
- sf->pfts.currentFileProgress = size;
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_DATA, sf, (LPARAM)& sf->pfts);
-
- }
- }
-
- if (fd > 0) {
- int tr = 0;
-
- do {
- rw = Netlib_Recv((HANDLE)fd, buf, sizeof(buf), 0);
- LOG(("Got: %d bytes", rw));
-
- if (tr == 0) {
- //"HTTP/1.1 999" 12
- // 012345678901
- if (rw > 12) {
- if (buf[9] != '2' || buf[10] != '0' || buf[11] != '0') {
- LOG(("File Transfer Failed: %c%c%c", buf[9], buf[10], buf[11]));
- error = 1;
- }
- }
- }
- tr += rw;
- } while (rw > 0);
-
- Netlib_CloseHandle((HANDLE)fd);
- }
-
- LOG(("File send complete!"));
-
- if (!error) {
- sf->pfts.currentFileNumber++;
-
- if (sf->pfts.currentFileNumber >= sf->pfts.totalFiles) {
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, sf, 0);
- }
- else {
- // Do Next file
- FREE(sf->pfts.tszCurrentFile);
-
- YList *l = sf->files;
-
- fi = (yahoo_file_info*)l->data;
- FREE(fi->filename);
- FREE(fi);
-
- sf->files = y_list_remove_link(sf->files, l);
- y_list_free_1(l);
-
- // need to move to the next file on the list and fill the file information
- fi = (yahoo_file_info*)sf->files->data;
- sf->pfts.tszCurrentFile = wcsdup(sf->pfts.ptszFiles[sf->pfts.currentFileNumber]);
- sf->pfts.currentFileSize = fi->filesize;
- sf->pfts.currentFileProgress = 0;
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, sf, 0);
- LOG(("Waiting for next file request packet..."));
- }
- }
- else ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, sf, 0);
-}
-
-static void dl_file(int id, INT_PTR fd, int error, const char*, unsigned long size, void *data)
-{
- y_filetransfer *sf = (y_filetransfer*)data;
- yahoo_file_info *fi = (yahoo_file_info *)sf->files->data;
- char buf[1024];
- unsigned long rsize = 0;
- DWORD dw, c;
-
- if (fd < 0) {
- LOG(("[get_url] Connect Failed!"));
-
- if (sf->ftoken != NULL) {
- LOG(("[get_url] DC Detected: asking sender to upload to Yahoo FileServers!"));
- yahoo_ftdc_deny(id, sf->who, fi->filename, sf->ftoken, 3);
- }
-
- error = 1;
- }
-
- if (!error) {
- HANDLE myhFile;
- wchar_t filefull[MAX_PATH];
-
- /*
- * We need FULL Path for File Resume to work properly!!!
- *
- * Don't rely on workingDir to be right, since it's not used to check if file exists.
- */
- mir_snwprintf(filefull, L"%s\\%s", sf->pfts.tszWorkingDir, sf->pfts.tszCurrentFile);
- FREE(sf->pfts.tszCurrentFile);
- sf->pfts.tszCurrentFile = wcsdup(filefull);
-
- ResetEvent(sf->hWaitEvent);
-
- if (sf->ppro->ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_FILERESUME, sf, (LPARAM)&sf->pfts)) {
- WaitForSingleObject(sf->hWaitEvent, INFINITE);
-
- LOG(("[dl_file] Got action: %ld", sf->action));
-
- switch (sf->action) {
- case FILERESUME_RENAME:
- case FILERESUME_OVERWRITE:
- case FILERESUME_RESUME:
- // no action needed at this point, just break out of the switch statement
- break;
-
- case FILERESUME_CANCEL:
- sf->cancel = 1;
- break;
-
- case FILERESUME_SKIP:
- default:
- sf->cancel = 2;
- break;
- }
- }
-
-
-
- if (!sf->cancel) {
-
- myhFile = CreateFile(sf->pfts.tszCurrentFile,
- GENERIC_WRITE,
- FILE_SHARE_WRITE,
- NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
-
- if (myhFile != INVALID_HANDLE_VALUE) {
- DWORD lNotify = GetTickCount();
-
- SetEndOfFile(myhFile);
-
- LOG(("proto: %s, hContact: %p", sf->ppro->m_szModuleName, sf->hContact));
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, sf, 0);
-
- do {
- dw = Netlib_Recv((HANDLE)fd, buf, 1024, MSG_NODUMP);
-
- if (dw > 0) {
- WriteFile(myhFile, buf, dw, &c, NULL);
- rsize += dw;
- sf->pfts.totalProgress += dw;
- sf->pfts.currentFileProgress += dw;
-
- if (GetTickCount() >= lNotify + 500 || dw <= 0 || rsize == size) {
-
- LOG(("DOING UI Notify. Got %lu/%lu", rsize, size));
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_DATA, sf, (LPARAM)& sf->pfts);
- lNotify = GetTickCount();
- }
-
- }
- else {
- LOG(("Recv Failed! Socket Error?"));
- error = 1;
- break;
- }
-
- if (sf->cancel) {
- LOG(("Recv Cancelled! "));
- error = 1;
- break;
- }
- } while (dw > 0 && rsize < size);
-
- while (dw > 0 && !sf->cancel && !error) {
- dw = Netlib_Recv((HANDLE)fd, buf, 1024, MSG_NODUMP);
- LOG(("Ack."));
- }
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_DATA, sf, (LPARAM)& sf->pfts);
-
- LOG(("[Finished DL] Got %lu/%lu", rsize, size));
- CloseHandle(myhFile);
-
- }
- else {
- LOG(("Can not open file for writing: %s", buf));
- error = 1;
- }
-
- }
- }
-
- if (fd > 0) {
- LOG(("Closing connection: %d", fd));
- Netlib_CloseHandle((HANDLE)fd);
-
- if (sf->cancel || error) {
- /* abort FT transfer */
- yahoo_ft7dc_abort(id, sf->who, sf->ftoken);
- }
- }
-
- if (!error) {
- sf->pfts.currentFileNumber++;
-
- LOG(("File %d/%d download complete!", sf->pfts.currentFileNumber, sf->pfts.totalFiles));
-
- if (sf->pfts.currentFileNumber >= sf->pfts.totalFiles) {
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, sf, 0);
- }
- else {
- // Do Next file
- yahoo_ft7dc_nextfile(id, sf->who, sf->ftoken);
- FREE(sf->pfts.tszCurrentFile);
-
- YList *l = sf->files;
-
- fi = (yahoo_file_info*)l->data;
- FREE(fi->filename);
- FREE(fi);
-
- sf->files = y_list_remove_link(sf->files, l);
- y_list_free_1(l);
-
- // need to move to the next file on the list and fill the file information
- fi = (yahoo_file_info*)sf->files->data;
- sf->pfts.tszCurrentFile = wcsdup(sf->pfts.ptszFiles[sf->pfts.currentFileNumber]);
- sf->pfts.currentFileSize = fi->filesize;
- sf->pfts.currentFileProgress = 0;
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, sf, 0);
- }
- }
- else {
- LOG(("File download failed!"));
-
- ProtoBroadcastAck(sf->ppro->m_szModuleName, sf->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, sf, 0);
- }
-}
-
-//=======================================================
-//File Transfer
-//=======================================================
-void __cdecl CYahooProto::recv_filethread(void *psf)
-{
- y_filetransfer *sf = (y_filetransfer*)psf;
- yahoo_file_info *fi = (yahoo_file_info *)sf->files->data;
-
- ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
-
- debugLogA("[yahoo_recv_filethread] who: %s, msg: %s, filename: %s ", sf->who, sf->msg, fi->filename);
-
-
- yahoo_get_url_handle(m_id, sf->url, &dl_file, sf);
-
- if (sf->pfts.currentFileNumber >= sf->pfts.totalFiles)
- free_ft(sf);
- else
- debugLogA("[yahoo_recv_filethread] More files coming?");
-}
-
-void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7)
-{
- LOG(("[ext_yahoo_got_file] ident:%s, who: %s, url: %s, expires: %lu, msg: %s, fname: %s, fsize: %lu ftoken: %s y7: %d", me, who, url, expires, msg, fname, fesize, ft_token == NULL ? "NULL" : ft_token, y7));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL)
- hContact = add_buddy(who, who, 0 /* NO FT for other IMs */, PALF_TEMPORARY);
-
- char fn[1024];
- memset(fn, 0, sizeof(fn));
-
- if (fname != NULL)
- mir_strncpy(fn, fname, 1024);
- else {
- /* based on how gaim does this */
- char *start = (char*)strrchr(url, '/');
- if (start)
- start++;
-
- char *end = (char*)strrchr(url, '?');
- if (start && *start && end)
- mir_strncpy(fn, start, end - start + 1);
- else
- mir_strcpy(fn, "filename.ext");
- }
-
- yahoo_file_info *fi = y_new(yahoo_file_info, 1);
- fi->filename = strdup(fn);
- fi->filesize = fesize;
-
- YList *files = y_list_append(NULL, fi);
-
- y_filetransfer *ft = new_ft(this, m_id, hContact, who, msg, url, ft_token, y7, files, 0 /* downloading */);
- if (ft == NULL) {
- y_list_free(files);
- debugLogA("SF IS NULL!!!");
- return;
- }
-
- char *szFileName = fn;
-
- PROTORECVFILET pre = { 0 };
- pre.dwFlags = PRFF_UNICODE;
- pre.fileCount = 1;
- pre.timestamp = time(NULL);
- pre.descr.a = (char*)msg;
- pre.files.a = &szFileName;
- pre.lParam = (LPARAM)ft;
- ProtoChainRecvFile(hContact, &pre);
-}
-
-void CYahooProto::ext_got_files(const char *me, const char *who, const char *ft_token, int y7, YList* files)
-{
- LOG(("[ext_yahoo_got_files] ident:%s, who: %s, ftoken: %s ", me, who, ft_token == NULL ? "NULL" : ft_token));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL)
- hContact = add_buddy(who, who, 0 /* NO FT for other IMs */, PALF_TEMPORARY);
-
- y_filetransfer *ft = new_ft(this, m_id, hContact, who, NULL, NULL, ft_token, y7, files, 0 /* downloading */);
- if (ft == NULL) {
- debugLogA("SF IS NULL!!!");
- return;
- }
-
- int fc = 0;
- LIST<char> arNames(1);
-
- for (YList *f = files; f; f = y_list_next(f)) {
- yahoo_file_info *fi = (yahoo_file_info *)f->data;
- arNames.insert(fi->filename);
- fc++;
- }
-
- PROTORECVFILET pre = { 0 };
- pre.fileCount = fc;
- pre.timestamp = time(NULL);
- pre.descr.a = "";
- pre.files.a = arNames.getArray();
- pre.lParam = (LPARAM)ft;
- ProtoChainRecvFile(ft->hContact, &pre);
-}
-
-void CYahooProto::ext_got_file7info(const char *me, const char *who, const char *url, const char *fname, const char *ft_token)
-{
- LOG(("[ext_yahoo_got_file7info] ident:%s, who: %s, url: %s, fname: %s, ft_token: %s", me, who, url, fname, ft_token));
-
- y_filetransfer *ft = find_ft(ft_token, who);
-
- if (ft == NULL) {
- LOG(("ERROR: Can't find the token: %s in my file transfers list...", ft_token));
- return;
- }
-
- ProtoBroadcastAck(ft->hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-
- FREE(ft->url);
-
- ft->url = strdup(url);
-
- ForkThread(&CYahooProto::recv_filethread, ft);
-}
-
-void ext_yahoo_send_file7info(int id, const char *me, const char *who, const char *ft_token)
-{
- LOG(("[ext_yahoo_send_file7info] id: %i, ident:%s, who: %s, ft_token: %s", id, me, who, ft_token));
-
- y_filetransfer *ft = find_ft(ft_token, who);
-
- if (ft == NULL) {
- LOG(("ERROR: Can't find the token: %s in my file transfers list...", ft_token));
- return;
- }
-
- yahoo_file_info *fi = (yahoo_file_info *)ft->files->data;
-
- char *c = strrchr(fi->filename, '\\');
- if (c != NULL) {
- c++;
- }
- else {
- c = fi->filename;
- }
-
- LOG(("Resolving relay.msg.yahoo.com..."));
- PHOSTENT he = gethostbyname("relay.msg.yahoo.com");
-
- if (he) {
- ft->relay = strdup(inet_ntoa(*(PIN_ADDR)he->h_addr_list[0]));
- LOG(("Got Relay IP: %s", ft->relay));
- }
- else {
- ft->relay = strdup("98.136.112.33");
- LOG(("DNS Lookup failed. Using Relay IP: %s", ft->relay));
- }
-
- yahoo_send_file7info(id, me, who, ft_token, c, ft->relay);
-}
-
-struct _sfs
-{
- char *me;
- char *token;
- y_filetransfer *sf;
-};
-
-void CYahooProto::ext_ft7_send_file(const char *me, const char *who, const char*, const char *token, const char *ft_token)
-{
- LOG(("[ext_yahoo_send_file7info] ident:%s, who: %s, ft_token: %s", me, who, ft_token));
-
- y_filetransfer *sf = find_ft(ft_token, who);
-
- if (sf == NULL) {
- LOG(("ERROR: Can't find the token: %s in my file transfers list...", ft_token));
- return;
- }
-
- _sfs *s = (_sfs *)malloc(sizeof(_sfs));
-
- s->me = strdup(me);
- s->token = strdup(token);
- s->sf = sf;
-
- ForkThread(&CYahooProto::send_filethread, s);
-}
-
-/**************** Send File ********************/
-
-void __cdecl CYahooProto::send_filethread(void *psf)
-{
- _sfs *s = (_sfs *)psf;
- y_filetransfer *sf = s->sf;
- yahoo_file_info *fi = (yahoo_file_info *)sf->files->data;
-
- ProtoBroadcastAck(sf->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, sf, 0);
-
- LOG(("who %s, msg: %s, filename: %s filesize: %ld", sf->who, sf->msg, fi->filename, fi->filesize));
-
- yahoo_send_file_y7(sf->id, s->me, sf->who, sf->relay, fi->filesize, s->token, &upload_file, sf);
-
- FREE(s->me);
- FREE(s->token);
- FREE(s);
-
- if (sf->pfts.currentFileNumber >= sf->pfts.totalFiles) {
- free_ft(sf);
- }
- else {
- debugLogA("[yahoo_send_filethread] More files coming?");
- }
-}
-
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SendFile - sends a file
-
-HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles)
-{
- LOG(("[YahooSendFile]"));
-
- if (!m_bLoggedIn)
- return 0;
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- long tFileSize = 0;
- struct _stat statbuf;
- YList *fs = NULL;
-
- int i = 0;
- for (; ppszFiles[i] != NULL; i++) {
- if (_wstat(ppszFiles[i], &statbuf) == 0)
- tFileSize = statbuf.st_size;
-
- yahoo_file_info *fi = y_new(yahoo_file_info, 1);
-
- fi->filename = strdup(T2Utf(ppszFiles[i]));
- fi->filesize = tFileSize;
-
- fs = y_list_append(fs, fi);
- }
-
- y_filetransfer *sf = new_ft(this, m_id, hContact, dbv.pszVal, (char*)szDescription,
- NULL, NULL, 0, fs, 1 /* sending */);
-
- db_free(&dbv);
-
- if (sf == NULL) {
- debugLogA("SF IS NULL!!!");
- return 0;
- }
-
- LOG(("who: %s, msg: %s, # files: %d", sf->who, sf->msg, i));
-
- sf->ftoken = yahoo_ft7dc_send(m_id, sf->who, fs);
-
- LOG(("Exiting SendRequest..."));
-
- return sf;
- }
-
- LOG(("[/YahooSendFile]"));
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// FileAllow - starts a file transfer
-
-HANDLE __cdecl CYahooProto::FileAllow(MCONTACT, HANDLE hTransfer, const wchar_t* szPath)
-{
- y_filetransfer *ft = (y_filetransfer *)hTransfer;
-
- debugLogA("[YahooFileAllow]");
-
- //LOG(LOG_INFO, "[%s] Requesting file from %s", ft->cookie, ft->user);
- ft->pfts.tszWorkingDir = wcsdup(szPath);
-
- size_t len = mir_wstrlen(ft->pfts.tszWorkingDir) - 1;
- if (ft->pfts.tszWorkingDir[len] == '\\')
- ft->pfts.tszWorkingDir[len] = 0;
-
- if (ft->y7) {
- debugLogA("[YahooFileAllow] Trying to relay Y7 transfer.");
- //void yahoo_ft7dc_accept(int id, const char *buddy, const char *ft_token);
- yahoo_ft7dc_accept(ft->id, ft->who, ft->ftoken);
-
- return hTransfer;
- }
-
- ForkThread(&CYahooProto::recv_filethread, ft);
- return hTransfer;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// FileCancel - cancels a file transfer
-
-int __cdecl CYahooProto::FileCancel(MCONTACT, HANDLE hTransfer)
-{
- debugLogA("[YahooFileCancel]");
-
- y_filetransfer* ft = (y_filetransfer*)hTransfer;
-
- if (!(ft->pfts.flags & PFTS_SENDING) && !ft->cancel) {
- /* abort FT transfer */
- yahoo_ft7dc_abort(ft->id, ft->who, ft->ftoken);
- }
-
- if (ft->hWaitEvent != INVALID_HANDLE_VALUE)
- SetEvent(ft->hWaitEvent);
-
- ft->action = FILERESUME_CANCEL;
- ft->cancel = 1;
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// FileDeny - denies a file transfer
-
-int __cdecl CYahooProto::FileDeny(MCONTACT, HANDLE hTransfer, const wchar_t*)
-{
- /* deny file receive request.. just ignore it! */
- y_filetransfer *ft = (y_filetransfer *)hTransfer;
-
- debugLogA("[YahooFileDeny]");
-
- if (!m_bLoggedIn || ft == NULL) {
- debugLogA("[YahooFileDeny] Not logged-in or some other error!");
- return 1;
- }
-
- if (ft->y7) {
- debugLogA("[YahooFileDeny] Y7 Transfer detected.");
- //void yahoo_ft7dc_accept(int id, const char *buddy, const char *ft_token);
- yahoo_ft7dc_deny(ft->id, ft->who, ft->ftoken);
- return 0;
- }
-
- if (ft->ftoken != NULL) {
- yahoo_file_info *fi = (yahoo_file_info *)ft->files->data;
-
- debugLogA("[YahooFileDeny] DC Detected: Denying File Transfer!");
- yahoo_ftdc_deny(m_id, ft->who, fi->filename, ft->ftoken, 2);
- }
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// FileResume - processes file renaming etc
-
-int __cdecl CYahooProto::FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename)
-{
- y_filetransfer *ft = (y_filetransfer *)hTransfer;
-
- debugLogA("[YahooFileResume] Action: %d", *action);
-
- if (!m_bLoggedIn || ft == NULL) {
- debugLogA("[YahooFileResume] Not loggedin or some other error!");
- return 1;
- }
-
- ft->action = *action;
-
- debugLogA("[YahooFileResume] Action: %d", *action);
-
- if (*action == FILERESUME_RENAME) {
- debugLogA("[YahooFileResume] Renamed file!");
-
- FREE(ft->pfts.tszCurrentFile);
- ft->pfts.tszCurrentFile = wcsdup(*szFilename);
- }
-
- SetEvent(ft->hWaitEvent);
- return 0;
-}
diff --git a/tools/_deprecated/Yahoo/src/file_transfer.h b/tools/_deprecated/Yahoo/src/file_transfer.h deleted file mode 100644 index b57a56867d..0000000000 --- a/tools/_deprecated/Yahoo/src/file_transfer.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * $Id: file_transfer.h 11130 2010-01-13 22:49:25Z gena01@gmail.com $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_FILE_TRANSFER_H_ -#define _YAHOO_FILE_TRANSFER_H_ - -#define FILERESUME_CANCEL 11 - -typedef struct { - CYahooProto* ppro; - int id; - char *who; - char *msg; - char *ftoken; - char *relay; - MCONTACT hContact; - int cancel; - char *url; - HANDLE hWaitEvent; - DWORD action; - int y7; - YList *files; - PROTOFILETRANSFERSTATUS pfts; -} y_filetransfer; - -/* libyahoo2 callback(s) */ -void ext_yahoo_got_file(int id, const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7); -void ext_yahoo_got_files(int id, const char *me, const char *who, const char *ft_token, int y7, YList *files); -void ext_yahoo_got_file7info(int id, const char *me, const char *who, const char *url, const char *fname, const char *ft_token); -void ext_yahoo_send_file7info(int id, const char *me, const char *who, const char *ft_token); -void ext_yahoo_ft7_send_file(int id, const char *me, const char *who, const char *filename, const char *token, const char *ft_token); - -/* service functions */ -int YahooFileAllow(WPARAM wParam,LPARAM lParam); -int YahooFileDeny(WPARAM wParam, LPARAM lParam); -int YahooFileResume(WPARAM wParam, LPARAM lParam); -int YahooFileCancel(WPARAM wParam, LPARAM lParam); -int YahooSendFile(WPARAM wParam, LPARAM lParam); -int YahooRecvFile(WPARAM wParam, LPARAM lParam); - -#endif diff --git a/tools/_deprecated/Yahoo/src/http_gateway.cpp b/tools/_deprecated/Yahoo/src/http_gateway.cpp deleted file mode 100644 index bbf5412eae..0000000000 --- a/tools/_deprecated/Yahoo/src/http_gateway.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/*
- * $Id: http_gateway.cpp 9232 2009-03-26 18:11:02Z ghazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-
-#ifdef HTTP_GATEWAY
-
-int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPREQUEST *nlhr)
-{
- NETLIBHTTPPROXYINFO nlhpi;
-
- debugLogA("YAHOO_httpGatewayInit!!!");
-
- memset(&nlhpi, 0, sizeof(nlhpi));
- nlhpi.cbSize = sizeof(nlhpi);
- nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/";
-
- return CallService(MS_NETLIB_SETHTTPPROXYINFO, (WPARAM)hConn, (LPARAM)&nlhpi);
-}
-
-int YAHOO_httpGatewayWrapSend(HANDLE hConn, PBYTE buf, int len, int flags, MIRANDASERVICE pfnNetlibSend)
-{
- debugLogA("YAHOO_httpGatewayWrapSend!!! Len: %d", len);
-
- if (len == 0 && m_id > 0) { // we need to send something!!!
- int n;
- char *z = yahoo_webmessenger_idle_packet(m_id, &n);
- int ret = 0;
-
- if (z != NULL) {
- debugLogA("YAHOO_httpGatewayWrapSend!!! Got Len: %d", n);
- NETLIBBUFFER tBuf = { ( char* )z, n, flags };
- ret = pfnNetlibSend((LPARAM)hConn, (WPARAM) &tBuf );
- FREE(z);
- } else {
- debugLogA("YAHOO_httpGatewayWrapSend!!! GOT NULL???");
- }
-
- return ret;
- } else {
- NETLIBBUFFER tBuf = { ( char* )buf, len, flags };
-
- return pfnNetlibSend((LPARAM)hConn, (WPARAM) &tBuf );
- }
-}
-
-PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, int *outBufLen, void *(*NetlibRealloc)(void *, size_t))
-{
- debugLogA("YAHOO_httpGatewayUnwrapRecv!!! Len: %d", len);
-
- debugLogA("Got headers: %d", nlhr->headersCount);
- /* we need to get the first 4 bytes! */
- if (len < 4)
- return NULL;
-
- ylad->rpkts = buf[0] + buf[1] *256;
- debugLogA("Got packets: %d", ylad->rpkts);
-
- if (len == 4) {
- *outBufLen = 0;
- return buf;
- } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) {
- memmove( buf, buf + 4, len - 4);
- *outBufLen = len-4;// we take off 4 bytes from the beginning
-
- return buf;
- } else
- return NULL; /* Break connection, something went wrong! */
-
-}
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/http_gateway.h b/tools/_deprecated/Yahoo/src/http_gateway.h deleted file mode 100644 index 43aa4c1809..0000000000 --- a/tools/_deprecated/Yahoo/src/http_gateway.h +++ /dev/null @@ -1,24 +0,0 @@ -/*
- * $Id: http_gateway.h 3541 2006-08-18 21:18:33Z gena01 $ - *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#ifndef _YAHOO_HTTP_GATEWAY_H_
-#define _YAHOO_HTTP_GATEWAY_H_
-
-#define HTTP_PROXY_VERSION 0x0443
-
-int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPREQUEST *nlhr);
-int YAHOO_httpGatewayWrapSend(HANDLE hConn, PBYTE buf, int len, int flags, MIRANDASERVICE pfnNetlibSend);
-PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int bufLen, int *outBufLen, void *(*NetlibRealloc)(void *, size_t));
-
-#endif
-
diff --git a/tools/_deprecated/Yahoo/src/icolib.cpp b/tools/_deprecated/Yahoo/src/icolib.cpp deleted file mode 100644 index 886ad3578a..0000000000 --- a/tools/_deprecated/Yahoo/src/icolib.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/*
- * $Id: util.c 3936 2006-10-02 06:58:19Z ghazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include "stdafx.h"
-#include <m_langpack.h>
-#include <win2k.h>
-#include "m_icolib.h"
-
-#include "resource.h"
-
-static IconItem iconList[] =
-{
- { LPGEN("Main"), "yahoo", IDI_YAHOO },
- { LPGEN("Mail"), "mail", IDI_INBOX },
- { LPGEN("Profile"), "profile", IDI_PROFILE },
- { LPGEN("Refresh"), "refresh", IDI_REFRESH },
- { LPGEN("Address Book"), "yab", IDI_YAB },
- { LPGEN("Set Status"), "set_status", IDI_SET_STATUS },
- { LPGEN("Calendar"), "calendar", IDI_CALENDAR }
-};
-
-void IconsInit(void)
-{
- Icon_Register(hInstance, "Protocols/YAHOO", iconList, _countof(iconList), "YAHOO");
-}
-
-HICON LoadIconEx(const char* name, bool big)
-{
- char szSettingName[100];
- mir_snprintf(szSettingName, "YAHOO_%s", name);
- return IcoLib_GetIcon(szSettingName, big);
-}
-
-HANDLE GetIconHandle(int iconId)
-{
- for (unsigned i = 0; i < _countof(iconList); i++)
- if (iconList[i].defIconID == iconId)
- return iconList[i].hIcolib;
-
- return NULL;
-}
-
-void ReleaseIconEx(const char* name, bool big)
-{
- char szSettingName[100];
- mir_snprintf(szSettingName, "YAHOO_%s", name);
- IcoLib_Release(szSettingName, big);
-}
diff --git a/tools/_deprecated/Yahoo/src/ignore.cpp b/tools/_deprecated/Yahoo/src/ignore.cpp deleted file mode 100644 index 5770a570e1..0000000000 --- a/tools/_deprecated/Yahoo/src/ignore.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/*
- * $Id$
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include "stdafx.h"
-#include "ignore.h"
-
-const YList* CYahooProto::GetIgnoreList(void)
-{
- if (m_id < 1)
- return NULL;
-
- return yahoo_get_ignorelist(m_id);
-}
-
-void CYahooProto::IgnoreBuddy(const char *buddy, int ignore)
-{
- if (m_id < 1)
- return;
-
- yahoo_ignore_buddy(m_id, buddy, ignore);
- //yahoo_get_list(m_id);
-}
-
-
-int CYahooProto::BuddyIgnored(const char *who)
-{
- const YList *l = GetIgnoreList();
- while (l != NULL) {
- yahoo_buddy *b = (yahoo_buddy *) l->data;
-
- if (mir_strcmpi(b->id, who) == 0) {
- //LOG(("User '%s' on our Ignore List. Dropping Message.", who));
- return 1;
- }
- l = l->next;
- }
-
- return 0;
-}
-
-void CYahooProto::ext_got_ignore(YList * igns)
-{
- YList *l = igns;
-
- LOG(("[ext_yahoo_got_ignore] Got Ignore List"));
-
- while (l != NULL) {
- yahoo_buddy *b = (yahoo_buddy *) l->data;
-
- debugLogA("[ext_yahoo_got_ignore] Buddy: %s", b->id);
-
- l = l->next;
- }
-
- debugLogA("[ext_yahoo_got_ignore] End Of Ignore List");
-}
-
diff --git a/tools/_deprecated/Yahoo/src/ignore.h b/tools/_deprecated/Yahoo/src/ignore.h deleted file mode 100644 index e8d3ede800..0000000000 --- a/tools/_deprecated/Yahoo/src/ignore.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * $Id$ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */
-#ifndef _YAHOO_IGNORE_H_
-#define _YAHOO_IGNORE_H_
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/im.cpp b/tools/_deprecated/Yahoo/src/im.cpp deleted file mode 100644 index 398dfda62a..0000000000 --- a/tools/_deprecated/Yahoo/src/im.cpp +++ /dev/null @@ -1,239 +0,0 @@ -/*
- * $Id: im.cpp 12307 2010-08-11 21:49:46Z Michael.Kunz@s2005.TU-Chemnitz.de $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-#include <m_langpack.h>
-#include <m_protosvc.h>
-
-#include "avatar.h"
-#include "im.h"
-#include "ignore.h"
-
-void CYahooProto::send_msg(const char *id, int protocol, const char *msg, int utf8)
-{
- LOG(("[send_msg] Who: %s: protocol: %d Msg: '%s', utf: %d", id, protocol, msg, utf8));
-
- int buddy_icon = (getDword("AvatarHash", 0) != 0) ? 2 : 0;
- yahoo_send_im(m_id, NULL, id, protocol, msg, utf8, buddy_icon);
-}
-
-void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, const char *msg,
- long tm, int stat, int utf8, int buddy_icon,
- const char *seqn, int sendn)
-{
- char *umsg;
- const char *c = msg;
- int oidx = 0;
-
- LOG(("YAHOO_GOT_IM id:%s %s: %s (len: %d) tm:%lu stat:%i utf8:%i buddy_icon: %i", me, who, msg, mir_strlen(msg), tm, stat, utf8, buddy_icon));
-
- if (stat == 2) {
- char z[1024];
-
- mir_snprintf(z, "Error sending message to %s", who);
- LOG((z));
- ShowError(TranslateT("Yahoo Error"), _A2T(z));
- return;
- }
-
- if (!msg) {
- LOG(("Empty Incoming Message, exiting."));
- return;
- }
-
- if (getByte("IgnoreUnknown", 0)) {
-
- /*
- * Check our buddy list to see if we have it there. And if it's not on the list then we don't accept any IMs.
- */
- if (getbuddyH(who) == NULL) {
- LOG(("Ignoring unknown user messages. User '%s'. Dropping Message.", who));
- return;
- }
- }
-
- if (BuddyIgnored(who)) {
- LOG(("User '%s' on our Ignore List. Dropping Message.", who));
- return;
- }
-
- // make a bigger buffer for \n -> \r\n conversion (x2)
- umsg = (char *)alloca(mir_strlen(msg) * 2 + 1);
-
- while (*c != '\0') {
- // Strip the font tag
- if (!_strnicmp(c, "<font ", 6) || !_strnicmp(c, "</font>", 6) ||
- // strip the fade tag
- !_strnicmp(c, "<FADE ", 6) || !_strnicmp(c, "</FADE>", 7) ||
- // strip the alternate colors tag
- !_strnicmp(c, "<ALT ", 5) || !_strnicmp(c, "</ALT>", 6)) {
- while ((*c++ != '>') && (*c != '\0'));
- }
- else
- // strip ANSI color combination
- if ((*c == 0x1b) && (*(c + 1) == '[')) {
- while ((*c++ != 'm') && (*c != '\0'));
- }
- else
-
- if (*c != '\0') {
- umsg[oidx++] = *c;
-
- /* Adding \r to \r\n conversion */
- if (*c == '\r' && *(c + 1) != '\n')
- umsg[oidx++] = '\n';
-
- c++;
- }
- }
-
- umsg[oidx++] = '\0';
-
- /* Need to strip off formatting stuff first. Then do all decoding/converting */
- LOG(("%s: %s", who, umsg));
-
- MCONTACT hContact = add_buddy(who, who, protocol, PALF_TEMPORARY);
- //setWord(hContact, "yprotoid", protocol);
- Set_Protocol(hContact, protocol);
-
- PROTORECVEVENT pre = { 0 };
- if (tm) {
- MEVENT hEvent = db_event_last(hContact);
-
- if (hEvent) { // contact has events
- DWORD dummy;
- DBEVENTINFO dbei = { sizeof(dbei) };
- dbei.pBlob = (BYTE*)&dummy;
- dbei.cbBlob = 2;
- if (!db_event_get(hEvent, &dbei))
- // got that event, if newer than ts then reset to current time
- if ((DWORD)tm < dbei.timestamp) tm = (long)time(NULL);
- }
-
- pre.timestamp = (DWORD)time(NULL);
-
- if ((DWORD)tm < pre.timestamp)
- pre.timestamp = tm;
-
- }
- else pre.timestamp = (DWORD)time(NULL);
-
- pre.szMessage = umsg;
- pre.lParam = 0;
-
- // Turn off typing
- CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
- ProtoChainRecvMsg(hContact, &pre);
-
- // ack the message we just got
- if (seqn)
- yahoo_send_im_ack(m_id, me, who, seqn, sendn);
-
- if (buddy_icon < 0) return;
-
- //?? Don't generate floods!!
- setByte(hContact, "AvatarType", (BYTE)buddy_icon);
- if (buddy_icon != 2)
- reset_avatar(hContact);
- else if (getDword(hContact, "PictCK", 0) == 0) /* request the buddy image */
- request_avatar(who);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SendMessage - sends a message
-
-void __cdecl CYahooProto::im_sendacksuccess(void *hContact)
-{
- ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-}
-
-void __cdecl CYahooProto::im_sendackfail(void *hContact)
-{
- SleepEx(1000, TRUE);
- ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
- (LPARAM)Translate("The message send timed out."));
-}
-
-void __cdecl CYahooProto::im_sendackfail_longmsg(void *hContact)
-{
- SleepEx(1000, TRUE);
- ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
- (LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars"));
-}
-
-int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
-{
- if (!m_bLoggedIn) {/* don't send message if we not connected! */
- ForkThread(&CYahooProto::im_sendackfail, (void*)hContact);
- return 1;
- }
-
- if (mir_strlen(pszSrc) > 800) {
- ForkThread(&CYahooProto::im_sendackfail_longmsg, (void*)hContact);
- return 1;
- }
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), pszSrc, 1);
-
- ForkThread(&CYahooProto::im_sendacksuccess, (void*)hContact);
-
- db_free(&dbv);
- return 1;
- }
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// RecvMsg
-
-int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
-{
- db_unset(hContact, "CList", "Hidden");
-
- // NUDGES
- if (!mir_strcmp(pre->szMessage, "<ding>") && ServiceExists("NUDGE/Send")) {
- debugLogA("[YahooRecvMessage] Doing Nudge Service!");
- NotifyEventHooks(hYahooNudge, hContact, pre->timestamp);
- return 0;
- }
-
- return Proto_RecvMessage(hContact, pre);
-}
-
-//=======================================================
-// Send a nudge
-//=======================================================
-
-INT_PTR __cdecl CYahooProto::SendNudge(WPARAM hContact, LPARAM)
-{
- debugLogA("[YAHOO_SENDNUDGE]");
-
- if (!m_bLoggedIn) {/* don't send nudge if we not connected! */
- ForkThread(&CYahooProto::im_sendackfail, (void*)hContact);
- return 1;
- }
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- send_msg(dbv.pszVal, getWord(hContact, "yprotoid", 0), "<ding>", 0);
- db_free(&dbv);
-
- ForkThread(&CYahooProto::im_sendacksuccess, (void*)hContact);
- return 1;
- }
-
- return 0;
-}
diff --git a/tools/_deprecated/Yahoo/src/im.h b/tools/_deprecated/Yahoo/src/im.h deleted file mode 100644 index 4fa6be16c8..0000000000 --- a/tools/_deprecated/Yahoo/src/im.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * $Id: im.h 8594 2008-11-25 14:05:22Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */
-#ifndef _YAHOO_IM_H_
-#define _YAHOO_IM_H_
-
-void ext_yahoo_got_im(int id, const char *me, const char *who, int protocol,
- const char *msg, long tm, int stat, int utf8, int buddy_icon,
- const char *seqn, int sendn);
-
-int YahooSendNudge(WPARAM wParam, LPARAM lParam);
-int YahooRecvMessage(WPARAM wParam, LPARAM lParam);
-int YahooSendMessageW(WPARAM wParam, LPARAM lParam);
-int YahooSendMessage(WPARAM wParam, LPARAM lParam);
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/AUTHORS b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/AUTHORS deleted file mode 100644 index 2cc592900c..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -libyahoo2: library for Yahoo! Messenger new protocol
-
-Philip S Tellis <philip . tellis AT gmx . net> Maintainer
-Steve McAndrewSmith <steve AT finalge . org> Code cleanups
-Michaël Kamp <miksun AT users . sourceforge . net> Webcam Support
-Wayne Parrott <wayne_p AT pacific . net . au> Yahoo Chat
-Doug Davis <dougd AT airmail . net> Various Patches
-Konstantin Klyagin <konst AT konst . org. ua> Yahoo Search
-
-libyahoo2 is derivative of gaim: http://gaim.sourceforge.net/
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/COPYING b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/COPYING deleted file mode 100644 index fbdd65f6f8..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- 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, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ChangeLog b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ChangeLog deleted file mode 100644 index ecf16131c5..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ChangeLog +++ /dev/null @@ -1,280 +0,0 @@ -* Fri Jan 16 2003 Alan Humpherys
-- remove_handler also takes client_id
-
-* Wed Jan 14 2003 Doug Davis
-- fix auth
-
-* Mon Dec 29 2003 Philip Tellis 0.7.3
-- up version number
-
-* Thu Dec 25 2003 Philip Tellis
-- asynchronous writes as well (might break file send)
-- better support for webcam broadcast
-- webcam images sent in chunks rather than as a single image
-- check for EAGAIN on send, defer if it is returned
-- add handler returns a tag, which is passed to remove handler to remove it
-- api has changed
-
-* Wed Dec 10 2003 Philip Tellis
-- initialise some unintialised variables
-
-* Tue Dec 9 2003 Philip Tellis
-- Yahoo Search - by Konstantin Klyagin - centericq
-
-* Tue Dec 9 2003 Philip Tellis
-- Typing notification fix from Gena01
-- Don't send VERIFY as first packet, since we don't know what do
-do if it fails anyway.
-TODO revert when we figure this out
-
-* Wed Oct 22 2003 Philip Tellis
-- Identify failed login because of incorrect username
-
-* Wed Oct 8 2003 Philip Tellis
-- Fix bug with double processing of format string in error logging
-- log_level no longer global, use yahoo_get_log_level() instead (was
-only used internally)
-
-* Tue Sep 30 2003 Doug Davis
-- chat room logout and error code
-
-* Tue Sep 30 2003 Philip
-- fix for auth to work with big endian machines too
-
-* Mon Sep 29 2003 Philip
-- attribute new auth to Cerulean studios (which is where gaim got it from)
-
-* Sun Sep 28 2003 Philip 0.7.2-2
-- made yahoo_init do what it did before, and renamed the new yahoo_init
-to yahoo_init_with_attributes. This should help not break old code.
-
-* Sun Sep 28 2003 Philip
-- changed g_malloc0 to malloc - thanks to Pixador
-
-* Sun Sep 28 2003 Philip 0.7.2
-- Auth fixed by Sean Egan (gaim).
-
-* Sat Sep 27 2003 Philip
-- Added more fallback ports
-- Fix crash in process_auth
-
-* Wed Sep 24 2003 Philip
-- Messenger host name changed to scs.msg.yahoo.com
-
-* Mon Sep 22 2003 Philip
-- Forgot a strdup
-
-* Sat Sep 20 2003 Philip
-- Support protocol 0x0b
-
-* Sat Sep 20 2003 Philip
-- Formatting fixes and yahoo_list memory management fixes
-
-* Sat Sep 20 2003 Philip
-- No more extern vars (almost)
-- yahoo_init now takes optional key/value pairs to set server settings
-see the README or yahoo2.h for full details
-- These variables no longer need to be exported from the sourcefile that
-uses the library
-
-* Fri Sep 12 2003 Philip 0.7.1
-- configure checks for socket library and won't build sample client
-if not found
-
-* Thu Sep 11 2003 Philip
-- Up version number to 0x0a so that we don't get blocked
-
-* Thu Jun 5 2003 Philip
-- fix a bunch of memory leaks
-
-* Sun May 25 2003 Philip
-- Add option to disable building sample client
-
-* Sat May 24 2003 Philip 0.7.0-1
-- Fix configure error because of old missing script in distribution
-
-* Mon May 19 2003 Philip (version 0.7.0)
-- Update README
-- release 0.7.0
-
-* Tue May 6 2003 Mik
-- fixes for webcam uploading
-- extra callback for closing connection
-
-* Thu May 1 2003 Philip
-- allow closing of webcam connections
-- more reliable finding of webcam connections
-
-* Thu May 1 2003 Philip
-- send who's images along with webcam image
-
-* Thu May 1 2003 Philip
-- get idle time from server
-- changes to webcam support to not require the user to worry about keys and
-servers
-
-* Sun Apr 20 2003 Philip
-- fixes for multiple connects and bugs introduced when adding async connects
-
-* Sat Apr 19 2003 Philip
-- Add asynchronous connects
-- Each `id' represents a single login session and everything to do with it
-- add_handler and yahoo_(read|write)_ready take a void * data argument
-- possibly introduce many bugs :D
-
-* Thu Apr 10 2003 Wayne
-- Added callback for the list of chatrooms
-
-* Thu Mar 29 2003 Wayne
-- Added basic support for pulling down the list of chatrooms
-
-* Mon Mar 24 2003 Mik
-- Seperate webcam struct to public and private data
-- Rename webcam struct to yahoo_webcam
-
-* Fri Mar 21 2003 Philip
-- Don't dereference yd after it has been freed
-
-* Fri Mar 21 2003 Mik
-- Clean up webcam data when yahoo data is cleaned up
-- Added connection type to webcam
-- Removed static for callbacks in sample_client
-
-* Wed Mar 19 2003 Mik
-- Added perliminary webcam upload support
-- Added descriptions for the webcam functions
-
-* Tue Mar 18 2003 Wayne Parrott
-- Added preliminary yahoo chat support
-
-* Sun Mar 16 2003 Philip
-- Fixed double deletion problem with yab
-- Fixed memory leak with non-pager connections
-
-* Fri Mar 14 2003 Philip
-- Announce login success earlier
-
-* Thu Mar 13 2003 Mik
-- Add preliminary webcam support
-
-* Thu Mar 6 2003 Philip
-- Remove requests for unnecessary data in addressbook code
-
-* Tue Mar 4 2003 Philip
-- Fix read past end of string in yahoo_getyab
-
-* Wed Feb 19 2003 Philip (version 0.6.3)
-- Make dist depend on libyahoo2.spec and libyahoo2.pc
-- Change version number to 0.6.3
-
-* Thu Feb 13 2003 Philip
-- added check for null connection when reading from socket.
-thanks to Alan Humpherys
-
-* Thu Feb 6 2003 Philip
-- renamed yahoo_add_yab to yahoo_set_yab
-
-* Wed Feb 5 2003 Philip
-- Support for modifying an address book entry
-
-* Mon Jan 27 2003 Philip
-- Support for adding address book entry on the server
-
-* Thu Jan 24 2003 Philip
-- Download address book from server and fill in real_name field
-of yahoo_buddy
-
-* Tue Jan 21 2003 Philip
-- Added CHAT service codes from yach
-- Fixed the problem with Offline UTF-8 encoded messages
-it no longer sends an extra bell
-- Implemented group renaming
-
-* Sat Jan 18 2003 Philip
-- utf-8 encoding/decoding functions are in yahoo_util
-- detect whether it is utf-8 or not from utf-8 flag in message
-
-* Wed Jan 15 2003 Philip
-- added utf-8 decode to conference messages too. I need to move this into
-a separate function
-
-* Tue Jan 14 2003 Philip
-- changed the accent character hack to proper UTF-8 decode supplied by Alan
-
-* Mon Jan 13 2003 Philip Tellis
-- sample client handles accented characters correctly.
-
-* Thu Dec 18 2002 Philip Tellis
-- sample client now handles sending of bell with ^G and sounding of bell
-when it receives it
-
-* Tue Dec 10 2002 Philip Tellis (version 0.6.2)
-- Added some prototypes for snprintf, strdup and vsnprintf (when compiling
-with -ansi -pedantic and without glib
-- Updated version number for release
-
-* Mon Dec 9 2002 Philip Tellis
-- Changed u_char to unsigned char
-- Fixed yahoo_get16 and yahoo_get32 to work with big endian systems also
-
-* Tue Nov 19 2002 Philip Tellis
-- Added code to process a voice chat invite. Doesn't do anything.
-
-* Mon Nov 18 2002 Philip Tellis
-- Multiple offline messages are now received correctly
-- Memory leaks cleaned up
-- Check for glib-2 as well as glib-1
-- dropped port 21 from port scan
-- Added a spec file for RPM
-
-* Sat Nov 16 2002 Rodney Dawes
-- Make libyahoo2 versioned
-- Add a pkgconfig file
-- Install headers in $(pkgincludedir)
-- Make yahoo sample client a noinst program
-- Require autoconf >= 2.50
-- Cleanups in configure.ac
-
-* Wed Nov 13 2002 Philip Tellis
-- libyahoo2 now automatically scans ports 21, 23, 25 and 80 if it cannot
-connect on the default port.
-
-* Wed Nov 06 2002 Philip Tellis
-- added protocol documentation
-
-* Tue Nov 05 2002 Philip Tellis
-- compiles with -ansi and -pedantic
-
-* Sat Oct 19 2002 Philip Tellis
-- no longer strip colour/style codes from messages
-- added colour entry for any colour to yahoo2_types.h (Nelson Ferreira)
-
-
-* Fri Oct 18 2002 Philip Tellis (version 0.6.1)
-- fixed segfault on some weird notification packets
-- fixes for conference add invite
-- identity support for conferences
-
-- sample console client can handle conferencing
-
-* Wed Oct 9 2002 Philip Tellis (version 0.6)
-- Removed glib dependencies. Will use glib only if available
-- Configure time option --with-struct-callbacks to use a callback struct
-instead of callback functions (see yahoo2_callbacks.h and the README)
-- Code cleanups by Steve McAndrewSmith
-- Get identities from server
-- Activate/Deactivate identities
-- Use identities when sending messages
-- Fixed buffer overflow in key/value pair reading
-
-- sample console client no longer requires gtk!
-
-* Mon Jul 22 2002 Philip Tellis (version 0.5)
-- Added basic documentation to README
-- Several minor code fixes and cleanups
-
-* Sat Jul 20 2002 Philip Tellis (version 0.5.cvs)
-This is an initial public release as a separate library
-I'll put a feature list in later.
-0.5 is just a random version number, I figure it's got half the features
-of where it should be when complete.
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/NEWS b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/NEWS deleted file mode 100644 index e4021883a1..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/NEWS +++ /dev/null @@ -1,88 +0,0 @@ -* 29-Dec-2003
-
-Releasing 0.7.3 with some new features thanks to Konst, Doug and Gena
-
-* 9-Dec-2003
-
-Well, we now have contributions from the CenterICQ and Miranda IM teams.
-Good going methinks.
-
-* 28-Sep-2003
-
-Releasing 0.7.2 with the new auth code. Fixed by gaim.
-
-* 12-Sep-2003
-
-Releasing 0.7.1 which has a newer protocol version number. This should hold
-for a while.
-
-* 19-May-2003
-
-Released 0.7. It has webcam support, yahoo chat support and a new connection
-handling system. Asynchronous connects are also possible.
-
-* 18-Mar-2003
-
-Michaël Kamp has added Webcam support, and Wayne Parrott has started on Yahoo
-Chat support. Things are starting to move.
-
-Welcome to these two new members of the team.
-
-
-* 19-Feb-2003
-
-Released 0.6.3 - no real changes from 11th Feb.
-
-
-* 11-Feb-2003
-
-Added address book support. Rodney Dawes helped make the library
-versioned. I've also added the htdocs to CVS to make updates easier.
-0.6.2 should come out Real Soon Now.
-
-The mailing list has been alive for a while. There's been some good
-discussions.
-
-Also added documentation for the YMSG-9 protocol and the Addressbook
-structure.
-
-libyahoo2 is used in Ayttm - a fork of everybuddy.
-
-There have been requests for a Java version/wrapper. Any volunteers?
-
-
-* 18-Oct-2002
-
-This is a service release, mainly to fix the segfault on certain error
-notification packets.
-
-
-* 9-Oct-2002
-
-0.6 has been released. Also just found out that libyahoo2 is also used in
-GNUYahoo
-
-
-* 28-Sep-2002
-
-Well, I added documentation some time ago. It's in the README file. I
-suppose people have found it.
-
-The good news now is that libyahoo2 is being used in many clients, the
-bad news is that there's very little discussion on the mailing list.
-
-From what has been reported to me, and what I've heard, it seems that
-libyahoo2 is being used in Everybuddy, Fire, Proteus, Kopete, centericq.
-
-
-Hope to come out with 0.6 Real Soon Now.
-
-
-* 20-Jul-2002
-
-Umm, ok, it's been in everybuddy for a few months, and now I'm releasing
-it as a separate project.
-
-libyahoo2 has its own life now.
-
-Philip
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/README b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/README deleted file mode 100644 index 281de5c7c3..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/README +++ /dev/null @@ -1,442 +0,0 @@ -README for libyahoo2
-====================
-
-* Using the library
-
-Ok, here's a short, quick intro on how to use the library.
-Full documentation will come later.
-
-First include the two headers.
-
-#include <libyahoo2/yahoo2.h>
-#include <libyahoo2/yahoo2_callbacks.h>
-
-
-yahoo2.h contains functions that you can call. The data structures used
-are defined in yahoo2_types.h, which is included by yahoo2.h
-
-yahoo2_callbacks.h contains prototypes for functions that you *must*
-implement. *All* these functions must be implemented by your code. You
-can choose at configure time whether these are implemented as callback
-functions or as a callback structure.
-
-If compiled as a callback structure, you must call yahoo_register_callbacks
-before doing anything else.
-
-What each function is supposed to do and return is documented in
-yahoo2_callbacks.h
-
-
-
-Ok, assuming you've implemented all those functions to do what they're
-supposed to do, this is the process flow:
-
-1. Login
-
-Before logging in, you must initialise the connection by calling yahoo_init
-and passing the username and password of the account. yahoo_init returns
-a connection id that will be used to identify this connection for all other
-calls.
-
-You may use yahoo_init_with_attributes if you need to set any server settings.
-
-int yahoo_init(const char *username, const char *password);
-int yahoo_init_with_attributes(const char *username, const char *password, ...);
-
-The optional parameters to init are key/value pairs that specify server
-settings to use. This list must be NULL terminated - even if the list is
-empty. If a parameter isn't set, a default value will be used. Parameter
-keys are strings, parameter values are either strings or ints, depending on
-the key. Values passed in are copied, so you can use const/auto/static/
-pointers/whatever you want. Parameters are:
-
- NAME TYPE DEFAULT DESCRIPTION
- ------------------- ------- --------------------------- --------------
- pager_host char * scs.msg.yahoo.com
-
- pager_port int 5050
-
- filetransfer_host char * filetransfer.msg.yahoo.com
-
- filetransfer_port int 80
-
- webcam_host char * webcam.yahoo.com
-
- webcam_port int 5100
-
- webcam_description char * "" Webcam description
-
- local_host char * "" local IP address
- regardless of whether
- you're behind a
- firewall or not
-
- conn_type int Y_WCM_DSL see yahoo2_types.h
-
-
-You should set at least local_host if you intend to use webcams
-yahoo_init uses default values for all of the above.
-
-Remember to close the connection by calling yahoo_close when you no longer
-need it. This will free all resources allocated to the connection.
-
-void yahoo_close(int id);
-
-After initialising, you may call yahoo_login, with the id and the initial
-login status.
-
-void yahoo_login(int id, int initial);
-
-The initial status is one of enum yahoo_status (NOTE, only INVISIBLE and
-ONLINE are known to work at all times).
-
-When the login procedure is complete, the library will call
-ext_yahoo_login_response with a status code. See yahoo2_types for an
-enumeration of these codes.
-
-The buddy list and cookies will not be available at the time when
-ext_yahoo_login_response is called. You should wait for ext_yahoo_got_buddies
-and ext_yahoo_got_cookies.
-
-
-2. Buddies and Addressbook
-
-When the library receives the buddy list from the server, it will call
-ext_yahoo_got_buddies with the buddy list as a parameter. The library
-will call ext_yahoo_got_ignore when it receives the ignore list.
-
-- To get the buddy list at any other time, make a call to yahoo_get_buddylist,
-and use the return value of that call.
-
-- Similarly, for the ignorelist, call yahoo_get_ignorelist.
-
-These lists will be returned from the library's cache. To force a reload
-from the server, make a call to yahoo_get_list.
-
-Buddy nicknames and other contact information is stored in your yahoo address
-book. To retrieve this information, call yahoo_get_yab. call yahoo_set_yab
-to create or modify an addressbook entry. Call these functions only after
-ext_yahoo_got_cookies has been called.
-
-- To refresh the status of all buddies, make a call to yahoo_refresh.
-
-- To add a buddy, call yahoo_add_buddy:
-void yahoo_add_buddy(id, char *who, char *group);
-
-You can add a buddy to multiple groups by calling this function once for
-each group.
-
-- To remove a buddy, call yahoo_remove_buddy:
-void yahoo_remove_buddy(id, char *who, char *group);
-
-Remove buddy removes the buddy from the specified group. To completely
-remove a buddy, call this function for all groups that the buddy is in.
-
-- If a buddy adds you, and you do nothing, that buddy is accpeted (that's the
-way the protocol works). If you want to reject the buddy, make a call to
-yahoo_reject_buddy:
-
-void yahoo_reject_buddy(id, char * who, char *msg);
-
-where msg is the rejection message.
-
-- To change a buddy's group, call yahoo_change_buddy_group:
-void yahoo_change_buddy_group(id, char * who, char *old_group, char *new_group);
-
-- To ignore/unignore a buddy, call yahoo_ignore_buddy:
-void yahoo_ignore_buddy(id, char *who, int unignore);
-
-If unignore is TRUE, the buddy is unignored, if it is FALSE, the buddy is
-ignored.
-
-- You can also rename a group with:
-void yahoo_group_rename(id, char *old_group, char *new_group);
-
-
-
-
-3. Sending an IM
-
-To send an IM, make a call to yahoo_send_im
-
-void yahoo_send_im(int id, char * from, char *who, char *what, int utf8);
-
-id is the id that the connection is identified with, who is who you want
-to message, what is the message to be sent.
-
-The parameter from is the identity that you want to use to send the message.
-If this is NULL, your default identity will be used.
-
-utf8 is a boolean field that specifies whether the message you're sending
-has been encoded in utf8 or not. libyahoo2 will not do the encoding
-for you - you have to do it yourself.
-
-You may use the utility functions y_str_to_utf8 and y_utf8_to_str in
-yahoo_util to do this encoding. You must free the pointers returned by
-these functions.
-
-UTF8 encoding may also be used in messages received. It is not sent or
-received for invitations/rejection messages.
-
-You can also send typing notifications with yahoo_send_typing.
-
-
-4. Changing your status
-
-To change your status on the server, call yahoo_set_away.
-
-void yahoo_set_away(id, enum yahoo_status status, char *msg, int away);
-
-id is the identifying id, status is your new status.
-msg is a custom status message in case status == YAHOO_STATUS_CUSTOM
-and away is a flag that says whether the custom message is an away message
-or just a regular signature (this affects the kind of icon against your
-name in the official Yahoo Messenger client).
-
-
-5. Conferencing
-
-To start a conference, call yahoo_conference_invite with a list of initial
-members, the room name, and a welcome message.
-
-To add more people to the conference after it has started, call
-yahoo_conference_addinvite.
-
-If someone adds you to the conference, you can either accept by calling
-yahoo_conference_logon, or decline by calling yahoo_conference_decline
-
-You can log off from the conference by calling yahoo_conference_logoff.
-
-Send a message by calling yahoo_conference_message.
-
-The parameter from is the identity that you want to use to send the message.
-If this is NULL, your default identity will be used.
-
-NOTE: Except for yahoo_conference_addinvite, all conference functions take
-the list of members as an argument.
-
-Have a look at yahoo2_callbacks.h for conference callbacks. Beware that
-there's a chance you could get a conf_userjoin even before you get an
-invitation to that conference.
-
-
-6. File Transfer
-
-To send a file, call yahoo_send_file(id, who, msg, name, size).
-
-This will set up the initial file send connection and return a unix file
-descriptor that you must write to. You then write the file's contents to
-this fd.
-
-Receiving a file is similar. You will receive a call to ext_yahoo_got_file
-with the file's url as one of the parameters. When you are ready to start
-downloading the file, make a call to yahoo_get_url_handle:
-
- fd = yahoo_get_url_handle(id, url, &fname, &fsize);
-
-fname and fsize are used to store the file's name and size
-
-Yahoo's file transfer is implemented using HTTP. It can either be peer
-to peer or via the yahoo file transfer servers. The latter is used in
-case a peer to peer connection cannot be set up - for example, in the
-case of a firewall.
-
-libyahoo2 supports both types of file transfer for receiving, but only
-sends files using the yahoo file transfer server.
-
-If anyone's interested in implementing peer to peer file send, this is
-how it happens.
-
-First a PEERTOPEER packet is sent to check if it is possible. This will
-mark the connection between these two hosts as p2p compatible. No further
-PEERTOPEER packets will be sent between these two hosts for the duration
-that the connection is alive.
-
-After the first P2P packet, the initiater will start an HTTP server on
-some port (really any port), and send the url across to the other end.
-
-After this, the first host will always play the part of the server for
-all file transfers. If a transfer is from the server, it uses GET, if
-it is from the client to the server, it uses POST. There is no encoding
-used for POST.
-
-You'll still have to study it a bit, but IMO the major complexity is in
-putting a http server in the lib, and whether we want to do that.
-
-
-7. Webcam
-
-To make a request for a webcam feed, call yahoo_webcam_get_feed with the
-user's yahoo id. You call this function in response to someone's webcam
-invitation as well.
-
-void yahoo_webcam_get_feed(int id, const char *who);
-
-The response may take a while as there's a lot of work done from the time
-you make a request till the time you start receiving a feed. There is
-no feedback from the library during this time. The function returns
-immediately.
-
-To close an open feed, simply call yahoo_webcam_close_feed
-
-void yahoo_webcam_close_feed(int id, const char *who);
-
-NOTE: it is possible to have two open webcam feeds with a single user
-if you open a second without closing the first. Results are unpredictable
-if you call close on a non-unique id/who combination.
-
-Webcam broadcast has not been fully tested.
-
-To invite a user to view your webcam, call yahoo_webcam_invite with the
-user's yahoo_id
-
-void yahoo_webcam_invite(int id, const char *who);
-
-To close this user's connection, call yahoo_webcam_close_feed. To
-accept/reject a request from a user to view your webcam, call
-yahoo_webcam_accept_viewer:
-
-void yahoo_webcam_accept_viewer(int id, const char *who, int accept);
-
-accept may be 1 or 0.
-
-Consult yahoo2_callbacks for the callbacks that are called on webcam
-events.
-
-You will require to be able to decode jpeg2000 images to view the webcam
-feed. You could use a library like GraphicsMagick (BSD Licence) or jasper
-(possibly non-Free) to do this.
-
-8. Yahoo Chat
-
-To retrieve a list of yahoo chatrooms, call yahoo_get_chatrooms. The
-response callback will return the xml for the chatrooms. You must parse
-this yourself.
-
-To log in to a chat room, call yahoo_chat_logon, and to log off, call
-yahoo_chat_logoff. To send a chat message, call yahoo_chat_message.
-
-Chatting is similar to conferencing. Consult yahoo2_callbacks.h for the
-list of chat callbacks.
-
-
-9. Callbacks
-
-The library may request you to register io handlers using ext_yahoo_add_handler.
-Whenever an input condition occurs, you must call one of the callback functions.
-For a read condition, call yahoo_read_ready, for a write condition, call
-yahoo_write_ready.
-
-ext_yahoo_connect_async is an asynchronous connect call. It will register a
-callback function that must be called when the connect completes. This
-callback is of type yahoo_connect_callback. Consult yahoo2_callbacks.h for
-full details on what your async connect should return.
-
-You must also call yahoo_keepalive at regular intervals (10 minutes?) to keep
-the connection alive.
-
-
-10. Identities
-
-libyahoo2 will now get your identities from the server (if you don't know
-what that is, then you aren't using it). Use yahoo_get_identities to get
-your list of identities. libyahoo2 will also call ext_got_identities when
-it first gets the list of identities.
-
-To activate/deactivate an identity, call yahoo_set_identity_status:
- yahoo_set_identity_status(id, char * identity, int active);
-
-If active is non-zero, activate the identity, else deactivate it.
-
-If you try to activate/deactivate an identity that isn't yours, you'll
-get a call back to ext_yahoo_error with a custom error message. This
-message is from the yahoo servers. Don't complain to me about it. I
-know it sucks that we can't do translation of these strings.
-
-
-11. Search
-
-To search for contacts, use the two functions:
-
- yahoo_search(id, type, text, gender, agerange, photo, yahoo_only);
-and
- yahoo_search_again(id, int start);
-
-The first is used for a first time search. Check yahoo2_types.h for
-valid values for each of the parameters. text is a text string to
-search for.
-
-The search results are returned through ext_yahoo_got_search_result.
-
-Results are limited to 20 per query, so if you want to continue the
-search, call yahoo_search_again to get 20 more results. You may
-specify the start value, or use -1 to just get the next 20 results.
-
-
-12. Other functions
-
-You can call yahoo_get_cookie to get the cookies for your connection. I
-think these can be used when starting a browser to get information from
-the yahoo servers. See the comments in yahoo2.h for more information.
-
-You can also call yahoo_urldecode and yahoo_urlencode utility functions
-to url decode/encode a given string. This will be useful for getting the
-filename from a url in the file receive code.
-
-
-* Platforms
-
-libyahoo2 is known to compile on:
- - Debian 2.2 (linux 2.4) i386, Alpha, PPC RS/6000 and Sparc Ultra60
- - Redhat 6.0, 7.1 and 7.3 (linux 2.2 and 2.4)
- - MacOS X 10.1 PPC - G4
- - FreeBSD 4.6-Stable
- - Sun Solaris (8)
-
-Thanks to Sourceforge's compile farms for letting me test it there
-
-* Copyright
-
-libyahoo2 is Copyright (C) 2002-2004 Philip S Tellis
-Portions of this code was taken and adapted from the yahoo module for
-gaim released under the GNU GPL. This code is also released under the
-GNU GPL.
-
-This code is derivitive of Gaim <http://gaim.sourceforge.net>
-copyright (C) 1998-1999, Mark Spencer <markster@marko.net>
- 1998-1999, Adam Fritzler <afritz@marko.net>
- 1998-2002, Rob Flynn <rob@marko.net>
- 2000-2002, Eric Warmenhoven <eric@warmenhoven.org>
- 2001-2002, Brian Macke <macke@strangelove.net>
- 2001, Anand Biligiri S <abiligiri@users.sf.net>
- 2001, Valdis Kletnieks
- 2002, Sean Egan <bj91704@binghamton.edu>
- 2002, Toby Gray <toby.gray@ntlworld.com>
-
-This library also uses code from other libraries, namely:
- Portions from libfaim copyright 1998, 1999 Adam Fritzler
- <afritz@auk.cx>
- Portions of Sylpheed copyright 2000-2002 Hiroyuki Yamamoto
- <hiro-y@kcn.ne.jp>
-
-
-* Licence
-
-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.
-
-You should have received a copy of the GNU General Public License
-along with this program in the file named Copying; if not, write to the
-Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-MA 02111-1307 USA
-
-
-* Warranty
-
-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.
-
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/TODO b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/TODO deleted file mode 100644 index f005ec9bf2..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/TODO +++ /dev/null @@ -1,8 +0,0 @@ -Changing user profiles
-Voice Chat
-Video Chat
-
-
-Bugs:
-Check which pointers are freed by the lib and which must be freed by the
-client, and document these.
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ymsg-9.txt b/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ymsg-9.txt deleted file mode 100644 index d017013d7d..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/Docs/ymsg-9.txt +++ /dev/null @@ -1,326 +0,0 @@ -Yahoo Messenger Protocol v 9
-----------------------------
-
-The Yahoo Messenger Protocol is an application layer protocol running most
-of the time over TCP, but in some cases over HTTP as well. Throughout
-this document, we will speak about the YMSG packets, after stripping out
-any other protocol data, but will mention this other data if it is of
-relevance.
-
-This document is incomplete. For anything not mentioned here, refer to the
-source of libyahoo2.
-
-
-1. The YMSG packet structure
-
-The YMSG packet structure is as follows:
-
-(each byte is represented by 5 spaces in the following diagram,
-including the | at the end)
-
- <------- 4B -------><------- 4B -------><---2B--->
- +-------------------+-------------------+---------+
- | Y M S G | version | pkt_len |
- +---------+---------+---------+---------+---------+
- | service | status | session_id |
- +---------+-------------------+-------------------+
- | |
- : D A T A :
- | 0 - 65535* |
- +-------------------------------------------------+
-
-
-* 65535 is the theoretical limit, since the length field is two bytes
-long. Practically though, the data section does not exceed about 1000
-bytes.
-
-All numeric fields are stored in network byte order. i.e. Most
-significant byte first.
-
-YMSG - The first four bytes of all packets are always YMSG - the
- protocol name.
-
-version - The next four bytes are for the protocol version number.
- For version 9, these are 0x09 0x00 0x00 0x00
- NOTE: The last three bytes of this may just be padding bytes.
-
-pkt_len - A two byte value, in network byte order, stating how many bytes
- are in the _data_ section of the packet. In practice, this
- value does not exceed about 1000.
-
-service - This is an opcode that tells the client/server what kind of
- service is requested/being responded to. There are 45 known
- services. See the services section of this document for a
- full listing.
-
-status - In case of a response from the server, indicates the status
- of the request (success/failure/etc.). For a request, it is 0
- in most cases, except for packets that set the user's status
- (set status, typing notify, etc.)
-
-session - The session id is used primarily when connecting through a HTTP
-id proxy. It is set in all cases, but has no effect in a direct
- connection. When the client sends the first packet, it is 0,
- the server responds with a session id that is used by the client
- and the server in all further packets. The server may change
- the session id, in which case the client must use the new
- session id henceforth.
-
-DATA - The data section is pkt_len bytes long and consists of a series
- of key/value pairs. All keys are numeric strings. The packet
- contains their numeric values in the ASCII character set. e.g.
- 1 == 0x31, 21 == 0x32 0x31
-
- The maximum number of digits in a key is unknown, although keys
- of up to three digits have been seen.
-
- Every key and value is terminated by a two byte sequence of
- 0xc0 0x80. Some keys may have empty values.
-
- The actual keys sent, and their meanings depend on the service
- in use.
-
- e.g. The packet data to send an instant message looks like this:
-
- 0x30 0xc080 yahoo_id 0xc080 0x31 0xc080 active_id 0xc080 0x35
- 0xc080 recipient_id 0xc080 0x3134 0xc080 message_text 0xc080
-
- The 0xc080 byte sequence is a separator. The values 0x30, 0x31,
- 0x35 and 0x3134 are the keys. Convert them to their ASCII
- equivalents and you get 0, 1, 5, 14 (0x3134 == 0x31 0x34)
-
-
-2. Services
-
-There are 45 known services at the moment, although more may exist. All
-known services are listed below along with the hex values that they
-correspond to. Any service without a hex value is one more than the
-previous value. i.e. YAHOO_SERVICE_LOGOFF=0x02 and
-YAHOO_SERVICE_ISBACK=0x04.
-
- YAHOO_SERVICE_LOGON = 0x01
- YAHOO_SERVICE_LOGOFF
- YAHOO_SERVICE_ISAWAY
- YAHOO_SERVICE_ISBACK
- YAHOO_SERVICE_IDLE = 0x05
- YAHOO_SERVICE_MESSAGE
- YAHOO_SERVICE_IDACT
- YAHOO_SERVICE_IDDEACT
- YAHOO_SERVICE_MAILSTAT
- YAHOO_SERVICE_USERSTAT = 0x0a
- YAHOO_SERVICE_NEWMAIL
- YAHOO_SERVICE_CHATINVITE
- YAHOO_SERVICE_CALENDAR
- YAHOO_SERVICE_NEWPERSONALMAIL
- YAHOO_SERVICE_NEWCONTACT = 0x0f
- YAHOO_SERVICE_ADDIDENT = 0x10
- YAHOO_SERVICE_ADDIGNORE
- YAHOO_SERVICE_PING
- YAHOO_SERVICE_GROUPRENAME
- YAHOO_SERVICE_SYSMESSAGE = 0x14
- YAHOO_SERVICE_PASSTHROUGH2 = 0x16
- YAHOO_SERVICE_CONFINVITE = 0x18
- YAHOO_SERVICE_CONFLOGON
- YAHOO_SERVICE_CONFDECLINE = 0x1a
- YAHOO_SERVICE_CONFLOGOFF
- YAHOO_SERVICE_CONFADDINVITE
- YAHOO_SERVICE_CONFMSG
- YAHOO_SERVICE_CHATLOGON
- YAHOO_SERVICE_CHATLOGOFF = 0x1f
- YAHOO_SERVICE_CHATMSG = 0x20
- YAHOO_SERVICE_GAMELOGON = 0x28
- YAHOO_SERVICE_GAMELOGOFF
- YAHOO_SERVICE_GAMEMSG = 0x2a
- YAHOO_SERVICE_FILETRANSFER = 0x46
- YAHOO_SERVICE_VOICECHAT = 0x4a
- YAHOO_SERVICE_NOTIFY = 0x4b
- YAHOO_SERVICE_P2PFILEXFER = 0x4d
- YAHOO_SERVICE_PEERTOPEER = 0x4f
- YAHOO_SERVICE_AUTHRESP = 0x54
- YAHOO_SERVICE_LIST = 0x55
- YAHOO_SERVICE_AUTH = 0x57
- YAHOO_SERVICE_ADDBUDDY = 0x83
- YAHOO_SERVICE_REMBUDDY = 0x84
- YAHOO_SERVICE_IGNORECONTACT = 0x85
- YAHOO_SERVICE_REJECTCONTACT = 0x86
-
-Most of the service codes should be self explanatory. Those that aren't
-are listed here:
-
-IDACT/IDDEACT - activate/deactivate an identity
-NOTIFY - typing/game notification
-FILETRASNFER - transfer a file using the yahoo filetransfer server as an
- intermediate
-P2PFILEXFER - transfer a file between two peers, yahoo server not used
-PEERTOPEER - check if peer to peer connections are possible
-AUTH - Send initial login packet (username), response contains
- challenge string
-AUTHRESP - Send response to challenge string, or, if received from
- server, contains reason for login failure
-LOGON/LOGOFF - a buddy logged in/out
-
-
-3. Status codes
-
-The status code is a four byte value. Most status codes are two bytes
-long. The status codes (in decimal except for offline and typing) are:
-
- YAHOO_STATUS_AVAILABLE = 0
- YAHOO_STATUS_BRB
- YAHOO_STATUS_BUSY
- YAHOO_STATUS_NOTATHOME
- YAHOO_STATUS_NOTATDESK
- YAHOO_STATUS_NOTINOFFICE = 5
- YAHOO_STATUS_ONPHONE
- YAHOO_STATUS_ONVACATION
- YAHOO_STATUS_OUTTOLUNCH
- YAHOO_STATUS_STEPPEDOUT = 9
- YAHOO_STATUS_INVISIBLE = 12
- YAHOO_STATUS_CUSTOM = 99
- YAHOO_STATUS_IDLE = 999
- YAHOO_STATUS_OFFLINE = 0x5a55aa56
- YAHOO_STATUS_TYPING = 0x16
-
-You may choose either AVAILABLE or INVISIBLE as your initial login status.
-TYPING is used only when sending a TYPING notification packet.
-
-
-4. Session states
-
-A Yahoo session has two states, Authentication and Messaging.
-
-4.1. Authentication
-
-The session starts in the authentication state. The client sends the username
-to the server. The server responds with a challenge string. The client
-responds to this challenge with two response strings. If authentication is
-successful, the connection goes into the messaging state, else, an error
-response is sent back.
-
-4.2. Messaging state
-
-After successful authentication, the session goes into the messaging state.
-The server sends the buddy list, ignore list, identity list and a list of
-cookies to the client. These might all be sent in a single packet. It then
-sends the list of online buddies along with their status codes. All this is
-sent without the client requesting anything.
-
-At this time, any offline messages are also delivered to the client.
-
-In the messaging state, a client may send/receive messages, join conferences,
-send/receive files, change state, etc.
-
-Messaging state is terminated when the user goes offline by sending a LOGOFF
-packet.
-
-
-5. Requests
-
-5.1. Authentication
-
-The first packet sent from the client is the authentication request
-packet. This consists of the user's yahoo id, or any identity
-corresponding to that yahoo id. The AUTH packet has one key/value pair.
-
- service: YAHOO_SERVICE_AUTH
- status: YAHOO_STATUS_AVAILABLE
-
- 1: yahoo_id
-
-The server responds with a Challenge string. The client then hashes the
-username and password with this challenge string, and sends it back as an
-AUTH_RESP packet.
-
- service: YAHOO_SERVICE_AUTHRESP
- status: initial login status
-
- 0: yahoo_id
- 6: response_string_1
- 96: response_string_2
- 1: active_id
-
-
-5.2. Sending a message
-
- service: YAHOO_SERVICE_MESSAGE
- status: 0
-
- 0: yahoo_id
- 1: active_id
- 5: recipient_id
- 14: message to send
-
-5.3. Send typing start/stop notification
-
- service: YAHOO_SERVICE_NOTIFY
- status: YAHOO_STATUS_TYPING
-
- 4: active_id
- 5: recipient_id
- 13: 1 or 0 depending on whether this is a typing start or stop
- packet
- 14: <space>
- 49: TYPING /* The literal string */
-
-5.4. Set status
-
- service: YAHOO_SERVICE_ISBACK or YAHOO_SERVICE_ISAWAY
- status: the status to set to
-
- 10: status_code
- if custom_status:
- 19: custom away message
- 47: 0 or 1 depending on whether it is away or not
-
-
-5.5. Logoff
-
- service: YAHOO_SERVICE_LOGOFF
- status: YAHOO_STATUS_AVAILABLE
-
- no key value pairs
-
-5.6. Keep alive - sent every 20 minutes
-
- service: YAHOO_SERVICE_PING
- status: YAHOO_STATUS_AVAILABLE
-
- no key value pairs
-
-5.7. Add buddy
-
- service: YAHOO_SERVICE_ADDBUDDY
- status: YAHOO_STATUS_AVAILABLE
-
- 1: yahoo_id
- 7: buddy_to_add
- 65: group to add to
-
-5.8. Remove buddy
-
- service: YAHOO_SERVICE_REMBUDDY
- status: YAHOO_STATUS_AVAILABLE
-
- 1: yahoo_id
- 7: buddy_to_remove
- 65: group to remove from
-
-
-5.9. Reject buddy add
-
- service: YAHOO_SERVICE_REJECTCONTACT
- status: YAHOO_STATUS_AVAILABLE
-
- 1: yahoo_id
- 7: buddy_to_reject
- 14: reject message
-
-
------------------------------------------------------------------------
-
-What? Is that all?
-
- Use the source Luke!
-
------------------------------------------------------------------------
-
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/config.h b/tools/_deprecated/Yahoo/src/libyahoo2/config.h deleted file mode 100644 index 4b776e5447..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/config.h +++ /dev/null @@ -1,52 +0,0 @@ -/*
- * $Id: config.h 9339 2009-04-05 00:15:32Z gena01 $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#ifndef _YAHOO_CONFIG_H_
-#define _YAHOO_CONFIG_H_
-
-#define HAVE_STRING_H 1
-#define STDC_HEADERS 1
-#define HAVE_STRCHR 1
-#define HAVE_MEMCPY 1
-
-#define PACKAGE "libyahoo2"
-#define VERSION "0.7.5"
-
-#include <windows.h>
-#include <stdio.h>
-
-#ifdef _MSC_VER
-
-#define strncasecmp strnicmp
-
-#define wsnprintf _wsnprintf
-#define snprintf _snprintf
-#define vsnprintf _vsnprintf
-
-#endif
-
-#define USE_STRUCT_CALLBACKS
-
-#define write(a,b,c) send(a,b,c,0)
-#define read(a,b,c) recv(a,b,c,0)
-
-#include <newpluginapi.h>
-#include <m_netlib.h>
-#define close(a) Netlib_CloseHandle((HANDLE)a)
-
-/*
- * Need to handle MD5 through Miranda. otherwise just include some md5.h implementation instead
- */
-#include <m_utils.h>
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/crypt.cpp b/tools/_deprecated/Yahoo/src/libyahoo2/crypt.cpp deleted file mode 100644 index b200ec02a2..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/crypt.cpp +++ /dev/null @@ -1,202 +0,0 @@ -/* One way encryption based on MD5 sum.
- Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-/* warmenhoven took this file and made it work with the md5.[ch] we
- * already had. isn't that lovely. people should just use linux or
- * freebsd, crypt works properly on those systems. i hate solaris */
-
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#elif HAVE_STRINGS_H
-# include <strings.h>
-#endif
-
-#include <stdlib.h>
-#include "yahoo_util.h"
-
-/* Define our magic string to mark salt for MD5 "encryption"
- replacement. This is meant to be the same as for other MD5 based
- encryption implementations. */
-static const char md5_salt_prefix[] = "$1$";
-
-/* Table with characters for base64 transformation. */
-static const char b64t[65] =
-"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-
-char *yahoo_crypt(char *key, char *salt)
-{
- char *buffer = NULL;
- size_t buflen = 0, needed = 3 + strlen (salt) + 1 + 26 + 1;
-
- BYTE alt_result[16];
- mir_md5_state_t ctx;
- mir_md5_state_t alt_ctx;
- int cnt;
- char *cp;
-
- if (buflen < needed) {
- buflen = needed;
- if ((buffer = (char*)realloc(buffer, buflen)) == NULL)
- return NULL;
- }
-
- /* Find beginning of salt string. The prefix should normally always
- be present. Just in case it is not. */
- if (strncmp (md5_salt_prefix, salt, sizeof (md5_salt_prefix) - 1) == 0)
- /* Skip salt prefix. */
- salt += sizeof (md5_salt_prefix) - 1;
-
- int salt_len = (int)MIN(strcspn(salt, "$"), 8);
- int key_len = (int)strlen(key);
-
- /* Prepare for the real work. */
- mir_md5_init(&ctx);
-
- /* Add the key string. */
- mir_md5_append(&ctx, (BYTE *)key, (int)key_len);
-
- /* Because the SALT argument need not always have the salt prefix we
- add it separately. */
- mir_md5_append(&ctx, (BYTE *)md5_salt_prefix, sizeof (md5_salt_prefix) - 1);
-
- /* The last part is the salt string. This must be at most 8
- characters and it ends at the first `$' character (for
- compatibility which existing solutions). */
- mir_md5_append(&ctx, (BYTE *)salt, (int)salt_len);
-
- /* Compute alternate MD5 sum with input KEY, SALT, and KEY. The
- final result will be added to the first context. */
- mir_md5_init(&alt_ctx);
-
- /* Add key. */
- mir_md5_append(&alt_ctx, (BYTE *)key, key_len);
-
- /* Add salt. */
- mir_md5_append(&alt_ctx, (BYTE *)salt, salt_len);
-
- /* Add key again. */
- mir_md5_append(&alt_ctx, (BYTE *)key, key_len);
-
- /* Now get result of this (16 bytes) and add it to the other
- context. */
- mir_md5_finish(&alt_ctx, alt_result);
-
- /* Add for any character in the key one byte of the alternate sum. */
- for (cnt = key_len; cnt > 16; cnt -= 16)
- mir_md5_append(&ctx, alt_result, 16);
- mir_md5_append(&ctx, alt_result, cnt);
-
- /* For the following code we need a NUL byte. */
- alt_result[0] = '\0';
-
- /* The original implementation now does something weird: for every 1
- bit in the key the first 0 is added to the buffer, for every 0
- bit the first character of the key. This does not seem to be
- what was intended but we have to follow this to be compatible. */
- for (cnt = key_len; cnt > 0; cnt >>= 1)
- mir_md5_append(&ctx, (cnt & 1) != 0 ? alt_result : (BYTE *)key, 1);
-
- /* Create intermediate result. */
- mir_md5_finish(&ctx, alt_result);
-
- /* Now comes another weirdness. In fear of password crackers here
- comes a quite long loop which just processes the output of the
- previous round again. We cannot ignore this here. */
- for (cnt = 0; cnt < 1000; ++cnt) {
- /* New context. */
- mir_md5_init(&ctx);
-
- /* Add key or last result. */
- if ((cnt & 1) != 0)
- mir_md5_append(&ctx, (BYTE *)key, key_len);
- else
- mir_md5_append(&ctx, alt_result, 16);
-
- /* Add salt for numbers not dividable by 3. */
- if (cnt % 3 != 0)
- mir_md5_append(&ctx, (BYTE *)salt, salt_len);
-
- /* Add key for numbers not dividable by 7. */
- if (cnt % 7 != 0)
- mir_md5_append(&ctx, (BYTE *)key, key_len);
-
- /* Add key or last result. */
- if ((cnt & 1) != 0)
- mir_md5_append(&ctx, alt_result, 16);
- else
- mir_md5_append(&ctx, (BYTE *)key, key_len);
-
- /* Create intermediate result. */
- mir_md5_finish(&ctx, alt_result);
- }
-
- /* Now we can construct the result string. It consists of three
- parts. */
-
- strncpy(buffer, md5_salt_prefix, MAX (0, buflen));
- cp = buffer + strlen(buffer);
- buflen -= sizeof (md5_salt_prefix);
-
- strncpy(cp, salt, MIN (buflen, salt_len));
- cp = cp + strlen(cp);
- buflen -= MIN (buflen, salt_len);
-
- if (buflen > 0) {
- *cp++ = '$';
- --buflen;
- }
-
-#define b64_from_24bit(B2, B1, B0, N) \
- do { \
- unsigned int w = ((B2) << 16) | ((B1) << 8) | (B0); \
- int n = (N); \
- while (n-- > 0 && buflen > 0) { \
- *cp++ = b64t[w & 0x3f]; \
- --buflen; \
- w >>= 6; \
- }\
- } while (0)
-
- b64_from_24bit (alt_result[0], alt_result[6], alt_result[12], 4);
- b64_from_24bit (alt_result[1], alt_result[7], alt_result[13], 4);
- b64_from_24bit (alt_result[2], alt_result[8], alt_result[14], 4);
- b64_from_24bit (alt_result[3], alt_result[9], alt_result[15], 4);
- b64_from_24bit (alt_result[4], alt_result[10], alt_result[5], 4);
- b64_from_24bit (0, 0, alt_result[11], 2);
- if (buflen <= 0) {
- FREE(buffer);
- } else
- *cp = '\0'; /* Terminate the string. */
-
- /* Clear the buffer for the intermediate result so that people
- attaching to processes or reading core dumps cannot get any
- information. We do it in this way to clear correct_words[]
- inside the MD5 implementation as well. */
- mir_md5_init(&ctx);
- mir_md5_finish(&ctx, alt_result);
- memset (&ctx, '\0', sizeof (ctx));
- memset (&alt_ctx, '\0', sizeof (alt_ctx));
-
- return buffer;
-}
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/libyahoo2.cpp b/tools/_deprecated/Yahoo/src/libyahoo2/libyahoo2.cpp deleted file mode 100644 index 7cf41884ce..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/libyahoo2.cpp +++ /dev/null @@ -1,6697 +0,0 @@ -/* - * libyahoo2: libyahoo2.c - * - * Some code copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net> - * - * Yahoo Search copyright (C) 2003, Konstantin Klyagin <konst AT konst.org.ua> - * - * Much of this code was taken and adapted from the yahoo module for - * gaim released under the GNU GPL. This code is also released under the - * GNU GPL. - * - * This code is derivitive of Gaim <http://gaim.sourceforge.net> - * copyright (C) 1998-1999, Mark Spencer <markster@marko.net> - * 1998-1999, Adam Fritzler <afritz@marko.net> - * 1998-2002, Rob Flynn <rob@marko.net> - * 2000-2002, Eric Warmenhoven <eric@warmenhoven.org> - * 2001-2002, Brian Macke <macke@strangelove.net> - * 2001, Anand Biligiri S <abiligiri@users.sf.net> - * 2001, Valdis Kletnieks - * 2002, Sean Egan <bj91704@binghamton.edu> - * 2002, Toby Gray <toby.gray@ntlworld.com> - * - * This library also uses code from other libraries, namely: - * Portions from libfaim copyright 1998, 1999 Adam Fritzler - * <afritz@auk.cx> - * Portions of Sylpheed copyright 2000-2002 Hiroyuki Yamamoto - * <hiro-y@kcn.ne.jp> - * - * - * 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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#ifndef _WIN32 -# include <unistd.h> -#endif - -#include <errno.h> -#include <stdio.h> -#include <stdarg.h> - -#if STDC_HEADERS -# include <string.h> -#else -# if !HAVE_STRCHR -# define strchr index -# define strrchr rindex -# endif -char *strchr(), *strrchr(); -# if !HAVE_MEMCPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# define memmove(d, s, n) bcopy ((s), (d), (n)) -# endif -#endif - -#include <sys/types.h> - -#include <stdlib.h> -#include <ctype.h> -#include <time.h> -#include <malloc.h> - -#include "yahoo2.h" -#include "yahoo_httplib.h" -#include "yahoo_util.h" - -#include "yahoo2_callbacks.h" -#include "yahoo_debug.h" - -#ifdef USE_STRUCT_CALLBACKS -struct yahoo_callbacks *yc = NULL; - -void yahoo_register_callbacks(struct yahoo_callbacks * tyc) -{ - yc = tyc; -} - -#define YAHOO_CALLBACK(x) yc->x -#else -#define YAHOO_CALLBACK(x) x -#endif - -struct yahoo_pair -{ - int key; - char *value; -}; - -struct yahoo_packet -{ - unsigned short int service; - int status; - unsigned int id; - YList *hash; -}; - -struct yahoo_search_state -{ - int lsearch_type; - char *lsearch_text; - int lsearch_gender; - int lsearch_agerange; - int lsearch_photo; - int lsearch_yahoo_only; - int lsearch_nstart; - int lsearch_nfound; - int lsearch_ntotal; -}; - -struct data_queue -{ - unsigned char *queue; - int len; -}; - -struct yahoo_input_data -{ - struct yahoo_data *yd; - struct yahoo_webcam *wcm; - struct yahoo_webcam_data *wcd; - struct yahoo_search_state *ys; - - INT_PTR fd; - enum yahoo_connection_type type; - - unsigned char *rxqueue; - int rxlen; - int read_tag; - - YList *txqueues; - int write_tag; -}; - -/* default values for servers */ -static const char pager_host[] = "scs.msg.yahoo.com"; -static const int pager_port = 5050; -static const int fallback_ports[] = { 80, 23, 25, 20, 119, 8001, 8002, 5050, 0 }; -static const char filetransfer_host[] = "filetransfer.msg.yahoo.com"; -static const int filetransfer_port = 80; -static const char webcam_host[] = "webcam.yahoo.com"; -static const int webcam_port = 5100; -static const char webcam_description[] = ""; -static char local_host[] = ""; -static int conn_type = Y_WCM_DSL; -static const char login_host[] = "login.yahoo.com"; -static char profile_url[] = "http://profiles.yahoo.com/"; - -typedef struct -{ - int key; - char *name; -}value_string; - -static int yahoo_send_data(INT_PTR fd, const char *data, int len); - -int yahoo_log_message(char * fmt, ...) -{ - char out[1024]; - va_list ap; - va_start(ap, fmt); - vsnprintf(out, sizeof(out), fmt, ap); - va_end(ap); - return YAHOO_CALLBACK(ext_yahoo_log)("%s", out); -} - -int yahoo_connect(char * host, int port, int type) -{ - return YAHOO_CALLBACK(ext_yahoo_connect)(host, port, type); -} - -static enum yahoo_log_level log_level = YAHOO_LOG_NONE; - -enum yahoo_log_level yahoo_get_log_level() -{ - return log_level; -} - -int yahoo_set_log_level(enum yahoo_log_level level) -{ - enum yahoo_log_level l = log_level; - log_level = level; - return l; -} - -static const value_string ymsg_service_vals[] = { - {YAHOO_SERVICE_LOGON, "Pager Logon"}, - {YAHOO_SERVICE_LOGOFF, "Pager Logoff"}, - {YAHOO_SERVICE_ISAWAY, "Is Away"}, - {YAHOO_SERVICE_ISBACK, "Is Back"}, - {YAHOO_SERVICE_IDLE, "Idle"}, - {YAHOO_SERVICE_MESSAGE, "Message"}, - {YAHOO_SERVICE_IDACT, "Activate Identity"}, - {YAHOO_SERVICE_IDDEACT, "Deactivate Identity"}, - {YAHOO_SERVICE_MAILSTAT, "Mail Status"}, - {YAHOO_SERVICE_USERSTAT, "User Status"}, - {YAHOO_SERVICE_NEWMAIL, "New Mail"}, - {YAHOO_SERVICE_CHATINVITE, "Chat Invitation"}, - {YAHOO_SERVICE_CALENDAR, "Calendar Reminder"}, - {YAHOO_SERVICE_NEWPERSONALMAIL, "New Personals Mail"}, - {YAHOO_SERVICE_NEWCONTACT, "New Friend"}, - {YAHOO_SERVICE_ADDIDENT, "Add Identity"}, - {YAHOO_SERVICE_ADDIGNORE, "Add Ignore"}, - {YAHOO_SERVICE_PING, "Ping"}, - {YAHOO_SERVICE_GOTGROUPRENAME, "Got Group Rename"}, - {YAHOO_SERVICE_SYSMESSAGE, "System Message"}, - {YAHOO_SERVICE_SKINNAME, "YAHOO_SERVICE_SKINNAME"}, - {YAHOO_SERVICE_PASSTHROUGH2, "Passthrough 2"}, - {YAHOO_SERVICE_CONFINVITE, "Conference Invitation"}, - {YAHOO_SERVICE_CONFLOGON, "Conference Logon"}, - {YAHOO_SERVICE_CONFDECLINE, "Conference Decline"}, - {YAHOO_SERVICE_CONFLOGOFF, "Conference Logoff"}, - {YAHOO_SERVICE_CONFADDINVITE, "Conference Additional Invitation"}, - {YAHOO_SERVICE_CONFMSG, "Conference Message"}, - {YAHOO_SERVICE_CHATLOGON, "Chat Logon"}, - {YAHOO_SERVICE_CHATLOGOFF, "Chat Logoff"}, - {YAHOO_SERVICE_CHATMSG, "Chat Message"}, - {YAHOO_SERVICE_GAMELOGON, "Game Logon"}, - {YAHOO_SERVICE_GAMELOGOFF, "Game Logoff"}, - {YAHOO_SERVICE_GAMEMSG, "Game Message"}, - {YAHOO_SERVICE_FILETRANSFER, "File Transfer"}, - {YAHOO_SERVICE_VOICECHAT, "Voice Chat"}, - {YAHOO_SERVICE_NOTIFY, "Notify"}, - {YAHOO_SERVICE_VERIFY, "Verify"}, - {YAHOO_SERVICE_P2PFILEXFER, "P2P File Transfer"}, - {YAHOO_SERVICE_PEERTOPEER, "Peer To Peer"}, - {YAHOO_SERVICE_WEBCAM, "WebCam"}, - {YAHOO_SERVICE_AUTHRESP, "Authentication Response"}, - {YAHOO_SERVICE_LIST, "List"}, - {YAHOO_SERVICE_AUTH, "Authentication"}, - {YAHOO_SERVICE_ADDBUDDY, "Add Buddy"}, - {YAHOO_SERVICE_REMBUDDY, "Remove Buddy"}, - {YAHOO_SERVICE_IGNORECONTACT, "Ignore Contact"}, - {YAHOO_SERVICE_REJECTCONTACT, "Reject Contact"}, - {YAHOO_SERVICE_GROUPRENAME, "Group Rename"}, - {YAHOO_SERVICE_KEEPALIVE, "Keep Alive"}, - {YAHOO_SERVICE_CHATONLINE, "Chat Online"}, - {YAHOO_SERVICE_CHATGOTO, "Chat Goto"}, - {YAHOO_SERVICE_CHATJOIN, "Chat Join"}, - {YAHOO_SERVICE_CHATLEAVE, "Chat Leave"}, - {YAHOO_SERVICE_CHATEXIT, "Chat Exit"}, - {YAHOO_SERVICE_CHATADDINVITE, "Chat Invite"}, - {YAHOO_SERVICE_CHATLOGOUT, "Chat Logout"}, - {YAHOO_SERVICE_CHATPING, "Chat Ping"}, - {YAHOO_SERVICE_COMMENT, "Comment"}, - {YAHOO_SERVICE_GAME_INVITE,"Game Invite"}, - {YAHOO_SERVICE_STEALTH_PERM, "Stealth Permanent"}, - {YAHOO_SERVICE_STEALTH_SESSION, "Stealth Session"}, - {YAHOO_SERVICE_AVATAR,"Avatar"}, - {YAHOO_SERVICE_PICTURE_CHECKSUM,"Picture Checksum"}, - {YAHOO_SERVICE_PICTURE,"Picture"}, - {YAHOO_SERVICE_PICTURE_UPDATE,"Picture Update"}, - {YAHOO_SERVICE_PICTURE_UPLOAD,"Picture Upload"}, - {YAHOO_SERVICE_YAB_UPDATE,"Yahoo Address Book Update"}, - {YAHOO_SERVICE_Y6_VISIBLE_TOGGLE, "Y6 Visibility Toggle"}, - {YAHOO_SERVICE_Y6_STATUS_UPDATE, "Y6 Status Update"}, - {YAHOO_SERVICE_PICTURE_SHARING, "Picture Sharing Status"}, - {YAHOO_SERVICE_VERIFY_ID_EXISTS, "Verify ID Exists"}, - {YAHOO_SERVICE_AUDIBLE, "Audible"}, - {YAHOO_SERVICE_Y7_CONTACT_DETAILS,"Y7 Contact Details"}, - {YAHOO_SERVICE_Y7_CHAT_SESSION, "Y7 Chat Session"}, - {YAHOO_SERVICE_Y7_AUTHORIZATION,"Y7 Buddy Authorization"}, - {YAHOO_SERVICE_Y7_FILETRANSFER,"Y7 File Transfer"}, - {YAHOO_SERVICE_Y7_FILETRANSFERINFO,"Y7 File Transfer Information"}, - {YAHOO_SERVICE_Y7_FILETRANSFERACCEPT,"Y7 File Transfer Accept"}, - {YAHOO_SERVICE_Y7_MINGLE, "Y7 360 Mingle"}, - {YAHOO_SERVICE_Y7_CHANGE_GROUP, "Y7 Change Group"}, - {YAHOO_SERVICE_Y8_STATUS_UPDATE, "Y8 Buddy Status Update"}, - {YAHOO_SERVICE_Y8_LIST, "Y8 Buddy List"}, - {YAHOO_SERVICE_Y9_MESSAGE_ACK, "Y9 Message Ack"}, - {YAHOO_SERVICE_Y9_PINGBOX_LIST, "Y9 Pingbox List"}, - {YAHOO_SERVICE_Y9_PINGBOX_GUEST_STATUS, "Y9 Pingbox Guest Status"}, - {YAHOO_SERVICE_Y9_PINGBOX_NA, "Y9 Pingbox ???"}, - {YAHOO_SERVICE_WEBLOGIN, "Web Login"}, - {YAHOO_SERVICE_SMS_MSG, "SMS Message"}, - {YAHOO_SERVICE_Y7_DISCONNECTED, "Y7 Disconnected"}, - {0, NULL} -}; - -static const value_string ymsg_status_vals[] = { - {YPACKET_STATUS_DISCONNECTED,"Disconnected"}, - {YPACKET_STATUS_DEFAULT,""}, - {YPACKET_STATUS_SERVERACK,"Server Ack"}, - {YPACKET_STATUS_GAME,"Playing Game"}, - {YPACKET_STATUS_AWAY, "Away"}, - {YPACKET_STATUS_CONTINUED,"More Packets??"}, - {YPACKET_STATUS_NOTIFY, "Notify"}, - {YPACKET_STATUS_WEBLOGIN,"Web Login"}, - {YPACKET_STATUS_OFFLINE,"Offline"}, - {0, NULL} -}; - -static const value_string packet_keys[] = { - { 0, "identity" }, - { 1, "ID" }, - { 2, "id?" }, - { 3, "my id"}, - { 4, "ID/Nick"}, - { 5, "To"}, - { 6, "auth token 1"}, - { 7, "Buddy" }, - { 8, "# buddies"}, - { 9, "# mails"}, - { 10, "state"}, - { 11, "session"}, - { 12, "reverse ip? [gaim]"}, - { 13, "stat/location"}, // bitnask: 0 = pager, 1 = chat, 2 = game - { 14, "ind/msg"}, - { 15, "time"}, - { 16, "Error msg"}, - { 17, "chat"}, - { 18, "subject/topic?"}, - { 19, "custom msg"}, - { 20, "url"}, - { 24, "session timestamp"}, - { 27, "filename"}, - { 28, "filesize"}, - { 31, "visibility?"}, - { 38, "expires"}, - { 42, "email"}, - { 43, "email who"}, - { 47, "away"}, - { 49, "service"}, - { 50, "conf host"}, - { 52, "conf invite"}, - { 53, "conf logon"}, - { 54, "conf decline"}, - { 55, "conf unavail"}, - { 56, "conf logoff"}, - { 57, "conf room"}, - { 58, "conf joinmsg"}, - { 59, "cookies"}, - { 60, "SMS/Mobile"}, - { 61, "Cookie?"}, - { 63, "imvironment name;num"}, - { 64, "imvironment enabled/avail"}, - { 65, "group"}, - { 66, "login status"}, - { 73, "user name"}, - { 87, "buds/groups"}, - { 88, "ignore list"}, - { 89, "identities"}, - { 91, "pingbox nick"}, - { 92, "pingbox id"}, - { 94, "auth seed"}, - { 96, "auth token 2"}, - { 97, "utf8"}, - {104, "room name"}, - {105, "chat topic"}, - {108, "chat nbuddies"}, - {109, "chat from"}, - {110, "chat age"}, - {113, "chat attrs"}, - {117, "chat msg"}, - {124, "chat msg type"}, - {128, "chat room category?"}, - {129, "chat room serial 2"}, - {130, "first join/chat room cookie"}, - {135, "YIM version"}, - {137, "idle time"}, - {138, "idle?"}, - {142, "chat location"}, - {143, "ping interval (mins)"}, - {144, "keep-alive interval (mins)"}, - {185, "stealth/hide?"}, - {192, "Pictures/Buddy Icons"}, - {197, "Avatars"}, - {203, "YAB data?"}, - {206, "display image type"}, - {213, "share avatar type"}, - {216, "first name"}, - {219, "cookie separator?"}, - {222, "FT7 Service"}, - {223, "authorized?"}, - {230, "the audible, in foo.bar.baz format"}, - {231, "audible text"}, - {232, "weird number (md5 hash?) [audible]"}, - {241, "protocol"}, - {244, "client version"}, - {249, "FT7 Op"}, - {250, "FT7 Relay Host"}, - {251, "File Preview?"}, - {254, "last name"}, - {265, "FT7 Token"}, - {266, "FT7 # Files"}, - {267, "FT7 Preview"}, - {317, "Stealth"}, - {430, "Seq #"}, - {450, "Retry"}, - {1002, "YIM6+"}, - {10093, "YIM7 (sets it to 4)"}, - {10097, "Region (SMS?)"}, - { -1, "" } -}; - -const char *dbg_key(int key) -{ - int i = 0; - - while ((packet_keys[i].key >= 0) && (packet_keys[i].key != key)) - i++; - - if (packet_keys[i].key != key) - return NULL; - else - return packet_keys[i].name; -} - -const char *dbg_service(int key) -{ - int i = 0; - - while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key)) - i++; - - if (ymsg_service_vals[i].key != key) - return NULL; - else - return ymsg_service_vals[i].name; -} - -const char *dbg_status(int key) -{ - int i; - - for (i = 0; ymsg_status_vals[i].name != NULL; i++) { - if (ymsg_status_vals[i].key == key) - return ymsg_status_vals[i].name; - } - - return NULL; -} - -static struct yahoo_server_settings* _yahoo_default_server_settings() -{ - struct yahoo_server_settings *yss = y_new0(struct yahoo_server_settings, 1); - - yss->pager_host = strdup(pager_host); - yss->pager_port = pager_port; - yss->filetransfer_host = strdup(filetransfer_host); - yss->filetransfer_port = filetransfer_port; - yss->webcam_host = strdup(webcam_host); - yss->webcam_port = webcam_port; - yss->webcam_description = strdup(webcam_description); - yss->local_host = strdup(local_host); - yss->conn_type = conn_type; - yss->pic_cksum = -1; - yss->login_host = strdup(login_host); - - return yss; -} - -static struct yahoo_server_settings * _yahoo_assign_server_settings(va_list ap) -{ - struct yahoo_server_settings *yss = _yahoo_default_server_settings(); - char *key; - char *svalue; - int nvalue; - - while (1) { - key = va_arg(ap, char *); - if (key == NULL) - break; - - if (!strcmp(key, "pager_host")) { - svalue = va_arg(ap, char *); - free(yss->pager_host); - yss->pager_host = strdup(svalue); - } - else if (!strcmp(key, "pager_port")) { - nvalue = va_arg(ap, int); - yss->pager_port = nvalue; - } - else if (!strcmp(key, "filetransfer_host")) { - svalue = va_arg(ap, char *); - free(yss->filetransfer_host); - yss->filetransfer_host = strdup(svalue); - } - else if (!strcmp(key, "filetransfer_port")) { - nvalue = va_arg(ap, int); - yss->filetransfer_port = nvalue; - } - else if (!strcmp(key, "webcam_host")) { - svalue = va_arg(ap, char *); - free(yss->webcam_host); - yss->webcam_host = strdup(svalue); - } - else if (!strcmp(key, "webcam_port")) { - nvalue = va_arg(ap, int); - yss->webcam_port = nvalue; - } - else if (!strcmp(key, "webcam_description")) { - svalue = va_arg(ap, char *); - free(yss->webcam_description); - yss->webcam_description = strdup(svalue); - } - else if (!strcmp(key, "local_host")) { - svalue = va_arg(ap, char *); - free(yss->local_host); - yss->local_host = strdup(svalue); - } - else if (!strcmp(key, "conn_type")) { - nvalue = va_arg(ap, int); - yss->conn_type = nvalue; - } - else if (!strcmp(key, "picture_checksum")) { - nvalue = va_arg(ap, int); - yss->pic_cksum = nvalue; - } - else if (!strcmp(key, "web_messenger")) { - nvalue = va_arg(ap, int); - yss->web_messenger = nvalue; - } - else if (!strcmp(key, "login_host")) { - svalue = va_arg(ap, char *); - free(yss->login_host); - yss->login_host = strdup(svalue); - } - else { - WARNING(("Unknown key passed to yahoo_init, " - "perhaps you didn't terminate the list " - "with NULL")); - } - } - - return yss; -} - -static void yahoo_free_server_settings(struct yahoo_server_settings *yss) -{ - if (!yss) - return; - - free(yss->pager_host); - free(yss->filetransfer_host); - free(yss->webcam_host); - free(yss->webcam_description); - free(yss->local_host); - free(yss->login_host); - free(yss); -} - -static YList *conns = NULL; -static YList *inputs = NULL; -static int last_id = 0; - -static void add_to_list(struct yahoo_data *yd) -{ - conns = y_list_prepend(conns, yd); -} -static struct yahoo_data * find_conn_by_id(int id) -{ - YList *l; - for (l = conns; l; l = y_list_next(l)) { - struct yahoo_data *yd = (struct yahoo_data *) l->data; - if (yd->client_id == id) - return yd; - } - return NULL; -} -static void del_from_list(struct yahoo_data *yd) -{ - conns = y_list_remove(conns, yd); -} - -/* call repeatedly to get the next one */ -/* -static struct yahoo_input_data * find_input_by_id(int id) -{ - YList *l; - for (l = inputs; l; l = y_list_next(l)) { - struct yahoo_input_data *yid = l->data; - if (yid->yd->client_id == id) - return yid; - } - return NULL; -} -*/ - -static struct yahoo_input_data * find_input_by_id_and_webcam_user(int id, const char * who) -{ - YList *l; - LOG(("find_input_by_id_and_webcam_user")); - for (l = inputs; l; l = y_list_next(l)) { - struct yahoo_input_data *yid = (struct yahoo_input_data *) l->data; - if (yid->type == YAHOO_CONNECTION_WEBCAM && yid->yd->client_id == id - && yid->wcm && - ((who && yid->wcm->user && !strcmp(who, yid->wcm->user)) || - !(yid->wcm->user && !who))) - return yid; - } - return NULL; -} - -static struct yahoo_input_data * find_input_by_id_and_type(int id, enum yahoo_connection_type type) -{ - YList *l; - - //LOG(("[find_input_by_id_and_type] id: %d, type: %d", id, type)); - for (l = inputs; l; l = y_list_next(l)) { - struct yahoo_input_data *yid = (struct yahoo_input_data *)l->data; - if (yid->type == type && yid->yd->client_id == id) { - //LOG(("[find_input_by_id_and_type] Got it!!!")); - return yid; - } - } - return NULL; -} - -static struct yahoo_input_data * find_input_by_id_and_fd(int id, INT_PTR fd) -{ - YList *l; - LOG(("find_input_by_id_and_fd")); - for (l = inputs; l; l = y_list_next(l)) { - struct yahoo_input_data *yid = (struct yahoo_input_data *) l->data; - - if (yid->fd == fd && yid->yd->client_id == id) - return yid; - } - return NULL; -} - -static int count_inputs_with_id(int id) -{ - int c = 0; - YList *l; - LOG(("counting %d", id)); - for (l = inputs; l; l = y_list_next(l)) { - struct yahoo_input_data *yid = (struct yahoo_input_data *) l->data; - if (yid->yd->client_id == id) - c++; - } - LOG(("%d", c)); - return c; -} - - -extern char *yahoo_crypt(char *, char *); - -/* Free a buddy list */ -static void yahoo_free_buddies(YList * list) -{ - YList *l; - - for (l = list; l; l = l->next) { - struct yahoo_buddy *bud = (struct yahoo_buddy *) l->data; - if (!bud) - continue; - - FREE(bud->group); - FREE(bud->id); - FREE(bud->real_name); - if (bud->yab_entry) { - FREE(bud->yab_entry->fname); - FREE(bud->yab_entry->lname); - FREE(bud->yab_entry->nname); - FREE(bud->yab_entry->id); - FREE(bud->yab_entry->email); - FREE(bud->yab_entry->hphone); - FREE(bud->yab_entry->wphone); - FREE(bud->yab_entry->mphone); - FREE(bud->yab_entry); - } - FREE(bud); - l->data = bud = NULL; - } - - y_list_free(list); -} - -/* Free an identities list */ -static void yahoo_free_identities(YList * list) -{ - while (list) { - YList *n = list; - FREE(list->data); - list = y_list_remove_link(list, list); - y_list_free_1(n); - } -} - -/* Free webcam data */ -static void yahoo_free_webcam(struct yahoo_webcam *wcm) -{ - if (wcm) { - FREE(wcm->user); - FREE(wcm->server); - FREE(wcm->key); - FREE(wcm->description); - FREE(wcm->my_ip); - } - FREE(wcm); -} - -static void yahoo_free_data(struct yahoo_data *yd) -{ - FREE(yd->user); - FREE(yd->password); - FREE(yd->pw_token); - FREE(yd->cookie_y); - FREE(yd->cookie_t); - FREE(yd->cookie_c); - FREE(yd->cookie_b); - FREE(yd->login_cookie); - FREE(yd->login_id); - FREE(yd->rawstealthlist); - FREE(yd->ygrp); - - yahoo_free_buddies(yd->buddies); - yahoo_free_buddies(yd->ignore); - yahoo_free_identities(yd->identities); - - yahoo_free_server_settings(yd->server_settings); - - FREE(yd); -} - -#define YAHOO_PACKET_HDRLEN (4 + 2 + 2 + 2 + 2 + 4 + 4) - -static struct yahoo_packet *yahoo_packet_new(enum yahoo_service service, -enum ypacket_status status, int id) -{ - struct yahoo_packet *pkt = y_new0(struct yahoo_packet, 1); - - pkt->service = service; - pkt->status = status; - pkt->id = id; - - return pkt; -} - -static void yahoo_packet_hash(struct yahoo_packet *pkt, int key, const char *value) -{ - struct yahoo_pair *pair = y_new0(struct yahoo_pair, 1); - pair->key = key; - pair->value = strdup(value); - pkt->hash = y_list_append(pkt->hash, pair); -} - -static void yahoo_packet_hash_int(struct yahoo_packet *pkt, int key, int value) -{ - char c[128]; - - snprintf(c, 128, "%d", value); - yahoo_packet_hash(pkt, key, c); -} - - - -static int yahoo_packet_length(struct yahoo_packet *pkt) -{ - YList *l; - - int len = 0; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - int tmp = pair->key; - do { - tmp /= 10; - len++; - } while (tmp); - len += 2; - len += (int)strlen(pair->value); - len += 2; - } - - return len; -} - -#define yahoo_put16(buf, data) ( \ - (*(buf) = (unsigned char)((data)>>8)&0xff), \ - (*((buf)+1) = (unsigned char)(data)&0xff), \ - 2) -#define yahoo_get16(buf) ((((*(buf))&0xff)<<8) + ((*((buf)+1)) & 0xff)) -#define yahoo_put32(buf, data) ( \ - (*((buf)) = (unsigned char)((data)>>24)&0xff), \ - (*((buf)+1) = (unsigned char)((data)>>16)&0xff), \ - (*((buf)+2) = (unsigned char)((data)>>8)&0xff), \ - (*((buf)+3) = (unsigned char)(data)&0xff), \ - 4) -#define yahoo_get32(buf) ((((*(buf) )&0xff)<<24) + \ - (((*((buf)+1))&0xff)<<16) + \ - (((*((buf)+2))&0xff)<< 8) + \ - (((*((buf)+3))&0xff))) - -static void yahoo_packet_read(struct yahoo_packet *pkt, unsigned char *data, int len) -{ - int pos = 0, zl; - char z[100]; - - snprintf(z, sizeof(z), "-=[ %s (0x%02x) ", dbg_service(pkt->service), pkt->service); - - if (pkt->status != 0) - snprintf(z, sizeof(z), "%s, %s (%d)", z, dbg_status(pkt->status), pkt->status); - - if (len != 0) - snprintf(z, sizeof(z), "%s Length: %d", z, len); - - snprintf(z, sizeof(z), "%s ]=-", z); - - zl = (int)strlen(z); - DEBUG_MSG1((z)); - - while (pos + 1 < len) { - char *key, *value = NULL; - int accept; - int x; - - struct yahoo_pair *pair = y_new0(struct yahoo_pair, 1); - - key = (char *)malloc(len + 1); - x = 0; - while (pos + 1 < len) { - if (data[pos] == 0xc0 && data[pos + 1] == 0x80) - break; - key[x++] = data[pos++]; - } - key[x] = 0; - pos += 2; - pair->key = strtol(key, NULL, 10); - free(key); - - accept = x; - - if (pos + 1 > len) { - /* Malformed packet! (Truncated--garbage or something) */ - accept = 0; - } - - /* if x is 0 there was no key, so don't accept it */ - if (accept) - value = (char *)malloc(len - pos + 1); - x = 0; - while (pos + 1 < len) { - if (data[pos] == 0xc0 && data[pos + 1] == 0x80) - break; - if (accept) - value[x++] = data[pos++]; - } - if (accept) - value[x] = 0; - pos += 2; - if (accept) { - pair->value = strdup(value); - FREE(value); - pkt->hash = y_list_append(pkt->hash, pair); - - DEBUG_MSG1(("Key: (%5d) %-25s Value: '%s'", pair->key, dbg_key(pair->key), pair->value)); - } - else { - FREE(pair); - } - } - - for (pos = 0; pos < zl; pos++) z[pos] = '-'; - z[pos] = '\0'; - DEBUG_MSG1((z)); -} - -static void yahoo_packet_write(struct yahoo_packet *pkt, unsigned char *data) -{ - YList *l; - int pos = 0; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - unsigned char buf[100]; - - snprintf((char *)buf, sizeof(buf), "%d", pair->key); - strcpy((char *)data + pos, (char *)buf); - pos += (int)strlen((char *)buf); - data[pos++] = 0xc0; - data[pos++] = 0x80; - - strcpy((char *)data + pos, pair->value); - pos += (int)strlen(pair->value); - data[pos++] = 0xc0; - data[pos++] = 0x80; - } -} - -static void yahoo_dump_unhandled(struct yahoo_packet *pkt) -{ - YList *l; - - NOTICE(("Service: %s (0x%02x)\tStatus: %s (%d)", dbg_service(pkt->service), pkt->service, dbg_status(pkt->status), pkt->status)); - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - NOTICE(("\t%d => %s", pair->key, pair->value)); - } -} - - -static void yahoo_packet_dump(unsigned char *data, int len) -{ - if (yahoo_get_log_level() >= YAHOO_LOG_DEBUG) { - char z[4096], t[10]; - int i; - - z[0] = '\0'; - - for (i = 0; i < len; i++) { - if ((i % 8 == 0) && i) - //YAHOO_CALLBACK(ext_yahoo_log)(" "); - mir_strcat(z, " "); - if ((i % 16 == 0) && i) - mir_strcat(z, "\n"); - - wsprintfA(t, "%02x ", data[i]); - mir_strcat(z, t); - } - mir_strcat(z, "\n"); - YAHOO_CALLBACK(ext_yahoo_log)(z); - - z[0] = '\0'; - for (i = 0; i < len; i++) { - if ((i % 8 == 0) && i) - //YAHOO_CALLBACK(ext_yahoo_log)(" "); - mir_strcat(z, " "); - if ((i % 16 == 0) && i) - //YAHOO_CALLBACK(ext_yahoo_log)("\n"); - mir_strcat(z, "\n"); - if (isprint(data[i])) { - //YAHOO_CALLBACK(ext_yahoo_log)(" %c ", data[i]); - wsprintfA(t, " %c ", data[i]); - mir_strcat(z, t); - } - else - //YAHOO_CALLBACK(ext_yahoo_log)(" . "); - mir_strcat(z, " . "); - } - //YAHOO_CALLBACK(ext_yahoo_log)("\n"); - mir_strcat(z, "\n"); - YAHOO_CALLBACK(ext_yahoo_log)(z); - } -} - -static const char base64digits[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -"abcdefghijklmnopqrstuvwxyz" -"0123456789._"; - -static void to_y64(unsigned char *out, const unsigned char *in, int inlen) -/* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */ -{ - for (; inlen >= 3; inlen -= 3) { - *out++ = base64digits[in[0] >> 2]; - *out++ = base64digits[((in[0] << 4) & 0x30) | (in[1] >> 4)]; - *out++ = base64digits[((in[1] << 2) & 0x3c) | (in[2] >> 6)]; - *out++ = base64digits[in[2] & 0x3f]; - in += 3; - } - if (inlen > 0) { - unsigned char fragment; - - *out++ = base64digits[in[0] >> 2]; - fragment = (in[0] << 4) & 0x30; - if (inlen > 1) - fragment |= in[1] >> 4; - *out++ = base64digits[fragment]; - *out++ = (inlen < 2) ? '-' - : base64digits[(in[1] << 2) & 0x3c]; - *out++ = '-'; - } - *out = '\0'; -} - -static void yahoo_add_to_send_queue(struct yahoo_input_data *yid, void *data, int length) -{ - struct data_queue *tx = y_new0(struct data_queue, 1); - tx->queue = y_new0(unsigned char, length); - tx->len = length; - memcpy(tx->queue, data, length); - - yid->txqueues = y_list_append(yid->txqueues, tx); - - if (!yid->write_tag) - yid->write_tag = YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, yid->fd, YAHOO_INPUT_WRITE, yid); -} - -static void yahoo_send_packet(struct yahoo_input_data *yid, struct yahoo_packet *pkt, int extra_pad) -{ - int pktlen = yahoo_packet_length(pkt); - int len = YAHOO_PACKET_HDRLEN + pktlen; - unsigned char *data; - int pos = 0; - - if (yid->fd < 0) - return; - - data = y_new0(unsigned char, len + 1); - - memcpy(data + pos, "YMSG", 4); pos += 4; - pos += yahoo_put16(data + pos, YAHOO_PROTO_VER); /* version [latest 12 0x000c] */ - pos += yahoo_put16(data + pos, 0x0000); /* HIWORD pkt length??? */ - pos += yahoo_put16(data + pos, pktlen + extra_pad); /* LOWORD pkt length? */ - pos += yahoo_put16(data + pos, pkt->service); /* service */ - pos += yahoo_put32(data + pos, pkt->status); /* status [4bytes] */ - pos += yahoo_put32(data + pos, pkt->id); /* session [4bytes] */ - - yahoo_packet_write(pkt, data + pos); - - //yahoo_packet_dump(data, len); - DEBUG_MSG1(("Sending Packet:")); - - yahoo_packet_read(pkt, data + pos, len - pos); - - if (yid->type == YAHOO_CONNECTION_FT || - (yid->type == YAHOO_CONNECTION_PAGER && - (pkt->service == YAHOO_SERVICE_KEEPALIVE || - pkt->service == YAHOO_SERVICE_PING || - pkt->service == YAHOO_SERVICE_LOGOFF)) - ) { - yahoo_send_data(yid->fd, (const char *)data, len); - } - else { - yahoo_add_to_send_queue(yid, data, len); - } - - FREE(data); -} - -static void yahoo_packet_free(struct yahoo_packet *pkt) -{ - while (pkt->hash) { - struct yahoo_pair *pair = (struct yahoo_pair *)pkt->hash->data; - YList *tmp; - FREE(pair->value); - FREE(pair); - tmp = pkt->hash; - pkt->hash = y_list_remove_link(pkt->hash, pkt->hash); - y_list_free_1(tmp); - } - FREE(pkt); -} - -static int yahoo_send_data(INT_PTR fd, const char *data, int len) -{ - int ret; - int e; - - if (fd < 0) - return -1; - - //yahoo_packet_dump(data, len); - - do { - ret = write(fd, data, len); - } while (ret == -1 && errno == EINTR); - e = errno; - - if (ret == -1) { - LOG(("wrote data: ERR %s", strerror(errno))); - } /*else { - LOG(("wrote data: OK")); - }*/ - - errno = e; - return ret; -} - -void yahoo_close(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return; - - del_from_list(yd); - - yahoo_free_data(yd); - if (id == last_id) - last_id--; -} - -static void yahoo_input_close(struct yahoo_input_data *yid) -{ - inputs = y_list_remove(inputs, yid); - - LOG(("yahoo_input_close(read)")); - YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->yd->client_id, yid->read_tag); - LOG(("yahoo_input_close(write)")); - YAHOO_CALLBACK(ext_yahoo_remove_handler)(yid->yd->client_id, yid->write_tag); - yid->read_tag = yid->write_tag = 0; - if (yid->fd) - close(yid->fd); - yid->fd = 0; - FREE(yid->rxqueue); - if (count_inputs_with_id(yid->yd->client_id) == 0) { - LOG(("closing %d", yid->yd->client_id)); - yahoo_close(yid->yd->client_id); - } - yahoo_free_webcam(yid->wcm); - if (yid->wcd) - FREE(yid->wcd); - if (yid->ys) { - FREE(yid->ys->lsearch_text); - FREE(yid->ys); - } - FREE(yid); -} - -static int is_same_bud(const void * a, const void * b) -{ - const struct yahoo_buddy *subject = (struct yahoo_buddy *) a; - const struct yahoo_buddy *object = (struct yahoo_buddy *) b; - - return strcmp(subject->id, object->id) && (subject->protocol == object->protocol); -} - -char * getcookie(char *rawcookie) -{ - char * cookie = NULL; - char * tmpcookie; - char * cookieend; - - if (strlen(rawcookie) < 2) - return NULL; - - tmpcookie = strdup(rawcookie + 2); - cookieend = strchr(tmpcookie, ';'); - - if (cookieend) - *cookieend = '\0'; - - cookie = strdup(tmpcookie); - FREE(tmpcookie); - /* cookieend=NULL; not sure why this was there since the value is not preserved in the stack -dd */ - - return cookie; -} - -static char * getlcookie(char *cookie) -{ - char *tmp; - char *tmpend; - char *login_cookie = NULL; - - tmpend = strstr(cookie, "n="); - if (tmpend) { - tmp = strdup(tmpend + 2); - tmpend = strchr(tmp, '&'); - if (tmpend) - *tmpend = '\0'; - login_cookie = strdup(tmp); - FREE(tmp); - } - - return login_cookie; -} - -static void yahoo_process_notify(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *msg = NULL; - char *from = NULL; - char *to = NULL; - int stat = 0; - int accept = 0; - int protocol = 0; - char *ind = NULL; - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 4) - from = pair->value; - if (pair->key == 5) - to = pair->value; - if (pair->key == 49) - msg = pair->value; - if (pair->key == 13) - stat = atoi(pair->value); - if (pair->key == 14) - ind = pair->value; - if (pair->key == 16) { /* status == -1 */ - NOTICE((pair->value)); - return; - } - if (pair->key == 241) - protocol = atoi(pair->value); - } - - if (!msg) - return; - - if (!strncasecmp(msg, "TYPING", strlen("TYPING"))) - YAHOO_CALLBACK(ext_yahoo_typing_notify)(yd->client_id, to, from, protocol, stat); - else if (!strncasecmp(msg, "GAME", strlen("GAME"))) - YAHOO_CALLBACK(ext_yahoo_game_notify)(yd->client_id, to, from, stat, ind); - else if (!strncasecmp(msg, "WEBCAMINVITE", strlen("WEBCAMINVITE"))) { - if (!strcmp(ind, " ")) { - YAHOO_CALLBACK(ext_yahoo_webcam_invite)(yd->client_id, to, from); - } - else { - accept = atoi(ind); - /* accept the invitation (-1 = deny 1 = accept) */ - if (accept < 0) - accept = 0; - YAHOO_CALLBACK(ext_yahoo_webcam_invite_reply)(yd->client_id, to, from, accept); - } - } - else - LOG(("Got unknown notification: %s", msg)); -} - -static void yahoo_process_filetransfer(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *from = NULL; - char *to = NULL; - char *msg = NULL; - char *url = NULL; - long expires = 0; - - char *service = NULL; - char *ft_token = NULL; - char *filename = NULL; - unsigned long filesize = 0L; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 4) - from = pair->value; - if (pair->key == 5) - to = pair->value; - if (pair->key == 14) - msg = pair->value; - if (pair->key == 20) - url = pair->value; - if (pair->key == 38) - expires = atol(pair->value); - - if (pair->key == 27) - filename = pair->value; - - if (pair->key == 28) - filesize = atol(pair->value); - - if (pair->key == 49) - service = pair->value; - - if (pair->key == 53) - ft_token = pair->value; - } - - if (pkt->service == YAHOO_SERVICE_P2PFILEXFER) { - if (strcmp("FILEXFER", service) != 0) { - WARNING(("unhandled service 0x%02x", pkt->service)); - yahoo_dump_unhandled(pkt); - return; - } - } - - if (msg) { - char *tmp; - tmp = strchr(msg, '\006'); - if (tmp) - *tmp = '\0'; - } - if (url && from) - YAHOO_CALLBACK(ext_yahoo_got_file)(yd->client_id, to, from, url, expires, msg, filename, filesize, ft_token, 0); - else if (strcmp(from, "FILE_TRANSFER_SYSTEM") == 0 && msg != NULL) - YAHOO_CALLBACK(ext_yahoo_system_message)(yd->client_id, to, from, msg); -} - -static void yahoo_process_filetransfer7(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *from = NULL; - char *to = NULL; - - int service = 0; - char *ft_token = NULL; - char *filename = NULL; - unsigned long filesize = 0L; - - struct yahoo_file_info *fi; - YList *l, *files = NULL; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 4: /* from */ - from = pair->value; - break; - - case 5: /* to */ - to = pair->value; - break; - - case 222: /* Services: - 1 - dl - 2 - cancel - 3 - send - */ - service = atol(pair->value); - break; - - case 265: /* this is the FT token for this batch/session */ - ft_token = pair->value; - break; - - - case 27: /* filename */ - filename = pair->value; - break; - - case 28: /* file size */ - filesize = atol(pair->value); - break; - - case 301: /* file terminator token usually set to 268 */ - fi = y_new0(struct yahoo_file_info, 1); - fi->filename = strdup(filename); - fi->filesize = filesize; - - files = y_list_append(files, fi); - break; - } - } - - switch (service) { - case 1: // FT7 - YAHOO_CALLBACK(ext_yahoo_got_files)(yd->client_id, to, from, ft_token, service, files); - break; - case 2: // FT7 Cancelled - break; - case 3: // FT7 Send Files - YAHOO_CALLBACK(ext_yahoo_send_file7info)(yd->client_id, to, from, ft_token); - break; - case 4: // FT7 Declined - - break; - } -} - -char *yahoo_decode(const char *t) -{ - /* - * Need to process URL ??? we get sent \002 style thingies.. which need to be decoded - * and then urlencoded? - * - * Thanks GAIM for the code... - */ - char y[1024]; - char *n; - const char *end, *p; - int i, k; - - n = y; - end = t + mir_strlen(t); - - for (p = t; p < end; p++, n++) { - if (*p == '\\') { - if (p[1] >= '0' && p[1] <= '7') { - p += 1; - for (i = 0, k = 0; k < 3; k += 1) { - char c = p[k]; - if (c < '0' || c > '7') break; - i *= 8; - i += c - '0'; - } - *n = i; - p += k - 1; - } - else { /* bug 959248 */ - /* If we see a \ not followed by an octal number, - * it means that it is actually a \\ with one \ - * already eaten by some unknown function. - * This is arguably broken. - * - * I think wing is wrong here, there is no function - * called that I see that could have done it. I guess - * it is just really sending single \'s. That's yahoo - * for you. - */ - *n = *p; - } - } - else - *n = *p; - } - - *n = '\0'; - - return yahoo_urlencode(y); -} - -static void yahoo_process_filetransfer7info(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *from = NULL; - char *to = NULL; - int service = 0; - char *ft_token = NULL; - char *filename = NULL; - char *host = NULL; - char *token = NULL; - unsigned long filesize = 0L; - - /** - TODO: Need to process FileTransfer7Info Disconnected Status. - - It doesn't send service but sends Status (66) = -1 - [10:56:02 YAHOO] Key: ( 1) ID Value: 'xxx' - [10:56:02 YAHOO] Key: ( 4) ID/Nick Value: 'xxx' - [10:56:02 YAHOO] Key: ( 5) To Value: 'xxxxxxx' - [10:56:02 YAHOO] Key: ( 66) login status Value: '-1' - [10:56:02 YAHOO] Key: ( 251) (null) Value: 'likQolabUXpDajoIdTZKPw--AsM.A7RnMpJwfZjQmIm.SZea2CCIGPAjF0DTHjizENuccwdZueaEuA13irqIIdAJcPOT24yWnwwvIHYqcMg4foLt0LA-' - [10:56:02 YAHOO] Key: ( 265) FT7 Token Value: '$t$1vTZy4AzepDkGzJoMBg$$' - - */ - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 4: - from = pair->value; - break; - case 5: - to = pair->value; - break; - case 27: - filename = pair->value; - break; - - case 28: - filesize = atol(pair->value); - break; - - case 249: - service = atol(pair->value); - break; - case 250: - host = pair->value; - break; - case 251: - token = pair->value; - break; - case 265: - ft_token = pair->value; - break; - } - } - - switch (service) { - case 1: // P2P - //YAHOO_CALLBACK(ext_yahoo_got_file)(yd->client_id, to, from, url, expires, msg, filename, filesize, ft_token, 1); - { - /* - * From Kopete: deny P2P - */ - struct yahoo_packet *pkt1 = NULL; - - LOG(("[yahoo_process_filetransfer7info] Got File info, Denying P2P.")); - - pkt1 = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt1, 1, yd->user); - yahoo_packet_hash(pkt1, 5, from); - yahoo_packet_hash(pkt1, 265, ft_token); - yahoo_packet_hash(pkt1, 66, "-3"); - - yahoo_send_packet(yid, pkt1, 0); - yahoo_packet_free(pkt1); - - } - break; - case 3: // Relay - { - char url[1024]; - char *t; - - /* - * From Kopete: accept the info? - */ - struct yahoo_packet *pkt1 = NULL; - - LOG(("[yahoo_process_filetransfer7info] Got File info, Relaying FT.")); - - pkt1 = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt1, 1, yd->user); - yahoo_packet_hash(pkt1, 5, from); - yahoo_packet_hash(pkt1, 265, ft_token); - yahoo_packet_hash(pkt1, 27, filename); - yahoo_packet_hash(pkt1, 249, "3"); // use reflection server - yahoo_packet_hash(pkt1, 251, token); - - yahoo_send_packet(yid, pkt1, 0); - yahoo_packet_free(pkt1); - - t = yahoo_decode(token); - sprintf(url, "http://%s/relay?token=%s&sender=%s&recver=%s", host, t, from, to); - - YAHOO_CALLBACK(ext_yahoo_got_file7info)(yd->client_id, to, from, url, filename, ft_token); - - FREE(t); - } - break; - } -} -static void yahoo_process_filetransfer7accept(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *from = NULL; - char *to = NULL; - int service = 0; - char *ft_token = NULL; - char *filename = NULL; - char *token = NULL; - - /** - TODO: Need to process FileTransfer7Info Disconnected Status. - - It doesn't send service but sends Status (66) = -1 - [10:56:02 YAHOO] Key: ( 1) ID Value: 'xxx' - [10:56:02 YAHOO] Key: ( 4) ID/Nick Value: 'xxx' - [10:56:02 YAHOO] Key: ( 5) To Value: 'xxxxxxx' - [10:56:02 YAHOO] Key: ( 66) login status Value: '-1' - [10:56:02 YAHOO] Key: ( 251) (null) Value: 'likQolabUXpDajoIdTZKPw--AsM.A7RnMpJwfZjQmIm.SZea2CCIGPAjF0DTHjizENuccwdZueaEuA13irqIIdAJcPOT24yWnwwvIHYqcMg4foLt0LA-' - [10:56:02 YAHOO] Key: ( 265) FT7 Token Value: '$t$1vTZy4AzepDkGzJoMBg$$' - - */ - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 4: - from = pair->value; - break; - case 5: - to = pair->value; - break; - case 27: - filename = pair->value; - break; - - case 249: - service = atol(pair->value); - break; - - case 251: - token = pair->value; - break; - - case 265: - ft_token = pair->value; - break; - - case 66: // login status = -1 Disconnected/Failed Transfer. - break; - - case 271: // 271 = 1 "Next File" - YAHOO_CALLBACK(ext_yahoo_send_file7info)(yd->client_id, to, from, ft_token); - break; - } - } - - switch (service) { - case 1: // P2P - - break; - - case 3: // Relay - YAHOO_CALLBACK(ext_yahoo_ft7_send_file)(yd->client_id, to, from, filename, token, ft_token); - break; - } -} - - -static void yahoo_process_conference(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *msg = NULL; - char *host = NULL; - char *who = NULL; - char *room = NULL; - char *id = NULL; - int utf8 = 0; - YList *members = NULL; - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - if (pair->key == 50) - host = pair->value; - - if (pair->key == 52) { /* invite */ - members = y_list_append(members, strdup(pair->value)); - } - if (pair->key == 53) /* logon */ - who = pair->value; - if (pair->key == 54) /* decline */ - who = pair->value; - if (pair->key == 55) /* unavailable (status == 2) */ - who = pair->value; - if (pair->key == 56) /* logoff */ - who = pair->value; - - if (pair->key == 57) - room = pair->value; - - if (pair->key == 58) /* join message */ - msg = pair->value; - if (pair->key == 14) /* decline/conf message */ - msg = pair->value; - - if (pair->key == 16) /* error */ - msg = pair->value; - - if (pair->key == 1) /* my id */ - id = pair->value; - if (pair->key == 3) /* message sender */ - who = pair->value; - - if (pair->key == 97) - utf8 = atoi(pair->value); - } - - if (!room) - return; - - if (host) { - for (l = members; l; l = l->next) { - char * w = (char *)l->data; - if (!strcmp(w, host)) - break; - } - if (!l) - members = y_list_append(members, strdup(host)); - } - /* invite, decline, join, left, message -> status == 1 */ - - switch (pkt->service) { - case YAHOO_SERVICE_CONFINVITE: - if (pkt->status == 2) - ; - else if (members) - YAHOO_CALLBACK(ext_yahoo_got_conf_invite)(yd->client_id, id, host, room, msg, members); - else if (msg) - YAHOO_CALLBACK(ext_yahoo_error)(yd->client_id, msg, 0, E_CONFNOTAVAIL); - break; - case YAHOO_SERVICE_CONFADDINVITE: - if (pkt->status == 2) - ; - else - YAHOO_CALLBACK(ext_yahoo_got_conf_invite)(yd->client_id, id, host, room, msg, members); - break; - case YAHOO_SERVICE_CONFDECLINE: - if (who) - YAHOO_CALLBACK(ext_yahoo_conf_userdecline)(yd->client_id, id, who, room, msg); - break; - case YAHOO_SERVICE_CONFLOGON: - if (who) - YAHOO_CALLBACK(ext_yahoo_conf_userjoin)(yd->client_id, id, who, room); - break; - case YAHOO_SERVICE_CONFLOGOFF: - if (who) - YAHOO_CALLBACK(ext_yahoo_conf_userleave)(yd->client_id, id, who, room); - break; - case YAHOO_SERVICE_CONFMSG: - if (who) - YAHOO_CALLBACK(ext_yahoo_conf_message)(yd->client_id, id, who, room, msg, utf8); - break; - } -} - -static void yahoo_process_chat(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *msg = NULL; - char *id = NULL; - char *who = NULL; - char *room = NULL; - char *topic = NULL; - YList *members = NULL; - struct yahoo_chat_member *currentmember = NULL; - int msgtype = 1; - int utf8 = 0; - int firstjoin = 0; - int membercount = 0; - int chaterr = 0; - YList *l; - - yahoo_dump_unhandled(pkt); - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - if (pair->key == 1) { - /* My identity */ - id = pair->value; - } - - if (pair->key == 104) { - /* Room name */ - room = pair->value; - } - - if (pair->key == 105) { - /* Room topic */ - topic = pair->value; - } - - if (pair->key == 108) { - /* Number of members in this packet */ - membercount = atoi(pair->value); - } - - if (pair->key == 109) { - /* message sender */ - who = pair->value; - - if (pkt->service == YAHOO_SERVICE_CHATJOIN) { - currentmember = y_new0(struct yahoo_chat_member, 1); - currentmember->id = strdup(pair->value); - members = y_list_append(members, currentmember); - } - } - - if (pair->key == 110) { - /* age */ - if (pkt->service == YAHOO_SERVICE_CHATJOIN) - currentmember->age = atoi(pair->value); - } - - if (pair->key == 113) { - /* attribs */ - if (pkt->service == YAHOO_SERVICE_CHATJOIN) - currentmember->attribs = atoi(pair->value); - } - - if (pair->key == 141) { - /* alias */ - if (pkt->service == YAHOO_SERVICE_CHATJOIN) - currentmember->alias = strdup(pair->value); - } - - if (pair->key == 142) { - /* location */ - if (pkt->service == YAHOO_SERVICE_CHATJOIN) - currentmember->location = strdup(pair->value); - } - - - if (pair->key == 130) { - /* first join */ - firstjoin = 1; - } - - if (pair->key == 117) { - /* message */ - msg = pair->value; - } - - if (pair->key == 124) { - /* Message type */ - msgtype = atoi(pair->value); - } - if (pair->key == 114) { - /* message error not sure what all the pair values mean */ - /* but -1 means no session in room */ - chaterr = atoi(pair->value); - } - } - - if (!room) { - if (pkt->service == YAHOO_SERVICE_CHATLOGOUT) { /* yahoo originated chat logout */ - YAHOO_CALLBACK(ext_yahoo_chat_yahoologout)(yid->yd->client_id, id); - return; - } - if (pkt->service == YAHOO_SERVICE_COMMENT && chaterr) { - YAHOO_CALLBACK(ext_yahoo_chat_yahooerror)(yid->yd->client_id, id); - return; - } - - WARNING(("We didn't get a room name, ignoring packet")); - return; - } - - switch (pkt->service) { - case YAHOO_SERVICE_CHATJOIN: - if (y_list_length(members) != membercount) { - WARNING(("Count of members doesn't match No. of members we got")); - } - if (firstjoin && members) { - YAHOO_CALLBACK(ext_yahoo_chat_join)(yid->yd->client_id, id, room, topic, members, yid->fd); - } - else if (who) { - if (y_list_length(members) != 1) { - WARNING(("Got more than 1 member on a normal join")); - } - /* this should only ever have one, but just in case */ - while (members) { - YList *n = members->next; - currentmember = (struct yahoo_chat_member *) members->data; - YAHOO_CALLBACK(ext_yahoo_chat_userjoin)(yid->yd->client_id, id, room, currentmember); - y_list_free_1(members); - members = n; - } - } - break; - case YAHOO_SERVICE_CHATEXIT: - if (who) { - YAHOO_CALLBACK(ext_yahoo_chat_userleave)(yid->yd->client_id, id, room, who); - } - break; - case YAHOO_SERVICE_COMMENT: - if (who) { - YAHOO_CALLBACK(ext_yahoo_chat_message)(yid->yd->client_id, id, who, room, msg, msgtype, utf8); - } - break; - } -} - -static void yahoo_process_message(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - YList *l; - YList * messages = NULL; - - struct m - { - int i_31; - int i_32; - char *to; - char *from; - long tm; - char *msg; - int utf8; - int buddy_icon; - int protocol; - char *seqn; - int sendn; - } *message = y_new0(struct m, 1); - - message->buddy_icon = -1; // no info - message->utf8 = 1; // default value for utf-8. (Seems a ton of clients/pingbox/etc.. don't send this) - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - /* so it seems that key == 1 is not used when receiving messages and causes - problems for mobile IMs? This has been reported in the forum and this patch - was provided by Bryan Aldrich */ - switch (pair->key) { - /*case 1: */ - case 4: - if (!message->from) - message->from = pair->value; - - break; - - case 5: - message->to = pair->value; - break; - - case 15: - message->tm = strtol(pair->value, NULL, 10); - break; - - case 206: - message->buddy_icon = atoi(pair->value); - break; - - case 97: - message->utf8 = atoi(pair->value); - break; - - /* user message */ /* sys message */ - case 14: - case 16: - message->msg = pair->value; - break; - - case 31: - if (message->i_31) { - messages = y_list_append(messages, message); - message = y_new0(struct m, 1); - } - message->i_31 = atoi(pair->value); - break; - - case 32: - message->i_32 = atoi(pair->value); - break; - - case 241: - message->protocol = strtol(pair->value, NULL, 10); - break; - - case 429: /* message sequence # */ - message->seqn = pair->value; - break; - - case 450: /* attempt # */ - message->sendn = atoi(pair->value); - break; - - - /*default: - LOG(("yahoo_process_message: status: %d, key: %d, value: %s", - pkt->status, pair->key, pair->value)); - */ - } - } - - messages = y_list_append(messages, message); - - for (l = messages; l; l = l->next) { - message = (struct m*) l->data; - if (pkt->service == YAHOO_SERVICE_SYSMESSAGE) { - YAHOO_CALLBACK(ext_yahoo_system_message)(yd->client_id, message->to, - message->from, message->msg); - } - else if (pkt->status <= 2 || pkt->status == 5) { - YAHOO_CALLBACK(ext_yahoo_got_im)(yd->client_id, message->to, message->from, - message->protocol, message->msg, message->tm, - pkt->status, message->utf8, message->buddy_icon, - message->seqn, message->sendn); - } - else if (pkt->status == YPACKET_STATUS_DISCONNECTED) { - YAHOO_CALLBACK(ext_yahoo_error)(yd->client_id, message->msg, 0, E_SYSTEM); - } - free(message); - } - - y_list_free(messages); -} - -static void yahoo_process_logon(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - YList *l; - struct yahoo_data *yd = yid->yd; - char *name = NULL; - int state = 0, away = 0, idle = 0, mobile = 0, cksum = 0, buddy_icon = -1, protocol = 0, - client_version = 0, utf8 = 1; - char *msg = NULL; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 0: /* we won't actually do anything with this */ - //NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 1: /* we don't get the full buddy list here. */ - if (!yd->logged_in) { - yd->logged_in = TRUE; - - if (yd->current_status == YAHOO_STATUS_OFFLINE) - yd->current_status = yd->initial_status; - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_OK, NULL); - } - break; - case 7: /* the current buddy */ - if (name != NULL) { - YAHOO_CALLBACK(ext_yahoo_status_logon)(yd->client_id, name, protocol, state, msg, away, idle, mobile, cksum, buddy_icon, client_version, utf8); - msg = NULL; - utf8 = 1; - protocol = client_version = cksum = state = away = idle = mobile = 0; - buddy_icon = -1; - } - name = pair->value; - break; - case 8: /* how many online buddies we have */ - //NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 10: /* state */ - state = strtol(pair->value, NULL, 10); - break; - case 11: /* this is the buddy's session id */ - //NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 13: /* bitmask, bit 0 = pager, bit 1 = chat, bit 2 = game */ - if (strtol(pair->value, NULL, 10) == 0) { - //YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, name, 0, YAHOO_STATUS_OFFLINE, NULL, 1, 0, 0); - //name = NULL; - state = YAHOO_STATUS_OFFLINE; - //break; - } - break; - case 16: /* Custom error message */ - YAHOO_CALLBACK(ext_yahoo_error)(yd->client_id, pair->value, 0, E_CUSTOM); - break; - case 17: /* in chat? */ - break; - case 19: /* custom status message */ - msg = pair->value; - break; - case 24: /* session timestamp */ - yd->session_timestamp = atol(pair->value); - break; - case 47: /* is it an away message or not */ - away = atoi(pair->value); - break; - case 60: /* SMS -> 1 MOBILE USER */ - /* sometimes going offline makes this 2, but invisible never sends it */ - //NOTICE(("key %d:%s", pair->key, pair->value)); - if (atoi(pair->value) > 0) - mobile = 1; - break; - - case 97: /* utf8 */ - utf8 = atoi(pair->value); - break; - - case 137: /* Idle: seconds */ - idle = atoi(pair->value); - break; - case 138: /* Idle: Flag - * 0: Use the 137 key to see how long - * 1: not-idle - */ - - idle = 0; - break; - - case 192: /* Pictures aka BuddyIcon checksum*/ - cksum = strtol(pair->value, NULL, 10); - break; - - case 197: /* avatar base64 encodded [Ignored by Gaim?] */ - /*avatar = pair->value;*/ - break; - - case 213: /* Pictures aka BuddyIcon type 0-none, 1-avatar, 2-picture*/ - buddy_icon = strtol(pair->value, NULL, 10); - break; - - case 244: /* client version number. Yahoo Client Detection */ - client_version = strtol(pair->value, NULL, 10); - break; - - case 241: /* protocol */ - protocol = strtol(pair->value, NULL, 10); - break; - - default: - //WARNING(("unknown status key %d:%s", pair->key, pair->value)); - break; - } - } - - if (name != NULL) - YAHOO_CALLBACK(ext_yahoo_status_logon)(yd->client_id, name, protocol, state, msg, away, idle, mobile, cksum, buddy_icon, client_version, utf8); - -} - -static void yahoo_process_status(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - YList *l; - struct yahoo_data *yd = yid->yd; - char *name = NULL; - int state = YAHOO_STATUS_AVAILABLE; - int away = 0, idle = 0, mobile = 0, protocol = 0, utf8 = 1; - int login_status = YAHOO_LOGIN_LOGOFF; - char *msg = NULL; - char *errmsg = NULL; - - /*if (pkt->service == YAHOO_SERVICE_LOGOFF && pkt->status == YAHOO_STATUS_DISCONNECTED) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_DUPL, NULL); - return; - }*/ - - if (pkt->service == YAHOO_SERVICE_LOGOFF) - state = YAHOO_STATUS_OFFLINE; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 0: /* we won't actually do anything with this */ - NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 1: /* we don't get the full buddy list here. */ - if (!yd->logged_in) { - yd->logged_in = TRUE; - if (yd->current_status == YAHOO_STATUS_OFFLINE) - yd->current_status = yd->initial_status; - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_OK, NULL); - } - break; - case 8: /* how many online buddies we have */ - NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 7: /* the current buddy */ - if (name != NULL) { - YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, name, protocol, state, msg, away, idle, mobile, utf8); - msg = NULL; - utf8 = 1; - protocol = away = idle = mobile = 0; - state = (pkt->service == YAHOO_SERVICE_LOGOFF) ? YAHOO_STATUS_OFFLINE : YAHOO_STATUS_AVAILABLE; - } - name = pair->value; - - /*if (pkt->service == YAHOO_SERVICE_LOGOFF) { - YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, name, protocol, YAHOO_STATUS_OFFLINE, NULL, 0, 0, 0); - name = NULL; - }*/ - break; - case 10: /* state */ - state = strtol(pair->value, NULL, 10); - break; - case 19: /* custom status message */ - msg = pair->value; - break; - case 47: /* is it an away message or not */ - away = atoi(pair->value); - break; - case 137: /* seconds idle */ - idle = atoi(pair->value); - break; - case 138: /* either we're not idle, or we are but won't say how long */ - /* thanx Gaim.. I am seeing 138 -> 1. so don't do idle at all for miranda - since we don't have idle w/o time :( */ - idle = 0; - break; - case 11: /* this is the buddy's session id */ - NOTICE(("key %d:%s", pair->key, pair->value)); - break; - case 17: /* in chat? */ - break; - case 13: /* bitmask, bit 0 = pager, bit 1 = chat, bit 2 = game */ - /*if (pkt->service == YAHOO_SERVICE_LOGOFF || strtol(pair->value, NULL, 10) == 0) { - YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, name, protocol, YAHOO_STATUS_OFFLINE, NULL, 0, 0, 0); - name = NULL; - break; - }*/ - if (strtol(pair->value, NULL, 10) == 0) - state = YAHOO_STATUS_OFFLINE; - break; - case 60: /* SMS -> 1 MOBILE USER */ - /* sometimes going offline makes this 2, but invisible never sends it */ - NOTICE(("key %d:%s", pair->key, pair->value)); - if (atoi(pair->value) > 0) - mobile = 1; - break; - case 16: /* Custom error message */ - errmsg = pair->value; - break; - case 241: /* protocol */ - protocol = strtol(pair->value, NULL, 10); - break; - case 66: /* login status */ - { - int i = atoi(pair->value); - - switch (i) { - case 42: /* duplicate login */ - login_status = YAHOO_LOGIN_DUPL; - break; - case 28: /* session expired */ - - break; - } - } - break; - case 97: /* utf-8 ? */ - utf8 = strtol(pair->value, NULL, 10); - break; - - default: - //WARNING(("unknown status key %d:%s", pair->key, pair->value)); - break; - } - } - - if (name != NULL) - YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, name, protocol, state, msg, away, idle, mobile, utf8); - else if (pkt->service == YAHOO_SERVICE_LOGOFF && pkt->status == YPACKET_STATUS_DISCONNECTED) - // - //Key: Error msg (16) Value: 'Session expired. Please relogin' - //Key: login status (66) Value: '28' - // - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, login_status, NULL); - else if (errmsg != NULL) - YAHOO_CALLBACK(ext_yahoo_error)(yd->client_id, errmsg, 0, E_CUSTOM); - else if (pkt->service == YAHOO_SERVICE_LOGOFF && pkt->status == YAHOO_STATUS_AVAILABLE && pkt->hash == NULL) - // Server Acking our Logoff (close connection) - yahoo_input_close(yid); -} - -static void yahoo_process_list(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - YList *l; - char *fname = NULL, *lname = NULL, *nick = NULL; - - /* we could be getting multiple packets here */ - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - - case 89: /* identities */ - { - char **identities = y_strsplit(pair->value, ",", -1); - int i; - for (i = 0; identities[i]; i++) - yd->identities = y_list_append(yd->identities, - strdup(identities[i])); - y_strfreev(identities); - } - - break; - case 59: /* cookies */ - if (pair->value[0] == 'Y') { - FREE(yd->cookie_y); - FREE(yd->login_cookie); - - yd->cookie_y = getcookie(pair->value); - yd->login_cookie = getlcookie(yd->cookie_y); - - } - else if (pair->value[0] == 'T') { - FREE(yd->cookie_t); - yd->cookie_t = getcookie(pair->value); - - } - else if (pair->value[0] == 'C') { - FREE(yd->cookie_c); - yd->cookie_c = getcookie(pair->value); - } - - break; - case 3: /* my id */ - nick = pair->value; - break; - case 90: /* 1 */ - case 100: /* 0 */ - case 101: /* NULL */ - case 102: /* NULL */ - case 93: /* 86400/1440 */ - break; - case 213: /* my current avatar setting */ - { - int buddy_icon = strtol(pair->value, NULL, 10); - - YAHOO_CALLBACK(ext_yahoo_got_avatar_share)(yd->client_id, buddy_icon); - } - break; - case 217: /*??? Seems like last key */ - - break; - - case 216: /* Firat Name */ - fname = pair->value; - break; - - case 254: /* Last Name */ - lname = pair->value; - break; - } - } - - YAHOO_CALLBACK(ext_yahoo_got_identities)(yd->client_id, nick, fname, lname, yd->identities); - - /* we could be getting multiple packets here */ - if (pkt->status != 0) /* Thanks for the fix GAIM */ - return; - - if (yd->cookie_y && yd->cookie_t && yd->cookie_c) - YAHOO_CALLBACK(ext_yahoo_got_cookies)(yd->client_id); - - /*** We login at the very end of the packet communication */ - if (!yd->logged_in) { - yd->logged_in = TRUE; - - if (yd->current_status == YAHOO_STATUS_OFFLINE) - yd->current_status = yd->initial_status; - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_OK, NULL); - } -} - -static void yahoo_process_y8_list(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - YList *l; - struct yahoo_buddy *bud = NULL; - - /* we could be getting multiple packets here */ - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 302: - /* This is always 318 before a group, 319 before the first s/n in a group, 320 before any ignored s/n. - * It is not sent for s/n's in a group after the first. - * All ignored s/n's are listed last, so when we see a 320 we clear the group and begin marking the - * s/n's as ignored. It is always followed by an identical 300 key. - */ - if (pair->value && !strcmp(pair->value, "320")) { - /* No longer in any group; this indicates the start of the ignore list. */ - FREE(yd->ygrp); - } - - break; - case 301: /* This is 319 before all s/n's in a group after the first. It is followed by an identical 300. */ - break; - case 300: /* This is 318 before a group, 319 before any s/n in a group, and 320 before any ignored s/n. */ - break; - case 65: /* This is the group */ - FREE(yd->ygrp); - yd->ygrp = strdup(pair->value); - break; - case 7: /* buddy's s/n */ - /** - * Need to add the buddy to one of several lists - */ - bud = y_new0(struct yahoo_buddy, 1); - bud->id = strdup(pair->value); - - if (yd->ygrp) { - bud->group = strdup(yd->ygrp); - - yd->buddies = y_list_append(yd->buddies, bud); - } - else { - yd->ignore = y_list_append(yd->ignore, bud); - } - - break; - case 241: /* another protocol user */ - if (bud) { - bud->protocol = strtol(pair->value, NULL, 10); - } - break; - - case 223: /* Auth request pending */ - if (bud) { - bud->auth = strtol(pair->value, NULL, 10); - } - break; - - case 59: /* somebody told cookies come here too, but im not sure */ - break; - - case 317: /* Stealth Setting */ - if (bud && (strtol(pair->value, NULL, 10) == 2)) { - //f->presence = YAHOO_PRESENCE_PERM_OFFLINE; - bud->stealth = 2; - } - - break; - } - } - - /* we could be getting multiple packets here */ - if (pkt->status != 0) - return; - - if (yd->buddies) { - YAHOO_CALLBACK(ext_yahoo_got_buddies)(yd->client_id, yd->buddies); - } - - if (yd->ignore) { - YAHOO_CALLBACK(ext_yahoo_got_ignore)(yd->client_id, yd->ignore); - } - - -} - -static void yahoo_process_verify(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - struct yahoo_server_settings *yss = yd->server_settings; - - if (pkt->status != 0x01) { - DEBUG_MSG(("expected status: 0x01, got: %d", pkt->status)); - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_LOCK, ""); - return; - } - - pkt = yahoo_packet_new(YAHOO_SERVICE_AUTH, YPACKET_STATUS_DEFAULT, 0); - yahoo_packet_hash(pkt, 1, yd->user); - //NOTICE(("web messenger: %d", yss->web_messenger)); - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash(pkt, 24, "0"); - } - //NOTICE(("Sending initial packet")); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); - -} - -/* - * New Yahoo 9.x auth protocol - */ -static void yahoo_process_auth_0x0f(struct yahoo_input_data *yid, const char *seed, const char *sn) -{ - struct yahoo_packet *pack = NULL; - struct yahoo_data *yd = yid->yd; - struct yahoo_server_settings *yss; - - char *crumb = NULL; - char *response = NULL; - char url[1024]; - char *c, *t; - BYTE result[16]; - mir_md5_state_t ctx; - unsigned char *magic_hash = (unsigned char*)malloc(50); /* this one is like 26 bytes? */ - int i; - - /** - case 2: Totally Cracked... Yay.. no more crypt tables.. just need some SSL magic. - - Thanks to: http://shinkaiho.com/?p=32 - - login.yahoo.com:443 - -*chal is returned from ymsg connection -GET /config/pwtoken_get?src=ymsgr&ts=1195577375&login=user&passwd=pass&chal=chal HTTP/1.1 - -*token is the ymsgr value returned from the above request -GET /config/pwtoken_login?src=ymsgr&ts=1195577376&token=token HTTP/1.1 - -*crumb is returned from the above request along with ymsg cookie -307 field is crumb + chal md5ed (16 bytes dont convert to hex) then base64ed - - **/ - yss = yd->server_settings; - - if (yd->pw_token == NULL) { - - c = yahoo_urlencode(yd->password); - - _snprintf(url, sizeof(url), "/config/pwtoken_get?src=ymsgr&login=%s&passwd=%s", sn, c); - response = YAHOO_CALLBACK(ext_yahoo_send_https_request)(yd, yss->login_host, url); - - FREE(c); - - if (response == NULL) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - return; // fail for now - } - - LOG(("Got response:\n%s", response)); - - if (!isdigit(response[0])) { - LOG(("Non numeric status code received.")); - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - return; // fail for now - } - - i = atoi(response); - - if (i != 0) { - /** - * Some Error Code, we need to process it here - */ - - switch (i) { - case 1212: /* Invalid ID or password. Please try again. */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_PASSWD, NULL); - break; - - case 1213: - /* security lock from too many failed login attempts */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_LOCK, "Yahoo! website"); - break; - - case 1235: /* This ID is not yet taken */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_UNAME, NULL); - break; - - case 1221: - c = strstr(response, "url="); - - if (c != NULL) { - t = c + 6; - - while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++; - - i = c - t; - - if (i > 1000) - i = 1000; - - strncpy(url, t, i); - url[i] = '\0'; - } - else { - url[0] = '\0'; - } - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_LOCK, url); - break; - - case 1214: - case 1236: /* indicates a lock of some description */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_LOCK, "Yahoo! website"); - break; - - - case 100: /* Required field missing */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_PASSWD, NULL); - break; - - default: - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - break; - } - - FREE(response); - return; - } - /* - 0 - status code. See: http://www.carbonize.co.uk/ymsg16.html - ymsgr=<YToken> - partnerid=<???> - */ - c = strstr(response, "ymsgr="); - - if (c != NULL) { - t = c + 6; - - while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++; - - yd->pw_token = (char *)malloc(c - t + 1); - - memcpy(yd->pw_token, t, c - t); - yd->pw_token[c - t] = '\0'; - - LOG(("Got Token: %s", yd->pw_token)); - } - - FREE(response); - - if (yd->pw_token == NULL) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_PASSWD, NULL); - return; // fail for now - } - } - - //_snprintf(url, sizeof(url), "/config/pwtoken_login?src=ymsgr&token=%s&ext_err=1",token); - _snprintf(url, sizeof(url), "/config/pwtoken_login?src=ymsgr&token=%s", yd->pw_token); - - /* - 0 - crumb=hN3LKzv4Ho. - Y=v=1&n=11nh9j9k4vpm8&l=64d0xxtsqqt/o&p=m270ar7013000000&jb=33|47|&r=bt&lg=us&intl=us&np=1; path=/; domain=.yahoo.com - T=z=xUvdFBxaEeFBfOaVlmk3RSXNDMxBjU2MjQyNjFPNTE-&a=QAE&sk=DAAWDRZBoXexNr&d=c2wBTXpRMkFUSXhOVE0xTVRZNE1qWS0BYQFRQUUBenoBeFV2ZEZCZ1dBAXRpcAFNSVlVN0Q-; path=/; domain=.yahoo.com - cookievalidfor=86400 - - */ - response = YAHOO_CALLBACK(ext_yahoo_send_https_request)(yd, yss->login_host, url); - - if (response == NULL) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - return; // fail for now - } - - LOG(("Got response:\n%s", response)); - - if (!isdigit(response[0])) { - LOG(("Non numeric status code received.")); - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - return; // fail for now - } - - i = atoi(response); - - if (i != 0) { - /** - * Some Error Code, we need to process it here - */ - - switch (i) { - - case 100: /* Required field missing???? */ - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - break; - - default: - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - break; - } - - FREE(response); - return; - } - - c = strstr(response, "crumb="); - if (c != NULL) { - t = c + 6; - - while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++; - - crumb = (char *)_alloca(c - t + 1); - - memcpy(crumb, t, c - t); - crumb[c - t] = '\0'; - - LOG(("Got crumb: %s", crumb)); - } - else - goto LBL_FAILED; - - c = strstr(response, "Y="); - if (c != NULL) { - t = c + 2; - - while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++; - - FREE(yd->cookie_y); - yd->cookie_y = (char *)malloc(c - t + 1); - - memcpy(yd->cookie_y, t, c - t); - yd->cookie_y[c - t] = '\0'; - - LOG(("Got Y Cookie: %s", yd->cookie_y)); - } - else - goto LBL_FAILED; - - c = strstr(response, "T="); - if (c != NULL) { - t = c + 2; - - while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++; - - yd->cookie_t = (char *)malloc(c - t + 1); - - memcpy(yd->cookie_t, t, c - t); - yd->cookie_t[c - t] = '\0'; - - LOG(("Got T Cookie: %s", yd->cookie_t)); - } - else { -LBL_FAILED: - FREE(response); - - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_PASSWD, "At stage 2"); - return; - } - - FREE(response); - - pack = yahoo_packet_new(YAHOO_SERVICE_AUTHRESP, (yd->initial_status == YAHOO_STATUS_INVISIBLE) ? YPACKET_STATUS_INVISIBLE : YPACKET_STATUS_WEBLOGIN, 0); - /* - AuthResp, WebLogin - 0: id - 1: id - 277: v=.... - 278: z=... - 307: <from above> - 244: 4194239 - 2: id - 2: 1 - 59: B\tvalue - 98: us - 135: 9.0.0.1912 - */ - /* - 277:v=1&n=11nh9j9k4vpm8&l=64d0xxtsqqt/o&p=m270ar7013000000&jb=33|47|&r=bt&lg=us&intl=us&np=1; path=/; domain=.yahoo.com - 278:z=xUvdFBxaEeFBfOaVlmk3RSXNDMxBjU2MjQyNjFPNTE-&a=QAE&sk=DAAWDRZBoXexNr&d=c2wBTXpRMkFUSXhOVE0xTVRZNE1qWS0BYQFRQUUBenoBeFV2ZEZCZ1dBAXRpcAFNSVlVN0Q-; path=/; domain=.yahoo.com - 307:VATg29jzHSXlp_2LL7J4Fw-- - */ - mir_md5_init(&ctx); - - mir_md5_append(&ctx, (BYTE *)crumb, strlen(crumb)); - mir_md5_append(&ctx, (BYTE *)seed, strlen(seed)); - mir_md5_finish(&ctx, result); - - to_y64(magic_hash, result, 16); - LOG(("Y64 Hash: %s", magic_hash)); - - yahoo_packet_hash(pack, 1, sn); - yahoo_packet_hash(pack, 0, sn); - - yahoo_packet_hash(pack, 277, yd->cookie_y); - yahoo_packet_hash(pack, 278, yd->cookie_t); - yahoo_packet_hash(pack, 307, (const char *)magic_hash); - free(magic_hash); - - yahoo_packet_hash(pack, 244, "4194239"); // Yahoo 9.0 - - yahoo_packet_hash(pack, 2, sn); - yahoo_packet_hash(pack, 2, "1"); - - yahoo_packet_hash(pack, 135, "9.0.0.2162"); - - yahoo_send_packet(yid, pack, 0); - yahoo_packet_free(pack); -} - -static void yahoo_process_auth(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *seed = NULL; - char *sn = NULL; - YList *l = pkt->hash; - int m = 0; - - while (l) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 94: - seed = pair->value; - break; - case 1: - sn = pair->value; - break; - case 13: - m = atoi(pair->value); - break; - } - l = l->next; - } - - if (!seed || !sn) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yid->yd->client_id, YAHOO_LOGIN_SOCK, NULL); - return; - } - - switch (m) { - case 2: - yahoo_process_auth_0x0f(yid, seed, sn); - break; - default: - /* call error */ - WARNING(("unknown auth type %d", m)); - //yahoo_process_auth_0x0b(yid, seed, sn); - YAHOO_CALLBACK(ext_yahoo_login_response)(yid->yd->client_id, YAHOO_LOGIN_SOCK, NULL); - break; - } -} - -static void yahoo_process_auth_resp(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *login_id; - char *handle; - char *url = NULL; - int login_status = -1; - - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 0) - login_id = pair->value; - else if (pair->key == 1) - handle = pair->value; - else if (pair->key == 20) - url = pair->value; - else if (pair->key == 66) - login_status = atoi(pair->value); - } - - if (pkt->status == YPACKET_STATUS_DISCONNECTED) { - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, login_status, url); - /* yahoo_logoff(yd->client_id);*/ - } -} - -static void yahoo_process_mail(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - char *email = NULL; - char *subj = NULL; - int count = 0; - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 9) - count = strtol(pair->value, NULL, 10); - else if (pair->key == 43) - who = pair->value; - else if (pair->key == 42) - email = pair->value; - else if (pair->key == 18) - subj = pair->value; - else - LOG(("key: %d => value: '%s'", pair->key, pair->value)); - } - - if (email && subj) { - char from[1024]; - - if (who) { - snprintf(from, sizeof(from), "\"%s\" <%s>", who, email); - } - else { - strncpy_s(from, email, _TRUNCATE); - } - - YAHOO_CALLBACK(ext_yahoo_mail_notify)(yd->client_id, from, subj, count); - } - else { - YAHOO_CALLBACK(ext_yahoo_mail_notify)(yd->client_id, NULL, NULL, count); - } -} - -static void yahoo_buddy_added_us(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *id = NULL; - char *who = NULL; - char *msg = NULL; - long tm = 0L; - YList *l; - int protocol = 0; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 1: - id = pair->value; - break; - case 3: - who = pair->value; - break; - case 14: - msg = pair->value; - break; - case 15: - tm = strtol(pair->value, NULL, 10); - break; - - case 241: - protocol = strtol(pair->value, NULL, 10); - break; - - default: - LOG(("key: %d => value: '%s'", pair->key, pair->value)); - } - } - - YAHOO_CALLBACK(ext_yahoo_contact_added)(yd->client_id, id, who, NULL, NULL, msg, protocol); -} - -static void yahoo_buddy_denied_our_add(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - char *msg = NULL; - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 3: - who = pair->value; - break; - case 14: - msg = pair->value; - break; - default: - LOG(("key: %d => value: '%s'", pair->key, pair->value)); - } - } - - YAHOO_CALLBACK(ext_yahoo_rejected)(yd->client_id, who, msg); -} - -static void yahoo_process_contact(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - switch (pkt->status) { - case 1: - yahoo_process_status(yid, pkt); - return; - case 3: - yahoo_buddy_added_us(yid, pkt); - break; - case 7: - yahoo_buddy_denied_our_add(yid, pkt); - break; - default: - LOG(("Unknown status value: '%d'", pkt->status)); - } - -} - -static void yahoo_process_authorization(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL, - *msg = NULL, - *fname = NULL, - *lname = NULL, - *id = NULL; - int state = 0, utf8 = 0, protocol = 0; - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 4: /* who added us */ - who = pair->value; - break; - - case 5: /* our identity */ - id = pair->value; - break; - - case 13: /* which type of request this is */ - state = strtol(pair->value, NULL, 10); - break; - - case 14: /* was there a message ? */ - msg = pair->value; - break; - - case 97: /* Unicode flag? */ - utf8 = strtol(pair->value, NULL, 10); - break; - - case 216: /* first name */ - fname = pair->value; - break; - - case 241: - protocol = strtol(pair->value, NULL, 10); - break; - - case 254: /* last name */ - lname = pair->value; - break; - - default: - LOG(("key: %d => value: '%s'", pair->key, pair->value)); - } - } - - switch (state) { - case 1: /* Authorization Accepted */ - - break; - case 2: /* Authorization Denied */ - YAHOO_CALLBACK(ext_yahoo_rejected)(yd->client_id, who, msg); - break; - default: /* Authorization Request? */ - YAHOO_CALLBACK(ext_yahoo_contact_added)(yd->client_id, id, who, fname, lname, msg, protocol); - - } - -} - -static void yahoo_process_buddyadd(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - char *where = NULL; - int status = 0, auth = 0, protocol = 0; - char *me = NULL; - - struct yahoo_buddy *bud = NULL; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 1: - me = pair->value; - break; - case 7: - who = pair->value; - break; - case 65: - where = pair->value; - break; - case 66: - status = strtol(pair->value, NULL, 10); - break; - - case 223: - auth = strtol(pair->value, NULL, 10); - break; - - case 241: - protocol = strtol(pair->value, NULL, 10); - break; - - default: - DEBUG_MSG(("unknown key: %d = %s", pair->key, pair->value)); - } - } - - //yahoo_dump_unhandled(pkt); - - if (!who) - return; - if (!where) - where = "Unknown"; - - bud = y_new0(struct yahoo_buddy, 1); - bud->id = strdup(who); - bud->group = strdup(where); - bud->real_name = NULL; - bud->protocol = protocol; - - yd->buddies = y_list_append(yd->buddies, bud); - - YAHOO_CALLBACK(ext_yahoo_buddy_added)(yd->client_id, me, who, where, status, auth); - /* YAHOO_CALLBACK(ext_yahoo_status_changed)(yd->client_id, who, status, NULL, (status==YAHOO_STATUS_AVAILABLE?0:1)); */ -} - -static void yahoo_process_buddydel(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - char *where = NULL; - int unk_66 = 0, protocol = 0; - char *me = NULL; - struct yahoo_buddy *bud; - - YList *buddy; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 1: - me = pair->value; - break; - - case 7: - who = pair->value; - break; - - case 65: - where = pair->value; - break; - - case 66: - unk_66 = strtol(pair->value, NULL, 10); - break; - - case 241: - protocol = strtol(pair->value, NULL, 10); - break; - - default: - DEBUG_MSG(("unknown key: %d = %s", pair->key, pair->value)); - } - } - - if (!who || !where) - return; - - bud = y_new0(struct yahoo_buddy, 1); - bud->id = strdup(who); - bud->group = strdup(where); - bud->protocol = protocol; - - buddy = y_list_find_custom(yd->buddies, bud, is_same_bud); - - FREE(bud->id); - FREE(bud->group); - FREE(bud); - - if (buddy) { - bud = (struct yahoo_buddy *) buddy->data; - yd->buddies = y_list_remove_link(yd->buddies, buddy); - y_list_free_1(buddy); - - FREE(bud->id); - FREE(bud->group); - FREE(bud->real_name); - FREE(bud); - - bud = NULL; - } -} -static void yahoo_process_yahoo7_change_group(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - char *me = NULL; - char *old_group = NULL; - char *new_group = NULL; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - switch (pair->key) { - case 1: - me = pair->value; - break; - case 7: - who = pair->value; - break; - case 224: - old_group = pair->value; - break; - case 264: - new_group = pair->value; - break; - } - } - - YAHOO_CALLBACK(ext_yahoo_buddy_group_changed)(yd->client_id, me, who, old_group, new_group); -} - -static void yahoo_process_ignore(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - struct yahoo_data *yd = yid->yd; - char *who = NULL; - int status = 0; - char *me = NULL; - int un_ignore = 0; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 0) - who = pair->value; - if (pair->key == 1) - me = pair->value; - if (pair->key == 13) /* 1 == ignore, 2 == unignore */ - un_ignore = strtol(pair->value, NULL, 10); - if (pair->key == 66) - status = strtol(pair->value, NULL, 10); - } - - - /* - * status - * 0 - ok - * 2 - already in ignore list, could not add - * 3 - not in ignore list, could not delete - * 12 - is a buddy, could not add - */ - - if (status) { - YAHOO_CALLBACK(ext_yahoo_error)(yd->client_id, who, 0, status); - } - else { - /* we adding or removing to the ignore list */ - if (un_ignore == 1) { /* ignore */ - struct yahoo_buddy *bud = y_new0(struct yahoo_buddy, 1); - - bud->id = strdup(who); - bud->group = NULL; - bud->real_name = NULL; - - yd->ignore = y_list_append(yd->ignore, bud); - - } - else { /* unignore */ - YList *buddy; - - buddy = yd->ignore; - - while (buddy) { - struct yahoo_buddy *b = (struct yahoo_buddy *) buddy->data; - - if (mir_strcmpi(b->id, who) == 0) - break; - - buddy = buddy->next; - } - - if (buddy) { - struct yahoo_buddy *bud = (struct yahoo_buddy *) buddy->data; - - yd->ignore = y_list_remove_link(yd->ignore, buddy); - y_list_free_1(buddy); - - FREE(bud->id); - FREE(bud->group); - FREE(bud->real_name); - FREE(bud); - - bud = NULL; - } - } - } -} - -static void yahoo_process_stealth(struct yahoo_input_data*, struct yahoo_packet *pkt) -{ - //struct yahoo_data *yd = yid->yd; - char *who = NULL; - int status = 0; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - if (pair->key == 7) - who = pair->value; - - if (pair->key == 31) - status = strtol(pair->value, NULL, 10); - } - - NOTICE(("got %s stealth info for %s with value: %d", pkt->service == YAHOO_SERVICE_STEALTH_PERM ? "permanent" : "session", who, status == 1)); -} - -static void yahoo_process_voicechat(struct yahoo_input_data*, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - char *room = NULL; - char *voice_room = NULL; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - if (pair->key == 4) - who = pair->value; - if (pair->key == 5) - me = pair->value; - if (pair->key == 13) - voice_room = pair->value; - if (pair->key == 57) - room = pair->value; - } - - NOTICE(("got voice chat invite from %s in %s to identity %s", who, room, me)); - /* - * send: s:0 1:me 5:who 57:room 13:1 - * ???? s:4 5:who 10:99 19:-1615114531 - * gotr: s:4 5:who 10:99 19:-1615114615 - * ???? s:1 5:me 4:who 57:room 13:3room - * got: s:1 5:me 4:who 57:room 13:1room - * rej: s:0 1:me 5:who 57:room 13:3 - * rejr: s:4 5:who 10:99 19:-1617114599 - */ -} - -static void yahoo_process_picture(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - char *pic_url = NULL; - int cksum = 0; - int type = 0; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - - /* based on GAIM code */ - switch (pair->key) { - case 1: - case 4: - who = pair->value; - break; - case 5: - me = pair->value; - break; - case 13: - type = strtol(pair->value, NULL, 10); - break; - case 20: - pic_url = pair->value; - break; - case 192: - cksum = strtol(pair->value, NULL, 10); - break; - } /*switch */ - - } - NOTICE(("got picture packet")); - YAHOO_CALLBACK(ext_yahoo_got_picture)(yid->yd->client_id, me, who, pic_url, cksum, type); -} - -void yahoo_send_picture_info(int id, const char *who, int type, const char *pic_url, int cksum) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, yd->user); - //yahoo_packet_hash(pkt, 4, yd->user); - yahoo_packet_hash(pkt, 5, who); - - yahoo_packet_hash_int(pkt, 13, type); - - yahoo_packet_hash(pkt, 20, pic_url); - - yahoo_packet_hash_int(pkt, 192, cksum); - yahoo_send_packet(yid, pkt, 0); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_packet_free(pkt); -} - -void yahoo_send_picture_update(int id, const char *who, int type) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPDATE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, who); - - yahoo_packet_hash_int(pkt, 206, type); - yahoo_send_packet(yid, pkt, 0); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_packet_free(pkt); -} - -void yahoo_send_picture_checksum(int id, const char *who, int cksum) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_CHECKSUM, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - - if (who) - yahoo_packet_hash(pkt, 5, who); // ? - - yahoo_packet_hash(pkt, 212, "1"); // ? - - yahoo_packet_hash_int(pkt, 192, cksum); // checksum - yahoo_send_packet(yid, pkt, 0); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_packet_free(pkt); - - /* weird YIM7 sends another packet! See picture_status below*/ -} - -void yahoo_send_picture_status(int id, int buddy_icon) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_SHARING, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 3, yd->user); - - yahoo_packet_hash_int(pkt, 213, buddy_icon); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -static void yahoo_process_picture_checksum(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - int cksum = 0; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 4) - who = pair->value; - if (pair->key == 5) - me = pair->value; - if (pair->key == 192) - cksum = strtol(pair->value, NULL, 10); - - } - NOTICE(("got picture_checksum packet")); - YAHOO_CALLBACK(ext_yahoo_got_picture_checksum)(yid->yd->client_id, me, who, cksum); -} - -static void yahoo_process_picture_update(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - int buddy_icon = -1; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *)l->data; - if (pair->key == 4) - who = pair->value; - if (pair->key == 5) - me = pair->value; - if (pair->key == 206) - buddy_icon = strtol(pair->value, NULL, 10); - - } - NOTICE(("got picture_update packet")); - YAHOO_CALLBACK(ext_yahoo_got_picture_update)(yid->yd->client_id, me, who, buddy_icon); -} - -static void yahoo_process_picture_upload(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *url = NULL; - char *me = NULL; - unsigned int ts = 0; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *)l->data; - switch (pair->key) { - case 5: /* our id */ - me = pair->value; - break; - case 27: /* filename on our computer */ - break; - case 20: /* url at yahoo */ - url = pair->value; - break; - case 38: /* timestamp */ - ts = strtol(pair->value, NULL, 10); - break; - } - } - NOTICE(("[yahoo_process_picture_upload]")); - - YAHOO_CALLBACK(ext_yahoo_got_picture_upload)(yid->yd->client_id, me, url, ts); -} - -static void yahoo_process_picture_status(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - int buddy_icon = -1; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 5: /* our id */ - me = pair->value; - break; - case 4: /* who is notifying all */ - who = pair->value; - break; - case 213: /* picture = 0-none, 1-?, 2=picture */ - buddy_icon = strtol(pair->value, NULL, 10); - break; - } - } - NOTICE(("[yahoo_process_picture_status]")); - if (who) // sometimes we just get a confirmation without the WHO.(ack on our avt update) - YAHOO_CALLBACK(ext_yahoo_got_picture_status)(yid->yd->client_id, me, who, buddy_icon); -} - -static void yahoo_process_audible(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *who = NULL; - char *me = NULL; - char *aud_hash = NULL; - char *msg = NULL; - char *aud = NULL; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 5: /* our id */ - me = pair->value; - break; - case 4: /* who is notifying all */ - who = pair->value; - break; - case 230: /* file class name - GAIM: the audible, in foo.bar.baz format - - Actually this is the filename. - Full URL: - - http://us.dl1.yimg.com/download.yahoo.com/dl/aud/us/aud.swf - - where aud in foo.bar.baz format - */ - aud = pair->value; - break; - case 231: /*audible text*/ - msg = pair->value; - break; - case 232: /* weird number (md5 hash?) */ - aud_hash = pair->value; - break; - } - } - NOTICE(("[yahoo_process_audible]")); - if (who) // sometimes we just get a confirmation without the WHO.(ack on our send/update) - YAHOO_CALLBACK(ext_yahoo_got_audible)(yid->yd->client_id, me, who, aud, msg, aud_hash); -} - -static void yahoo_process_calendar(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *msg = NULL; - char *url = NULL; - int svc = -1, type = -1; - - YList *l; - - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 20: /* url to calendar reminder/event */ - if (pair->value[0] != '\0') - url = pair->value; - break; - case 21: /* type? number seems to be 0? */ - type = atol(pair->value); - break; - case 14: /* index msg/title ? */ - if (pair->value[0] != '\0') - msg = pair->value; - break; - case 13: /* service # ? */ - svc = atol(pair->value); - break; - } - } - - if (url) // sometimes we just get a reminder w/o the URL - YAHOO_CALLBACK(ext_yahoo_got_calendar)(yid->yd->client_id, url, type, msg, svc); -} - - -static void yahoo_process_ping(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *errormsg = NULL; - - YList *l; - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 16) - errormsg = pair->value; - } - - NOTICE(("got ping packet")); - YAHOO_CALLBACK(ext_yahoo_got_ping)(yid->yd->client_id, errormsg); -} - -static void yahoo_process_yab_update(struct yahoo_input_data*, struct yahoo_packet *pkt) -{ - char *who = NULL, *yentry = NULL; - int svc = 0; - YList *l; - - /* - [15:42:00 YAHOO] Yahoo Service: (null) (0xc4) Status: YAHOO_STATUS_AVAILABLE (0) -[15:42:00 YAHOO] -[15:42:00 YAHOO] libyahoo2/libyahoo2.c:900: debug: -[15:42:00 YAHOO] [Reading packet] len: 309 -[15:42:00 YAHOO] -[15:42:00 YAHOO] Key: To (5) Value: 'xxxxxxx' -[15:42:00 YAHOO] -[15:42:00 YAHOO] Key: (null) (203) Value: '<?xml version="1.0" encoding="ISO-8859-1"?> - <ab k="aaaaaaa" cc="1" ec="1" rs="OK"><ct e="1" id="1" mt="1147894756" cr="1090811437" fn="ZZZ" ln="XXX" - e0="aaaa@yahoo.com" nn="AAAA" ca="Unfiled" yi="xxxxxxx" pr="0" cm="Some personal notes here." - imm="xxxxxx@hotmail.com"/></ab>' -[15:42:00 YAHOO] -[15:42:00 YAHOO] Key: stat/location (13) Value: '1' - - */ - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - switch (pair->key) { - case 5: /* who */ - who = pair->value; - break; - case 203: /* yab entry */ - yentry = pair->value; - break; - case 13: /* type of update */ - svc = atoi(pair->value); - } - } - - NOTICE(("got YAB Update packet")); - //YAHOO_CALLBACK(ext_yahoo_got_ping)(yid->yd->client_id, errormsg); -} - -static void _yahoo_webcam_get_server_connected(INT_PTR fd, int error, void *d) -{ - struct yahoo_input_data *yid = (struct yahoo_input_data *) d; - char *who = yid->wcm->user; - char *data = NULL; - char *packet = NULL; - unsigned char magic_nr[] = { 0, 1, 0 }; - unsigned char header_len = 8; - unsigned int len = 0; - unsigned int pos = 0; - - if (error || fd <= 0) { - FREE(who); - FREE(yid); - return; - } - - yid->fd = fd; - inputs = y_list_prepend(inputs, yid); - - /* send initial packet */ - if (who) - data = strdup("<RVWCFG>"); - else - data = strdup("<RUPCFG>"); - yahoo_add_to_send_queue(yid, data, (int)strlen(data)); - FREE(data); - - /* send data */ - if (who) { - data = strdup("g="); - data = y_string_append(data, who); - data = y_string_append(data, "\r\n"); - } - else { - data = strdup("f=1\r\n"); - } - len = (int)strlen(data); - packet = y_new0(char, header_len + len); - packet[pos++] = header_len; - memcpy(packet + pos, magic_nr, sizeof(magic_nr)); - pos += sizeof(magic_nr); - pos += yahoo_put32(packet + pos, len); - memcpy(packet + pos, data, len); - pos += len; - yahoo_add_to_send_queue(yid, packet, pos); - FREE(packet); - FREE(data); - - yid->read_tag = YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, fd, YAHOO_INPUT_READ, yid); -} - -static void yahoo_webcam_get_server(struct yahoo_input_data *y, char *who, char *key) -{ - struct yahoo_input_data *yid = y_new0(struct yahoo_input_data, 1); - struct yahoo_server_settings *yss = y->yd->server_settings; - - yid->type = YAHOO_CONNECTION_WEBCAM_MASTER; - yid->yd = y->yd; - yid->wcm = y_new0(struct yahoo_webcam, 1); - yid->wcm->user = who ? strdup(who) : NULL; - yid->wcm->direction = who ? YAHOO_WEBCAM_DOWNLOAD : YAHOO_WEBCAM_UPLOAD; - yid->wcm->key = strdup(key); - - YAHOO_CALLBACK(ext_yahoo_connect_async)(yid->yd->client_id, yss->webcam_host, yss->webcam_port, yid->type, - _yahoo_webcam_get_server_connected, yid); - -} - -static YList *webcam_queue = NULL; -static void yahoo_process_webcam_key(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - char *me = NULL; - char *key = NULL; - char *who = NULL; - - YList *l; - yahoo_dump_unhandled(pkt); - for (l = pkt->hash; l; l = l->next) { - struct yahoo_pair *pair = (struct yahoo_pair *) l->data; - if (pair->key == 5) - me = pair->value; - if (pair->key == 61) - key = pair->value; - } - - l = webcam_queue; - if (!l) - return; - - who = (char *)l->data; - webcam_queue = y_list_remove_link(webcam_queue, webcam_queue); - y_list_free_1(l); - yahoo_webcam_get_server(yid, who, key); - FREE(who); -} - -static void yahoo_packet_process(struct yahoo_input_data *yid, struct yahoo_packet *pkt) -{ - //DEBUG_MSG(("yahoo_packet_process: 0x%02x", pkt->service)); - switch (pkt->service) { - case YAHOO_SERVICE_LOGON: - case YAHOO_SERVICE_Y8_STATUS_UPDATE: - yahoo_process_logon(yid, pkt); - break; - case YAHOO_SERVICE_USERSTAT: - case YAHOO_SERVICE_LOGOFF: - case YAHOO_SERVICE_ISAWAY: - case YAHOO_SERVICE_ISBACK: - case YAHOO_SERVICE_GAMELOGON: - case YAHOO_SERVICE_GAMELOGOFF: - case YAHOO_SERVICE_IDACT: - case YAHOO_SERVICE_IDDEACT: - case YAHOO_SERVICE_Y6_STATUS_UPDATE: - yahoo_process_status(yid, pkt); - break; - case YAHOO_SERVICE_NOTIFY: - yahoo_process_notify(yid, pkt); - break; - case YAHOO_SERVICE_MESSAGE: - case YAHOO_SERVICE_GAMEMSG: - case YAHOO_SERVICE_SYSMESSAGE: - yahoo_process_message(yid, pkt); - break; - case YAHOO_SERVICE_NEWMAIL: - yahoo_process_mail(yid, pkt); - break; - case YAHOO_SERVICE_NEWCONTACT: - yahoo_process_contact(yid, pkt); - break; - case YAHOO_SERVICE_LIST: - yahoo_process_list(yid, pkt); - break; - case YAHOO_SERVICE_VERIFY: - yahoo_process_verify(yid, pkt); - break; - case YAHOO_SERVICE_AUTH: - yahoo_process_auth(yid, pkt); - break; - case YAHOO_SERVICE_AUTHRESP: - yahoo_process_auth_resp(yid, pkt); - break; - case YAHOO_SERVICE_CONFINVITE: - case YAHOO_SERVICE_CONFADDINVITE: - case YAHOO_SERVICE_CONFDECLINE: - case YAHOO_SERVICE_CONFLOGON: - case YAHOO_SERVICE_CONFLOGOFF: - case YAHOO_SERVICE_CONFMSG: - yahoo_process_conference(yid, pkt); - break; - case YAHOO_SERVICE_CHATONLINE: - case YAHOO_SERVICE_CHATGOTO: - case YAHOO_SERVICE_CHATJOIN: - case YAHOO_SERVICE_CHATLEAVE: - case YAHOO_SERVICE_CHATEXIT: - case YAHOO_SERVICE_CHATLOGOUT: - case YAHOO_SERVICE_CHATPING: - case YAHOO_SERVICE_COMMENT: - yahoo_process_chat(yid, pkt); - break; - case YAHOO_SERVICE_P2PFILEXFER: - case YAHOO_SERVICE_FILETRANSFER: - yahoo_process_filetransfer(yid, pkt); - break; - case YAHOO_SERVICE_ADDBUDDY: - yahoo_process_buddyadd(yid, pkt); - break; - case YAHOO_SERVICE_REMBUDDY: - yahoo_process_buddydel(yid, pkt); - break; - case YAHOO_SERVICE_IGNORECONTACT: - yahoo_process_ignore(yid, pkt); - break; - case YAHOO_SERVICE_STEALTH_PERM: - case YAHOO_SERVICE_STEALTH_SESSION: - yahoo_process_stealth(yid, pkt); - break; - case YAHOO_SERVICE_VOICECHAT: - yahoo_process_voicechat(yid, pkt); - break; - case YAHOO_SERVICE_WEBCAM: - yahoo_process_webcam_key(yid, pkt); - break; - case YAHOO_SERVICE_PING: - yahoo_process_ping(yid, pkt); - break; - case YAHOO_SERVICE_PICTURE: - yahoo_process_picture(yid, pkt); - break; - case YAHOO_SERVICE_PICTURE_CHECKSUM: - yahoo_process_picture_checksum(yid, pkt); - break; - case YAHOO_SERVICE_PICTURE_UPDATE: - yahoo_process_picture_update(yid, pkt); - break; - case YAHOO_SERVICE_PICTURE_UPLOAD: - yahoo_process_picture_upload(yid, pkt); - break; - case YAHOO_SERVICE_YAB_UPDATE: - yahoo_process_yab_update(yid, pkt); - break; - case YAHOO_SERVICE_PICTURE_SHARING: - yahoo_process_picture_status(yid, pkt); - break; - case YAHOO_SERVICE_AUDIBLE: - yahoo_process_audible(yid, pkt); - break; - case YAHOO_SERVICE_CALENDAR: - yahoo_process_calendar(yid, pkt); - break; - case YAHOO_SERVICE_Y7_AUTHORIZATION: - yahoo_process_authorization(yid, pkt); - break; - case YAHOO_SERVICE_Y7_FILETRANSFER: - yahoo_process_filetransfer7(yid, pkt); - break; - case YAHOO_SERVICE_Y7_FILETRANSFERINFO: - yahoo_process_filetransfer7info(yid, pkt); - break; - case YAHOO_SERVICE_Y7_FILETRANSFERACCEPT: - /* - * We need to parse this packet - * - * Abort is signalled via status = -1 and 66 login status = -1 with FT_TOKEN - */ - yahoo_process_filetransfer7accept(yid, pkt); - break; - case YAHOO_SERVICE_Y7_CHANGE_GROUP: - yahoo_process_yahoo7_change_group(yid, pkt); - break; - case YAHOO_SERVICE_Y8_LIST: - yahoo_process_y8_list(yid, pkt); - break; - case YAHOO_SERVICE_IDLE: - case YAHOO_SERVICE_MAILSTAT: - case YAHOO_SERVICE_CHATINVITE: - case YAHOO_SERVICE_NEWPERSONALMAIL: - case YAHOO_SERVICE_ADDIDENT: - case YAHOO_SERVICE_ADDIGNORE: - case YAHOO_SERVICE_GOTGROUPRENAME: - case YAHOO_SERVICE_GROUPRENAME: - case YAHOO_SERVICE_PASSTHROUGH2: - case YAHOO_SERVICE_CHATLOGON: - case YAHOO_SERVICE_CHATLOGOFF: - case YAHOO_SERVICE_CHATMSG: - case YAHOO_SERVICE_REJECTCONTACT: - case YAHOO_SERVICE_PEERTOPEER: - WARNING(("unhandled service 0x%02x", pkt->service)); - //yahoo_dump_unhandled(pkt); - break; - default: - WARNING(("unknown service 0x%02x", pkt->service)); - //yahoo_dump_unhandled(pkt); - break; - } -} - -static struct yahoo_packet * yahoo_getdata(struct yahoo_input_data * yid) -{ - struct yahoo_packet *pkt; - struct yahoo_data *yd = yid->yd; - int pos = 0; - int pktlen; - - if (!yd) - return NULL; - - DEBUG_MSG(("rxlen is %d", yid->rxlen)); - if (yid->rxlen < YAHOO_PACKET_HDRLEN) { - DEBUG_MSG(("len < YAHOO_PACKET_HDRLEN")); - return NULL; - } - - /*DEBUG_MSG(("Dumping Packet Header:")); - yahoo_packet_dump(yid->rxqueue + pos, YAHOO_PACKET_HDRLEN); - DEBUG_MSG(("--- Done Dumping Packet Header ---"));*/ - { - char *buf = (char *)(yid->rxqueue + pos); - - if (buf[0] != 'Y' || buf[1] != 'M' || buf[2] != 'S' || buf[3] != 'G') { - DEBUG_MSG(("Not a YMSG packet?")); - return NULL; - } - } - pos += 4; /* YMSG */ - pos += 2; - pos += 2; - - pktlen = yahoo_get16(yid->rxqueue + pos); pos += 2; - DEBUG_MSG(("%d bytes to read, rxlen is %d", pktlen, yid->rxlen)); - - if (yid->rxlen < (YAHOO_PACKET_HDRLEN + pktlen)) { - DEBUG_MSG(("len < YAHOO_PACKET_HDRLEN + pktlen")); - return NULL; - } - - //LOG(("reading packet")); - //yahoo_packet_dump(yid->rxqueue, YAHOO_PACKET_HDRLEN + pktlen); - - pkt = yahoo_packet_new(YAHOO_SERVICE_LOGON, YPACKET_STATUS_DEFAULT, 0); - - pkt->service = yahoo_get16(yid->rxqueue + pos); pos += 2; - pkt->status = yahoo_get32(yid->rxqueue + pos); pos += 4; - pkt->id = yahoo_get32(yid->rxqueue + pos); pos += 4; - - yd->session_id = pkt->id; - - yahoo_packet_read(pkt, yid->rxqueue + pos, pktlen); - - yid->rxlen -= YAHOO_PACKET_HDRLEN + pktlen; - //DEBUG_MSG(("rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - if (yid->rxlen > 0) { - unsigned char *tmp = (unsigned char *)y_memdup(yid->rxqueue + YAHOO_PACKET_HDRLEN - + pktlen, yid->rxlen); - FREE(yid->rxqueue); - yid->rxqueue = tmp; - //DEBUG_MSG(("new rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - } - else { - //DEBUG_MSG(("freed rxqueue == %p", yid->rxqueue)); - FREE(yid->rxqueue); - } - - return pkt; -} - -static void yahoo_yab_read(struct yab *yab, unsigned char *d, int len) -{ - char *st, *en; - char *data = (char *)d; - data[len] = '\0'; - - DEBUG_MSG(("Got yab: %s", data)); - st = en = strstr(data, "userid=\""); - if (st) { - st += strlen("userid=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->id = yahoo_xmldecode(st); - } - - st = strstr(en, "fname=\""); - if (st) { - st += strlen("fname=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->fname = yahoo_xmldecode(st); - } - - st = strstr(en, "lname=\""); - if (st) { - st += strlen("lname=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->lname = yahoo_xmldecode(st); - } - - st = strstr(en, "nname=\""); - if (st) { - st += strlen("nname=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->nname = yahoo_xmldecode(st); - } - - st = strstr(en, "email=\""); - if (st) { - st += strlen("email=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->email = yahoo_xmldecode(st); - } - - st = strstr(en, "hphone=\""); - if (st) { - st += strlen("hphone=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->hphone = yahoo_xmldecode(st); - } - - st = strstr(en, "wphone=\""); - if (st) { - st += strlen("wphone=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->wphone = yahoo_xmldecode(st); - } - - st = strstr(en, "mphone=\""); - if (st) { - st += strlen("mphone=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->mphone = yahoo_xmldecode(st); - } - - st = strstr(en, "dbid=\""); - if (st) { - st += strlen("dbid=\""); - en = strchr(st, '"'); *en++ = '\0'; - yab->dbid = atoi(st); - } -} - -static struct yab * yahoo_getyab(struct yahoo_input_data *yid) -{ - struct yab *yab = NULL; - int pos = 0, end = 0; - struct yahoo_data *yd = yid->yd; - - if (!yd) - return NULL; - - //DEBUG_MSG(("rxlen is %d", yid->rxlen)); - - if (yid->rxlen <= strlen("<record")) - return NULL; - - /* start with <record */ - while (pos < yid->rxlen - strlen("<record") + 1 - && memcmp(yid->rxqueue + pos, "<record", strlen("<record"))) - pos++; - - if (pos >= yid->rxlen - 1) - return NULL; - - end = pos + 2; - /* end with /> */ - while (end < yid->rxlen - strlen("/>") + 1 && memcmp(yid->rxqueue + end, "/>", strlen("/>"))) - end++; - - if (end >= yid->rxlen - 1) - return NULL; - - yab = y_new0(struct yab, 1); - yahoo_yab_read(yab, yid->rxqueue + pos, end + 2 - pos); - - - yid->rxlen -= end + 1; - //DEBUG_MSG(("rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - if (yid->rxlen>0) { - unsigned char *tmp = (unsigned char *)y_memdup(yid->rxqueue + end + 1, yid->rxlen); - FREE(yid->rxqueue); - yid->rxqueue = tmp; - //DEBUG_MSG(("new rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - } - else { - //DEBUG_MSG(("freed rxqueue == %p", yid->rxqueue)); - FREE(yid->rxqueue); - } - - - return yab; -} - -static char * yahoo_getwebcam_master(struct yahoo_input_data *yid) -{ - unsigned int pos = 0; - int len = 0; - unsigned int status = 0; - char *server = NULL; - struct yahoo_data *yd; - - if (!yid || !yid->yd) - return NULL; - yd = yid->yd; - - DEBUG_MSG(("rxlen is %d", yid->rxlen)); - - len = yid->rxqueue[pos++]; - if (yid->rxlen < len) - return NULL; - - /* extract status (0 = ok, 6 = webcam not online) */ - status = yid->rxqueue[pos++]; - - if (status == 0) { - pos += 2; /* skip next 2 bytes */ - server = (char *)y_memdup(yid->rxqueue + pos, 16); - pos += 16; - } - else if (status == 6) { - YAHOO_CALLBACK(ext_yahoo_webcam_closed) - (yd->client_id, yid->wcm->user, 4); - } - - /* skip rest of the data */ - - yid->rxlen -= len; - DEBUG_MSG(("rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - if (yid->rxlen > 0) { - unsigned char *tmp = (unsigned char *)y_memdup(yid->rxqueue + pos, yid->rxlen); - FREE(yid->rxqueue); - yid->rxqueue = tmp; - DEBUG_MSG(("new rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - } - else { - DEBUG_MSG(("freed rxqueue == %p", yid->rxqueue)); - FREE(yid->rxqueue); - } - - return server; -} - -static int yahoo_get_webcam_data(struct yahoo_input_data *yid) -{ - unsigned char reason = 0; - int pos = 0; - int begin = 0; - int end = 0; - unsigned int closed = 0; - unsigned char header_len = 0; - char *who; - int connect = 0; - struct yahoo_data *yd = yid->yd; - - if (!yd) - return -1; - - if (!yid->wcm || !yid->wcd || !yid->rxlen) - return -1; - - DEBUG_MSG(("rxlen is %d", yid->rxlen)); - - /* if we are not reading part of image then read header */ - if (!yid->wcd->to_read) { - header_len = yid->rxqueue[pos++]; - yid->wcd->packet_type = 0; - - if (yid->rxlen < header_len) - return 0; - - if (header_len >= 8) { - reason = yid->rxqueue[pos++]; - /* next 2 bytes should always be 05 00 */ - pos += 2; - yid->wcd->data_size = yahoo_get32(yid->rxqueue + pos); - pos += 4; - yid->wcd->to_read = yid->wcd->data_size; - } - if (header_len >= 13) { - yid->wcd->packet_type = yid->rxqueue[pos++]; - yid->wcd->timestamp = yahoo_get32(yid->rxqueue + pos); - pos += 4; - } - - /* skip rest of header */ - pos = header_len; - } - - begin = pos; - pos += yid->wcd->to_read; - if (pos > yid->rxlen) pos = yid->rxlen; - - /* if it is not an image then make sure we have the whole packet */ - if (yid->wcd->packet_type != 0x02) { - if ((pos - begin) != yid->wcd->data_size) { - yid->wcd->to_read = 0; - return 0; - } - else { - yahoo_packet_dump(yid->rxqueue + begin, pos - begin); - } - } - - DEBUG_MSG(("packet type %.2X, data length %d", yid->wcd->packet_type, - yid->wcd->data_size)); - - /* find out what kind of packet we got */ - switch (yid->wcd->packet_type) { - case 0x00: - /* user requests to view webcam (uploading) */ - if (yid->wcd->data_size && - yid->wcm->direction == YAHOO_WEBCAM_UPLOAD) { - end = begin; - while (end <= yid->rxlen && - yid->rxqueue[end++] != 13); - if (end > begin) { - who = (char *)y_memdup(yid->rxqueue + begin, end - begin); - who[end - begin - 1] = 0; - YAHOO_CALLBACK(ext_yahoo_webcam_viewer)(yd->client_id, who + 2, 2); - FREE(who); - } - } - - if (yid->wcm->direction == YAHOO_WEBCAM_DOWNLOAD) { - /* timestamp/status field */ - /* 0 = declined viewing permission */ - /* 1 = accepted viewing permission */ - if (yid->wcd->timestamp == 0) { - YAHOO_CALLBACK(ext_yahoo_webcam_closed)(yd->client_id, yid->wcm->user, 3); - } - } - break; - case 0x01: /* status packets?? */ - /* timestamp contains status info */ - /* 00 00 00 01 = we have data?? */ - break; - case 0x02: /* image data */ - YAHOO_CALLBACK(ext_yahoo_got_webcam_image)(yd->client_id, - yid->wcm->user, yid->rxqueue + begin, - yid->wcd->data_size, pos - begin, - yid->wcd->timestamp); - break; - case 0x05: /* response packets when uploading */ - if (!yid->wcd->data_size) { - YAHOO_CALLBACK(ext_yahoo_webcam_data_request)(yd->client_id, yid->wcd->timestamp); - } - break; - case 0x07: /* connection is closing */ - switch (reason) { - case 0x01: /* user closed connection */ - closed = 1; - break; - case 0x0F: /* user cancelled permission */ - closed = 2; - break; - } - YAHOO_CALLBACK(ext_yahoo_webcam_closed)(yd->client_id, yid->wcm->user, closed); - break; - case 0x0C: /* user connected */ - case 0x0D: /* user disconnected */ - if (yid->wcd->data_size) { - who = (char *)y_memdup(yid->rxqueue + begin, pos - begin + 1); - who[pos - begin] = 0; - if (yid->wcd->packet_type == 0x0C) - connect = 1; - else - connect = 0; - YAHOO_CALLBACK(ext_yahoo_webcam_viewer)(yd->client_id, who, connect); - FREE(who); - } - break; - case 0x13: /* user data */ - /* i=user_ip (ip of the user we are viewing) */ - /* j=user_ext_ip (external ip of the user we */ - /* are viewing) */ - break; - case 0x17: /* ?? */ - break; - } - yid->wcd->to_read -= pos - begin; - - yid->rxlen -= pos; - DEBUG_MSG(("rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - if (yid->rxlen > 0) { - unsigned char *tmp = (unsigned char *)y_memdup(yid->rxqueue + pos, yid->rxlen); - FREE(yid->rxqueue); - yid->rxqueue = tmp; - DEBUG_MSG(("new rxlen == %d, rxqueue == %p", yid->rxlen, yid->rxqueue)); - } - else { - DEBUG_MSG(("freed rxqueue == %p", yid->rxqueue)); - FREE(yid->rxqueue); - } - - /* If we read a complete packet return success */ - if (!yid->wcd->to_read) - return 1; - - return 0; -} - -int yahoo_write_ready(int id, INT_PTR fd, void *data) -{ - struct yahoo_input_data *yid = (struct yahoo_input_data *) data; - int len; - struct data_queue *tx; - - LOG(("write callback: id=%d fd=%d data=%p", id, fd, data)); - if (!yid || !yid->txqueues) - return -2; - - tx = (struct data_queue *) yid->txqueues->data; - LOG(("writing %d bytes", tx->len)); - len = yahoo_send_data(fd, (const char *)tx->queue, MIN(1024, tx->len)); - - if (len == -1 && errno == EAGAIN) - return 1; - - if (len <= 0) { - int e = errno; - DEBUG_MSG(("len == %d (<= 0)", len)); - while (yid->txqueues) { - YList *l = yid->txqueues; - tx = (struct data_queue *) l->data; - free(tx->queue); - free(tx); - yid->txqueues = y_list_remove_link(yid->txqueues, yid->txqueues); - y_list_free_1(l); - } - LOG(("yahoo_write_ready(%d, %d) len < 0", id, fd)); - YAHOO_CALLBACK(ext_yahoo_remove_handler)(id, yid->write_tag); - yid->write_tag = 0; - errno = e; - return 0; - } - - - tx->len -= len; - //LOG(("yahoo_write_ready(%d, %d) tx->len: %d, len: %d", id, fd, tx->len, len)); - if (tx->len > 0) { - unsigned char *tmp = (unsigned char *)y_memdup(tx->queue + len, tx->len); - FREE(tx->queue); - tx->queue = tmp; - } - else { - YList *l = yid->txqueues; - free(tx->queue); - free(tx); - yid->txqueues = y_list_remove_link(yid->txqueues, yid->txqueues); - y_list_free_1(l); - if (!yid->txqueues) { - //LOG(("yahoo_write_ready(%d, %d) !txqueues", id, fd)); - YAHOO_CALLBACK(ext_yahoo_remove_handler)(id, yid->write_tag); - yid->write_tag = 0; - } - } - - return 1; -} - -static void yahoo_process_pager_connection(struct yahoo_input_data *yid, int over) -{ - struct yahoo_packet *pkt; - struct yahoo_data *yd = yid->yd; - int id = yd->client_id; - - if (over) - return; - - while (find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER) - && (pkt = yahoo_getdata(yid)) != NULL) { - - yahoo_packet_process(yid, pkt); - - yahoo_packet_free(pkt); - } -} - -static void yahoo_process_ft_connection(struct yahoo_input_data*, int) -{ -} - -static void yahoo_process_chatcat_connection(struct yahoo_input_data *yid, int over) -{ - if (over) - return; - - if (strstr((char*)yid->rxqueue + (yid->rxlen - 20), "</content>")) { - YAHOO_CALLBACK(ext_yahoo_chat_cat_xml)(yid->yd->client_id, (char*)yid->rxqueue); - } -} - -static void yahoo_process_yab_connection(struct yahoo_input_data *yid, int over) -{ - struct yahoo_data *yd = yid->yd; - struct yab *yab; - YList *buds; - //int changed=0; - int id = yd->client_id; - BOOL yab_used = FALSE; - - LOG(("yahoo_process_yab_connection(over = %d) ", over)); - if (over) { - YAHOO_CALLBACK(ext_yahoo_got_buddies)(yd->client_id, yd->buddies); - return; - } - - while (find_input_by_id_and_type(id, YAHOO_CONNECTION_YAB) - && (yab = yahoo_getyab(yid)) != NULL) { - if (!yab->id) - continue; - - //changed=1; - yab_used = FALSE; - for (buds = yd->buddies; buds; buds = buds->next) { - struct yahoo_buddy * bud = (struct yahoo_buddy *) buds->data; - - if (!strcmp(bud->id, yab->id)) { - yab_used = TRUE; - bud->yab_entry = yab; - if (yab->nname) { - bud->real_name = strdup(yab->nname); - } - else if (yab->fname && yab->lname) { - bud->real_name = y_new0(char, - strlen(yab->fname) + - strlen(yab->lname) + 2 - ); - sprintf(bud->real_name, "%s %s", - yab->fname, yab->lname); - } - else if (yab->fname) { - bud->real_name = strdup(yab->fname); - } - break; /* for */ - } - } - - if (!yab_used) { - //need to free the yab entry - FREE(yab->fname); - FREE(yab->lname); - FREE(yab->nname); - FREE(yab->id); - FREE(yab->email); - FREE(yab->hphone); - FREE(yab->wphone); - FREE(yab->mphone); - FREE(yab); - } - - } - - //if (changed) - // YAHOO_CALLBACK(ext_yahoo_got_buddies)(yd->client_id, yd->buddies); -} - -static void yahoo_process_search_connection(struct yahoo_input_data *yid, int over) -{ - struct yahoo_found_contact *yct = NULL; - char *p = (char *)yid->rxqueue, *np, *cp; - int k, n; - int start = 0, found = 0, total = 0; - YList *contacts = NULL; - struct yahoo_input_data *pyid; - - LOG(("[yahoo_process_search_connection] over:%d", over)); - - pyid = find_input_by_id_and_type(yid->yd->client_id, YAHOO_CONNECTION_PAGER); - - if (!over || !pyid) { - LOG(("yahoo_process_search_connection] ?? Not Done yet? Waiting for more packets!")); - return; - } - - if (p && (p = strstr(p, "\r\n\r\n"))) { - p += 4; - - for (k = 0; (p = strchr(p, 4)) && (k < 4); k++) { - p++; - n = atoi(p); - switch (k) { - case 0: found = pyid->ys->lsearch_nfound = n; break; - case 2: start = pyid->ys->lsearch_nstart = n; break; - case 3: total = pyid->ys->lsearch_ntotal = n; break; - } - } - - if (p) - p++; - - k = 0; - while (p && *p) { - cp = p; - np = strchr(p, 4); - - if (!np) - break; - *np = 0; - p = np + 1; - - switch (k++) { - case 1: - if (strlen(cp) > 2 && y_list_length(contacts) < total) { - yct = y_new0(struct yahoo_found_contact, 1); - contacts = y_list_append(contacts, yct); - yct->id = cp + 2; - } - else { - *p = 0; - } - break; - case 2: - yct->online = !strcmp(cp, "2") ? 1 : 0; - break; - case 3: - yct->gender = cp; - break; - case 4: - yct->age = atoi(cp); - break; - case 5: - if (strcmp(cp, "\005")) - yct->location = cp; - k = 0; - break; - } - } - } - - YAHOO_CALLBACK(ext_yahoo_got_search_result)(yid->yd->client_id, found, start, total, contacts); - - while (contacts) { - YList *node = contacts; - contacts = y_list_remove_link(contacts, node); - free(node->data); - y_list_free_1(node); - } -} - -static void _yahoo_webcam_connected(INT_PTR fd, int error, void *d) -{ - struct yahoo_input_data *yid = (struct yahoo_input_data *) d; - struct yahoo_webcam * wcm = yid->wcm; - struct yahoo_data * yd = yid->yd; - char szConnType[100]; - char *data = NULL; - char *packet = NULL; - unsigned char magic_nr[] = { 1, 0, 0, 0, 1 }; - unsigned header_len = 0; - unsigned int len = 0; - unsigned int pos = 0; - - if (error || fd <= 0) { - FREE(yid); - return; - } - - yid->fd = fd; - inputs = y_list_prepend(inputs, yid); - - LOG(("Connected")); - /* send initial packet */ - switch (wcm->direction) { - case YAHOO_WEBCAM_DOWNLOAD: - data = strdup("<REQIMG>"); - break; - case YAHOO_WEBCAM_UPLOAD: - data = strdup("<SNDIMG>"); - break; - default: - return; - } - yahoo_add_to_send_queue(yid, data, (int)strlen(data)); - FREE(data); - - /* send data */ - switch (wcm->direction) { - case YAHOO_WEBCAM_DOWNLOAD: - header_len = 8; - data = strdup("a=2\r\nc=us\r\ne=21\r\nu="); - data = y_string_append(data, yd->user); - data = y_string_append(data, "\r\nt="); - data = y_string_append(data, wcm->key); - data = y_string_append(data, "\r\ni="); - data = y_string_append(data, wcm->my_ip); - data = y_string_append(data, "\r\ng="); - data = y_string_append(data, wcm->user); - data = y_string_append(data, "\r\no=w-2-5-1\r\np="); - snprintf(szConnType, sizeof(szConnType), "%d", wcm->conn_type); - data = y_string_append(data, szConnType); - data = y_string_append(data, "\r\n"); - break; - case YAHOO_WEBCAM_UPLOAD: - header_len = 13; - data = strdup("a=2\r\nc=us\r\nu="); - data = y_string_append(data, yd->user); - data = y_string_append(data, "\r\nt="); - data = y_string_append(data, wcm->key); - data = y_string_append(data, "\r\ni="); - data = y_string_append(data, wcm->my_ip); - data = y_string_append(data, "\r\no=w-2-5-1\r\np="); - snprintf(szConnType, sizeof(szConnType), "%d", wcm->conn_type); - data = y_string_append(data, szConnType); - data = y_string_append(data, "\r\nb="); - data = y_string_append(data, wcm->description); - data = y_string_append(data, "\r\n"); - break; - } - - len = (int)strlen(data); - packet = y_new0(char, header_len + len); - packet[pos++] = header_len; - packet[pos++] = 0; - switch (wcm->direction) { - case YAHOO_WEBCAM_DOWNLOAD: - packet[pos++] = 1; - packet[pos++] = 0; - break; - case YAHOO_WEBCAM_UPLOAD: - packet[pos++] = 5; - packet[pos++] = 0; - break; - } - - pos += yahoo_put32(packet + pos, len); - if (wcm->direction == YAHOO_WEBCAM_UPLOAD) { - memcpy(packet + pos, magic_nr, sizeof(magic_nr)); - pos += sizeof(magic_nr); - } - memcpy(packet + pos, data, len); - yahoo_add_to_send_queue(yid, packet, header_len + len); - FREE(packet); - FREE(data); - - yid->read_tag = YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, yid->fd, YAHOO_INPUT_READ, yid); -} - -static void yahoo_webcam_connect(struct yahoo_input_data *y) -{ - struct yahoo_webcam *wcm = y->wcm; - struct yahoo_input_data *yid; - struct yahoo_server_settings *yss; - - if (!wcm || !wcm->server || !wcm->key) - return; - - yid = y_new0(struct yahoo_input_data, 1); - yid->type = YAHOO_CONNECTION_WEBCAM; - yid->yd = y->yd; - - /* copy webcam data to new connection */ - yid->wcm = y->wcm; - y->wcm = NULL; - - yss = y->yd->server_settings; - - yid->wcd = y_new0(struct yahoo_webcam_data, 1); - - LOG(("Connecting to: %s:%d", wcm->server, wcm->port)); - YAHOO_CALLBACK(ext_yahoo_connect_async)(y->yd->client_id, wcm->server, wcm->port, yid->type, - _yahoo_webcam_connected, yid); - -} - -static void yahoo_process_webcam_master_connection(struct yahoo_input_data *yid, int over) -{ - char* server; - struct yahoo_server_settings *yss; - - if (over) - return; - - server = yahoo_getwebcam_master(yid); - - if (server) { - yss = yid->yd->server_settings; - yid->wcm->server = strdup(server); - yid->wcm->port = yss->webcam_port; - yid->wcm->conn_type = yss->conn_type; - yid->wcm->my_ip = strdup(yss->local_host); - if (yid->wcm->direction == YAHOO_WEBCAM_UPLOAD) - yid->wcm->description = strdup(yss->webcam_description); - yahoo_webcam_connect(yid); - FREE(server); - } -} - -static void yahoo_process_webcam_connection(struct yahoo_input_data *yid, int over) -{ - int id = yid->yd->client_id; - INT_PTR fd = yid->fd; - - if (over) - return; - - /* as long as we still have packets available keep processing them */ - while (find_input_by_id_and_fd(id, fd) - && yahoo_get_webcam_data(yid) == 1); -} - -static void(*yahoo_process_connection[])(struct yahoo_input_data *, int over) = { - yahoo_process_pager_connection, - yahoo_process_ft_connection, - yahoo_process_yab_connection, - yahoo_process_webcam_master_connection, - yahoo_process_webcam_connection, - yahoo_process_chatcat_connection, - yahoo_process_search_connection -}; - -int yahoo_read_ready(int, INT_PTR fd, void *data) -{ - struct yahoo_input_data *yid = (struct yahoo_input_data *) data; - struct yahoo_server_settings *yss; - char buf[4096]; - int len; - - //LOG(("read callback: id=%d fd=%d data=%p", id, fd, data)); - if (!yid) - return -2; - - - do { - len = read(fd, buf, sizeof(buf)); - - //LOG(("read callback: id=%d fd=%d len=%d", id, fd, len)); - - } while (len == -1 && errno == EINTR); - - if (len == -1 && errno == EAGAIN) /* we'll try again later */ - return 1; - - if (len <= 0) { - int e = errno; - DEBUG_MSG(("len == %d (<= 0)", len)); - - if (yid->type == YAHOO_CONNECTION_PAGER) { - - if (yid->yd) { - // need this to handle live connection with web_messenger set - yss = yid->yd->server_settings; - - if (yss && yss->web_messenger && len == 0) - return 1; // try again later.. just nothing here yet - } - - YAHOO_CALLBACK(ext_yahoo_error)(yid->yd->client_id, "Connection closed by server", 1, E_CONNECTION); - } - - yahoo_process_connection[yid->type](yid, 1); - yahoo_input_close(yid); - - /* no need to return an error, because we've already fixed it */ - if (len == 0) - return 1; - - errno = e; - LOG(("read error: %s", strerror(errno))); - return -1; - } - - yid->rxqueue = y_renew(unsigned char, yid->rxqueue, len + yid->rxlen + 1); - memcpy(yid->rxqueue + yid->rxlen, buf, len); - yid->rxlen += len; - yid->rxqueue[yid->rxlen] = 0; // zero terminate - - yahoo_process_connection[yid->type](yid, 0); - - return len; -} - -int yahoo_init_with_attributes(const char *username, const char *password, const char *pw_token, ...) -{ - va_list ap; - struct yahoo_data *yd; - char *c; - - yd = y_new0(struct yahoo_data, 1); - - if (!yd) - return 0; - - yd->user = strdup(username); - - /* we need to strip out @yahoo.com in case a user enters full e-mail address. - NOTE: Not sure what other domains to strip out as well - */ - c = strstr(yd->user, "@yahoo.com"); - - if (c != NULL) - (*c) = '\0'; - - /** - * Lower case it in case a user uses different/mixed case - */ - strlwr(yd->user); - - yd->password = strdup(password); - yd->pw_token = (pw_token != NULL && pw_token[0] != '\0') ? strdup(pw_token) : NULL; - - yd->initial_status = YAHOO_STATUS_OFFLINE; - yd->current_status = YAHOO_STATUS_OFFLINE; - - yd->client_id = ++last_id; - - add_to_list(yd); - - va_start(ap, pw_token); - yd->server_settings = _yahoo_assign_server_settings(ap); - va_end(ap); - - yd->ignore = yd->buddies = NULL; - yd->ygrp = NULL; - - return yd->client_id; -} - -int yahoo_init(const char *username, const char *password, const char *pw_token) -{ - return yahoo_init_with_attributes(username, password, pw_token, NULL); -} - -struct connect_callback_data -{ - struct yahoo_data *yd; - int tag; - int i; - int type; -}; - -static void yahoo_connected(INT_PTR fd, int error, void *data) -{ - struct connect_callback_data *ccd = (struct connect_callback_data *) data; - struct yahoo_data *yd = ccd->yd; - struct yahoo_packet *pkt; - struct yahoo_input_data *yid; - struct yahoo_server_settings *yss = yd->server_settings; - - if (error) { - if (ccd->type == YAHOO_CONNECTION_PAGER && fallback_ports[ccd->i]) { - int tag; - yss->pager_port = fallback_ports[ccd->i++]; - - LOG(("[yahoo_connected] Trying port %d", yss->pager_port)); - - tag = YAHOO_CALLBACK(ext_yahoo_connect_async)(yd->client_id, yss->pager_host, yss->pager_port, - ccd->type, yahoo_connected, ccd); - - if (tag > 0) - ccd->tag = tag; - } - else { - LOG(("[yahoo_connected] No More ports or wrong type?")); - - FREE(ccd); - YAHOO_CALLBACK(ext_yahoo_login_response)(yd->client_id, YAHOO_LOGIN_SOCK, NULL); - } - return; - } - - FREE(ccd); - - /* fd < 0 && error == 0 means connect was cancelled */ - if (fd < 0) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_VERIFY, YPACKET_STATUS_DEFAULT, 0); - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->fd = fd; - inputs = y_list_prepend(inputs, yid); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); - - yid->read_tag = YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, yid->fd, YAHOO_INPUT_READ, yid); -} - -void yahoo_login(int id, enum yahoo_status initial) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct connect_callback_data *ccd; - struct yahoo_server_settings *yss; - - LOG(("[yahoo_login] id: %d, initial status: %d", id, initial)); - - if (!yd) - return; - - yss = yd->server_settings; - - yd->initial_status = initial; - - ccd = y_new0(struct connect_callback_data, 1); - ccd->yd = yd; - ccd->type = YAHOO_CONNECTION_PAGER; - YAHOO_CALLBACK(ext_yahoo_connect_async)(yd->client_id, yss->pager_host, yss->pager_port, YAHOO_CONNECTION_PAGER, - yahoo_connected, ccd); -} - - -int yahoo_get_fd(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - if (!yid) - return 0; - else - return yid->fd; -} - -void yahoo_send_im(int id, const char *from, const char *who, int protocol, const char *msg, int utf8, int buddy_icon) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_packet *pkt = NULL; - struct yahoo_data *yd; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - pkt = yahoo_packet_new(YAHOO_SERVICE_MESSAGE, YPACKET_STATUS_OFFLINE, yd->session_id); - - if (from && strcmp(from, yd->user)) - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash(pkt, 1, from ? from : yd->user); - yahoo_packet_hash(pkt, 5, who); - - if (utf8) - yahoo_packet_hash(pkt, 97, "1"); - - yahoo_packet_hash(pkt, 14, msg); - - - /* GAIM does doodle so they allow/enable imvironments (that get rejected?) - 63 - imvironment string;11 - 64 - imvironment enabled/allowed - 0 - enabled imwironment ;0 - no imvironment - 2 - disabled '' - empty cause we don;t do these - */ - yahoo_packet_hash(pkt, 63, ""); /* imvironment name; or ;0 (doodle;11)*/ - yahoo_packet_hash(pkt, 64, "2"); - - //if (!yss->web_messenger) { - //yahoo_packet_hash(pkt, 1002, "1"); /* YIM6+ */ - /* - * So yahoo swallows the packet if I sent this now?? WTF?? Taking it out - */ - //yahoo_packet_hash(pkt, 10093, "4"); /* YIM7? */ - //} - - yahoo_packet_hash_int(pkt, 206, buddy_icon); /* buddy_icon, 0 = none, 1=avatar?, 2=picture */ - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_send_typing(int id, const char *from, const char *who, int protocol, int typ) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - - pkt = yahoo_packet_new(YAHOO_SERVICE_NOTIFY, YPACKET_STATUS_NOTIFY, yd->session_id); - - yahoo_packet_hash(pkt, 49, "TYPING"); - yahoo_packet_hash(pkt, 1, from ? from : yd->user); - yahoo_packet_hash(pkt, 14, " "); - yahoo_packet_hash(pkt, 13, typ ? "1" : "0"); - yahoo_packet_hash(pkt, 5, who); - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - //} else { - //yahoo_packet_hash(pkt, 1002, "1"); /* YIM6+ */ - //yahoo_packet_hash(pkt, 10093, "4"); /* YIM7+ */ - } - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - //int service; - enum yahoo_status cs; - - if (!yid) - return; - - yd = yid->yd; - - //if (yd->current_status == state && state != YAHOO_STATUS_CUSTOM) - // return; - - cs = yd->current_status; - yss = yd->server_settings; - - if (state == YAHOO_STATUS_INVISIBLE) { - pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 13, "2"); - yd->current_status = state; - } - else { - LOG(("yahoo_set_away: state: %d, msg: %s, away: %d", state, msg, away)); - - if (msg) { - yd->current_status = YAHOO_STATUS_CUSTOM; - } - else { - yd->current_status = state; - } - - //if (yd->current_status == YAHOO_STATUS_AVAILABLE) - // service = YAHOO_SERVICE_ISBACK; - //else - // service = YAHOO_SERVICE_ISAWAY; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_STATUS_UPDATE, YPACKET_STATUS_DEFAULT, yd->session_id); - if ((away == 2) && (yd->current_status == YAHOO_STATUS_AVAILABLE)) { - //pkt = yahoo_packet_new(YAHOO_SERVICE_ISAWAY, YAHOO_STATUS_BRB, yd->session_id); - yahoo_packet_hash(pkt, 10, "999"); - yahoo_packet_hash(pkt, 47, "2"); - } - else { - //pkt = yahoo_packet_new(YAHOO_SERVICE_YAHOO6_STATUS_UPDATE, YAHOO_STATUS_AVAILABLE, yd->session_id); - yahoo_packet_hash_int(pkt, 10, yd->current_status); - - if (yd->current_status == YAHOO_STATUS_CUSTOM) { - yahoo_packet_hash(pkt, 19, msg); - yahoo_packet_hash(pkt, 97, "1"); - yahoo_packet_hash(pkt, 47, (away == 2) ? "2" : (away) ? "1" : "0"); - yahoo_packet_hash(pkt, 187, "0"); // ??? - } - else { - yahoo_packet_hash(pkt, 19, ""); - yahoo_packet_hash(pkt, 97, "1"); - //yahoo_packet_hash(pkt, 47, (away == 2)? "2": (away) ?"1":"0"); - } - - - - } - } - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - - if (cs == YAHOO_STATUS_INVISIBLE && state != YAHOO_STATUS_INVISIBLE) { - pkt = yahoo_packet_new(YAHOO_SERVICE_Y6_VISIBLE_TOGGLE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 13, "1"); - yd->current_status = state; - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - } -} - -void yahoo_set_stealth(int id, const char *buddy, int protocol, int add) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - //int service; - //char s[4]; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_STEALTH_PERM, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 31, add ? "1" : "2"); /*visibility? */ - yahoo_packet_hash(pkt, 13, "2"); // function/service - - yahoo_packet_hash(pkt, 302, "319"); - yahoo_packet_hash(pkt, 300, "319"); - - yahoo_packet_hash(pkt, 7, buddy); - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - yahoo_packet_hash(pkt, 301, "319"); - yahoo_packet_hash(pkt, 303, "319"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_logoff(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - LOG(("yahoo_logoff: current status: %d", yd->current_status)); - - if (yd->current_status != YAHOO_STATUS_OFFLINE) { - struct yahoo_server_settings *yss = yd->server_settings; - - pkt = yahoo_packet_new(YAHOO_SERVICE_LOGOFF, YPACKET_STATUS_DEFAULT, yd->session_id); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yd->current_status = YAHOO_STATUS_OFFLINE; - - if (pkt) { - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - } - } - - - /* do { - yahoo_input_close(yid); - } while((yid = find_input_by_id(id)));*/ - -} - -void yahoo_get_list(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_LIST, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - if (pkt) { - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - } -} - -static void _yahoo_http_connected(int, INT_PTR fd, int, void *data) -{ - struct yahoo_input_data *yid = (struct yahoo_input_data *) data; - if (fd <= 0) { - inputs = y_list_remove(inputs, yid); - FREE(yid); - return; - } - - yid->fd = fd; - yid->read_tag = YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, fd, YAHOO_INPUT_READ, yid); -} - -void yahoo_get_yab(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - char url[1024]; - char buff[1024]; - - if (!yd) - return; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_YAB; - - snprintf(url, 1024, "http://insider.msg.yahoo.com/ycontent/?ab2=0"); - - snprintf(buff, sizeof(buff), "Y=%s; T=%s", - yd->cookie_y, yd->cookie_t); - - inputs = y_list_prepend(inputs, yid); - - //yahoo_http_get(yid->yd->client_id, url, buff, - // _yahoo_http_connected, yid); - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_YAB, "GET", url, buff, 0, - _yahoo_http_connected, yid); -} - -void yahoo_set_yab(int id, struct yab * yab) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - char url[1024]; - char buff[1024]; - char *temp; - int size = sizeof(url) - 1; - - if (!yd) - return; - - yid = y_new0(struct yahoo_input_data, 1); - yid->type = YAHOO_CONNECTION_YAB; - yid->yd = yd; - - strncpy(url, "http://insider.msg.yahoo.com/ycontent/?addab2=0", size); - - if (yab->dbid) { - /* change existing yab */ - char tmp[32]; - strncat(url, "&ee=1&ow=1&id=", size - strlen(url)); - snprintf(tmp, sizeof(tmp), "%d", yab->dbid); - strncat(url, tmp, size - strlen(url)); - } - - if (yab->fname) { - strncat(url, "&fn=", size - strlen(url)); - temp = yahoo_urlencode(yab->fname); - strncat(url, temp, size - strlen(url)); - free(temp); - } - if (yab->lname) { - strncat(url, "&ln=", size - strlen(url)); - temp = yahoo_urlencode(yab->lname); - strncat(url, temp, size - strlen(url)); - free(temp); - } - strncat(url, "&yid=", size - strlen(url)); - temp = yahoo_urlencode(yab->id); - strncat(url, temp, size - strlen(url)); - free(temp); - if (yab->nname) { - strncat(url, "&nn=", size - strlen(url)); - temp = yahoo_urlencode(yab->nname); - strncat(url, temp, size - strlen(url)); - free(temp); - } - if (yab->email) { - strncat(url, "&e=", size - strlen(url)); - temp = yahoo_urlencode(yab->email); - strncat(url, temp, size - strlen(url)); - free(temp); - } - if (yab->hphone) { - strncat(url, "&hp=", size - strlen(url)); - temp = yahoo_urlencode(yab->hphone); - strncat(url, temp, size - strlen(url)); - free(temp); - } - if (yab->wphone) { - strncat(url, "&wp=", size - strlen(url)); - temp = yahoo_urlencode(yab->wphone); - strncat(url, temp, size - strlen(url)); - free(temp); - } - if (yab->mphone) { - strncat(url, "&mp=", size - strlen(url)); - temp = yahoo_urlencode(yab->mphone); - strncat(url, temp, size - strlen(url)); - free(temp); - } - strncat(url, "&pp=0", size - strlen(url)); - - snprintf(buff, sizeof(buff), "Y=%s; T=%s", - yd->cookie_y, yd->cookie_t); - - inputs = y_list_prepend(inputs, yid); - - // yahoo_http_get(yid->yd->client_id, url, buff, - // _yahoo_http_connected, yid); - - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_YAB, "GET", url, buff, 0, - _yahoo_http_connected, yid); -} - -void yahoo_set_identity_status(int id, const char * identity, int active) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(active ? YAHOO_SERVICE_IDACT : YAHOO_SERVICE_IDDEACT, - YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 3, identity); - if (pkt) { - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - } -} - -void yahoo_refresh(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_USERSTAT, YPACKET_STATUS_DEFAULT, yd->session_id); - if (pkt) { - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - } -} - -void yahoo_send_ping(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_PING, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_keepalive(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_KEEPALIVE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_chat_keepalive(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATPING, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_add_buddy(int id, const char *myid, const char *fname, const char *lname, const char *who, int protocol, const char *group, const char *msg) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - if (!yd->logged_in) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_ADDBUDDY, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 14, (msg != NULL) ? msg : ""); - yahoo_packet_hash(pkt, 65, group); - yahoo_packet_hash(pkt, 97, "1"); - - if (fname != NULL) - yahoo_packet_hash(pkt, 216, fname); - - if (lname != NULL) - yahoo_packet_hash(pkt, 254, lname); - - yahoo_packet_hash(pkt, 1, myid ? myid : yd->user); // identity with which we are adding the user. - yahoo_packet_hash(pkt, 302, "319"); - yahoo_packet_hash(pkt, 300, "319"); - yahoo_packet_hash(pkt, 7, who); - //yahoo_packet_hash(pkt, 334, "0"); - - if (protocol != 0) { - yahoo_packet_hash_int(pkt, 241, protocol); - } - - yahoo_packet_hash(pkt, 301, "319"); - yahoo_packet_hash(pkt, 303, "319"); - - - /* YIM7 does something weird here: - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 14, msg != NULL ? msg : ""); - yahoo_packet_hash(pkt, 65, group); - yahoo_packet_hash(pkt, 97, 1); ????? - yahoo_packet_hash(pkt, 216, "First Name");??? - yahoo_packet_hash(pkt, 254, "Last Name");??? - yahoo_packet_hash(pkt, 7, who); - - Server Replies with: - 1: ID - 66: 0 - 7: who - 65: group - 223: 1 ?? - */ - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_remove_buddy(int id, const char *who, int protocol, const char *group) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_REMBUDDY, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 7, who); - yahoo_packet_hash(pkt, 65, group); - //yahoo_packet_hash(pkt, 66, "0"); // Yahoo 9.0 does login status 0?? What for? - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_accept_buddy(int id, const char *myid, const char *who, int protocol) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - if (!yd->logged_in) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_AUTHORIZATION, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, myid ? myid : yd->user); - yahoo_packet_hash(pkt, 5, who); - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - yahoo_packet_hash(pkt, 13, "1"); // Accept Authorization - - // Y8 also send 334: 0 - I guess that's the protocol stuff - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_reject_buddy(int id, const char *myid, const char *who, int protocol, const char *msg) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - if (!yd->logged_in) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_AUTHORIZATION, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, myid ? myid : yd->user); - yahoo_packet_hash(pkt, 5, who); - yahoo_packet_hash(pkt, 13, "2"); // Reject Authorization - - if (msg != NULL) - yahoo_packet_hash(pkt, 14, msg); - - if (protocol != 0) - yahoo_packet_hash_int(pkt, 241, protocol); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_ignore_buddy(int id, const char *who, int unignore) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - if (!yd->logged_in) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_IGNORECONTACT, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 7, who); - yahoo_packet_hash(pkt, 13, unignore ? "2" : "1"); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_change_buddy_group(int id, const char *who, const char *old_group, const char *new_group) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - /*pkt = yahoo_packet_new(YAHOO_SERVICE_ADDBUDDY, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 7, who); - yahoo_packet_hash(pkt, 14, ""); - yahoo_packet_hash(pkt, 65, new_group); - yahoo_packet_hash(pkt, 97, "1"); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - - pkt = yahoo_packet_new(YAHOO_SERVICE_REMBUDDY, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 7, who); - yahoo_packet_hash(pkt, 65, old_group); - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt);*/ - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_CHANGE_GROUP, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 302, "240"); //??? - yahoo_packet_hash(pkt, 300, "240"); //??? - yahoo_packet_hash(pkt, 7, who); - yahoo_packet_hash(pkt, 224, old_group); - yahoo_packet_hash(pkt, 264, new_group); - yahoo_packet_hash(pkt, 301, "240"); //??? - yahoo_packet_hash(pkt, 303, "240"); //??? - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_group_rename(int id, const char *old_group, const char *new_group) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_GROUPRENAME, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 65, old_group); - yahoo_packet_hash(pkt, 67, new_group); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_conference_addinvite(int id, const char * from, const char *who, const char *room, const YList * members, const char *msg) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFADDINVITE, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - yahoo_packet_hash(pkt, 51, who); - yahoo_packet_hash(pkt, 57, room); - yahoo_packet_hash(pkt, 58, msg); - yahoo_packet_hash(pkt, 13, "0"); - for (; members; members = members->next) { - yahoo_packet_hash(pkt, 52, (char *)members->data); - yahoo_packet_hash(pkt, 53, (char *)members->data); - } - /* 52, 53 -> other members? */ - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_conference_invite(int id, const char * from, YList *who, const char *room, const char *msg) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFINVITE, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - yahoo_packet_hash(pkt, 50, yd->user); - for (; who; who = who->next) { - yahoo_packet_hash(pkt, 52, (char *)who->data); - } - yahoo_packet_hash(pkt, 57, room); - yahoo_packet_hash(pkt, 58, msg); - yahoo_packet_hash(pkt, 13, "0"); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_conference_logon(int id, const char *from, YList *who, const char *room) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGON, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - - yahoo_packet_hash(pkt, 57, room); - - for (; who; who = who->next) { - yahoo_packet_hash(pkt, 3, (char *)who->data); - } - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_conference_decline(int id, const char * from, YList *who, const char *room, const char *msg) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFDECLINE, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - for (; who; who = who->next) { - yahoo_packet_hash(pkt, 3, (char *)who->data); - } - yahoo_packet_hash(pkt, 57, room); - yahoo_packet_hash(pkt, 14, msg); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_conference_logoff(int id, const char * from, YList *who, const char *room) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGOFF, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - for (; who; who = who->next) { - yahoo_packet_hash(pkt, 3, (char *)who->data); - } - yahoo_packet_hash(pkt, 57, room); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_conference_message(int id, const char * from, YList *who, const char *room, const char *msg, int utf8) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CONFMSG, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - for (; who; who = who->next) { - yahoo_packet_hash(pkt, 53, (char *)who->data); - } - yahoo_packet_hash(pkt, 57, room); - yahoo_packet_hash(pkt, 14, msg); - - if (utf8) - yahoo_packet_hash(pkt, 97, "1"); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_get_chatrooms(int id, int chatroomid) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - char url[1024]; - char buff[1024]; - - if (!yd) - return; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_CHATCAT; - - if (chatroomid == 0) { - snprintf(url, 1024, "http://insider.msg.yahoo.com/ycontent/?chatcat=0"); - } - else { - snprintf(url, 1024, "http://insider.msg.yahoo.com/ycontent/?chatroom_%d=0", chatroomid); - } - - snprintf(buff, sizeof(buff), "Y=%s; T=%s", yd->cookie_y, yd->cookie_t); - - inputs = y_list_prepend(inputs, yid); - - //yahoo_http_get(yid->yd->client_id, url, buff, _yahoo_http_connected, yid); - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_CHATCAT, "GET", url, buff, 0, - _yahoo_http_connected, yid); - -} - -void yahoo_chat_logon(int id, const char *from, const char *room, const char *roomid) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATONLINE, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - yahoo_packet_hash(pkt, 109, yd->user); - yahoo_packet_hash(pkt, 6, "abcde"); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); - - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATJOIN, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - yahoo_packet_hash(pkt, 104, room); - yahoo_packet_hash(pkt, 129, roomid); - yahoo_packet_hash(pkt, 62, "2"); /* ??? */ - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - - -void yahoo_chat_message(int id, const char *from, const char *room, const char *msg, const int msgtype, const int utf8) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_COMMENT, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - yahoo_packet_hash(pkt, 104, room); - yahoo_packet_hash(pkt, 117, msg); - - yahoo_packet_hash_int(pkt, 124, msgtype); - - if (utf8) - yahoo_packet_hash(pkt, 97, "1"); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - - -void yahoo_chat_logoff(int id, const char *from) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_CHATLOGOUT, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, (from ? from : yd->user)); - - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_webcam_close_feed(int id, const char *who) -{ - struct yahoo_input_data *yid = find_input_by_id_and_webcam_user(id, who); - - if (yid) - yahoo_input_close(yid); -} - -void yahoo_webcam_get_feed(int id, const char *who) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt; - - if (!yid) - return; - - /* - * add the user to the queue. this is a dirty hack, since - * the yahoo server doesn't tell us who's key it's returning, - * we have to just hope that it sends back keys in the same - * order that we request them. - * The queue is popped in yahoo_process_webcam_key - */ - webcam_queue = y_list_append(webcam_queue, who ? strdup(who) : NULL); - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_WEBCAM, YPACKET_STATUS_DEFAULT, yd->session_id); - - yahoo_packet_hash(pkt, 1, yd->user); - if (who != NULL) - yahoo_packet_hash(pkt, 5, who); - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -void yahoo_webcam_send_image(int id, unsigned char *image, unsigned int length, unsigned int timestamp) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_WEBCAM); - unsigned char *packet; - unsigned char header_len = 13; - unsigned int pos = 0; - - if (!yid) - return; - - packet = y_new0(unsigned char, header_len); - - packet[pos++] = header_len; - packet[pos++] = 0; - packet[pos++] = 5; /* version byte?? */ - packet[pos++] = 0; - pos += yahoo_put32(packet + pos, length); - packet[pos++] = 2; /* packet type, image */ - pos += yahoo_put32(packet + pos, timestamp); - yahoo_add_to_send_queue(yid, packet, header_len); - FREE(packet); - - if (length) - yahoo_add_to_send_queue(yid, image, length); -} - -void yahoo_webcam_accept_viewer(int id, const char* who, int accept) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_WEBCAM); - char *packet = NULL; - char *data = NULL; - unsigned char header_len = 13; - unsigned int pos = 0; - unsigned int len = 0; - - if (!yid) - return; - - data = strdup("u="); - data = y_string_append(data, (char*)who); - data = y_string_append(data, "\r\n"); - len = (int)strlen(data); - - packet = y_new0(char, header_len + len); - packet[pos++] = header_len; - packet[pos++] = 0; - packet[pos++] = 5; /* version byte?? */ - packet[pos++] = 0; - pos += yahoo_put32(packet + pos, len); - packet[pos++] = 0; /* packet type */ - pos += yahoo_put32(packet + pos, accept); - memcpy(packet + pos, data, len); - FREE(data); - yahoo_add_to_send_queue(yid, packet, header_len + len); - FREE(packet); -} - -void yahoo_webcam_invite(int id, const char *who) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_packet *pkt; - - if (!yid) - return; - - pkt = yahoo_packet_new(YAHOO_SERVICE_NOTIFY, YPACKET_STATUS_NOTIFY, yid->yd->session_id); - - yahoo_packet_hash(pkt, 49, "WEBCAMINVITE"); - yahoo_packet_hash(pkt, 14, " "); - yahoo_packet_hash(pkt, 13, "0"); - yahoo_packet_hash(pkt, 1, yid->yd->user); - yahoo_packet_hash(pkt, 5, who); - yahoo_send_packet(yid, pkt, 0); - - yahoo_packet_free(pkt); -} - -static void yahoo_search_internal(int id, int t, const char *text, int g, int, int photo, int yahoo_only, int startpos, int total) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - char url[1024]; - char buff[1024]; - char *ctext, *p; - - if (!yd) - return; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_SEARCH; - - /* - age range - .ar=1 - 13-18, 2 - 18-25, 3 - 25-35, 4 - 35-50, 5 - 50-70, 6 - 70+ - */ - - snprintf(buff, sizeof(buff), "&.sq=%%20&.tt=%d&.ss=%d", total, startpos); - - ctext = strdup(text); - while ((p = strchr(ctext, ' '))) - *p = '+'; - - snprintf(url, 1024, "http://profiles.yahoo.com/?.oc=m&.kw=%s&.sb=%d&.g=%d&.ar=0%s%s%s", - ctext, t, g, photo ? "&.p=y" : "", yahoo_only ? "&.pg=y" : "", - startpos ? buff : ""); - - FREE(ctext); - - snprintf(buff, sizeof(buff), "Y=%s; T=%s", yd->cookie_y, yd->cookie_t); - //snprintf(buff, sizeof(buff), "Y=%s; T=%s; C=%s", yd->cookie_y, yd->cookie_t, yd->cookie_c); - - inputs = y_list_prepend(inputs, yid); - // yahoo_http_get(yid->yd->client_id, url, buff, _yahoo_http_connected, yid); - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_SEARCH, "GET", url, buff, 0, - _yahoo_http_connected, yid); - -} - -void yahoo_search(int id, enum yahoo_search_type t, const char *text, enum yahoo_search_gender g, enum yahoo_search_agerange ar, - int photo, int yahoo_only) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_search_state *yss; - - if (!yid) - return; - - if (!yid->ys) - yid->ys = y_new0(struct yahoo_search_state, 1); - - yss = yid->ys; - - FREE(yss->lsearch_text); - yss->lsearch_type = t; - yss->lsearch_text = strdup(text); - yss->lsearch_gender = g; - yss->lsearch_agerange = ar; - yss->lsearch_photo = photo; - yss->lsearch_yahoo_only = yahoo_only; - - yahoo_search_internal(id, t, text, g, ar, photo, yahoo_only, 0, 0); -} - -void yahoo_search_again(int id, int start) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_search_state *yss; - - if (!yid || !yid->ys) - return; - - yss = yid->ys; - - if (start == -1) - start = yss->lsearch_nstart + yss->lsearch_nfound; - - yahoo_search_internal(id, yss->lsearch_type, yss->lsearch_text, - yss->lsearch_gender, yss->lsearch_agerange, - yss->lsearch_photo, yss->lsearch_yahoo_only, - start, yss->lsearch_ntotal); -} - -struct send_file_data -{ - struct yahoo_packet *pkt; - yahoo_get_fd_callback callback; - void *user_data; -}; - -static void _yahoo_send_file_connected(int id, INT_PTR fd, int error, void *data) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_FT); - struct send_file_data *sfd = (struct send_file_data *) data; - struct yahoo_packet *pkt = sfd->pkt; - unsigned char buff[1024]; - - if (fd <= 0) { - sfd->callback(id, fd, error, sfd->user_data); - FREE(sfd); - yahoo_packet_free(pkt); - inputs = y_list_remove(inputs, yid); - FREE(yid); - return; - } - - yid->fd = fd; - yahoo_send_packet(yid, pkt, 4); /* we pad with 4 chars that follow bellow */ - yahoo_packet_free(pkt); - - /* 4 magic padding chars that we need to send */ - buff[0] = 0x32; - buff[1] = 0x39; - buff[2] = 0xc0; - buff[3] = 0x80; - - write(yid->fd, (char*)buff, 4); - - /* YAHOO_CALLBACK(ext_yahoo_add_handler)(nyd->fd, YAHOO_INPUT_READ); */ - - sfd->callback(id, fd, error, sfd->user_data); - FREE(sfd); - inputs = y_list_remove(inputs, yid); - /* - while(yahoo_tcp_readline(buff, sizeof(buff), nyd->fd) > 0) { - if (!strcmp(buff, "")) - break; - } - - */ - yahoo_input_close(yid); -} - -void yahoo_send_file(int id, const char *who, const char *msg, - const char *name, unsigned long size, - yahoo_get_fd_callback callback, void *data) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - struct yahoo_server_settings *yss; - struct yahoo_packet *pkt = NULL; - char size_str[10]; - long content_length = 0; - char buff[1024]; - char url[255]; - struct send_file_data *sfd; - const char *s; - - if (!yd) - return; - - yss = yd->server_settings; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_FT; - - pkt = yahoo_packet_new(YAHOO_SERVICE_FILETRANSFER, YPACKET_STATUS_DEFAULT, yd->session_id); - - snprintf(size_str, sizeof(size_str), "%lu", size); - - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash(pkt, 5, who); - yahoo_packet_hash(pkt, 14, msg); - - s = strrchr(name, '\\'); - if (s == NULL) - s = name; - else - s++; - - yahoo_packet_hash(pkt, 27, s); - yahoo_packet_hash(pkt, 28, size_str); - - content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); - - snprintf(url, sizeof(url), "http://%s:%d/notifyft", - yss->filetransfer_host, yss->filetransfer_port); - snprintf((char *)buff, sizeof(buff), "Y=%s; T=%s; B=%s;", - yd->cookie_y, yd->cookie_t, yd->cookie_b); - inputs = y_list_prepend(inputs, yid); - - sfd = y_new0(struct send_file_data, 1); - sfd->pkt = pkt; - sfd->callback = callback; - sfd->user_data = data; - // yahoo_http_post(yid->yd->client_id, url, (char *)buff, content_length+4+size, - //_yahoo_send_file_connected, sfd); - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_FT, "POST", url, buff, content_length + 4 + size, - _yahoo_send_file_connected, sfd); -} - -void yahoo_send_file_y7(int id, const char *from, const char *to, const char *relay_ip, - unsigned long size, const char* token, yahoo_get_fd_callback callback, void *data) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - struct yahoo_server_settings *yss; - char buff[1024]; - char url[255]; - char *s; - - if (!yd) - return; - - yss = yd->server_settings; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_FT; - - s = yahoo_decode(token); - snprintf(url, sizeof(url), "http://%s/relay?token=%s&sender=%s&recver=%s", relay_ip, s, from, to); - - FREE(s); - - snprintf((char *)buff, sizeof(buff), "Y=%s; T=%s; B=%s;", - yd->cookie_y, yd->cookie_t, yd->cookie_b); - inputs = y_list_prepend(inputs, yid); - - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_FT, "POST", url, buff, size, callback, data); -} - - -void yahoo_send_avatar(int id, const char *name, unsigned long size, - yahoo_get_fd_callback callback, void *data) -{ - struct yahoo_data *yd = find_conn_by_id(id); - struct yahoo_input_data *yid; - struct yahoo_server_settings *yss; - struct yahoo_packet *pkt = NULL; - char size_str[10]; - long content_length = 0; - char buff[1024]; - char url[255]; - struct send_file_data *sfd; - const char *s; - - if (!yd) - return; - - yss = yd->server_settings; - - yid = y_new0(struct yahoo_input_data, 1); - yid->yd = yd; - yid->type = YAHOO_CONNECTION_FT; - - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE_UPLOAD, YPACKET_STATUS_DEFAULT, yd->session_id); - /* 1 = me, 38 = expire time(?), 0 = me, 28 = size, 27 = filename, 14 = NULL, 29 = data */ - snprintf(size_str, sizeof(size_str), "%lu", size); - - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 38, "604800"); /* time to expire */ - yahoo_packet_hash(pkt, 0, yd->user); - - s = strrchr(name, '\\'); - if (s == NULL) - s = name; - else - s++; - yahoo_packet_hash(pkt, 28, size_str); - yahoo_packet_hash(pkt, 27, s); - yahoo_packet_hash(pkt, 14, ""); - - content_length = YAHOO_PACKET_HDRLEN + yahoo_packet_length(pkt); - - //snprintf(url, sizeof(url), "http://%s:%d/notifyft", yss->filetransfer_host, yss->filetransfer_port); - if (yss->filetransfer_port != 80) { - snprintf(url, sizeof(url), "http://%s:%d/notifyft", yss->filetransfer_host, yss->filetransfer_port); - } - else { - snprintf(url, sizeof(url), "http://%s/notifyft", yss->filetransfer_host); - } - - //snprintf((char *)buff, sizeof(buff), "Y=%s; T=%s; B=%s;", yd->cookie_y, yd->cookie_t, yd->cookie_b); - snprintf((char *)buff, sizeof(buff), "T=%s; Y=%s", yd->cookie_t, yd->cookie_y); - - inputs = y_list_prepend(inputs, yid); - - sfd = y_new0(struct send_file_data, 1); - sfd->pkt = pkt; - sfd->callback = callback; - sfd->user_data = data; - // yahoo_http_post(yid->yd->client_id, url, (char *)buff, content_length+4+size, - // _yahoo_send_file_connected, sfd); - YAHOO_CALLBACK(ext_yahoo_send_http_request)(yid->yd->client_id, YAHOO_CONNECTION_FT, "POST", url, buff, content_length + 4 + size, - _yahoo_send_file_connected, sfd); -} - -enum yahoo_status yahoo_current_status(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - - if (!yd) - return YAHOO_STATUS_OFFLINE; - - return yd->current_status; -} - -const YList * yahoo_get_buddylist(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return NULL; - return yd->buddies; -} - -const YList * yahoo_get_ignorelist(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return NULL; - return yd->ignore; -} - -const YList * yahoo_get_identities(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return NULL; - return yd->identities; -} - -const char * yahoo_get_cookie(int id, const char *which) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return NULL; - if (!strncasecmp(which, "y", 1)) - return yd->cookie_y; - if (!strncasecmp(which, "t", 1)) - return yd->cookie_t; - if (!strncasecmp(which, "c", 1)) - return yd->cookie_c; - if (!strncasecmp(which, "login", 5)) - return yd->login_cookie; - if (!strncasecmp(which, "b", 1)) - return yd->cookie_b; - return NULL; -} - -const char * yahoo_get_pw_token(int id) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return NULL; - - return yd->pw_token; -} - -void yahoo_get_url_handle(int id, const char *url, - yahoo_get_url_handle_callback callback, void *data) -{ - struct yahoo_data *yd = find_conn_by_id(id); - if (!yd) - return; - - yahoo_get_url_fd(id, url, yd, callback, data); -} - -const char * yahoo_get_profile_url(void) -{ - return profile_url; -} - -void yahoo_request_buddy_avatar(int id, const char *buddy) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - struct yahoo_server_settings *yss; - - if (!yid) - return; - - yd = yid->yd; - yss = yd->server_settings; - - pkt = yahoo_packet_new(YAHOO_SERVICE_PICTURE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 13, "1"); - - if (yss->web_messenger) { - yahoo_packet_hash(pkt, 0, yd->user); - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - } - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_ftdc_deny(int id, const char *buddy, const char *filename, const char *ft_token, int command) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_P2PFILEXFER, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 49, "FILEXFER"); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 13, (command == 2) ? "2" : "3"); - yahoo_packet_hash(pkt, 27, filename); - yahoo_packet_hash(pkt, 53, ft_token); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -void yahoo_ft7dc_accept(int id, const char *buddy, const char *ft_token) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFER, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 222, "3"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -void yahoo_ft7dc_deny(int id, const char *buddy, const char *ft_token) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFER, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 222, "4"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -void yahoo_ft7dc_abort(int id, const char *buddy, const char *ft_token) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, YPACKET_STATUS_DISCONNECTED, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 66, "-1"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -void yahoo_ft7dc_relay(int id, const char *buddy, const char *ft_token) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 66, "-3"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -void yahoo_ft7dc_nextfile(int id, const char *buddy, const char *ft_token) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 271, "1"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -char *yahoo_ft7dc_send(int id, const char *buddy, YList *files) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - char ft_token[32]; // we only need 23 chars actually - YList *l = files; - BYTE result[16]; - mir_md5_state_t ctx; - - if (!yid) - return NULL; - - mir_md5_init(&ctx); - mir_md5_append(&ctx, (BYTE *)buddy, strlen(buddy)); - - snprintf(ft_token, 32, "%lu", (long)time(NULL)); - mir_md5_append(&ctx, (BYTE *)ft_token, strlen(ft_token)); - mir_md5_finish(&ctx, result); - to_y64((unsigned char *)ft_token, result, 16); - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFER, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, yd->user); - yahoo_packet_hash(pkt, 5, buddy); - yahoo_packet_hash(pkt, 222, "1"); - yahoo_packet_hash(pkt, 265, ft_token); - - yahoo_packet_hash_int(pkt, 266, y_list_length(files)); // files - - yahoo_packet_hash(pkt, 302, "268"); - yahoo_packet_hash(pkt, 300, "268"); - - while (l) { - struct yahoo_file_info * fi = (struct yahoo_file_info *) l->data; - char *c = strrchr(fi->filename, '\\'); - - if (c != NULL) { - c++; - } - else { - c = fi->filename; - } - - yahoo_packet_hash(pkt, 27, c); - yahoo_packet_hash_int(pkt, 28, fi->filesize); - - if (l->next) { - yahoo_packet_hash(pkt, 301, "268"); - yahoo_packet_hash(pkt, 300, "268"); - } - - l = l->next; - } - - yahoo_packet_hash(pkt, 301, "268"); - yahoo_packet_hash(pkt, 303, "268"); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - - return strdup(ft_token); -} - -void yahoo_send_file7info(int id, const char *me, const char *who, const char *ft_token, const char* filename, - const char *relay_ip) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) - return; - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y7_FILETRANSFERINFO, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, me); - yahoo_packet_hash(pkt, 5, who); - yahoo_packet_hash(pkt, 265, ft_token); - yahoo_packet_hash(pkt, 27, filename); - yahoo_packet_hash(pkt, 249, "3"); - yahoo_packet_hash(pkt, 250, relay_ip); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); - -} - -unsigned char *yahoo_webmessenger_idle_packet(int id, int *len) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - int pktlen; - unsigned char *data; - int pos = 0; - int web_messenger = 1; - - if (!yid) { - DEBUG_MSG(("NO Yahoo Input Data???")); - return NULL; - } - - yd = yid->yd; - - DEBUG_MSG(("[yahoo_webmessenger_idle_packet] Session: %ld", yd->session_timestamp)); - - pkt = yahoo_packet_new(YAHOO_SERVICE_IDLE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 0, yd->user); - - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - - pktlen = yahoo_packet_length(pkt); - (*len) = YAHOO_PACKET_HDRLEN + pktlen; - data = y_new0(unsigned char, (*len) + 1); - - memcpy(data + pos, "YMSG", 4); pos += 4; - pos += yahoo_put16(data + pos, web_messenger ? YAHOO_WEBMESSENGER_PROTO_VER : YAHOO_PROTO_VER); /* version [latest 12 0x000c */ - pos += yahoo_put16(data + pos, 0x0000); /* HIWORD pkt length??? */ - pos += yahoo_put16(data + pos, pktlen); /* LOWORD pkt length? */ - pos += yahoo_put16(data + pos, pkt->service); /* service */ - pos += yahoo_put32(data + pos, pkt->status); /* status [4bytes] */ - pos += yahoo_put32(data + pos, pkt->id); /* session [4bytes] */ - - yahoo_packet_write(pkt, data + pos); - - //yahoo_packet_dump(data, len); - DEBUG_MSG(("Sending Idle Packet:")); - - yahoo_packet_read(pkt, data + pos, (*len) - pos); - - - return data; -} - -void yahoo_send_idle_packet(int id) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - if (!yid) { - DEBUG_MSG(("NO Yahoo Input Data???")); - return; - } - - yd = yid->yd; - - DEBUG_MSG(("[yahoo_send_idle_packet] Session: %ld", yd->session_timestamp)); - - pkt = yahoo_packet_new(YAHOO_SERVICE_IDLE, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 0, yd->user); - - yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} - -void yahoo_send_im_ack(int id, const char *me, const char *buddy, const char *seqn, int sendn) -{ - struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER); - struct yahoo_data *yd; - struct yahoo_packet *pkt = NULL; - - DEBUG_MSG(("[yahoo_send_im_ack] My Id: %s, Buddy: %s, Seq #: %s, Retry: %d", me, buddy, seqn, sendn)); - - if (!yid) { - DEBUG_MSG(("NO Yahoo Input Data???")); - return; - } - - yd = yid->yd; - - pkt = yahoo_packet_new(YAHOO_SERVICE_Y9_MESSAGE_ACK, YPACKET_STATUS_DEFAULT, yd->session_id); - yahoo_packet_hash(pkt, 1, (me != NULL) ? me : yd->user); - yahoo_packet_hash(pkt, 5, buddy); - - yahoo_packet_hash(pkt, 302, "430"); - yahoo_packet_hash(pkt, 430, seqn); - yahoo_packet_hash(pkt, 303, "430"); - yahoo_packet_hash_int(pkt, 450, sendn); - //yahoo_packet_hash_int(pkt, 24, yd->session_timestamp); - - yahoo_send_packet(yid, pkt, 0); - yahoo_packet_free(pkt); -} diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2.h deleted file mode 100644 index 958e83e472..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2.h +++ /dev/null @@ -1,230 +0,0 @@ -/*
- * libyahoo2: yahoo2.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef YAHOO2_H
-#define YAHOO2_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "yahoo2_types.h"
-
-/* returns the socket descriptor for a given pager connection. shouldn't be needed */
-int yahoo_get_fd(int id);
-
-/* says how much logging to do */
-/* see yahoo2_types.h for the different values */
-int yahoo_set_log_level(enum yahoo_log_level level);
-enum yahoo_log_level yahoo_get_log_level( void );
-
-/* these functions should be self explanatory */
-/* who always means the buddy you're acting on */
-/* id is the successful value returned by yahoo_init */
-
-
-/* init returns a connection id used to identify the connection hereon */
-/* or 0 on failure */
-/* you must call init before calling any other function */
-/*
- * The optional parameters to init are key/value pairs that specify
- * server settings to use. This list must be NULL terminated - even
- * if the list is empty. If a parameter isn't set, a default value
- * will be used. Parameter keys are strings, parameter values are
- * either strings or ints, depending on the key. Values passed in
- * are copied, so you can use const/auto/static/pointers/whatever
- * you want. Parameters are:
- * NAME TYPE DEFAULT
- * pager_host char * scs.msg.yahoo.com
- * pager_port int 5050
- * filetransfer_host char * filetransfer.msg.yahoo.com
- * filetransfer_port int 80
- * webcam_host char * webcam.yahoo.com
- * webcam_port int 5100
- * webcam_description char * ""
- * local_host char * ""
- * conn_type int Y_WCM_DSL
- *
- * You should set at least local_host if you intend to use webcams
- */
-int yahoo_init_with_attributes(const char *username, const char *password, const char *pw_token, ...);
-
-/* yahoo_init does the same as yahoo_init_with_attributes, assuming defaults
- * for all attributes */
-int yahoo_init(const char *username, const char *password, const char *pw_token);
-
-/* retrieve the pw_token that's currently setup for this id if any
- */
-const char * yahoo_get_pw_token(int id);
-
-/* release all resources held by this session */
-/* you need to call yahoo_close for a session only if
- * yahoo_logoff is never called for it (ie, it was never logged in) */
-void yahoo_close(int id);
-/* login logs in to the server */
-/* initial is of type enum yahoo_status. see yahoo2_types.h */
-void yahoo_login(int id, enum yahoo_status initial);
-void yahoo_logoff(int id);
-/* reloads status of all buddies */
-void yahoo_refresh(int id);
-/* activates/deactivates an identity */
-void yahoo_set_identity_status(int id, const char * identity, int active);
-/* regets the entire buddy list from the server */
-void yahoo_get_list(int id);
-/* download buddy contact information from your yahoo addressbook */
-void yahoo_get_yab(int id);
-/* add/modify an address book entry. if yab->dbid is set, it will */
-/* modify that entry else it creates a new entry */
-void yahoo_set_yab(int id, struct yab * yab);
-void yahoo_send_ping(int id);
-void yahoo_keepalive(int id);
-void yahoo_chat_keepalive(int id);
-
-/* from is the identity you're sending from. if NULL, the default is used */
-/* utf8 is whether msg is a utf8 string or not. */
-void yahoo_send_im(int id, const char *from, const char *who, int protocol, const char *msg, int utf8, int buddy_icon);
-/* if type is true, send typing notice, else send stopped typing notice */
-void yahoo_send_typing(int id, const char *from, const char *who, int protocol, int typ);
-
-/* used to set away/back status. */
-/* away says whether the custom message is an away message or a sig */
-void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away);
-void yahoo_set_stealth(int id, const char *buddy, int protocol, int add);
-
-void yahoo_add_buddy(int id, const char *myid, const char *fname, const char *lname, const char *who, int protocol, const char *group, const char *msg);
-void yahoo_remove_buddy(int id, const char *who, int protocol, const char *group);
-void yahoo_accept_buddy(int id, const char *myid, const char *who, int protocol);
-void yahoo_reject_buddy(int id, const char *myid, const char *who, int protocol, const char *msg);
-/* if unignore is true, unignore, else ignore */
-void yahoo_ignore_buddy(int id, const char *who, int unignore);
-void yahoo_change_buddy_group(int id, const char *who, const char *old_group, const char *new_group);
-void yahoo_group_rename(int id, const char *old_group, const char *new_group);
-
-void yahoo_conference_invite(int id, const char * from, YList *who, const char *room, const char *msg);
-void yahoo_conference_addinvite(int id, const char * from, const char *who, const char *room, const YList * members, const char *msg);
-void yahoo_conference_decline(int id, const char * from, YList *who, const char *room, const char *msg);
-void yahoo_conference_message(int id, const char * from, YList *who, const char *room, const char *msg, int utf8);
-void yahoo_conference_logon(int id, const char * from, YList *who, const char *room);
-void yahoo_conference_logoff(int id, const char * from, YList *who, const char *room);
-
-/* Get a list of chatrooms */
-void yahoo_get_chatrooms(int id,int chatroomid);
-/* join room with specified roomname and roomid */
-void yahoo_chat_logon(int id, const char *from, const char *room, const char *roomid);
-/* Send message "msg" to room with specified roomname, msgtype is 1-normal message or 2-/me mesage */
-void yahoo_chat_message(int id, const char *from, const char *room, const char *msg, const int msgtype, const int utf8);
-/* Log off chat */
-void yahoo_chat_logoff(int id, const char *from);
-
-/* requests a webcam feed */
-/* who is the person who's webcam you would like to view */
-/* if who is null, then you're the broadcaster */
-void yahoo_webcam_get_feed(int id, const char *who);
-void yahoo_webcam_close_feed(int id, const char *who);
-
-/* sends an image when uploading */
-/* image points to a JPEG-2000 image, length is the length of the image */
-/* in bytes. The timestamp is the time in milliseconds since we started the */
-/* webcam. */
-void yahoo_webcam_send_image(int id, unsigned char *image, unsigned int length, unsigned int timestamp);
-
-/* this function should be called if we want to allow a user to watch the */
-/* webcam. Who is the user we want to accept. */
-/* Accept user (accept = 1), decline user (accept = 0) */
-void yahoo_webcam_accept_viewer(int id, const char* who, int accept);
-
-/* send an invitation to a user to view your webcam */
-void yahoo_webcam_invite(int id, const char *who);
-
-/* will set up a connection and initiate file transfer.
- * callback will be called with the fd that you should write
- * the file data to
- */
-void yahoo_send_file(int id, const char *who, const char *msg, const char *name, unsigned long size,
- yahoo_get_fd_callback callback, void *data);
-
-void yahoo_send_avatar(int id, const char *name, unsigned long size,
- yahoo_get_fd_callback callback, void *data);
-
-/* send a search request
- */
-void yahoo_search(int id, enum yahoo_search_type t, const char *text, enum yahoo_search_gender g, enum yahoo_search_agerange ar,
- int photo, int yahoo_only);
-
-/* continue last search
- * should be called if only (start+found >= total)
- *
- * where the above three are passed to ext_yahoo_got_search_result
- */
-void yahoo_search_again(int id, int start);
-
-/* returns a socket fd to a url for downloading a file. */
-void yahoo_get_url_handle(int id, const char *url,
- yahoo_get_url_handle_callback callback, void *data);
-
-/* these should be called when input is available on a fd */
-/* registered by ext_yahoo_add_handler */
-/* if these return negative values, errno may be set */
-int yahoo_read_ready(int id, INT_PTR fd, void *data);
-int yahoo_write_ready(int id, INT_PTR fd, void *data);
-
-/* utility functions. these do not hit the server */
-enum yahoo_status yahoo_current_status(int id);
-const YList * yahoo_get_buddylist(int id);
-const YList * yahoo_get_ignorelist(int id);
-const YList * yahoo_get_identities(int id);
-/* 'which' could be y, t, c or login. This may change in later versions. */
-const char * yahoo_get_cookie(int id, const char *which);
-
-/* returns the url used to get user profiles - you must append the user id */
-/* as of now this is http://profiles.yahoo.com/ */
-/* You'll have to do urlencoding yourself, but see yahoo_httplib.h first */
-const char * yahoo_get_profile_url( void );
-
-void yahoo_request_buddy_avatar(int id, const char *buddy);
-void yahoo_send_picture_checksum(int id, const char* who, int cksum);
-void yahoo_send_picture_info(int id, const char *who, int type, const char *pic_url, int cksum);
-void yahoo_send_picture_status(int id, int buddy_icon);
-void yahoo_send_picture_update(int id, const char *who, int type);
-
-void yahoo_ftdc_deny(int id, const char *buddy, const char *filename, const char *ft_token, int command);
-void yahoo_ft7dc_accept(int id, const char *buddy, const char *ft_token);
-void yahoo_ft7dc_deny(int id, const char *buddy, const char *ft_token);
-void yahoo_ft7dc_relay(int id, const char *buddy, const char *ft_token);
-void yahoo_ft7dc_abort(int id, const char *buddy, const char *ft_token);
-void yahoo_ft7dc_nextfile(int id, const char *buddy, const char *ft_token);
-char *yahoo_ft7dc_send(int id, const char *buddy, YList *files);
-void yahoo_send_file7info(int id, const char *me, const char *who, const char *ft_token, const char* filename,
- const char *relay_ip);
-void yahoo_send_file_y7(int id, const char *from, const char *to, const char *relay_ip,
- unsigned long size, const char* ft_token, yahoo_get_fd_callback callback, void *data);
-unsigned char *yahoo_webmessenger_idle_packet(int id, int* len);
-void yahoo_send_idle_packet(int id);
-void yahoo_send_im_ack(int id, const char *me, const char *buddy, const char *seqn, int sendn);
-#include "yahoo_httplib.h"
-
-char * getcookie(char *rawcookie);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_callbacks.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_callbacks.h deleted file mode 100644 index f8d7eb1ad1..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_callbacks.h +++ /dev/null @@ -1,891 +0,0 @@ -/*
- * libyahoo2: yahoo2_callbacks.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/*
- * The functions in this file *must* be defined in your client program
- * If you want to use a callback structure instead of direct functions,
- * then you must define USE_STRUCT_CALLBACKS in all files that #include
- * this one.
- *
- * Register the callback structure by calling yahoo_register_callbacks -
- * declared in this file and defined in libyahoo2.c
- */
-
-
-#ifndef YAHOO2_CALLBACKS_H
-#define YAHOO2_CALLBACKS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "yahoo2_types.h"
-
-/*
- * yahoo2_callbacks.h
- *
- * Callback interface for libyahoo2
- */
-
-typedef enum {
- YAHOO_INPUT_READ = 1 << 0,
- YAHOO_INPUT_WRITE = 1 << 1,
- YAHOO_INPUT_EXCEPTION = 1 << 2
-} yahoo_input_condition;
-
-/*
- * A callback function called when an asynchronous connect completes.
- *
- * Params:
- * fd - The file descriptor that has been connected, or -1 on error
- * error - The value of errno set by the call to connect or 0 if no error
- * Set both fd and error to 0 if the connect was cancelled by the
- * user
- * callback_data - the callback_data passed to the ext_yahoo_connect_async
- * function
- */
-typedef void (*yahoo_connect_callback)(INT_PTR fd, int error, void *callback_data);
-
-
-/*
- * The following functions need to be implemented in the client
- * interface. They will be called by the library when each
- * event occurs.
- */
-
-/*
- * should we use a callback structure or directly call functions
- * if you want the structure, you *must* define USE_STRUCT_CALLBACKS
- * both when you compile the library, and when you compile your code
- * that uses the library
- */
-
-#ifdef USE_STRUCT_CALLBACKS
-#define YAHOO_CALLBACK_TYPE(x) (*x)
-struct yahoo_callbacks {
-#else
-#define YAHOO_CALLBACK_TYPE(x) x
-#endif
-
-/*
- * Name: ext_yahoo_login_response
- * Called when the login process is complete
- * Params:
- * id - the id that identifies the server connection
- * succ - enum yahoo_login_status
- * url - url to reactivate account if locked
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_login_response)(int id, int succ, const char *url);
-
-
-/*
- * Name: ext_yahoo_got_buddies
- * Called when the contact list is got from the server
- * Params:
- * id - the id that identifies the server connection
- * buds - the buddy list
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_buddies)(int id, YList * buds);
-
-
-/*
- * Name: ext_yahoo_got_buddies
- * Called when the contact list is got from the server
- * Params:
- * id - the id that identifies the server connection
- * stealthlist - a string representing buddy ids to hide from
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_stealthlist)(int id, char *stealthlist);
-
-
-/*
- * Name: ext_yahoo_got_avatar_share
- * Called when the contact list is got from the server
- * Params:
- * id - the id that identifies the server connection
- * buddyIcon - current setting of how we sharing avatars
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_avatar_share)(int id, int buddy_icon);
-
-
-/*
- * Name: ext_yahoo_got_ignore
- * Called when the ignore list is got from the server
- * Params:
- * id - the id that identifies the server connection
- * igns - the ignore list
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ignore)(int id, YList * igns);
-
-
-/*
- * Name: ext_yahoo_got_identities
- * Called when the contact list is got from the server
- * Params:
- * id - the id that identifies the server connection
- * ids - the identity list
- * fname - first name
- * lname - last name
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_identities)(int id, const char *nick, const char *fname, const char *lname, YList *ids);
-
-
-/*
- * Name: ext_yahoo_got_cookies
- * Called when the cookie list is got from the server
- * Params:
- * id - the id that identifies the server connection
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_cookies)(int id);
-
-
-/*
- * Name: ext_yahoo_got_ping
- * Called when the ping packet is received from the server
- * Params:
- * id - the id that identifies the server connection
- * errormsg - optional error message
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_ping)(int id, const char *errormsg);
-
-
-/*
- * Name: ext_yahoo_status_logon
- * Called when remote user's status changes to online.
- * Params:
- * id - the id that identifies the server connection
- * who - the handle of the remote user
- * protocol - protocol id of the buddy.
- * stat - status code (enum yahoo_status)
- * msg - the message if stat == YAHOO_STATUS_CUSTOM
- * away - whether the contact is away or not (YAHOO_STATUS_CUSTOM)
- * idle - this is the number of seconds he is idle [if he is idle]
- * mobile - this is set for mobile users/buddies
- * cksum - picture checksum [avatar support]
- * buddy_icon - avatar type
- * client_version - client version # (Yahoo sends some long numbers for different clients)
- * utf8 - status message is utf8? (1 = yes)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_status_logon)(int id, const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int cksum, int buddy_icon, long client_version, int utf8);
-
-
-/*
- * Name: ext_yahoo_status_changed
- * Called when remote user's status changes.
- * Params:
- * id - the id that identifies the server connection
- * who - the handle of the remote user
- * protocol - protocol id of the buddy.
- * stat - status code (enum yahoo_status)
- * msg - the message if stat == YAHOO_STATUS_CUSTOM
- * away - whether the contact is away or not (YAHOO_STATUS_CUSTOM)
- * idle - this is the number of seconds he is idle [if he is idle]
- * mobile - this is set for mobile users/buddies
- * utf8 - is the status UTF-8 (1 = yes)
- * TODO: add support for pager, chat, and game states
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_status_changed)(int id, const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int utf8);
-
-
-/*
- * Name: ext_yahoo_got_picture
- * Called when we request picture URL.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * pic_url - URL to the buddy icon
- * cksum - checksum
- * type - type of packet (recv/send)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_picture)(int id, const char *me, const char *who, const char *pic_url, int cksum, int type);
-
-
-/*
- * Name: ext_yahoo_got_picture_checksum
- * Called when our buddy changes his/hers buddy icon
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * cksum - checksum
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_picture_checksum)(int id, const char *me, const char *who, int cksum);
-
-
-/*
- * Name: ext_yahoo_got_picture_update
- * Called when our buddy shares or stops sharing pictures with us.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * cksum - checksum
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_picture_update)(int id, const char *me, const char *who, int buddy_icon);
-
-
-/*
- * Name: ext_yahoo_got_picture_upload
- * Called when we just uploaded a picture to Yahoo File Servers
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * cksum - checksum
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_picture_upload)(int id, const char *me, const char *url, unsigned int ts);
-
-
-/*
- * Name: ext_yahoo_got_picture_status (Apparently this is also a GLOBAL Notification.)
- * GF Personal Notes: 2 Notifications?? 1 for Checksum, 1 for Global? To shut it off too?
- * Called when our buddy shares or stops sharing pictures with us.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * cksum - checksum
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_picture_status)(int id, const char *me, const char *who, int buddy_icon);
-
-
-/*
- * Name: ext_yahoo_got_im
- * Called when remote user sends you a message.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the message was sent to
- * who - the handle of the remote user
- * protocol - protocol id of the buddy.
- * msg - the message - NULL if stat == 2
- * tm - timestamp of message if offline
- * stat - message status - 0
- * 1
- * 2 == error sending message
- * 5
- * utf8 - whether the message is encoded as utf8 or not
- * buddy_icon - whether the buddy has buddy_icon set or not.
- * seqn - message sequence #
- * sendn - this is the try #. (starts from 0 and tries to re-send the message)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_im)(int id, const char *me, const char *who, int protocol, const char *msg, long tm, int stat, int utf8, int buddy_icon, const char* seqn, int sendn);
-
-
-/*
- * Name: ext_yahoo_got_audible
- * Called when our buddy send an audible to us.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity of mine being notified
- * who - the handle of the remote user
- * aud - audible sent (filename?)
- * msg - audible message
- * aud_hash - md5 hash?
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_audible)(int id, const char *me, const char *who, const char *aud, const char *msg, const char *aud_hash);
-
-
-/*
- * Name: ext_yahoo_got_calendar
- * Called when our buddy send an audible to us.
- * Params:
- * id - the id that identifies the server connection
- * url - the URL to the calendar reminder
- * type - type of request?
- * msg - string/description
- * svc - service?
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_calendar)(int id, const char *url, int type, const char *msg, int svc);
-
-
-/*
- * Name: ext_yahoo_got_conf_invite
- * Called when remote user sends you a conference invitation.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the invitation was sent to
- * who - the user inviting you
- * room - the room to join
- * msg - the message
- * members - the initial members of the conference (null terminated list)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_conf_invite)(int id, const char *me, const char *who, const char *room, const char *msg, YList *members);
-
-
-/*
- * Name: ext_yahoo_conf_userdecline
- * Called when someone declines to join the conference.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the conference
- * who - the user who has declined
- * room - the room
- * msg - the declining message
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userdecline)(int id, const char *me, const char *who, const char *room, const char *msg);
-
-
-/*
- * Name: ext_yahoo_conf_userjoin
- * Called when someone joins the conference.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the conference
- * who - the user who has joined
- * room - the room joined
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userjoin)(int id, const char *me, const char *who, const char *room);
-
-
-/*
- * Name: ext_yahoo_conf_userleave
- * Called when someone leaves the conference.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the conference
- * who - the user who has left
- * room - the room left
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_userleave)(int id, const char *me, const char *who, const char *room);
-
-
-/*
- * Name: ext_yahoo_chat_cat_xml
- * Called when ?
- * Params:
- * id - the id that identifies the server connection
- * xml - ?
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_cat_xml)(int id, const char *xml);
-
-
-/*
- * Name: ext_yahoo_chat_join
- * Called when joining the chatroom.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the chatroom
- * room - the room joined, used in all other chat calls, freed by
- * library after call
- * topic - the topic of the room, freed by library after call
- * members - the initial members of the chatroom (null terminated YList
- * of yahoo_chat_member's) Must be freed by the client
- * fd - the socket where the connection is coming from (for tracking)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_join)(int id, const char *me, const char *room, const char *topic, YList *members, INT_PTR fd);
-
-
-/*
- * Name: ext_yahoo_chat_userjoin
- * Called when someone joins the chatroom.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the chatroom
- * room - the room joined
- * who - the user who has joined, Must be freed by the client
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userjoin)(int id, const char *me, const char *room, struct yahoo_chat_member *who);
-
-
-/*
- * Name: ext_yahoo_chat_userleave
- * Called when someone leaves the chatroom.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the chatroom
- * room - the room left
- * who - the user who has left (Just the User ID)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_userleave)(int id, const char *me, const char *room, const char *who);
-
-
-/*
- * Name: ext_yahoo_chat_message
- * Called when someone messages in the chatroom.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity in the chatroom
- * room - the room
- * who - the user who messaged (Just the user id)
- * msg - the message
- * msgtype - 1 = Normal message
- * 2 = /me type message
- * utf8 - whether the message is utf8 encoded or not
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_message)(int id, const char *me, const char *who, const char *room, const char *msg, int msgtype, int utf8);
-
-
-/*
- *
- * Name: ext_yahoo_chat_yahoologout
- * called when yahoo disconnects your chat session
- * Note this is called whenver a disconnect happens, client or server
- * requested. Care should be taken to make sure you know the origin
- * of the disconnect request before doing anything here (auto-join's etc)
- * Params:
- * id - the id that identifies this connection
- * me - the identity in the chatroom
- * Returns:
- * nothing.
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahoologout)(int id, const char *me);
-
-
-/*
- *
- * Name: ext_yahoo_chat_yahooerror
- * called when yahoo sends back an error to you
- * Note this is called whenver chat message is sent into a room
- * in error (fd not connected, room doesn't exists etc)
- * Care should be taken to make sure you know the origin
- * of the error before doing anything about it.
- * Params:
- * id - the id that identifies this connection
- * me - the identity in the chatroom
- * Returns:
- * nothing.
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_chat_yahooerror)(int id, const char *me);
-
-
-/*
- * Name: ext_yahoo_conf_message
- * Called when someone messages in the conference.
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the conf message was sent to
- * who - the user who messaged
- * room - the room
- * msg - the message
- * utf8 - whether the message is utf8 encoded or not
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_conf_message)(int id, const char *me, const char *who, const char *room, const char *msg, int utf8);
-
-
-/*
- * Name: ext_yahoo_got_file
- * Called when someone sends you a file
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the file was sent to
- * who - the user who sent the file
- * url - the file url
- * expires - the expiry date of the file on the server (timestamp)
- * msg - the message
- * fname- the file name if direct transfer
- * fsize- the file size if direct transfer
- * ftoken - file token
- * y7 - flag signalling y7 transfer
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_file)(int id, const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7);
-
-
-/*
- * Name: ext_yahoo_got_files
- * Called when someone sends you a file(s)
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the file was sent to
- * who - the user who sent the file
- * ftoken - file token
- * y7 - flag signalling y7 transfer
- * files - YList of files containing "struct yahoo_file_info" records
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_files)(int id, const char *me, const char *who, const char *ft_token, int y7, YList *files);
-
-
-/*
- * Name: ext_yahoo_got_file7info
- * Called when someone sends you a file
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the file was sent to
- * who - the user who sent the file
- * url - the file url
- * expires - the expiry date of the file on the server (timestamp)
- * msg - the message
- * fname- the file name if direct transfer
- * fsize- the file size if direct transfer
- * ftoken - file token
- * y7 - flag signalling y7 transfer
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_file7info)(int id, const char *me, const char *who, const char *url, const char *fname, const char *ft_token);
-
-/*
- * Name: ext_yahoo_got_file7info
- * Called when someone sends you a file
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the file was sent to
- * who - the user who sent the file
- * ftoken - file token
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_send_file7info)(int id, const char *me, const char *who, const char *ft_token);
-
-/*
- * Name: ext_yahoo_ft7_send_file
- * Called when someone sends you a file
- * Params:
- * id - the id that identifies the server connection
- * me - the identity the file was sent to
- * who - the user who sent the file
- * ftoken - file token
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_ft7_send_file)(int id, const char *me, const char *who, const char *filename, const char *token, const char *ft_token);
-
-/*
- * Name: ext_yahoo_contact_added
- * Called when a contact adds you to their list
- * Params:
- * id - the id that identifies the server connection
- * myid - the identity he was added to
- * who - who was added
- * msg - any message sent
- * protocol - protocol id of the buddy.
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_contact_added)(int id, const char *myid, const char *who, const char *fname, const char *lname, const char *msg, int protocol);
-
-
-/*
- * Name: ext_yahoo_buddy_group_changed
- * Called when a buddy is moved from one group into another
- * Params:
- * id - the id that identifies the server connection
- * myid - the identity he was added to
- * who - who was added
- * from_group
- * to_group
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_buddy_group_changed)(int id, char *myid, char *who, char *old_group, char *new_group);
-
-
-/*
- * Name: ext_yahoo_buddy_added
- * Called when a contact is added to our server list
- * Params:
- * id - the id that identifies the server connection
- * myid - the identity he was added to
- * who - who was added
- * group - group buddy was added to
- * status - status of the operation
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_buddy_added)(int id, char *myid, char *who, char *group, int status, int auth);
-
-
-/*
- * Name: ext_yahoo_rejected
- * Called when a contact rejects your add
- * Params:
- * id - the id that identifies the server connection
- * who - who rejected you
- * msg - any message sent
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_rejected)(int id, const char *who, const char *msg);
-
-
-/*
- * Name: ext_yahoo_typing_notify
- * Called when remote user starts or stops typing.
- * Params:
- * id - the id that identifies the server connection
- * me - the handle of the identity the notification is sent to
- * who - the handle of the remote user
- * protocol - protocol id of the buddy.
- * stat - 1 if typing, 0 if stopped typing
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_typing_notify)(int id, const char *me, const char *who, int protocol, int stat);
-
-
-/*
- * Name: ext_yahoo_game_notify
- * Called when remote user starts or stops a game.
- * Params:
- * id - the id that identifies the server connection
- * me - the handle of the identity the notification is sent to
- * who - the handle of the remote user
- * stat - 1 if game, 0 if stopped gaming
- * msg - game description and/or other text
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_game_notify)(int id, const char *me, const char *who, int stat, const char *msg);
-
-
-/*
- * Name: ext_yahoo_mail_notify
- * Called when you receive mail, or with number of messages
- * Params:
- * id - the id that identifies the server connection
- * from - who the mail is from - NULL if only mail count
- * subj - the subject of the mail - NULL if only mail count
- * cnt - mail count - 0 if new mail notification
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_mail_notify)(int id, const char *from, const char *subj, int cnt);
-
-
-/*
- * Name: ext_yahoo_system_message
- * System message
- * Params:
- * id - the id that identifies the server connection
- * me - the handle of the identity the notification is sent to
- * who - the source of the system message (there are different types)
- * msg - the message
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_system_message)(int id, const char *me, const char *who, const char *msg);
-
-
-/*
- * Name: ext_yahoo_got_webcam_image
- * Called when you get a webcam update
- * An update can either be receiving an image, a part of an image or
- * just an update with a timestamp
- * Params:
- * id - the id that identifies the server connection
- * who - the user who's webcam we're viewing
- * image - image data
- * image_size - length of the image in bytes
- * real_size - actual length of image data
- * timestamp - milliseconds since the webcam started
- *
- * If the real_size is smaller then the image_size then only part of
- * the image has been read. This function will keep being called till
- * the total amount of bytes in image_size has been read. The image
- * received is in JPEG-2000 Code Stream Syntax (ISO/IEC 15444-1).
- * The size of the image will be either 160x120 or 320x240.
- * Each webcam image contains a timestamp. This timestamp should be
- * used to keep the image in sync since some images can take longer
- * to transport then others. When image_size is 0 we can still receive
- * a timestamp to stay in sync
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_webcam_image)(int id, const char * who,
- const unsigned char *image, unsigned int image_size, unsigned int real_size,
- unsigned int timestamp);
-
-
-/*
- * Name: ext_yahoo_webcam_invite
- * Called when you get a webcam invitation
- * Params:
- * id - the id that identifies the server connection
- * me - identity the invitation is to
- * from - who the invitation is from
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite)(int id, const char *me, const char *from);
-
-
-/*
- * Name: ext_yahoo_webcam_invite_reply
- * Called when you get a response to a webcam invitation
- * Params:
- * id - the id that identifies the server connection
- * me - identity the invitation response is to
- * from - who the invitation response is from
- * accept - 0 (decline), 1 (accept)
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_invite_reply)(int id, const char *me, const char *from, int accept);
-
-
-/*
- * Name: ext_yahoo_webcam_closed
- * Called when the webcam connection closed
- * Params:
- * id - the id that identifies the server connection
- * who - the user who we where connected to
- * reason - reason why the connection closed
- * 1 = user stopped broadcasting
- * 2 = user cancelled viewing permission
- * 3 = user declines permission
- * 4 = user does not have webcam online
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_closed)(int id, const char *who, int reason);
-
-
-/*
- * Name: ext_yahoo_got_search_result
- * Called when the search result received from server
- * Params:
- * id - the id that identifies the server connection
- * found - total number of results returned in the current result set
- * start - offset from where the current result set starts
- * total - total number of results available (start + found <= total)
- * contacts - the list of results as a YList of yahoo_found_contact
- * these will be freed after this function returns, so
- * if you need to use the information, make a copy
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_got_search_result)(int id, int found, int start, int total, YList *contacts);
-
-
-/*
- * Name: ext_yahoo_error
- * Called on error.
- * Params:
- * id - the id that identifies the server connection
- * err - the error message
- * fatal- whether this error is fatal to the connection or not
- * num - Which error is this
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_error)(int id, const char *err, int fatal, int num);
-
-
-/*
- * Name: ext_yahoo_webcam_viewer
- * Called when a viewer disconnects/connects/requests to connect
- * Params:
- * id - the id that identifies the server connection
- * who - the viewer
- * connect - 0=disconnect 1=connect 2=request
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_viewer)(int id, const char *who, int connect);
-
-
-/*
- * Name: ext_yahoo_webcam_data_request
- * Called when you get a request for webcam images
- * Params:
- * id - the id that identifies the server connection
- * send - whether to send images or not
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_webcam_data_request)(int id, int send);
-
-
-/*
- * Name: ext_yahoo_log
- * Called to log a message.
- * Params:
- * fmt - the printf formatted message
- * Returns:
- * 0
- */
-int YAHOO_CALLBACK_TYPE(ext_yahoo_log)(const char *fmt, ...);
-
-
-/*
- * Name: ext_yahoo_add_handler
- * Add a listener for the fd. Must call yahoo_read_ready
- * when a YAHOO_INPUT_READ fd is ready and yahoo_write_ready
- * when a YAHOO_INPUT_WRITE fd is ready.
- * Params:
- * id - the id that identifies the server connection
- * fd - the fd on which to listen
- * cond - the condition on which to call the callback
- * data - callback data to pass to yahoo_*_ready
- *
- * Returns: a tag to be used when removing the handler
- */
-unsigned int YAHOO_CALLBACK_TYPE(ext_yahoo_add_handler)(int id, INT_PTR fd, yahoo_input_condition cond, void *data);
-
-
-/*
- * Name: ext_yahoo_remove_handler
- * Remove the listener for the fd.
- * Params:
- * id - the id that identifies the connection
- * tag - the handler tag to remove
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_remove_handler)(int id, unsigned int tag);
-
-
-/*
- * Name: ext_yahoo_connect
- * Connect to a host:port
- * Params:
- * host - the host to connect to
- * port - the port to connect on
- * Returns:
- * a unix file descriptor to the socket
- */
-int YAHOO_CALLBACK_TYPE(ext_yahoo_connect)(const char *host, int port, int type);
-
-
-/*
- * Name: ext_yahoo_connect_async
- * Connect to a host:port asynchronously. This function should return
- * immediately returing a tag used to identify the connection handler,
- * or a pre-connect error (eg: host name lookup failure).
- * Once the connect completes (successfully or unsuccessfully), callback
- * should be called (see the signature for yahoo_connect_callback).
- * The callback may safely be called before this function returns, but
- * it should not be called twice.
- * Params:
- * id - the id that identifies this connection
- * host - the host to connect to
- * port - the port to connect on
- * callback - function to call when connect completes
- * callback_data - data to pass to the callback function
- * Returns:
- * a unix file descriptor to the socket
- */
-int YAHOO_CALLBACK_TYPE(ext_yahoo_connect_async)(int id, const char *host, int port, int type,
- yahoo_connect_callback callback, void *callback_data);
-
-/*
- * Name: ext_yahoo_send_http_request
- * This function opens a connection and sends the proper request for a specified resource
- * by utilizing the provided method.
- *
- * This callback allows us to do proper proxy authentication on the user level. As well as
- * possibly using some other routines for HTTP requests. (miranda has HTTP netlib api)
- * Params:
- * id - the id that identifies this connection
- * method - HTTP method to use HEAD/GET/POST
- * url - the URL that specifies the resource to reference
- * cookies - cookies to send with the request
- * content_length - the length of content to POST
- * callback - function to call when connect completes
- * callback_data - data to pass to the callback function
- */
-void YAHOO_CALLBACK_TYPE(ext_yahoo_send_http_request)(int id, enum yahoo_connection_type type, const char *method, const char *url, const char *cookies, long content_length,
- yahoo_get_fd_callback callback, void *callback_data);
-
-/*
- * Name: ext_yahoo_send_https_request
- * This function opens HTTPS connection and sends the proper request for a specified resource
- * by utilizing the provided method.
- *
- * This callback allows us to do proper proxy authentication on the user level. As well as
- * possibly using some other routines for HTTP requests. (miranda has HTTPS netlib api)
- * Params:
- * yd - yahoo_data *, allows HTTPS to read/write cookies
- * host - host to use for the request
- * path - the path that specifies the resource to reference
- */
-
-char *YAHOO_CALLBACK_TYPE(ext_yahoo_send_https_request)(struct yahoo_data *yd, const char *host, const char *path);
-
-#ifdef USE_STRUCT_CALLBACKS
-};
-
-/*
- * if using a callback structure, call yahoo_register_callbacks
- * before doing anything else
- */
-void yahoo_register_callbacks(struct yahoo_callbacks * tyc);
-
-#undef YAHOO_CALLBACK_TYPE
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_types.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_types.h deleted file mode 100644 index 245cc118fd..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo2_types.h +++ /dev/null @@ -1,432 +0,0 @@ -/*
- * libyahoo2: yahoo2_types.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef YAHOO2_TYPES_H
-#define YAHOO2_TYPES_H
-
-#include "yahoo_list.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum yahoo_service { /* these are easier to see in hex */
- YAHOO_SERVICE_LOGON = 1,
- YAHOO_SERVICE_LOGOFF,
- YAHOO_SERVICE_ISAWAY,
- YAHOO_SERVICE_ISBACK,
- YAHOO_SERVICE_IDLE, /* 5 (placemarker) */
- YAHOO_SERVICE_MESSAGE,
- YAHOO_SERVICE_IDACT,
- YAHOO_SERVICE_IDDEACT,
- YAHOO_SERVICE_MAILSTAT,
- YAHOO_SERVICE_USERSTAT, /* 0xa */
- YAHOO_SERVICE_NEWMAIL,
- YAHOO_SERVICE_CHATINVITE,
- YAHOO_SERVICE_CALENDAR,
- YAHOO_SERVICE_NEWPERSONALMAIL,
- YAHOO_SERVICE_NEWCONTACT,
- YAHOO_SERVICE_ADDIDENT, /* 0x10 */
- YAHOO_SERVICE_ADDIGNORE,
- YAHOO_SERVICE_PING,
- YAHOO_SERVICE_GOTGROUPRENAME, /* < 1, 36(old), 37(new) */
- YAHOO_SERVICE_SYSMESSAGE = 0x14,
- YAHOO_SERVICE_SKINNAME = 0x15,
- YAHOO_SERVICE_PASSTHROUGH2 = 0x16,
- YAHOO_SERVICE_CONFINVITE = 0x18,
- YAHOO_SERVICE_CONFLOGON,
- YAHOO_SERVICE_CONFDECLINE,
- YAHOO_SERVICE_CONFLOGOFF,
- YAHOO_SERVICE_CONFADDINVITE,
- YAHOO_SERVICE_CONFMSG,
- YAHOO_SERVICE_CHATLOGON,
- YAHOO_SERVICE_CHATLOGOFF,
- YAHOO_SERVICE_CHATMSG = 0x20,
- YAHOO_SERVICE_GAMELOGON = 0x28,
- YAHOO_SERVICE_GAMELOGOFF,
- YAHOO_SERVICE_GAMEMSG = 0x2a,
- YAHOO_SERVICE_FILETRANSFER = 0x46,
- YAHOO_SERVICE_VOICECHAT = 0x4A,
- YAHOO_SERVICE_NOTIFY,
- YAHOO_SERVICE_VERIFY,
- YAHOO_SERVICE_P2PFILEXFER,
- YAHOO_SERVICE_PEERTOPEER = 0x4F, /* Checks if P2P possible */
- YAHOO_SERVICE_WEBCAM,
- YAHOO_SERVICE_AUTHRESP = 0x54,
- YAHOO_SERVICE_LIST,
- YAHOO_SERVICE_AUTH = 0x57,
- YAHOO_SERVICE_AUTHBUDDY = 0x6d,
- YAHOO_SERVICE_ADDBUDDY = 0x83,
- YAHOO_SERVICE_REMBUDDY,
- YAHOO_SERVICE_IGNORECONTACT, /* > 1, 7, 13 < 1, 66, 13, 0*/
- YAHOO_SERVICE_REJECTCONTACT,
- YAHOO_SERVICE_GROUPRENAME = 0x89, /* > 1, 65(new), 66(0), 67(old) */
- YAHOO_SERVICE_KEEPALIVE = 0x8A, /* 0 - id and that's it?? */
- YAHOO_SERVICE_CHATONLINE = 0x96, /* > 109(id), 1, 6(abcde) < 0,1*/
- YAHOO_SERVICE_CHATGOTO,
- YAHOO_SERVICE_CHATJOIN, /* > 1 104-room 129-1600326591 62-2 */
- YAHOO_SERVICE_CHATLEAVE,
- YAHOO_SERVICE_CHATEXIT = 0x9b,
- YAHOO_SERVICE_CHATADDINVITE = 0x9d,
- YAHOO_SERVICE_CHATLOGOUT = 0xa0,
- YAHOO_SERVICE_CHATPING,
- YAHOO_SERVICE_COMMENT = 0xa8,
- YAHOO_SERVICE_GAME_INVITE = 0xb7,
- YAHOO_SERVICE_STEALTH_PERM = 0xb9,
- YAHOO_SERVICE_STEALTH_SESSION = 0xba,
- YAHOO_SERVICE_AVATAR = 0xbc,
- YAHOO_SERVICE_PICTURE_CHECKSUM = 0xbd,
- YAHOO_SERVICE_PICTURE = 0xbe,
- YAHOO_SERVICE_PICTURE_UPDATE = 0xc1,
- YAHOO_SERVICE_PICTURE_UPLOAD = 0xc2,
- YAHOO_SERVICE_YAB_UPDATE = 0xc4,
- YAHOO_SERVICE_Y6_VISIBLE_TOGGLE = 0xc5, /* YMSG13, key 13: 2 = invisible, 1 = visible */
- YAHOO_SERVICE_Y6_STATUS_UPDATE = 0xc6, /* YMSG13 */
- YAHOO_SERVICE_PICTURE_SHARING = 0xc7, /* YMSG13, key 213: 0 = none, 1 = avatar, 2 = picture */
- YAHOO_SERVICE_VERIFY_ID_EXISTS = 0xc8,
- YAHOO_SERVICE_AUDIBLE = 0xd0,
- YAHOO_SERVICE_Y7_PHOTO_SHARING = 0xd2,
- YAHOO_SERVICE_Y7_CONTACT_DETAILS = 0xd3,/* YMSG13 */
- YAHOO_SERVICE_Y7_CHAT_SESSION = 0xd4,
- YAHOO_SERVICE_Y7_AUTHORIZATION = 0xd6, /* YMSG13 */
- YAHOO_SERVICE_Y7_FILETRANSFER = 0xdc, /* YMSG13 */
- YAHOO_SERVICE_Y7_FILETRANSFERINFO, /* YMSG13 */
- YAHOO_SERVICE_Y7_FILETRANSFERACCEPT, /* YMSG13 */
- YAHOO_SERVICE_Y7_MINGLE = 0xe1, /* YMSG13 */
- YAHOO_SERVICE_Y7_CHANGE_GROUP = 0xe7, /* YMSG13 */
- YAHOO_SERVICE_Y8_STATUS_UPDATE = 0xf0, /* YMSG15 */
- YAHOO_SERVICE_Y8_LIST = 0Xf1, /* YMSG15 */
- YAHOO_SERVICE_Y9_MESSAGE_ACK = 0Xfb, /* YMSG16 */
- YAHOO_SERVICE_Y9_PINGBOX_LIST = 0Xfc, /* YMSG16 */
- YAHOO_SERVICE_Y9_PINGBOX_GUEST_STATUS = 0Xfd, /* YMSG16 */
- YAHOO_SERVICE_Y9_PINGBOX_NA = 0Xfd, /* YMSG16 */
- YAHOO_SERVICE_WEBLOGIN = 0x0226,
- YAHOO_SERVICE_SMS_MSG = 0x02ea,
- YAHOO_SERVICE_Y7_DISCONNECTED = 0x07d1 /* YMSG15, saw this for Auth Failed and ping flood/ban */
-};
-
-enum yahoo_status {
- YAHOO_STATUS_AVAILABLE = 0,
- YAHOO_STATUS_BRB,
- YAHOO_STATUS_BUSY,
- YAHOO_STATUS_NOTATHOME,
- YAHOO_STATUS_NOTATDESK,
- YAHOO_STATUS_NOTINOFFICE,
- YAHOO_STATUS_ONPHONE,
- YAHOO_STATUS_ONVACATION,
- YAHOO_STATUS_OUTTOLUNCH,
- YAHOO_STATUS_STEPPEDOUT,
- YAHOO_STATUS_INVISIBLE = 12,
- YAHOO_STATUS_CUSTOM = 99,
- YAHOO_STATUS_IDLE = 999,
-// YAHOO_STATUS_WEBLOGIN = 0x5a55aa55,
- YAHOO_STATUS_OFFLINE = 0x5a55aa56 /* don't ask */
-};
-
-enum ypacket_status {
- YPACKET_STATUS_DISCONNECTED = -1,
- YPACKET_STATUS_DEFAULT = 0,
- YPACKET_STATUS_SERVERACK = 1,
- YPACKET_STATUS_GAME = 0x2,
- YPACKET_STATUS_AWAY = 0x4,
- YPACKET_STATUS_CONTINUED = 0x5,
- YPACKET_STATUS_INVISIBLE = 12,
- YPACKET_STATUS_NOTIFY = 0x16, /* TYPING */
- YPACKET_STATUS_WEBLOGIN = 0x5a55aa55,
- YPACKET_STATUS_OFFLINE = 0x5a55aa56
-};
-
-#define YAHOO_STATUS_GAME 0x2 /* Games don't fit into the regular status model */
-
-enum yahoo_login_status {
- YAHOO_LOGIN_OK = 0,
- YAHOO_LOGIN_LOGOFF = 1,
- YAHOO_LOGIN_UNAME = 3,
- YAHOO_LOGIN_PASSWD = 13,
- YAHOO_LOGIN_LOCK = 14,
- YAHOO_LOGIN_DUPL = 99,
- YAHOO_LOGIN_SOCK = -1
-};
-
-enum yahoo_im_protocols {
- YAHOO_IM_YAHOO = 0,
- YAHOO_IM_LCS = 1,
- YAHOO_IM_MSN = 2,
- YAHOO_IM_SAMETIME = 9
-};
-
-enum yahoo_error {
- E_UNKNOWN = -1,
- E_CONNECTION = -2,
- E_SYSTEM = -3,
- E_CUSTOM = 0,
-
- /* responses from ignore buddy */
- E_IGNOREDUP = 2,
- E_IGNORENONE = 3,
- E_IGNORECONF = 12,
-
- /* conference */
- E_CONFNOTAVAIL = 20
-};
-
-enum yahoo_log_level {
- YAHOO_LOG_NONE = 0,
- YAHOO_LOG_FATAL,
- YAHOO_LOG_ERR,
- YAHOO_LOG_WARNING,
- YAHOO_LOG_NOTICE,
- YAHOO_LOG_INFO,
- YAHOO_LOG_DEBUG
-};
-
-/* Yahoo Protocol versions. Thanks to GAIM devs.*/
-//#define YAHOO_WEBMESSENGER_PROTO_VER 0x0065
-#define YAHOO_WEBMESSENGER_PROTO_VER 0x000D
-//#define YAHOO_PROTO_VER 0x000c
-
-/*
- Yahoo Protocol Versions and Client mappings
- 11 Yahoo 5.0
- 12 Yahoo 6.0
- 13 Yahoo 7.0
- 14 Yahoo 7.5
- 15 Yahoo 8.0
-
- per some post:
-Messenger
-
-Version 5.6
-YMSG11, 12
-
-6.0
-YMSG12
-
-Version 7.0
-YMSG12 and YMSG13
-
-Version 7.5
-YMSG14 Encrypted
-
-Version 8.0
-YMSG15 Encrypted
-
- */
-//#define YAHOO_PROTO_VER 0x000d
-
-// Yahoo 8.1 uses protocol 15 (0x0F)
-// Yahoo 9.0 uses protocol 16 (0x10)
-//#define YAHOO_PROTO_VER 0x000F
-#define YAHOO_PROTO_VER 0x0010
-
-/* Yahoo style/color directives */
-#define YAHOO_COLOR_BLACK "\033[30m"
-#define YAHOO_COLOR_BLUE "\033[31m"
-#define YAHOO_COLOR_LIGHTBLUE "\033[32m"
-#define YAHOO_COLOR_GRAY "\033[33m"
-#define YAHOO_COLOR_GREEN "\033[34m"
-#define YAHOO_COLOR_PINK "\033[35m"
-#define YAHOO_COLOR_PURPLE "\033[36m"
-#define YAHOO_COLOR_ORANGE "\033[37m"
-#define YAHOO_COLOR_RED "\033[38m"
-#define YAHOO_COLOR_OLIVE "\033[39m"
-#define YAHOO_COLOR_ANY "\033[#"
-#define YAHOO_STYLE_ITALICON "\033[2m"
-#define YAHOO_STYLE_ITALICOFF "\033[x2m"
-#define YAHOO_STYLE_BOLDON "\033[1m"
-#define YAHOO_STYLE_BOLDOFF "\033[x1m"
-#define YAHOO_STYLE_UNDERLINEON "\033[4m"
-#define YAHOO_STYLE_UNDERLINEOFF "\033[x4m"
-#define YAHOO_STYLE_URLON "\033[lm"
-#define YAHOO_STYLE_URLOFF "\033[xlm"
-
-enum yahoo_connection_type {
- YAHOO_CONNECTION_PAGER=0,
- YAHOO_CONNECTION_FT,
- YAHOO_CONNECTION_YAB,
- YAHOO_CONNECTION_WEBCAM_MASTER,
- YAHOO_CONNECTION_WEBCAM,
- YAHOO_CONNECTION_CHATCAT,
- YAHOO_CONNECTION_SEARCH
-};
-
-enum yahoo_webcam_direction_type {
- YAHOO_WEBCAM_DOWNLOAD=0,
- YAHOO_WEBCAM_UPLOAD
-};
-
-enum yahoo_stealth_visibility_type {
- YAHOO_STEALTH_DEFAULT = 0,
- YAHOO_STEALTH_ONLINE,
- YAHOO_STEALTH_PERM_OFFLINE
-};
-
-/* chat member attribs */
-#define YAHOO_CHAT_MALE 0x8000
-#define YAHOO_CHAT_FEMALE 0x10000
-#define YAHOO_CHAT_DUNNO 0x400
-#define YAHOO_CHAT_WEBCAM 0x10
-
-enum yahoo_webcam_conn_type { Y_WCM_DIALUP, Y_WCM_DSL, Y_WCM_T1 };
-
-struct yahoo_webcam {
- int direction; /* Uploading or downloading */
- int conn_type; /* 0=Dialup, 1=DSL/Cable, 2=T1/Lan */
-
- char *user; /* user we are viewing */
- char *server; /* webcam server to connect to */
- int port; /* webcam port to connect on */
- char *key; /* key to connect to the server with */
- char *description; /* webcam description */
- char *my_ip; /* own ip number */
-};
-
-struct yahoo_webcam_data {
- int data_size;
- int to_read;
- unsigned int timestamp;
- unsigned char packet_type;
-};
-
-struct yahoo_server_settings {
- char *pager_host;
- int pager_port;
- char *filetransfer_host;
- int filetransfer_port;
- char *webcam_host;
- int webcam_port;
- char *webcam_description;
- char *local_host;
- int conn_type;
- int pic_cksum;
- int web_messenger;
- char *login_host;
-};
-
-struct yahoo_data {
- char *user;
- char *password;
- char *pw_token;
-
- char *cookie_y;
- char *cookie_t;
- char *cookie_c;
- char *cookie_b;
- char *login_cookie;
-
- YList *buddies;
- YList *ignore;
- YList *identities;
- char *login_id;
-
- enum yahoo_status current_status;
- enum yahoo_status initial_status;
- int logged_in;
-
- int session_id;
-
- int client_id;
- long session_timestamp;
-
- char *rawbuddylist;
- char *rawstealthlist;
- char *ignorelist;
- char *ygrp;
-
- struct yahoo_server_settings *server_settings;
-};
-
-struct yab {
- char *id;
- char *fname;
- char *lname;
- char *nname;
- char *email;
- char *hphone;
- char *wphone;
- char *mphone;
- int dbid;
-};
-
-struct yahoo_buddy {
- char *group;
- char *id;
- char *real_name;
- int protocol;
- int stealth;
- int auth;
- struct yab *yab_entry;
-};
-
-enum yahoo_search_type {
- YAHOO_SEARCH_KEYWORD = 0,
- YAHOO_SEARCH_YID,
- YAHOO_SEARCH_NAME
-};
-
-enum yahoo_search_gender {
- YAHOO_GENDER_NONE = 0,
- YAHOO_GENDER_MALE,
- YAHOO_GENDER_FEMALE
-};
-
-enum yahoo_search_agerange {
- YAHOO_AGERANGE_NONE = 0
-};
-
-struct yahoo_found_contact {
- char *id;
- char *gender;
- char *location;
- int age;
- int online;
-};
-
-/*
- * Function pointer to be passed to http get/post and send file
- */
-typedef void (*yahoo_get_fd_callback)(int id, INT_PTR fd, int error, void *data);
-
-/*
- * Function pointer to be passed to yahoo_get_url_handle
- */
-typedef void (*yahoo_get_url_handle_callback)(int id, INT_PTR fd, int error,
- const char *filename, unsigned long size, void *data);
-
-
-struct yahoo_chat_member {
- char *id;
- int age;
- int attribs;
- char *alias;
- char *location;
-};
-
-struct yahoo_file_info {
- char *filename;
- unsigned long filesize;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_debug.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_debug.h deleted file mode 100644 index 9a847c9051..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_debug.h +++ /dev/null @@ -1,58 +0,0 @@ -/*
- * libyahoo2: yahoo_debug.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#if defined( _MSC_VER )
- int yahoo_log_message(char *fmt, ...);
-#else
- int yahoo_log_message(char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
-#endif
-
-/*
-#define NOTICE(x) if (yahoo_get_log_level() >= YAHOO_LOG_NOTICE) { yahoo_log_message x; yahoo_log_message("\n"); }
-
-#define LOG(x) if (yahoo_get_log_level() >= YAHOO_LOG_INFO) { yahoo_log_message("%s:%d: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message("\n"); }
-
-#define WARNING(x) if (yahoo_get_log_level() >= YAHOO_LOG_WARNING) { yahoo_log_message("%s:%d: warning: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message("\n"); }
-
-#define DEBUG_MSG(x) if (yahoo_get_log_level() >= YAHOO_LOG_DEBUG) { yahoo_log_message("%s:%d: debug: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message("\n"); }
-*/
-#define NOTICE(x) if (yahoo_get_log_level() >= YAHOO_LOG_NOTICE) { yahoo_log_message x; yahoo_log_message(" "); }
-
-#define LOG(x) if (yahoo_get_log_level() >= YAHOO_LOG_INFO) { yahoo_log_message("%s:%d: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message(" "); }
-
-#define WARNING(x) if (yahoo_get_log_level() >= YAHOO_LOG_WARNING) { yahoo_log_message("%s:%d: warning: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message(" "); }
-
-#define DEBUG_MSG(x) if (yahoo_get_log_level() >= YAHOO_LOG_DEBUG) { yahoo_log_message("%s:%d: debug: ", __FILE__, __LINE__); \
- yahoo_log_message x; \
- yahoo_log_message(" "); }
-
-#define DEBUG_MSG1(x) if (yahoo_get_log_level() >= YAHOO_LOG_DEBUG) { \
- yahoo_log_message x; }
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.cpp b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.cpp deleted file mode 100644 index 58005e440d..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.cpp +++ /dev/null @@ -1,456 +0,0 @@ -/*
- * libyahoo2: yahoo_httplib.c
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#if STDC_HEADERS
-# include <string.h>
-#else
-# if !HAVE_STRCHR
-# define strchr index
-# define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# if !HAVE_MEMCPY
-# define memcpy(d, s, n) bcopy ((s), (d), (n))
-# define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-
-#include <errno.h>
-
-/* special check for MSVC compiler */
-#ifndef _MSC_VER
-#ifndef __GNUC__
- #include <unistd.h>
-#endif
-#endif
-
-#include <ctype.h>
-#include "yahoo2.h"
-#include "yahoo2_callbacks.h"
-#include "yahoo_httplib.h"
-#include "yahoo_util.h"
-
-#include "yahoo_debug.h"
-
-#ifdef USE_STRUCT_CALLBACKS
-extern struct yahoo_callbacks *yc;
-#define YAHOO_CALLBACK(x) yc->x
-#else
-#define YAHOO_CALLBACK(x) x
-#endif
-
-extern enum yahoo_log_level log_level;
-
-int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd)
-{
- int n, rc;
- char c;
-
- for (n = 1; n < maxlen; n++) {
-
- do {
- rc = read(fd, &c, 1);
- } while(rc == -1 && (errno == EINTR || errno == EAGAIN)); /* this is bad - it should be done asynchronously */
-
- if (rc == 1) {
- if (c == '\r') /* get rid of \r */
- continue;
- *ptr = c;
- if (c == '\n')
- break;
- ptr++;
- } else if (rc == 0) {
- if (n == 1)
- return (0); /* EOF, no data */
- else
- break; /* EOF, w/ data */
- } else {
- return -1;
- }
- }
-
- *ptr = 0;
- return (n);
-}
-
-int url_to_host_port_path(const char *url, char *host, int *port, char *path)
-{
- char *urlcopy=NULL;
- char *slash=NULL;
- char *colon=NULL;
-
- /*
- * http://hostname
- * http://hostname/
- * http://hostname/path
- * http://hostname/path:foo
- * http://hostname:port
- * http://hostname:port/
- * http://hostname:port/path
- * http://hostname:port/path:foo
- */
-
- if (strstr(url, "http://") == url) {
- urlcopy = strdup(url+7);
- } else {
- WARNING(("Weird url - unknown protocol: %s", url));
- return 0;
- }
-
- slash = strchr(urlcopy, '/');
- colon = strchr(urlcopy, ':');
-
- if (!colon || (slash && slash < colon)) {
- *port = 80;
- } else {
- *colon = 0;
- *port = atoi(colon+1);
- }
-
- if (!slash) {
- strcpy(path, "/");
- } else {
- strcpy(path, slash);
- *slash = 0;
- }
-
- strcpy(host, urlcopy);
-
- FREE(urlcopy);
-
- return 1;
-}
-
-static int isurlchar(unsigned char c)
-{
- return (isalnum(c) || '-' == c || '_' == c);
-}
-
-char *yahoo_urlencode(const char *instr)
-{
- int ipos=0, bpos=0;
- char *str = NULL;
- int len = (int)strlen(instr);
-
- if (!(str = y_new(char, 3*len + 1)))
- return "";
-
- while(instr[ipos]) {
- while(isurlchar(instr[ipos]))
- str[bpos++] = instr[ipos++];
- if (!instr[ipos])
- break;
-
- snprintf(&str[bpos], 4, "%%%.2x", instr[ipos]);
- bpos+=3;
- ipos++;
- }
- str[bpos]='\0';
-
- /* free extra alloc'ed mem. */
- len = (int)strlen(str);
- str = y_renew(char, str, len+1);
-
- return (str);
-}
-
-char *yahoo_urldecode(const char *instr)
-{
- int ipos=0, bpos=0;
- char *str = NULL;
- char entity[3]={0,0,0};
- unsigned dec;
- int len = (int)strlen(instr);
-
- if (!(str = y_new(char, len+1)))
- return "";
-
- while(instr[ipos]) {
- while(instr[ipos] && instr[ipos]!='%')
- if (instr[ipos]=='+') {
- str[bpos++]=' ';
- ipos++;
- } else
- str[bpos++] = instr[ipos++];
- if (!instr[ipos])
- break;
-
- if (instr[ipos+1] && instr[ipos+2]) {
- ipos++;
- entity[0]=instr[ipos++];
- entity[1]=instr[ipos++];
- sscanf(entity, "%2x", &dec);
- str[bpos++] = (char)dec;
- } else {
- str[bpos++] = instr[ipos++];
- }
- }
- str[bpos]='\0';
-
- /* free extra alloc'ed mem. */
- len = (int)strlen(str);
- str = y_renew(char, str, len+1);
-
- return (str);
-}
-
-char *yahoo_xmldecode(const char *instr)
-{
- int ipos=0, bpos=0, epos=0;
- char *str = NULL;
- char entity[4]={0,0,0,0};
- char *entitymap[5][2]={
- {"amp;", "&"},
- {"quot;", "\""},
- {"lt;", "<"},
- {"gt;", "<"},
- {"nbsp;", " "}
- };
- unsigned dec;
- int len = (int)strlen(instr);
-
- if (!(str = y_new(char, len+1)))
- return "";
-
- while(instr[ipos]) {
- while(instr[ipos] && instr[ipos]!='&')
- if (instr[ipos]=='+') {
- str[bpos++]=' ';
- ipos++;
- } else
- str[bpos++] = instr[ipos++];
- if (!instr[ipos] || !instr[ipos+1])
- break;
- ipos++;
-
- if (instr[ipos] == '#') {
- ipos++;
- epos=0;
- while(instr[ipos] != ';')
- entity[epos++]=instr[ipos++];
- sscanf(entity, "%u", &dec);
- str[bpos++] = (char)dec;
- ipos++;
- }
- else {
- int i;
- for (i=0; i<5; i++)
- if (!strncmp(instr + ipos, entitymap[i][0], strlen(entitymap[i][0]))) {
- str[bpos++] = entitymap[i][1][0];
- ipos += (int)strlen(entitymap[i][0]);
- break;
- }
- }
- }
- str[bpos]='\0';
-
- /* free extra alloc'ed mem. */
- len = (int)strlen(str);
- str = y_renew(char, str, len+1);
-
- return (str);
-}
-
-typedef void (*http_connected)(int id, INT_PTR fd, int error);
-
-struct callback_data {
- int id;
- yahoo_get_fd_callback callback;
- char *request;
- void *user_data;
-};
-
-static void connect_complete(INT_PTR fd, int error, void *data)
-{
- struct callback_data *ccd = (struct callback_data *) data;
-
- if (error == 0 && fd > 0)
- write(fd, ccd->request, (int)strlen(ccd->request));
-
- FREE(ccd->request);
- ccd->callback(ccd->id, fd, error, ccd->user_data);
- FREE(ccd);
-}
-
-static void yahoo_send_http_request(int id, char *host, int port, char *request,
- yahoo_get_fd_callback callback, void *data)
-{
- struct callback_data *ccd=y_new0(struct callback_data, 1);
- ccd->callback = callback;
- ccd->id = id;
- ccd->request = strdup(request);
- ccd->user_data = data;
-
- YAHOO_CALLBACK(ext_yahoo_connect_async)(id, host, port, YAHOO_CONNECTION_FT, connect_complete, ccd);
-}
-
-void yahoo_http_post(int id, const char *url, const char *cookies, long content_length,
- yahoo_get_fd_callback callback, void *data)
-{
- char host[255];
- int port = 80;
- char path[255];
- char ck[2048];
- char buff[4096];
-
- if (!url_to_host_port_path(url, host, &port, path))
- return;
-
- if (cookies == NULL || cookies[0] == '\0')
- ck[0] = '\0';
- else
- snprintf(ck, sizeof(ck), "Cookie: %s\r\n", cookies);
-
- snprintf(buff, sizeof(buff),
- "POST %s HTTP/1.0\r\n"
- "User-Agent: %s\r\n"
- "Pragma: no-cache\r\n"
- "Host: %s\r\n"
- "Content-Length: %ld\r\n"
- "%s"
- "\r\n",
- path,
- NETLIB_USER_AGENT,
- host, content_length,
- ck);
-
- yahoo_send_http_request(id, host, port, buff, callback, data);
-}
-
-void yahoo_http_get(int id, const char *url, const char *cookies,
- yahoo_get_fd_callback callback, void *data)
-{
- char host[255];
- int port = 80;
- char path[255];
- char ck[2048];
- char buff[4096];
-
- if (!url_to_host_port_path(url, host, &port, path))
- return;
-
- if (cookies == NULL || cookies[0] == '\0')
- ck[0] = '\0';
- else
- snprintf(ck, sizeof(ck), "Cookie: %s\r\n", cookies);
-
- snprintf(buff, sizeof(buff),
- "GET %s HTTP/1.0\r\n"
- "User-Agent: %s\r\n"
- "Pragma: no-cache\r\n"
- "Host: %s\r\n"
- "%s"
- "\r\n",
- path, NETLIB_USER_AGENT, host, ck);
-
- yahoo_send_http_request(id, host, port, buff, callback, data);
-}
-
-struct url_data {
- yahoo_get_url_handle_callback callback;
- void *user_data;
-};
-
-static void yahoo_got_url_fd(int id, INT_PTR fd, int error, void *data)
-{
- char *tmp=NULL;
- char buff[1024];
- unsigned long filesize=0;
- char *filename=NULL;
- int n;
-
- struct url_data *ud = (struct url_data *) data;
-
- if (error || fd < 0) {
- ud->callback(id, fd, error, filename, filesize, ud->user_data);
- FREE(ud);
- return;
- }
-
- while((n=yahoo_tcp_readline(buff, sizeof(buff), fd)) > 0) {
- LOG(("Read:%s:\n", buff));
- if (!strcmp(buff, ""))
- break;
-
- if ( !strncasecmp(buff, "Content-length:",
- strlen("Content-length:"))) {
- tmp = strrchr(buff, ' ');
- if (tmp)
- filesize = atol(tmp);
- }
-
- if ( !strncasecmp(buff, "Content-disposition:",
- strlen("Content-disposition:"))) {
- tmp = strstr(buff, "name=");
- if (tmp) {
- tmp+=strlen("name=");
- if (tmp[0] == '"') {
- char *tmp2;
- tmp++;
- tmp2 = strchr(tmp, '"');
- if (tmp2)
- *tmp2 = '\0';
- } else {
- char *tmp2;
- tmp2 = strchr(tmp, ';');
- if (!tmp2)
- tmp2 = strchr(tmp, '\r');
- if (!tmp2)
- tmp2 = strchr(tmp, '\n');
- if (tmp2)
- *tmp2 = '\0';
- }
-
- filename = strdup(tmp);
- }
- }
- }
-
- LOG(("n == %d\n", n));
- LOG(("Calling callback, filename:%s, size: %ld\n", filename, filesize));
- ud->callback(id, fd, error, filename, filesize, ud->user_data);
- FREE(ud);
- FREE(filename);
-}
-
-void yahoo_get_url_fd(int id, const char *url, const struct yahoo_data *yd,
- yahoo_get_url_handle_callback callback, void *data)
-{
- char buff[1024];
- struct url_data *ud = y_new0(struct url_data, 1);
-
- //buff[0]='\0'; /*don't send them our cookies!! */
- snprintf(buff, sizeof(buff), "Y=%s; T=%s; B=%s", yd->cookie_y, yd->cookie_t, yd->cookie_b);
-
- ud->callback = callback;
- ud->user_data = data;
-// yahoo_http_get(id, url, buff, yahoo_got_url_fd, ud);
- YAHOO_CALLBACK(ext_yahoo_send_http_request)(id, YAHOO_CONNECTION_FT, "GET", url, buff, 0, yahoo_got_url_fd, ud);
-}
-
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.h deleted file mode 100644 index 1baea7cea8..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_httplib.h +++ /dev/null @@ -1,49 +0,0 @@ -/*
- * libyahoo2: yahoo_httplib.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef YAHOO_HTTPLIB_H
-#define YAHOO_HTTPLIB_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "yahoo2_types.h"
-
-char *yahoo_urlencode(const char *instr);
-char *yahoo_urldecode(const char *instr);
-char *yahoo_xmldecode(const char *instr);
-
-int yahoo_tcp_readline(char *ptr, int maxlen, INT_PTR fd);
-void yahoo_http_post(int id, const char *url, const char *cookies, long size,
- yahoo_get_fd_callback callback, void *data);
-void yahoo_http_get(int id, const char *url, const char *cookies,
- yahoo_get_fd_callback callback, void *data);
-void yahoo_get_url_fd(int id, const char *url, const struct yahoo_data *yd,
- yahoo_get_url_handle_callback callback, void *data);
-
-int url_to_host_port_path(const char *url, char *host, int *port, char *path);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.cpp b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.cpp deleted file mode 100644 index 42af4e2046..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/*
- * yahoo_list.c: linked list routines
- *
- * Some code copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- * Other code copyright Meredydd Luff <meredydd AT everybuddy.com>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Some of this code was borrowed from elist.c in the eb-lite sources
- *
- */
-
-#include <stdlib.h>
-
-#include "yahoo_list.h"
-
-YList *y_list_append(YList * list, void *data)
-{
- YList *n;
- YList *new_list = (YList *) malloc(sizeof(YList));
- YList *attach_to = NULL;
-
- new_list->next = NULL;
- new_list->data = data;
-
- for (n = list; n != NULL; n = n->next) {
- attach_to = n;
- }
-
- if (attach_to == NULL) {
- new_list->prev = NULL;
- return new_list;
- } else {
- new_list->prev = attach_to;
- attach_to->next = new_list;
- return list;
- }
-}
-
-YList *y_list_prepend(YList * list, void *data)
-{
- YList *n = (YList *) malloc(sizeof(YList));
-
- n->next = list;
- n->prev = NULL;
- n->data = data;
- if (list)
- list->prev = n;
-
- return n;
-}
-
-YList *y_list_concat(YList * list, YList * add)
-{
- YList *l;
-
- if (!list)
- return add;
-
- if (!add)
- return list;
-
- for (l = list; l->next; l = l->next)
- ;
-
- l->next = add;
- add->prev = l;
-
- return list;
-}
-
-YList *y_list_remove(YList * list, void *data)
-{
- YList *n;
-
- for (n = list; n != NULL; n = n->next) {
- if (n->data == data) {
- list=y_list_remove_link(list, n);
- y_list_free_1(n);
- break;
- }
- }
-
- return list;
-}
-
-/* Warning */
-/* link MUST be part of list */
-/* caller must free link using y_list_free_1 */
-YList *y_list_remove_link(YList * list, const YList * link)
-{
- if (!link)
- return list;
-
- if (link->next)
- link->next->prev = link->prev;
- if (link->prev)
- link->prev->next = link->next;
-
- if (link == list)
- list = link->next;
-
- return list;
-}
-
-int y_list_length(const YList * list)
-{
- int retval = 0;
- const YList *n = list;
-
- for (n = list; n != NULL; n = n->next) {
- retval++;
- }
-
- return retval;
-}
-
-/* well, you could just check for list == NULL, but that would be
- * implementation dependent
- */
-int y_list_empty(const YList * list)
-{
- if (!list)
- return 1;
- else
- return 0;
-}
-
-int y_list_singleton(const YList * list)
-{
- if (!list || list->next)
- return 0;
- return 1;
-}
-
-YList *y_list_copy(YList * list)
-{
- YList *n;
- YList *copy = NULL;
-
- for (n = list; n != NULL; n = n->next) {
- copy = y_list_append(copy, n->data);
- }
-
- return copy;
-}
-
-void y_list_free_1(YList * list)
-{
- free(list);
-}
-
-void y_list_free(YList * list)
-{
- YList *n = list;
-
- while (n != NULL) {
- YList *next = n->next;
- free(n);
- n = next;
- }
-}
-
-YList *y_list_find(YList * list, const void *data)
-{
- YList *l;
- for (l = list; l && l->data != data; l = l->next)
- ;
-
- return l;
-}
-
-void y_list_foreach(YList * list, YListFunc fn, void * user_data)
-{
- for (; list; list = list->next)
- fn(list->data, user_data);
-}
-
-YList *y_list_find_custom(YList * list, const void *data, YListCompFunc comp)
-{
- YList *l;
- for (l = list; l; l = l->next)
- if (comp(l->data, data) == 0)
- return l;
-
- return NULL;
-}
-
-YList *y_list_nth(YList * list, int n)
-{
- int i=n;
- for ( ; list && i; list = list->next, i--)
- ;
-
- return list;
-}
-
-YList *y_list_insert_sorted(YList * list, void *data, YListCompFunc comp)
-{
- YList *l, *n, *prev = NULL;
- if (!list)
- return y_list_append(list, data);
-
- n = (YList *) malloc(sizeof(YList));
- n->data = data;
- for (l = list; l && comp(l->data, n->data) <= 0; l = l->next)
- prev = l;
-
- if (l) {
- n->prev = l->prev;
- l->prev = n;
- } else
- n->prev = prev;
-
- n->next = l;
-
- if (n->prev) {
- n->prev->next = n;
- return list;
- } else {
- return n;
- }
-
-}
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.h deleted file mode 100644 index abb2c647cd..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_list.h +++ /dev/null @@ -1,74 +0,0 @@ -/*
- * yahoo_list.h: linked list routines
- *
- * Some code copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- * Other code copyright Meredydd Luff <meredydd AT everybuddy.com>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-/*
- * This is a replacement for the GList. It only provides functions that
- * we use in Ayttm. Thanks to Meredyyd from everybuddy dev for doing
- * most of it.
- */
-
-#ifndef __YLIST_H__
-#define __YLIST_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _YList {
- struct _YList *next;
- struct _YList *prev;
- void *data;
-} YList;
-
-typedef int (*YListCompFunc) (const void *, const void *);
-typedef void (*YListFunc) (void *, void *);
-
-YList *y_list_append(YList * list, void *data);
-YList *y_list_prepend(YList * list, void *data);
-YList *y_list_remove_link(YList * list, const YList * link);
-YList *y_list_remove(YList * list, void *data);
-
-YList *y_list_insert_sorted(YList * list, void * data, YListCompFunc comp);
-
-YList *y_list_copy(YList * list);
-
-YList *y_list_concat(YList * list, YList * add);
-
-YList *y_list_find(YList * list, const void *data);
-YList *y_list_find_custom(YList * list, const void *data, YListCompFunc comp);
-
-YList *y_list_nth(YList * list, int n);
-
-void y_list_foreach(YList * list, YListFunc fn, void *user_data);
-
-void y_list_free_1(YList * list);
-void y_list_free(YList * list);
-int y_list_length(const YList * list);
-int y_list_empty(const YList * list);
-int y_list_singleton(const YList * list);
-
-#define y_list_next(list) list->next
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.cpp b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.cpp deleted file mode 100644 index a3f60df7fc..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/*
- * libyahoo2: yahoo_util.c
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#if STDC_HEADERS
-# include <string.h>
-#else
-# if !HAVE_STRCHR
-# define strchr index
-# define strrchr rindex
-# endif
-char *strchr (), *strrchr ();
-# if !HAVE_MEMCPY
-# define memcpy(d, s, n) bcopy ((s), (d), (n))
-# define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
-#endif
-
-#include "yahoo_util.h"
-
-char * y_string_append(char * string, char * append)
-{
- int size = (int)strlen(string) + (int)strlen(append) + 1;
- char * new_string = y_renew(char, string, size);
-
- if (new_string == NULL) {
- new_string = y_new(char, size);
- strcpy(new_string, string);
- FREE(string);
- }
-
- mir_strcat(new_string, append);
-
- return new_string;
-}
-
-/*char * y_str_to_utf8(const char *in)
-{
- unsigned int n, i = 0;
- char *result = NULL;
-
- if (in == NULL || *in == '\0')
- return "";
-
- result = y_new(char, strlen(in) * 2 + 1);
-
- // convert a string to UTF-8 Format
- for (n = 0; n < strlen(in); n++) {
- unsigned char c = (unsigned char)in[n];
-
- if (c < 128) {
- result[i++] = (char) c;
- } else {
- result[i++] = (char) ((c >> 6) | 192);
- result[i++] = (char) ((c & 63) | 128);
- }
- }
- result[i] = '\0';
- return result;
-}
-
-char * y_utf8_to_str(const char *in)
-{
- int i = 0;
- unsigned int n;
- char *result = NULL;
-
- if (in == NULL || *in == '\0')
- return "";
-
- result = y_new(char, strlen(in) + 1);
-
- // convert a string from UTF-8 Format
- for (n = 0; n < strlen(in); n++) {
- unsigned char c = in[n];
-
- if (c < 128) {
- result[i++] = (char) c;
- } else {
- result[i++] = (c << 6) | (in[++n] & 63);
- }
- }
- result[i] = '\0';
- return result;
-} */
-
-#if !HAVE_GLIB
-
-void y_strfreev(char ** vector)
-{
- char **v;
- for(v = vector; *v; v++) {
- FREE(*v);
- }
- FREE(vector);
-}
-
-char ** y_strsplit(char * str, char * sep, int nelem)
-{
- char ** vector;
- int i=0;
- int l = (int)strlen(sep);
- if (nelem <= 0) {
- nelem=0;
- if (*str) {
- for(char *s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
- ;
- if (strcmp(str+strlen(str)-l, sep))
- nelem++;
- }
- }
-
- vector = y_new(char *, nelem + 1);
-
- char *p, *s;
- for(p=str, s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
- int len = s-p;
- vector[i] = y_new(char, len+1);
- strncpy(vector[i], p, len);
- vector[i][len] = '\0';
- }
-
- if (i<nelem && *str) /* str didn't end with sep, and str isn't empty */
- vector[i++] = strdup(p);
-
- vector[i] = NULL;
-
- return vector;
-}
-
-void * y_memdup(const void * addr, int n)
-{
- void * new_chunk = malloc(n);
- if (new_chunk)
- memcpy(new_chunk, addr, n);
- return new_chunk;
-}
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.h b/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.h deleted file mode 100644 index 10795deaed..0000000000 --- a/tools/_deprecated/Yahoo/src/libyahoo2/yahoo_util.h +++ /dev/null @@ -1,109 +0,0 @@ -/*
- * libyahoo2: yahoo_util.h
- *
- * Copyright (C) 2002-2004, Philip S Tellis <philip.tellis AT gmx.net>
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-
-#ifndef __YAHOO_UTIL_H__
-#define __YAHOO_UTIL_H__
-
-#if HAVE_GLIB
-# include <glib.h>
-
-# define FREE(x) if (x) {g_free(x); x=NULL;}
-
-# define y_new g_new
-# define y_new0 g_new0
-# define y_renew g_renew
-
-# define y_memdup g_memdup
-# define y_strsplit g_strsplit
-# define y_strfreev g_strfreev
-# ifndef strdup
-# define strdup g_strdup
-# endif
-# ifndef strncasecmp
-# define strncasecmp g_strncasecmp
-# define strcasecmp g_strcasecmp
-# endif
-
-# define snprintf g_snprintf
-# define vsnprintf g_vsnprintf
-
-#else
-
-# include <stdlib.h>
-# include <stdarg.h>
-
-# define FREE(x) if (x) {free(x); x=NULL;}
-
-# define y_new(type, n) (type *)malloc(sizeof(type) * (n))
-# define y_new0(type, n) (type *)calloc((n), sizeof(type))
-# define y_renew(type, mem, n) (type *)realloc(mem, n)
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-void * y_memdup(const void * addr, int n);
-char ** y_strsplit(char * str, char * sep, int nelem);
-void y_strfreev(char ** vector);
-
-#ifndef _WIN32
-int strncasecmp(const char * s1, const char * s2, size_t n);
-int strcasecmp(const char * s1, const char * s2);
-
-char * strdup(const char *s);
-
-int snprintf(char *str, size_t size, const char *format, ...);
-int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-#endif
-
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef MIN
-#define MIN(x,y) ((x)<(y)?(x):(y))
-#endif
-
-#ifndef MAX
-#define MAX(x,y) ((x)>(y)?(x):(y))
-#endif
-
-/*
- * The following three functions return newly allocated memory.
- * You must free it yourself
- */
-char * y_string_append(char * str, char * append);
-/*char * y_str_to_utf8(const char * in);
-char * y_utf8_to_str(const char * in);*/
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/tools/_deprecated/Yahoo/src/links.cpp b/tools/_deprecated/Yahoo/src/links.cpp deleted file mode 100644 index b831f4cfcd..0000000000 --- a/tools/_deprecated/Yahoo/src/links.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/*
- * $Id: services.c 5376 2007-05-07 16:13:18Z gena01 $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-
-#include "m_addcontact.h"
-#include "m_message.h"
-#include "m_assocmgr.h"
-
-#include "resource.h"
-
-static HANDLE hServiceParseLink;
-
-static int SingleHexToDecimal(wchar_t c)
-{
- if (c >= '0' && c <= '9') return c - '0';
- if (c >= 'a' && c <= 'f') return c - 'a' + 10;
- if (c >= 'A' && c <= 'F') return c - 'A' + 10;
- return -1;
-}
-
-static void url_decode(wchar_t* str)
-{
- wchar_t* s = str, *d = str;
-
- while (*s) {
- if (*s == '%') {
- int digit1 = SingleHexToDecimal(s[1]);
- if (digit1 != -1) {
- int digit2 = SingleHexToDecimal(s[2]);
- if (digit2 != -1) {
- s += 3;
- *d++ = (wchar_t)((digit1 << 4) | digit2);
- continue;
- }
- }
- }
- *d++ = *s++;
- }
-
- *d = 0;
-}
-
-static char* get_buddy(wchar_t ** arg)
-{
- wchar_t *buf = *arg;
-
- wchar_t *tok = wcschr(buf, '&'); /* first token */
- if (tok) *tok = 0;
-
- if (!buf[0]) return NULL;
- url_decode(buf);
-
- *arg = tok ? tok + 1 : NULL;
-
- return mir_u2a(buf);
-}
-
-
-/*
- add user: ymsgr:addfriend?ID
- send message: ymsgr:sendim?ID&m=MESSAGE
- add chatroom: ymsgr:chat?ROOM
- */
-static INT_PTR ServiceParseYmsgrLink(WPARAM, LPARAM lParam)
-{
- wchar_t *arg = (wchar_t*)lParam;
- if (arg == NULL) return 1; /* sanity check */
-
- /* skip leading prefix */
- arg = wcschr(arg, ':');
- if (arg == NULL) return 1; /* parse failed */
-
- for (++arg; *arg == '/'; ++arg) {}
-
- if (g_instances.getCount() == 0) return 0;
-
- CYahooProto *proto = g_instances[0];
- for (int i = 0; i < g_instances.getCount(); ++i) {
- if (g_instances[i]->m_iStatus > ID_STATUS_OFFLINE) {
- proto = g_instances[i];
- break;
- }
- }
- if (!proto) return 1;
-
- /* add a contact to the list */
- if (!wcsnicmp(arg, L"addfriend?", 10)) {
- arg += 10;
-
- char *id = get_buddy(&arg);
- if (!id) return 1;
-
- if (proto->getbuddyH(id) == NULL) /* does not yet check if id is current user */
- {
- ADDCONTACTSTRUCT acs = { 0 };
- PROTOSEARCHRESULT psr = { 0 };
-
- acs.handleType = HANDLE_SEARCHRESULT;
- acs.szProto = proto->m_szModuleName;
- acs.psr = &psr;
-
- psr.cbSize = sizeof(PROTOSEARCHRESULT);
- psr.id.w = (wchar_t*)id;
- CallService(MS_ADDCONTACT_SHOW, 0, (LPARAM)&acs);
- }
-
- mir_free(id);
- return 0;
- }
- /* send a message to a contact */
- else if (!wcsnicmp(arg, L"sendim?", 7)) {
- arg += 7;
-
- char *id = get_buddy(&arg);
- if (!id) return 1;
-
- wchar_t *msg = NULL;
-
- while (arg) {
- if (!wcsnicmp(arg, L"m=", 2)) {
- msg = arg + 2;
- url_decode(msg);
- break;
- }
-
- arg = wcschr(arg + 1, '&'); /* first token */
- if (arg) *arg = 0;
- }
-
- MCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */
- if (hContact)
- CallService(MS_MSG_SENDMESSAGEW, hContact, (LPARAM)msg);
-
- mir_free(id);
- return 0;
- }
- /* open a chatroom */
- else if (!wcsnicmp(arg, L"chat?", 5)) {
- arg += 5;
-
- // char *id = get_buddy(&arg);
- // if (!id) return 1;
-
- /* not yet implemented (rm contains name of chatroom)*/
- return 0;
- }
- return 1; /* parse failed */
-}
-
-void YmsgrLinksInit(void)
-{
- static const char szService[] = "YAHOO/ParseYmsgrLink";
-
- hServiceParseLink = CreateServiceFunction(szService, ServiceParseYmsgrLink);
- AssocMgr_AddNewUrlTypeT("ymsgr:", TranslateT("YAHOO Link Protocol"), hInstance, IDI_YAHOO, szService, 0);
-}
-
-void YmsgrLinksUninit(void)
-{
- DestroyServiceFunction(hServiceParseLink);
- CallService(MS_ASSOCMGR_REMOVEURLTYPE, 0, (LPARAM)"ymsgr:");
-}
diff --git a/tools/_deprecated/Yahoo/src/main.cpp b/tools/_deprecated/Yahoo/src/main.cpp deleted file mode 100644 index f9ddf9acd7..0000000000 --- a/tools/_deprecated/Yahoo/src/main.cpp +++ /dev/null @@ -1,153 +0,0 @@ -/*
- * $Id: main.cpp 13596 2011-04-15 19:07:23Z george.hazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include "stdafx.h"
-#include "http_gateway.h"
-#include "version.h"
-#include "resource.h"
-
-#include <m_langpack.h>
-
-/*
- * Global Variables
- */
-HINSTANCE hInstance;
-
-HANDLE g_hNetlibUser;
-
-CLIST_INTERFACE *pcli;
-int hLangpack;
-
-PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESCRIPTION,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE, //not transient
- { 0xaa7bfea, 0x1fc7, 0x45f0, { 0x90, 0x6e, 0x2a, 0x46, 0xb6, 0xe1, 0x19, 0xcf } } // {0AA7BFEA-1FC7-45f0-906E-2A46B6E119CF}
-};
-
-void YmsgrLinksInit(void);
-void YmsgrLinksUninit(void);
-
-/*
- * WINAPI DllMain - main entry point into a DLL
- * Parameters:
- * HINSTANCE hinst,
- * DWORD fdwReason,
- * LPVOID lpvReserved
- * Returns :
- * BOOL
- *
- */
-extern "C" BOOL WINAPI DllMain(HINSTANCE hinst, DWORD /*fdwReason*/, LPVOID /*lpvReserved*/)
-{
- hInstance = hinst;
- return TRUE;
-}
-
-/*
- * Load - loads plugin into memory
- */
-
-//=====================================================
-// Name : Load
-// Parameters:
-// Returns : int
-// Description : Called when plugin is loaded into Miranda
-//=====================================================
-
-static int CompareProtos(const CYahooProto* p1, const CYahooProto* p2)
-{
- return mir_wstrcmp(p1->m_tszUserName, p2->m_tszUserName);
-}
-
-LIST<CYahooProto> g_instances(1, CompareProtos);
-
-static CYahooProto* yahooProtoInit(const char* pszProtoName, const wchar_t* tszUserName)
-{
- CYahooProto* ppro = new CYahooProto(pszProtoName, tszUserName);
-
- g_instances.insert(ppro);
-
- return ppro;
-}
-
-static int yahooProtoUninit(CYahooProto* ppro)
-{
- g_instances.remove(ppro);
- delete ppro;
-
- return 0;
-}
-
-extern "C" int __declspec(dllexport)Load(void)
-{
- mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
-
- PROTOCOLDESCRIPTOR pd = { 0 };
- pd.cbSize = sizeof(pd);
- pd.szName = "YAHOO";
- pd.type = PROTOTYPE_PROTOCOL;
- pd.fnInit = (pfnInitProto)yahooProtoInit;
- pd.fnUninit = (pfnUninitProto)yahooProtoUninit;
- Proto_RegisterModule(&pd);
-
- NETLIBUSER nlu = { 0 };
- nlu.cbSize = sizeof(nlu);
- nlu.flags = NUF_UNICODE | NUF_OUTGOING | NUF_HTTPCONNS;
- nlu.szSettingsModule = "YAHOO/libyahoo2";
- nlu.ptszDescriptiveName = TranslateT("YAHOO plugin HTTP connections");
- g_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
-
- IconsInit();
- YmsgrLinksInit();
- /**
- * Register LibYahoo2 callback functions
- */
- register_callbacks();
- return 0;
-}
-
-/*
- * Unload - Unloads plugin
- * Parameters: void
- */
-
-extern "C" int __declspec(dllexport) Unload(void)
-{
- LOG(("Unload"));
-
- YmsgrLinksUninit();
- Netlib_CloseHandle(g_hNetlibUser);
- return 0;
-}
-
-/*
- * MirandaPluginInfoEx - Sets plugin info
- * Parameters: (DWORD mirandaVersion)
- */
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfo;
-}
-
-/*
- * MirandaInterfaces - Notifies the core of interfaces implemented
- * Parameters: none
- */
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
diff --git a/tools/_deprecated/Yahoo/src/options.cpp b/tools/_deprecated/Yahoo/src/options.cpp deleted file mode 100644 index f793642e52..0000000000 --- a/tools/_deprecated/Yahoo/src/options.cpp +++ /dev/null @@ -1,364 +0,0 @@ -/* - * $Id: options.cpp 12038 2010-06-21 16:46:22Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ - -#include "stdafx.h" -#include "resource.h" - -#include <m_langpack.h> -#include <m_utils.h> -#include <m_options.h> -#include <m_popup.h> - -#include "ignore.h" - -/* - * DlgProcYahooOpts - Account Options Dialog - */ -static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DBVARIANT dbv; - CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - - ppro = (CYahooProto*)lParam; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); - - if (!ppro->getString(YAHOO_LOGINID, &dbv)) { - SetDlgItemTextA(hwndDlg, IDC_HANDLE, dbv.pszVal); - db_free(&dbv); - } - - if (!ppro->getString("Nick", &dbv)) { - SetDlgItemTextA(hwndDlg, IDC_NICK, dbv.pszVal); - db_free(&dbv); - } - - if (!ppro->getString(YAHOO_PASSWORD, &dbv)) { - //bit of a security hole here, since it's easy to extract a password from an edit box - SetDlgItemTextA(hwndDlg, IDC_PASSWORD, dbv.pszVal); - db_free(&dbv); - } - - //SetButtonCheck(hwndDlg, IDC_DISABLE_UTF8, ppro->getByte("DisableUTF8", 0)); - SetButtonCheck(hwndDlg, IDC_USE_YAB, ppro->getByte("UseYAB", 1)); - SetButtonCheck(hwndDlg, IDC_SHOW_AVATARS, ppro->getByte("ShowAvatars", 1)); - SetButtonCheck(hwndDlg, IDC_MAIL_AUTOLOGIN, ppro->getByte("MailAutoLogin", 1)); - SetButtonCheck(hwndDlg, IDC_DISABLEYAHOOMAIL, !ppro->getByte("DisableYahoomail", 0)); - SetButtonCheck(hwndDlg, IDC_SHOW_ERRORS, ppro->getByte("ShowErrors", 1)); - - return TRUE; - - case WM_COMMAND: - - switch (LOWORD(wParam)) { - case IDC_NEWYAHOOACCOUNTLINK: - Utils_OpenUrl("http://edit.yahoo.com/config/eval_register"); - return TRUE; - - //case IDC_DISABLE_UTF8: - case IDC_USE_YAB: - case IDC_SHOW_AVATARS: - case IDC_MAIL_AUTOLOGIN: - case IDC_SHOW_ERRORS: - case IDC_DISABLEYAHOOMAIL: - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - } - - if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) - switch (LOWORD(wParam)) { - case IDC_HANDLE: - case IDC_PASSWORD: - case IDC_NICK: - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - - break; - - case WM_NOTIFY: - - if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) { - bool reconnectRequired = false; - - char str[128]; - GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, _countof(str)); - if (ppro->getString(YAHOO_LOGINID, &dbv)) { - reconnectRequired = true; - } - else { - if (mir_strcmp(str, dbv.pszVal)) - reconnectRequired = true; - db_free(&dbv); - } - ppro->setString(YAHOO_LOGINID, str); - - GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, _countof(str)); - if (ppro->getString(YAHOO_PASSWORD, &dbv)) { - reconnectRequired = true; - } - else { - if (mir_strcmp(str, dbv.pszVal)) - reconnectRequired = true; - db_free(&dbv); - } - - ppro->setString(YAHOO_PASSWORD, str); - GetDlgItemTextA(hwndDlg, IDC_NICK, str, _countof(str)); - - - if (str[0] == '\0') { - /* Check for empty Nick, if so delete the key in the DB */ - ppro->delSetting("Nick"); - } - else { - /* otherwise save the new Nick */ - ppro->setString("Nick", str); - } - - ppro->setByte("UseYAB", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_USE_YAB)); - ppro->setByte("ShowAvatars", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOW_AVATARS)); - ppro->setByte("MailAutoLogin", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_MAIL_AUTOLOGIN)); - ppro->setByte("DisableYahoomail", (BYTE)BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DISABLEYAHOOMAIL)); - ppro->setByte("ShowErrors", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOW_ERRORS)); - - if (reconnectRequired) { - ppro->delSetting(YAHOO_PWTOKEN); - if (ppro->m_bLoggedIn) - MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Yahoo network."), TranslateT("Yahoo options"), MB_OK); - - } - - return TRUE; - } - - break; - } - return FALSE; -} - -/* - * DlgProcYahooOpts - Connection Options Dialog - */ -static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - DBVARIANT dbv; - CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - - ppro = (CYahooProto*)lParam; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); - - if (!ppro->getString(YAHOO_LOGINSERVER, &dbv)) { - SetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, dbv.pszVal); - db_free(&dbv); - } - else SetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, YAHOO_DEFAULT_LOGIN_SERVER); - - SetDlgItemInt(hwndDlg, IDC_YAHOOPORT, ppro->getWord(YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT), FALSE); - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_RESETSERVER: - SetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, YAHOO_DEFAULT_LOGIN_SERVER); - SetDlgItemInt(hwndDlg, IDC_YAHOOPORT, YAHOO_DEFAULT_PORT, FALSE); - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - } - - if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) - switch (LOWORD(wParam)) { - case IDC_LOGINSERVER: - case IDC_YAHOOPORT: - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - } - - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->code == PSN_APPLY) { - bool reconnectRequired = false; - char str[128]; - GetDlgItemTextA(hwndDlg, IDC_LOGINSERVER, str, _countof(str)); - { - ptrA szServer(ppro->getStringA(YAHOO_LOGINSERVER)); - if (szServer == NULL) - reconnectRequired = true; - else if (mir_strcmp(str, szServer)) - reconnectRequired = true; - } - - ppro->setString(YAHOO_LOGINSERVER, str); - - int port = GetDlgItemInt(hwndDlg, IDC_YAHOOPORT, NULL, FALSE); - if (ppro->getWord(YAHOO_LOGINPORT, -1) != port) - reconnectRequired = true; - - ppro->setWord(YAHOO_LOGINPORT, port); - - if (reconnectRequired && ppro->m_bLoggedIn) - MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Yahoo network."), TranslateT("Yahoo options"), MB_OK); - - return TRUE; - } - break; - } - return FALSE; -} - -/* - * DlgProcYahooOpts - Connection Options Dialog - */ -static INT_PTR CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) -{ - YList *l; - CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); - - switch (msg) { - case WM_INITDIALOG: - TranslateDialogDefault(hwndDlg); - - ppro = (CYahooProto*)lParam; - SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam); - - if (ppro->getByte("IgnoreUnknown", 0)) { - CheckDlgButton(hwndDlg, IDC_OPT_IGN_UNKNOWN, BST_CHECKED); - - EnableWindow(GetDlgItem(hwndDlg, IDC_IGN_ADD), 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_IGN_REMOVE), 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_YIGN_EDIT), 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_YIGN_LIST), 0); - } - else CheckDlgButton(hwndDlg, IDC_OPT_IGN_LIST, BST_CHECKED); - - /* show our current ignore list */ - LOG(("[DlgProcYahooOptsIgnore] Grabbing current ignore list...")) - l = (YList *)ppro->GetIgnoreList(); - while (l != NULL) { - yahoo_buddy *b = (yahoo_buddy *) l->data; - - LOG(("[DlgProcYahooOptsIgnore] Buddy: %s", b->id)) - SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_ADDSTRING, 0, (LPARAM)b->id); - l = l->next; - } - LOG(("[DlgProcYahooOptsIgnore] End of Ignore List...")) - - return TRUE; - - case WM_COMMAND: - switch (LOWORD(wParam)) { - case IDC_OPT_IGN_UNKNOWN: - case IDC_OPT_IGN_LIST: - if ((HWND)lParam != GetFocus()) return 0; - - EnableWindow(GetDlgItem(hwndDlg, IDC_IGN_ADD), LOWORD(wParam) == IDC_OPT_IGN_LIST); - EnableWindow(GetDlgItem(hwndDlg, IDC_IGN_REMOVE), LOWORD(wParam) == IDC_OPT_IGN_LIST); - EnableWindow(GetDlgItem(hwndDlg, IDC_YIGN_EDIT), LOWORD(wParam) == IDC_OPT_IGN_LIST); - EnableWindow(GetDlgItem(hwndDlg, IDC_YIGN_LIST), LOWORD(wParam) == IDC_OPT_IGN_LIST); - - SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); - break; - - case IDC_IGN_ADD: - if (!ppro->m_bLoggedIn) - MessageBox(hwndDlg, TranslateT("You need to be connected to Yahoo to add to Ignore List."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION); - else { - char id[128]; - int i = GetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, id, _countof(id)); - - if (i < 3) { - MessageBox(hwndDlg, TranslateT("Please enter a valid buddy name to ignore."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION); - break; - } - - i = SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_FINDSTRINGEXACT, (WPARAM)-1, (LPARAM)id); - if (i != LB_ERR) { - MessageBox(hwndDlg, TranslateT("The buddy is already on your ignore list."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION); - break; - } - ppro->IgnoreBuddy(id, 0); - SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_ADDSTRING, 0, (LPARAM)id); - SetDlgItemTextA(hwndDlg, IDC_YIGN_EDIT, ""); - } - break; - - case IDC_IGN_REMOVE: - { - int i; - char id[128]; - - if (!ppro->m_bLoggedIn) { - MessageBox(hwndDlg, TranslateT("You need to be connected to Yahoo to remove from the ignore list."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION); - break; - } - - i = SendDlgItemMessage(hwndDlg, IDC_YIGN_LIST, LB_GETCURSEL, 0, 0); - if (i == LB_ERR) { - MessageBox(hwndDlg, TranslateT("Please select a buddy on the ignore list to remove."), TranslateT("Yahoo Ignore"), MB_OK | MB_ICONINFORMATION); - break; - } - - SendDlgItemMessageA(hwndDlg, IDC_YIGN_LIST, LB_GETTEXT, i, (LPARAM)id); - - ppro->IgnoreBuddy(id, 1); - SendDlgItemMessage(hwndDlg, IDC_YIGN_LIST, LB_DELETESTRING, i, 0); - } - } - break; - - case WM_NOTIFY: - if (((LPNMHDR)lParam)->code == PSN_APPLY) { - ppro->setByte("IgnoreUnknown", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_OPT_IGN_UNKNOWN)); - return TRUE; - } - break; - } - - return FALSE; -} - -/* - * YahooOptInit - initialize/register our Options w/ Miranda. - */ - -int __cdecl CYahooProto::OnOptionsInit(WPARAM wParam, LPARAM) -{ - OPTIONSDIALOGPAGE odp = { 0 }; - odp.position = -790000000; - odp.hInstance = hInstance; - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_YAHOO); - odp.pwszTitle = m_tszUserName; - odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE; - odp.pwszGroup = LPGENW("Network"); - odp.pwszTab = LPGENW("Account"); - odp.pfnDlgProc = DlgProcYahooOpts; - odp.dwInitParam = LPARAM(this); - Options_AddPage(wParam, &odp); - - odp.pwszTab = LPGENW("Connection"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_YAHOO_CONNECTION); - odp.pfnDlgProc = DlgProcYahooOptsConn; - Options_AddPage(wParam, &odp); - - odp.pwszTab = LPGENW("Ignore List"); - odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_YAHOO_IGNORE); - odp.pfnDlgProc = DlgProcYahooOptsIgnore; - Options_AddPage(wParam, &odp); - return 0; -} diff --git a/tools/_deprecated/Yahoo/src/options.h b/tools/_deprecated/Yahoo/src/options.h deleted file mode 100644 index 8916ee2ed4..0000000000 --- a/tools/_deprecated/Yahoo/src/options.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * $Id: options.h 8425 2008-10-15 16:02:48Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_SEARCH_H_
-#define _YAHOO_SEARCH_H_
-
-BOOL CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK DlgProcYahooOptsIgnore(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -//BOOL CALLBACK DlgProcYahooPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -int YahooOptInit(WPARAM wParam,LPARAM lParam); -
-#endif
diff --git a/tools/_deprecated/Yahoo/src/proto.cpp b/tools/_deprecated/Yahoo/src/proto.cpp deleted file mode 100644 index 353baf3c16..0000000000 --- a/tools/_deprecated/Yahoo/src/proto.cpp +++ /dev/null @@ -1,734 +0,0 @@ -/*
- * $Id: proto.cpp 13497 2011-03-25 04:55:36Z borkra $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-
-#include <win2k.h>
-
-#include <m_options.h>
-#include <m_skin.h>
-#include <m_userinfo.h>
-
-#include "resource.h"
-#include "file_transfer.h"
-
-#pragma warning(disable:4355)
-
-CYahooProto::CYahooProto(const char *aProtoName, const wchar_t *aUserName)
- : PROTO<CYahooProto>(aProtoName, aUserName),
- m_bLoggedIn(FALSE),
- poll_loop(0),
- m_chatrooms(3, ChatRoom::compare)
-{
- m_connections = NULL;
- m_connection_tags = 0;
-
- logoff_buddies();
-
- SkinAddNewSoundExW("mail", m_tszUserName, LPGENW("New E-mail available in Inbox"));
-
- LoadYahooServices();
-}
-
-CYahooProto::~CYahooProto()
-{
- if (m_bLoggedIn)
- logout();
-
- debugLogA("Logged out");
-
- DestroyHookableEvent(hYahooNudge);
-
- MenuUninit();
-
- FREE(m_startMsg);
- FREE(m_pw_token);
-
- Netlib_CloseHandle(m_hNetlibUser);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// OnModulesLoadedEx - performs hook registration
-
-int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM)
-{
- HookProtoEvent(ME_USERINFO_INITIALISE, &CYahooProto::OnUserInfoInit);
- HookProtoEvent(ME_IDLE_CHANGED, &CYahooProto::OnIdleEvent);
- HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CYahooProto::OnPrebuildContactMenu);
-
- wchar_t tModuleDescr[100];
- mir_snwprintf(tModuleDescr, TranslateT("%s plugin connections"), m_tszUserName);
-
- NETLIBUSER nlu = { 0 };
- nlu.cbSize = sizeof(nlu);
-#ifdef HTTP_GATEWAY
- nlu.flags = NUF_OUTGOING | NUF_HTTPGATEWAY| NUF_HTTPCONNS | NUF_UNICODE;
-#else
- nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
-#endif
- nlu.szSettingsModule = m_szModuleName;
- nlu.ptszDescriptiveName = tModuleDescr;
-
-#ifdef HTTP_GATEWAY
- // Here comes the Gateway Code!
- nlu.szHttpGatewayHello = NULL;
- nlu.szHttpGatewayUserAgent = "User-Agent: " + NETLIB_USER_AGENT;
- nlu.pfnHttpGatewayInit = YAHOO_httpGatewayInit;
- nlu.pfnHttpGatewayBegin = NULL;
- nlu.pfnHttpGatewayWrapSend = YAHOO_httpGatewayWrapSend;
- nlu.pfnHttpGatewayUnwrapRecv = YAHOO_httpGatewayUnwrapRecv;
-#endif
-
- m_hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
- MenuContactInit();
- ChatRegister();
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// AddToList - adds a contact to the contact list
-
-MCONTACT CYahooProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
-{
- debugLogA("[YahooAddToList] Flags: %d", flags);
-
- if (!m_bLoggedIn) {
- debugLogA("[YahooAddToList] WARNING: WE ARE OFFLINE!");
- return 0;
- }
-
- YAHOO_SEARCH_RESULT *ysr = (YAHOO_SEARCH_RESULT*)psr;
- if (ysr == NULL || ysr->cbSize != sizeof(YAHOO_SEARCH_RESULT)) {
- debugLogA("[YahooAddToList] Empty data passed?");
- return 0;
- }
-
- char *id = psr->flags & PSR_UNICODE ? mir_utf8encodeW((wchar_t*)psr->id.w) : mir_utf8encode((char*)psr->id.w);
- MCONTACT hContact = getbuddyH(id);
- if (hContact != NULL) {
- if (db_get_b(hContact, "CList", "NotOnList")) {
- debugLogA("[YahooAddToList] Temporary Buddy:%s already on our buddy list", id);
- //return 0;
- }
- else {
- debugLogA("[YahooAddToList] Buddy:%s already on our buddy list", id);
- mir_free(id);
- return 0;
- }
- }
- else if (flags & PALF_TEMPORARY) { /* not on our list */
- debugLogA("[YahooAddToList] Adding Temporary Buddy:%s ", id);
- }
-
- int protocol = ysr->protocol;
- debugLogA("Adding buddy:%s", id);
- hContact = add_buddy(id, id, protocol, flags);
- mir_free(id);
- return hContact;
-}
-
-MCONTACT __cdecl CYahooProto::AddToListByEvent(int, int, MEVENT hDbEvent)
-{
- debugLogA("[YahooAddToListByEvent]");
- if (!m_bLoggedIn)
- return 0;
-
- DBEVENTINFO dbei = { sizeof(dbei) };
- if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == -1) {
- debugLogA("[YahooAddToListByEvent] ERROR: Can't get blob size.");
- return 0;
- }
-
- debugLogA("[YahooAddToListByEvent] Got blob size: %lu", dbei.cbBlob);
- dbei.pBlob = (PBYTE)_alloca(dbei.cbBlob);
- if (db_event_get(hDbEvent, &dbei)) {
- debugLogA("[YahooAddToListByEvent] ERROR: Can't get event.");
- return 0;
- }
-
- if (dbei.eventType != EVENTTYPE_AUTHREQUEST) {
- debugLogA("[YahooAddToListByEvent] ERROR: Not an authorization request.");
- return 0;
- }
-
- if (mir_strcmp(dbei.szModule, m_szModuleName)) {
- debugLogA("[YahooAddToListByEvent] ERROR: Not Yahoo protocol.");
- return 0;
- }
-
- MCONTACT hContact = DbGetAuthEventContact(&dbei);
- if (hContact != NULL)
- debugLogA("Temp Buddy found at: %p ", hContact);
- else
- debugLogA("hContact NULL???");
-
- return hContact;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// AuthAllow - processes the successful authorization
-
-int CYahooProto::Authorize(MEVENT hdbe)
-{
- debugLogA("[YahooAuthAllow]");
- if (!m_bLoggedIn) {
- debugLogA("[YahooAuthAllow] Not Logged In!");
- return 1;
- }
-
- DBEVENTINFO dbei = { sizeof(dbei) };
- if ((dbei.cbBlob = db_event_getBlobSize(hdbe)) == -1)
- return 1;
-
- dbei.pBlob = (PBYTE)_alloca(dbei.cbBlob);
- if (db_event_get(hdbe, &dbei))
- return 1;
-
- if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return 1;
-
- if (mir_strcmp(dbei.szModule, m_szModuleName))
- return 1;
-
- /* Need to remove the buddy from our Miranda Lists */
- MCONTACT hContact = DbGetAuthEventContact(&dbei);
- if (hContact != NULL) {
- ptrA who(getStringA(hContact, YAHOO_LOGINID));
- if (who) {
- ptrA myid(getStringA(hContact, "MyIdentity"));
- debugLogA("Accepting buddy:%s", who);
- accept(myid, who, getWord(hContact, "yprotoid", 0));
- }
- }
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// AuthDeny - handles the unsuccessful authorization
-
-int CYahooProto::AuthDeny(MEVENT hdbe, const wchar_t *reason)
-{
- debugLogA("[YahooAuthDeny]");
- if (!m_bLoggedIn)
- return 1;
-
- DBEVENTINFO dbei = { sizeof(dbei) };
- if ((dbei.cbBlob = db_event_getBlobSize(hdbe)) == -1) {
- debugLogA("[YahooAuthDeny] ERROR: Can't get blob size");
- return 1;
- }
-
- dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
- if (db_event_get(hdbe, &dbei)) {
- debugLogA("YahooAuthDeny - Can't get db event!");
- return 1;
- }
-
- if (dbei.eventType != EVENTTYPE_AUTHREQUEST) {
- debugLogA("YahooAuthDeny - not Authorization event");
- return 1;
- }
-
- if (mir_strcmp(dbei.szModule, m_szModuleName)) {
- debugLogA("YahooAuthDeny - wrong module?");
- return 1;
- }
-
- /* Need to remove the buddy from our Miranda Lists */
- MCONTACT hContact = DbGetAuthEventContact(&dbei);
- if (hContact != NULL) {
- ptrA who(getStringA(hContact, YAHOO_LOGINID));
- if (who) {
- ptrA myid(getStringA(hContact, "MyIdentity"));
- T2Utf u_reason(reason);
-
- debugLogA("Rejecting buddy:%s msg: %s", who, u_reason);
- reject(myid, who, getWord(hContact, "yprotoid", 0), u_reason);
- db_delete_contact(hContact);
- }
- }
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// PSR_AUTH
-
-int __cdecl CYahooProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
-{
- debugLogA("[YahooRecvAuth] ");
- db_unset(hContact, "CList", "Hidden");
-
- Proto_AuthRecv(m_szModuleName, pre);
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// PSS_AUTHREQUEST
-
-int __cdecl CYahooProto::AuthRequest(MCONTACT hContact, const wchar_t* msg)
-{
- debugLogA("[YahooSendAuthRequest]");
-
- if (hContact && m_bLoggedIn) {
- AddBuddy(hContact, "miranda", msg);
- return 0; // Success
- }
-
- return 1; // Failure
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// GetCaps - return protocol capabilities bits
-
-DWORD_PTR __cdecl CYahooProto::GetCaps(int type, MCONTACT)
-{
- switch (type) {
- case PFLAGNUM_1:
- return PF1_IM | PF1_ADDED | PF1_AUTHREQ | PF1_MODEMSGRECV | PF1_MODEMSGSEND | PF1_BASICSEARCH |
- PF1_EXTSEARCH | PF1_FILESEND | PF1_FILERECV | PF1_VISLIST | PF1_SERVERCLIST;
-
- case PFLAGNUM_2:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_ONTHEPHONE |
- PF2_OUTTOLUNCH | PF2_INVISIBLE | PF2_LIGHTDND /*| PF2_HEAVYDND*/;
-
- case PFLAGNUM_3:
- return PF2_ONLINE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_ONTHEPHONE |
- PF2_OUTTOLUNCH | PF2_LIGHTDND;
-
- case PFLAGNUM_4:
- return PF4_FORCEAUTH | PF4_FORCEADDED | PF4_SUPPORTTYPING | PF4_SUPPORTIDLE
- | PF4_AVATARS | PF4_OFFLINEFILES | PF4_IMSENDOFFLINE /* for Meta plugin*/;
- case PFLAG_UNIQUEIDTEXT:
- return (DWORD_PTR)Translate("ID");
- case PFLAG_UNIQUEIDSETTING:
- return (DWORD_PTR)YAHOO_LOGINID;
- case PFLAG_MAXLENOFMESSAGE:
- return 800; /* STUPID YAHOO!!! */
- default:
- return 0;
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// GetInfo - retrieves a contact info
-
-void __cdecl CYahooProto::get_info_thread(void *hContact)
-{
- SleepEx(500, TRUE);
- ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-}
-
-int __cdecl CYahooProto::GetInfo(MCONTACT hContact, int /*infoType*/)
-{
- ForkThread(&CYahooProto::get_info_thread, (void*)hContact);
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// RecvFile
-
-int __cdecl CYahooProto::RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
-{
- db_unset(hContact, "CList", "Hidden");
-
- return Proto_RecvFile(hContact, evt);
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SetApparentMode - sets the visibility status
-
-int __cdecl CYahooProto::SetApparentMode(MCONTACT hContact, int mode)
-{
- if (mode && mode != ID_STATUS_OFFLINE)
- return 1;
-
- int oldMode = getWord(hContact, "ApparentMode", 0);
- if (mode != oldMode)
- setWord(hContact, "ApparentMode", mode);
- return 1;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SetStatus - sets the protocol status
-
-int __cdecl CYahooProto::SetStatus(int iNewStatus)
-{
- LOG(("[SetStatus] New status %S", pcli->pfnGetStatusModeDescription(iNewStatus, 0)));
-
- if (iNewStatus == ID_STATUS_OFFLINE) {
- logout();
- }
- else if (!m_bLoggedIn) {
- DBVARIANT dbv;
- int err = 0;
- char errmsg[80];
-
- if (m_iStatus == ID_STATUS_CONNECTING)
- return 0;
-
- YAHOO_utils_logversion();
-
- /*
- * Load Yahoo ID from the database.
- */
- if (!getString(YAHOO_LOGINID, &dbv)) {
- if (mir_strlen(dbv.pszVal) > 0)
- mir_strncpy(m_yahoo_id, dbv.pszVal, 255);
- else
- err++;
- db_free(&dbv);
- }
- else {
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
- err++;
- }
-
- if (err)
- mir_strncpy(errmsg, Translate("Please enter your Yahoo ID in Options -> Network -> Yahoo"), 80);
- else {
- if (!getString(YAHOO_PASSWORD, &dbv)) {
- if (mir_strlen(dbv.pszVal) > 0)
- mir_strncpy(m_password, dbv.pszVal, 255);
- else
- err++;
-
- db_free(&dbv);
- }
- else {
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
- err++;
- }
-
- if (err)
- mir_strncpy(errmsg, Translate("Please enter your Yahoo password in Options -> Network -> Yahoo"), 80);
- }
-
- if (err != 0) {
- BroadcastStatus(ID_STATUS_OFFLINE);
-
- ShowError(TranslateT("Yahoo Login Error"), _A2T(errmsg));
- return 0;
- }
-
- FREE(m_pw_token); // No Token yet.
-
- if (!getString(YAHOO_PWTOKEN, &dbv)) {
- if (mir_strlen(dbv.pszVal) > 0)
- m_pw_token = strdup(dbv.pszVal);
-
- db_free(&dbv);
- }
-
- m_startStatus = iNewStatus;
-
- //reset the unread email count. We'll get a new packet since we are connecting.
- m_unreadMessages = 0;
-
- BroadcastStatus(ID_STATUS_CONNECTING);
-
- iNewStatus = (iNewStatus == ID_STATUS_INVISIBLE) ? YAHOO_STATUS_INVISIBLE : YAHOO_STATUS_AVAILABLE;
- ForkThread(&CYahooProto::server_main, (void *)iNewStatus);
- }
- else if (iNewStatus == ID_STATUS_INVISIBLE) { /* other normal away statuses are set via setaway */
- BroadcastStatus(iNewStatus);
- set_status(m_iStatus, NULL, (m_iStatus != ID_STATUS_ONLINE) ? 1 : 0);
- }
- else {
- /* clear out our message just in case, STUPID AA! */
- FREE(m_startMsg);
-
- /* now tell miranda that we are Online, don't tell Yahoo server yet though! */
- BroadcastStatus(iNewStatus);
- }
-
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// GetAwayMsg - returns a contact's away message
-
-void __cdecl CYahooProto::get_status_thread(void *param)
-{
- DBVARIANT dbv;
- char *gm = NULL, *sm = NULL, *fm;
- MCONTACT hContact = (MCONTACT)param;
-
- Sleep(150);
-
- /* Check Yahoo Games Message */
- if (!getString(hContact, "YGMsg", &dbv)) {
- gm = strdup(dbv.pszVal);
- db_free(&dbv);
- }
-
- if (!db_get_s(hContact, "CList", "StatusMsg", &dbv)) {
- if (mir_strlen(dbv.pszVal) >= 1)
- sm = strdup(dbv.pszVal);
-
- db_free(&dbv);
- }
- else {
- int status = getDword(hContact, "YStatus", YAHOO_STATUS_OFFLINE);
- sm = yahoo_status_code(yahoo_status(status));
- if (sm) sm = strdup(sm); /* we need this to go global FREE later */
- }
-
- size_t l = 0;
- if (gm)
- l += mir_strlen(gm) + 3;
-
- l += mir_strlen(sm) + 1;
- fm = (char *)malloc(l);
-
- fm[0] = '\0';
- if (gm && mir_strlen(gm) > 0) {
- /* BAH YAHOO SUCKS! WHAT A PAIN!
- find first carriage return add status message then add the rest */
- char *c = strchr(gm, '\r');
-
- if (c != NULL) {
- mir_strncpy(fm, gm, c - gm + 1);
- fm[c - gm + 1] = '\0';
- }
- else
- mir_strcpy(fm, gm);
-
- if (sm) {
- mir_strcat(fm, ": ");
- mir_strcat(fm, sm);
- }
-
- if (c != NULL)
- mir_strcat(fm, c);
- }
- else if (sm) {
- mir_strcat(fm, sm);
- }
-
- FREE(sm);
-
- ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, _A2T(fm));
-}
-
-HANDLE __cdecl CYahooProto::GetAwayMsg(MCONTACT hContact)
-{
- debugLogA("[YahooGetAwayMessage] ");
-
- if (hContact && m_bLoggedIn) {
- if (getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
- return 0; /* user offline, what Status message? */
-
- ForkThread(&CYahooProto::get_status_thread, (void*)hContact);
- return (HANDLE)1; //Success
- }
-
- return 0; // Failure
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SetAwayMsg - sets the away status message
-
-int __cdecl CYahooProto::SetAwayMsg(int status, const wchar_t* msg)
-{
- char *c = msg && msg[0] ? mir_utf8encodeW(msg) : NULL;
-
- debugLogA("[YahooSetAwayMessage] Status: %S, Msg: %s", pcli->pfnGetStatusModeDescription(status, 0), (char*)c);
-
- if (!m_bLoggedIn) {
- if (m_iStatus == ID_STATUS_OFFLINE) {
- debugLogA("[YahooSetAwayMessage] WARNING: WE ARE OFFLINE!");
- mir_free(c);
- return 1;
- }
- else {
- if (m_startMsg) free(m_startMsg);
-
- m_startMsg = c ? strdup(c) : NULL;
-
- mir_free(c);
- return 0;
- }
- }
-
- /* need to tell ALL plugins that we are changing status */
- BroadcastStatus(status);
-
- if (m_startMsg) free(m_startMsg);
-
- /* now decide what we tell the server */
- if (c != 0) {
- m_startMsg = strdup(c);
- if (status == ID_STATUS_ONLINE) {
- set_status(YAHOO_CUSTOM_STATUS, c, 0);
- }
- else if (status != ID_STATUS_INVISIBLE) {
- set_status(YAHOO_CUSTOM_STATUS, c, 1);
- }
- }
- else {
- set_status(status, NULL, 0);
- m_startMsg = NULL;
- }
-
- mir_free(c);
- return 0;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// PS_GETMYAWAYMSG
-
-INT_PTR __cdecl CYahooProto::GetMyAwayMsg(WPARAM, LPARAM lParam)
-{
- if (!m_bLoggedIn || !m_startMsg)
- return 0;
-
- if (lParam & SGMA_UNICODE) {
- return (INT_PTR)mir_utf8decodeW(m_startMsg);
- }
- else {
- return (INT_PTR)mir_utf8decodeA(m_startMsg);
- }
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// UserIsTyping - sends a UTN notification
-
-int __cdecl CYahooProto::UserIsTyping(MCONTACT hContact, int type)
-{
- if (!m_bLoggedIn)
- return 0;
-
- char *szProto = GetContactProto(hContact);
- if (szProto == NULL || mir_strcmp(szProto, m_szModuleName))
- return 0;
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- if (type == PROTOTYPE_SELFTYPING_OFF || type == PROTOTYPE_SELFTYPING_ON) {
- sendtyping(dbv.pszVal, getWord(hContact, "yprotoid", 0), type == PROTOTYPE_SELFTYPING_ON ? 1 : 0);
- }
- db_free(&dbv);
- }
- return 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// OnEvent - maintain protocol events
-
-int __cdecl CYahooProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
-{
- switch (eventType) {
- case EV_PROTO_ONLOAD: return OnModulesLoadedEx(0, 0);
- case EV_PROTO_ONOPTIONS: return OnOptionsInit(wParam, lParam);
-
- case EV_PROTO_ONMENU:
- MenuMainInit();
- break;
-
- case EV_PROTO_ONCONTACTDELETED:
- return OnContactDeleted(wParam, lParam);
-
- case EV_PROTO_DBSETTINGSCHANGED:
- return OnSettingChanged(wParam, lParam);
- }
- return 1;
-}
-
-INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- DBVARIANT dbv;
- CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- ppro = (CYahooProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
-
- if (!ppro->getString(YAHOO_LOGINID, &dbv)) {
- SetDlgItemTextA(hwndDlg, IDC_HANDLE, dbv.pszVal);
- db_free(&dbv);
- }
-
- if (!ppro->getString(YAHOO_PASSWORD, &dbv)) {
- SetDlgItemTextA(hwndDlg, IDC_PASSWORD, dbv.pszVal);
- db_free(&dbv);
- }
-
- return TRUE;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_NEWYAHOOACCOUNTLINK) {
- Utils_OpenUrl("http://edit.yahoo.com/config/eval_register");
- return TRUE;
- }
-
- if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
- switch (LOWORD(wParam)) {
- case IDC_HANDLE:
- case IDC_PASSWORD:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->code == (UINT)PSN_APPLY) {
- char str[128];
- bool reconnectRequired = false;
-
- GetDlgItemTextA(hwndDlg, IDC_HANDLE, str, _countof(str));
-
- if (ppro->getString(YAHOO_LOGINID, &dbv)) {
- reconnectRequired = true;
- }
- else {
- if (mir_strcmp(str, dbv.pszVal))
- reconnectRequired = true;
- db_free(&dbv);
- }
-
- ppro->setString(YAHOO_LOGINID, str);
- GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, _countof(str));
-
- if (ppro->getString(YAHOO_PASSWORD, &dbv)) {
- reconnectRequired = true;
- }
- else {
- if (mir_strcmp(str, dbv.pszVal))
- reconnectRequired = true;
- db_free(&dbv);
- }
-
- ppro->setString(YAHOO_PASSWORD, str);
-
- if (reconnectRequired) {
- ppro->delSetting(YAHOO_PWTOKEN);
- if (ppro->m_bLoggedIn)
- MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Yahoo network."), TranslateT("Yahoo options"), MB_OK);
- }
- return TRUE;
- }
- break;
- }
-
- return FALSE;
-}
-
-INT_PTR CYahooProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
-{
- return (INT_PTR)CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_YAHOOACCOUNT),
- (HWND)lParam, first_run_dialog, (LPARAM)this);
-}
diff --git a/tools/_deprecated/Yahoo/src/proto.h b/tools/_deprecated/Yahoo/src/proto.h deleted file mode 100644 index 2cfed5b305..0000000000 --- a/tools/_deprecated/Yahoo/src/proto.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
- * $Id: proto.h 14181 2012-03-11 17:51:16Z george.hazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#ifndef _YAHOO_PROTO_H_
-#define _YAHOO_PROTO_H_
-
-#include <m_protoint.h>
-
-struct CYahooProto : public PROTO<CYahooProto>
-{
- CYahooProto(const char*, const wchar_t*);
- virtual ~CYahooProto();
-
- //====================================================================================
- // PROTO_INTERFACE
- //====================================================================================
-
- virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent);
-
- virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t *szReason);
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const wchar_t *szMessage );
-
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath );
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szReason );
- virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const wchar_t **szFilename );
-
- virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
-
- virtual HANDLE __cdecl SearchBasic(const wchar_t *id);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
-
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
-
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles);
- virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
-
- virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
-
- virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
- virtual int __cdecl SetAwayMsg( int m_iStatus, const wchar_t *msg);
- virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
-
- virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
-
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
-
- //====| Events |======================================================================
- int __cdecl OnContactDeleted(WPARAM, LPARAM);
- int __cdecl OnIdleEvent(WPARAM, LPARAM);
- int __cdecl OnModulesLoadedEx(WPARAM, LPARAM);
- int __cdecl OnOptionsInit(WPARAM, LPARAM);
- int __cdecl OnSettingChanged(WPARAM, LPARAM);
- int __cdecl OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam);
-
- //====| Services |====================================================================
- INT_PTR __cdecl OnABCommand(WPARAM, LPARAM);
- INT_PTR __cdecl OnCalendarCommand(WPARAM, LPARAM);
- INT_PTR __cdecl OnEditMyProfile(WPARAM, LPARAM);
- INT_PTR __cdecl OnGotoMailboxCommand(WPARAM, LPARAM);
- INT_PTR __cdecl OnRefreshCommand(WPARAM, LPARAM);
- INT_PTR __cdecl OnShowMyProfileCommand(WPARAM, LPARAM);
- INT_PTR __cdecl OnShowProfileCommand(WPARAM, LPARAM);
-
- INT_PTR __cdecl SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam);
- INT_PTR __cdecl GetUnreadEmailCount(WPARAM, LPARAM);
- INT_PTR __cdecl SendNudge(WPARAM, LPARAM);
- INT_PTR __cdecl SetMyAvatar(WPARAM, LPARAM);
-
- INT_PTR __cdecl CreateConference(WPARAM /*wParam*/, LPARAM /*lParam*/);
-
-
- void BroadcastStatus(int s);
- void LoadYahooServices( void );
- void MenuMainInit( void );
- void MenuContactInit( void );
- void MenuUninit( void );
-
- //====| Data |========================================================================
- BOOL m_bLoggedIn;
- YList *m_connections;
- unsigned int m_connection_tags;
-
- struct ChatRoom
- {
- char *name;
- YList *members;
-
- ChatRoom(const char* name, YList *members)
- : name(strdup(name)), members(members) {}
-
- ~ChatRoom()
- { for (YList *l = members; l; l = l->next) free(l->data);
- free(name); y_list_free(members); }
-
- static int compare(const ChatRoom* c1, const ChatRoom* c2)
- { return mir_strcmp(c1->name, c2->name); }
- };
-
- OBJLIST <ChatRoom> m_chatrooms;
-
- char* m_startMsg;
-
- // former ylad structure
- char m_yahoo_id[255]; // user id (login)
- char m_password[255]; // user password
- char *m_pw_token; // yahoo token (login)
- int m_id; // libyahoo id allocated for that proto instance
- int m_fd; // socket descriptor
- int m_status;
- char* m_msg;
- int m_rpkts;
-
- //====| avatar.cpp |==================================================================
- void __cdecl send_avt_thread(void *psf);
- void __cdecl recv_avatarthread(void *pavt);
-
- INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM);
- INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM);
- INT_PTR __cdecl GetMyAvatar(WPARAM, LPARAM);
-
- void ext_got_picture(const char *me, const char *who, const char *pic_url, int cksum, int type);
- void ext_got_picture_checksum(const char *me, const char *who, int cksum);
- void ext_got_picture_update(const char *me, const char *who, int buddy_icon);
- void ext_got_picture_status(const char *me, const char *who, int buddy_icon);
- void ext_got_picture_upload(const char *me, const char *url, unsigned int ts);
- void ext_got_avatar_share(int buddy_icon);
-
- void reset_avatar(MCONTACT hContact);
- void request_avatar(const char* who);
-
- void SendAvatar(const wchar_t *szFile);
- void GetAvatarFileName(MCONTACT hContact, wchar_t* pszDest, int cbLen, int type);
-
- //====| chat.cpp |====================================================================
- void ChatRegister(void);
- void ChatStart(const char* room);
- void ChatEvent(const char* room, const char* who, int evt, const wchar_t* msg = NULL);
- void ChatLeave(const char* room);
- void ChatLeaveAll(void);
-
- int __cdecl OnGCEventHook(WPARAM, LPARAM lParam);
- int __cdecl OnGCMenuHook(WPARAM, LPARAM lParam);
-
- //====| filetransfer.cpp |============================================================
- void __cdecl recv_filethread(void *psf);
- void __cdecl send_filethread(void *psf);
-
- void ext_got_file(const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7);
- void ext_got_files(const char *me, const char *who, const char *ft_token, int y7, YList* files);
- void ext_got_file7info(const char *me, const char *who, const char *url, const char *fname, const char *ft_token);
- void ext_ft7_send_file(const char *me, const char *who, const char *filename, const char *token, const char *ft_token);
-
- //====| ignore.cpp |==================================================================
- const YList* GetIgnoreList(void);
- void IgnoreBuddy(const char *buddy, int ignore);
- int BuddyIgnored(const char *who);
-
- void ext_got_ignore(YList * igns);
-
- //====| im.cpp |======================================================================
- void ext_got_im(const char *me, const char *who, int protocol, const char *msg, long tm, int stat, int utf8, int buddy_icon, const char *seqn=NULL, int sendn=0);
-
- void send_msg(const char *id, int protocol, const char *msg, int utf8);
-
- void __cdecl im_sendacksuccess(void *hContact);
- void __cdecl im_sendackfail(void *hContact);
- void __cdecl im_sendackfail_longmsg(void *hContact);
-
- //====| proto.cpp |===================================================================
- void __cdecl get_status_thread(void *hContact);
- void __cdecl get_info_thread(void *hContact);
-
- //====| search.cpp |==================================================================
- void __cdecl search_simplethread(void *snsearch);
- void __cdecl searchadv_thread(void *pHWND);
-
- void ext_got_search_result(int found, int start, int total, YList *contacts);
-
- //====| server.cpp |==================================================================
- void __cdecl server_main(void *empty);
-
- //====| services.cpp |================================================================
- void logoff_buddies();
-
- void OpenURL(const char *url, int autoLogin);
-
- INT_PTR __cdecl SetCustomStatCommand(WPARAM, LPARAM);
-
- //====| user_info.cpp |===============================================================
- int __cdecl OnUserInfoInit( WPARAM wParam, LPARAM lParam );
-
- //====| util.cpp |====================================================================
- int GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* );
- DWORD SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue );
-
- DWORD Set_Protocol(MCONTACT hContact, int protocol );
-
- int ShowNotification(const wchar_t *title, const wchar_t *info, DWORD flags);
- void ShowError(const wchar_t *title, const wchar_t *buff);
- int ShowPopup( const wchar_t* nickname, const wchar_t* msg, const char *szURL );
- bool IsMyContact(MCONTACT hContact);
-
- //====| yahoo.cpp |===================================================================
- MCONTACT add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags);
- const char *find_buddy( const char *yahoo_id);
- MCONTACT getbuddyH(const char *yahoo_id);
- void remove_buddy(const char *who, int protocol);
-
- void logout();
-
- void accept(const char *myid, const char *who, int protocol);
- void reject(const char *myid, const char *who, int protocol, const char *msg);
- void sendtyping(const char *who, int protocol, int stat);
- void set_status(int myyahooStatus, char *msg, int away);
- void stealth(const char *buddy, int add);
-
- INT_PTR ext_connect(const char *h, int p, int type);
- int ext_connect_async(const char *host, int port, int type, yahoo_connect_callback callback, void *data);
-
- void ext_send_http_request(enum yahoo_connection_type type, const char *method, const char *url, const char *cookies, long content_length, yahoo_get_fd_callback callback, void *callback_data);
- char * ext_send_https_request(struct yahoo_data *yd, const char *host, const char *path);
-
- void ext_status_changed(const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int utf8);
- void ext_status_logon(const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int cksum, int buddy_icon, long client_version, int utf8);
- void ext_got_audible(const char *me, const char *who, const char *aud, const char *msg, const char *aud_hash);
- void ext_got_calendar(const char *url, int type, const char *msg, int svc);
- void ext_got_stealth(char *stealthlist);
- void ext_got_buddies(YList * buds);
- void ext_rejected(const char *who, const char *msg);
- void ext_buddy_added(char *myid, char *who, char *group, int status, int auth);
- void ext_contact_added(const char *myid, const char *who, const char *fname, const char *lname, const char *msg, int protocol);
- void ext_typing_notify(const char *me, const char *who, int protocol, int stat);
- void ext_game_notify(const char *me, const char *who, int stat, const char *msg);
- void ext_mail_notify(const char *from, const char *subj, int cnt);
- void ext_system_message(const char *me, const char *who, const char *msg);
- void ext_got_identities(const char *nick, const char *fname, const char *lname, YList * ids);
- void ext_got_ping(const char *errormsg);
- void ext_error(const char *err, int fatal, int num);
- void ext_login_response(int succ, const char *url);
- void ext_login(enum yahoo_status login_mode);
-
- void AddBuddy(MCONTACT hContact, const char *group, const wchar_t *msg);
-
- void YAHOO_utils_logversion();
-
- unsigned int ext_add_handler(int fd, yahoo_input_condition cond, void *data);
- void ext_remove_handler(unsigned int tag);
-
-private:
- int m_startStatus;
- int m_unreadMessages;
-
- int poll_loop;
- long lLastSend;
-
- HANDLE hYahooNudge;
-
- HGENMENU hShowProfileMenuItem;
- HGENMENU menuItemsAll[ 8 ];
-};
-
-extern LIST<CYahooProto> g_instances;
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/resource.h b/tools/_deprecated/Yahoo/src/resource.h deleted file mode 100644 index c7aba4f76e..0000000000 --- a/tools/_deprecated/Yahoo/src/resource.h +++ /dev/null @@ -1,94 +0,0 @@ -/*
- * $Id: resource.h 9837 2009-05-21 15:12:06Z gena01 $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-/*
- * Resource Icons
- */
-#define IDI_YAHOO 10101
-#define IDI_INBOX 10102
-#define IDI_PROFILE 10103
-#define IDI_REFRESH 10104
-#define IDI_YAB 10105
-#define IDI_SET_STATUS 10106
-#define IDI_CALENDAR 10107
-
-/*
- * Options
- */
-#define IDD_OPT_YAHOO 185
-#define IDD_YAHOOACCOUNT 190
-
-#define IDD_SETCUSTSTAT 186
-#define IDD_OPT_YAHOO_POPUP 187
-#define IDD_CHATROOM_INVITE 188
-#define IDD_CHATROOM_INVITE_REQ 189
-
-#define IDC_CUSTSTATBUSY 1000
-#define IDC_CUSTSTAT 1001
-#define IDC_STYAHOOGROUP 1002
-#define IDC_EDIT1 1003
-#define IDC_STIGNGROUP 1004
-#define IDC_USEWINCOLORS 1008
-#define IDC_YCHECKMAIL 1011
-#define IDC_YTNOTIF 1012
-#define IDC_PASSWORD 1020
-#define IDC_NICK 1021
-#define IDC_HANDLE 1022
-#define IDC_BGCOLOUR 1026
-#define IDC_TEXTCOLOUR 1028
-#define IDC_PREVIEW 1030
-#define IDC_DEBUG 1050
-#define IDC_POPUP_TIMEOUT 1051
-#define IDC_LOGINSERVER 1171
-#define IDC_YAHOOPORT 1174
-#define IDC_DISABLEYAHOOMAIL 1301
-#define IDC_NEWYAHOOACCOUNTLINK 1438
-#define IDC_RESETSERVER 1472
-#define IDC_DISABLE_UTF8 1476
-#define IDC_USE_YAB 1477
-#define IDC_SHOW_ERRORS 1478
-#define IDC_SHOW_AVATARS 1479
-#define IDC_MAIL_AUTOLOGIN 1480
-#define IDC_MSG 1482
-#define IDC_ROOMNAME 1483
-#define IDC_CCLIST 1484
-#define IDC_EDITSCR 1485
-#define IDC_ADDSCR 1486
-#define IDC_SCREENNAME 1487
-#define IDC_MSG2 1488
-
-/*
- * Ignore Options
- */
-#define IDD_OPT_YAHOO_IGNORE 201
-#define IDC_YIGN_EDIT 202
-#define IDC_YIGN_LIST 203
-#define IDC_IGN_ADD 204
-#define IDC_IGN_REMOVE 205
-#define IDC_OPT_IGN_UNKNOWN 206
-#define IDC_OPT_IGN_LIST 207
-
-#define IDD_OPT_YAHOO_CONNECTION 301
-
-/*
- * These are needed for Advanced Search
- */
-#define IDD_SEARCHUSER 400
-#define IDC_SEARCH_ID 401
-#define IDC_SEARCH_PROTOCOL 402
-
-/*
- *
- */
-#define IDD_USER_INFO 500
-#define IDC_NFO_CLIENT 501
diff --git a/tools/_deprecated/Yahoo/src/search.cpp b/tools/_deprecated/Yahoo/src/search.cpp deleted file mode 100644 index 8a7fa143a8..0000000000 --- a/tools/_deprecated/Yahoo/src/search.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/*
- * $Id: search.cpp 11632 2010-04-24 12:32:03Z borkra $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-#include <m_protosvc.h>
-#include <m_langpack.h>
-
-#include "resource.h"
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SearchBasic - searches the contact by UIN
-
-void __cdecl CYahooProto::search_simplethread(void *snsearch)
-{
- wchar_t *id = (wchar_t *)snsearch;
-
- if (mir_wstrlen(id) < 4) {
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- MessageBoxA(NULL, "Please enter a valid ID to search for.", "Search", MB_OK);
- return;
- }
-
- wchar_t *c = wcschr(id, '@');
- if (c) *c = 0;
-
- YAHOO_SEARCH_RESULT psr;
- memset(&psr, 0, sizeof(psr));
- psr.cbSize = sizeof(psr);
- psr.flags = PSR_UNICODE;
- psr.id.w = (wchar_t*)wcslwr(id);
- psr.protocol = YAHOO_IM_YAHOO;
-
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)& psr);
-
- //yahoo_search(m_id, YAHOO_SEARCH_YID, m, YAHOO_GENDER_NONE, YAHOO_AGERANGE_NONE, 0, 1);
-
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-}
-
-HANDLE __cdecl CYahooProto::SearchBasic(const wchar_t* nick)
-{
- LOG(("[YahooBasicSearch] Searching for: %S", nick));
-
- if (!m_bLoggedIn)
- return 0;
-
- ForkThread(&CYahooProto::search_simplethread, wcsdup(nick));
- return (HANDLE)1;
-}
-
-////////////////////////////////////////////////////////////////////////////////////////
-// SearchAdvanced - searches the contact by UIN
-
-void CYahooProto::ext_got_search_result(int found, int start, int total, YList *contacts)
-{
- yahoo_found_contact *yct = NULL;
- int i = start;
- YList *en = contacts;
-
- LOG(("got search result: "));
-
- LOG(("Found: %d", found));
- LOG(("Start: %d", start));
- LOG(("Total: %d", total));
-
- YAHOO_SEARCH_RESULT psr;
- memset(&psr, 0, sizeof(psr));
- psr.cbSize = sizeof(psr);
- psr.flags = PSR_UTF8;
- psr.protocol = YAHOO_IM_YAHOO;
-
- while (en) {
- yct = (yahoo_found_contact*)en->data;
- if (yct == NULL) {
- LOG(("[%d] Empty record?", i++));
- }
- else {
- LOG(("[%d] id: '%s', online: %d, age: %d, sex: '%s', location: '%s'", i++, yct->id, yct->online, yct->age, yct->gender, yct->location));
- psr.id.a = yct->id;
-
- if (yct->gender[0] != 5) {
- psr.firstName.a = yct->gender;
- psr.email.a = yct->location;
- }
- else psr.firstName.a = psr.email.a = NULL;
-
- char c[10];
- if (yct->age > 0) {
- _itoa(yct->age, c, 10);
- psr.lastName.a = c;
- }
- else psr.lastName.a = NULL;
-
- // void yahoo_search(int id, enum yahoo_search_type t, const char *text, enum yahoo_search_gender g, enum yahoo_search_agerange ar,
- // int photo, int yahoo_only)
-
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)& psr);
- }
- en = y_list_next(en);
- }
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-}
-
-/*
- * This service function creates an advanced search dialog in Find/Add contacts Custom area.
- *
- * Returns: 0 on failure or HWND on success
- */
-
-static INT_PTR CALLBACK YahooSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM)
-{
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Yahoo! Messenger");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Lotus Sametime");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"LCS");
- SendDlgItemMessageA(hwndDlg, IDC_SEARCH_PROTOCOL, CB_ADDSTRING, 0, (LPARAM)"Windows Live (MSN)");
-
- // select the first one
- SendDlgItemMessage(hwndDlg, IDC_SEARCH_PROTOCOL, CB_SETCURSEL, 0, 0);
- return TRUE;
-
- case WM_COMMAND:
- if (LOWORD(wParam) == IDC_SEARCH_ID && HIWORD(wParam) == EN_CHANGE) {
- PostMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)hwndDlg);
- return TRUE;
- }
- if (LOWORD(wParam) == IDC_SEARCH_PROTOCOL && HIWORD(wParam) == CBN_SELCHANGE) {
- PostMessage(GetParent(hwndDlg), WM_COMMAND, MAKEWPARAM(0, EN_SETFOCUS), (LPARAM)hwndDlg);
- return TRUE;
- }
- break;
- }
- return FALSE;
-}
-
-HWND __cdecl CYahooProto::CreateExtendedSearchUI(HWND parent)
-{
- if (parent && hInstance)
- return CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, YahooSearchAdvancedDlgProc, (LPARAM)this);
-
- return 0;
-}
-
-void __cdecl CYahooProto::searchadv_thread(void *pHWND)
-{
- HWND hwndDlg = (HWND)pHWND;
-
- wchar_t searchid[128];
- GetDlgItemText(hwndDlg, IDC_SEARCH_ID, searchid, _countof(searchid));
-
- if (mir_wstrlen(searchid) == 0) {
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
- MessageBoxA(NULL, "Please enter a valid ID to search for.", "Search", MB_OK);
- return;
- }
-
- YAHOO_SEARCH_RESULT psr;
- memset(&psr, 0, sizeof(psr));
- psr.cbSize = sizeof(psr);
- psr.flags = PSR_UNICODE;
- psr.id.w = wcslwr(searchid);
-
- switch (SendDlgItemMessage(hwndDlg, IDC_SEARCH_PROTOCOL, CB_GETCURSEL, 0, 0)) {
- case 0: psr.firstName.w = L"<Yahoo>"; psr.protocol = YAHOO_IM_YAHOO; break;
- case 1: psr.firstName.w = L"<Lotus Sametime>"; psr.protocol = YAHOO_IM_SAMETIME; break;
- case 2: psr.firstName.w = L"<LCS>"; psr.protocol = YAHOO_IM_LCS; break;
- case 3: psr.firstName.w = L"<Windows Live (MSN)>"; psr.protocol = YAHOO_IM_MSN; break;
- }
-
- /*
- * Show this in results
- */
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)1, (LPARAM)& psr);
-
- /*
- * Done searching.
- */
- ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)1, 0);
-}
-
-/*
- * This service function does the advanced search
- *
- * Returns: 0 on failure or HWND on success
- */
-
-HWND __cdecl CYahooProto::SearchAdvanced(HWND owner)
-{
- LOG(("[YahooAdvancedSearch]"));
-
- if (!m_bLoggedIn)
- return 0;
-
- ForkThread(&CYahooProto::searchadv_thread, owner);
- return (HWND)1;
-}
diff --git a/tools/_deprecated/Yahoo/src/search.h b/tools/_deprecated/Yahoo/src/search.h deleted file mode 100644 index 38a76b39ef..0000000000 --- a/tools/_deprecated/Yahoo/src/search.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * $Id: search.h 8430 2008-10-15 16:49:25Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_SEARCH_H_
-#define _YAHOO_SEARCH_H_
-
-int YahooBasicSearch(WPARAM wParam,LPARAM lParam);
-void ext_yahoo_got_search_result(int id, int found, int start, int total, YList *contacts);
-
-/*
- * Adding Advanced Search to Miranda
- */
-int YahooCreateAdvancedSearchUI(WPARAM wParam, LPARAM lParam);
-int YahooAdvancedSearch(WPARAM wParam, LPARAM lParam);
-#endif
diff --git a/tools/_deprecated/Yahoo/src/server.cpp b/tools/_deprecated/Yahoo/src/server.cpp deleted file mode 100644 index 6fbf79f545..0000000000 --- a/tools/_deprecated/Yahoo/src/server.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/*
- * $Id: server.cpp 9810 2009-05-19 01:43:22Z gena01 $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include "stdafx.h"
-#include <time.h>
-
-int PASCAL send(SOCKET s, const char FAR *buf, int len, int)
-{
- int rlen = Netlib_Send((HANDLE)s, buf, len, 0);
-
-#ifdef HTTP_GATEWAY
- if (iHTTPGateway)
- lLastSend = time(NULL);
-#endif
-
- if (rlen == SOCKET_ERROR) {
- LOG(("SEND Error."));
- return -1;
- }
-
- return len;
-}
-
-int PASCAL recv(SOCKET s, char FAR *buf, int len, int)
-{
- int RecvResult = Netlib_Recv((HANDLE)s, buf, len, (len == 1) ? MSG_NODUMP : 0);
-
- if (RecvResult == 0) {
- LOG(("[recv] Connection closed gracefully."));
- return 0;
- }
- if (RecvResult == SOCKET_ERROR) {
- LOG(("[recv] Connection abortively closed"));
- return -1;
- }
-
- return RecvResult;
-}
-
-void __cdecl CYahooProto::server_main(void *empty)
-{
- enum yahoo_status status = (enum yahoo_status) (int)empty;
- time_t lLastPing, lLastKeepAlive, t;
- YList *l;
- NETLIBSELECTEX nls = { 0 };
- int recvResult, ridx = 0, widx = 0, i;
-
- debugLogA("Server Thread Starting status: %d", status);
-
- do_yahoo_debug = YAHOO_LOG_DEBUG;
- yahoo_set_log_level((yahoo_log_level)do_yahoo_debug);
-
- poll_loop = 1; /* set this so we start looping */
-
- ext_login(status);
-
- lLastKeepAlive = lLastPing = time(NULL);
-
- while (poll_loop) {
- nls.cbSize = sizeof(nls);
- nls.dwTimeout = 1000; // 1000 millis = 1 sec
-
- FD_ZERO(&nls.hReadStatus);
- FD_ZERO(&nls.hWriteStatus);
- FD_ZERO(&nls.hExceptStatus);
- nls.hExceptConns[0] = NULL;
- ridx = 0; widx = 0;
-
- for (l = m_connections; l;) {
- _conn *c = (_conn *)l->data;
- //LOG(("Connection tag:%d id:%d fd:%d remove:%d", c->tag, c->id, c->fd, c->remove));
- if (c->remove) {
- YList *n = y_list_next(l);
- //LOG(("Removing id:%d fd:%d tag:%d", c->id, c->fd, c->tag));
- m_connections = y_list_remove_link(m_connections, l);
- y_list_free_1(l);
- FREE(c);
- l = n;
- }
- else {
- if (c->cond & YAHOO_INPUT_READ) {
- //LOG(("[YAHOO_INPUT_READ] Waiting on read. Tag: %d fd: %d", c->tag, c->fd ));
- nls.hReadConns[ridx++] = (HANDLE)c->fd;
- }
-
- if (c->cond & YAHOO_INPUT_WRITE) {
- //LOG(("[YAHOO_INPUT_WRITE] Waiting on write. Tag: %d fd: %d", c->tag, c->fd ));
- nls.hWriteConns[widx++] = (HANDLE)c->fd;
- }
-
- l = y_list_next(l);
- }
- }
-
- //debugLogA("[Yahoo_Server] ridx:%d widx:%d", ridx, widx);
-
- nls.hReadConns[ridx] = NULL;
- nls.hWriteConns[widx] = NULL;
-
- if (m_connections == NULL) {
- debugLogA("Last connection closed.");
- break;
- }
- recvResult = CallService(MS_NETLIB_SELECTEX, 0, (LPARAM)&nls);
-
- /* do the timer check */
- if (m_id > 0) {
-#ifdef HTTP_GATEWAY
- //debugLogA("HTTPGateway: %d", iHTTPGateway);
- if (!iHTTPGateway) {
-#endif
- t = time(NULL);
-
- if (m_bLoggedIn && t - lLastKeepAlive >= 60) {
- LOG(("[TIMER] Sending a keep alive message"));
- yahoo_keepalive(m_id);
-
- lLastKeepAlive = t;
- }
-
- if (m_bLoggedIn && t - lLastPing >= 3600) {
- LOG(("[TIMER] Sending ping"));
- yahoo_send_ping(m_id);
-
- lLastPing = t;
- }
-
-#ifdef HTTP_GATEWAY
- } else {
- debugLogA("[SERVER] Got packets: %d", ylad->rpkts);
-
- if ( m_bLoggedIn && ( (ylad->rpkts > 0 && (time(NULL) - lLastSend) >=3) ||
- ( (time(NULL) - lLastSend) >= 13)) ) {
-
- LOG(("[TIMER] Sending an idle message..."));
- yahoo_send_idle_packet(m_id);
- }
-
- //
- // need to sleep, cause netlibselectex is too fast?
- //
- SleepEx(500, TRUE);
- }
-#endif
- }
- /* do the timer check ends */
-
- for (l = m_connections; l; l = y_list_next(l)) {
- _conn *c = (_conn *)l->data;
-
- if (c->remove)
- continue;
-
- /* are we waiting for a Read request? */
- if (c->cond & YAHOO_INPUT_READ) {
-
- for (i = 0; i < ridx; i++) {
- if ((HANDLE)c->fd == nls.hReadConns[i]) {
- if (nls.hReadStatus[i]) {
- //LOG(("[YAHOO_INPUT_READ] Read Ready. Tag: %d fd: %d", c->tag, c->fd ));
- yahoo_callback(c, YAHOO_INPUT_READ);
- }
- }//if c->fd=
- }//for i = 0
-
- }
-
- /* are we waiting for a Write request? */
- if (c->cond & YAHOO_INPUT_WRITE) {
-
- for (i = 0; i < widx; i++) {
- if ((HANDLE)c->fd == nls.hWriteConns[i]) {
- if (nls.hWriteStatus[i]) {
- //LOG(("[YAHOO_INPUT_WRITE] Write ready. Tag: %d fd: %d", c->tag, c->fd ));
- yahoo_callback(c, YAHOO_INPUT_WRITE);
- }
- } // if c->fd == nls
- }// for i = 0
- }
-
- }// for l=connections
-
- /* Check for Miranda Exit Status */
- if (Miranda_Terminated()) {
- debugLogA("Miranda Exiting... stopping the loop.");
- break;
- }
- }
- debugLogA("Exited loop");
-
- /* cleanup the data stuff and close our connection handles */
- while (m_connections) {
- YList *tmp = m_connections;
- _conn * c = (_conn *)m_connections->data;
- Netlib_CloseHandle((HANDLE)c->fd);
- FREE(c);
- m_connections = y_list_remove_link(m_connections, m_connections);
- y_list_free_1(tmp);
- }
-
- yahoo_close(m_id);
-
- m_bLoggedIn = FALSE;
-
- m_status = YAHOO_STATUS_OFFLINE;
- m_id = 0;
-
- /* now set ourselves to offline */
- BroadcastStatus(ID_STATUS_OFFLINE);
- logoff_buddies();
-
- debugLogA("Server thread ending");
-}
diff --git a/tools/_deprecated/Yahoo/src/services.cpp b/tools/_deprecated/Yahoo/src/services.cpp deleted file mode 100644 index 9140118921..0000000000 --- a/tools/_deprecated/Yahoo/src/services.cpp +++ /dev/null @@ -1,482 +0,0 @@ -/*
- * $Id: services.cpp 14142 2012-03-09 21:11:27Z george.hazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-
-#include <m_protosvc.h>
-#include <m_langpack.h>
-#include <m_skin.h>
-#include <m_utils.h>
-#include <m_options.h>
-#include <m_popup.h>
-#include <m_nudge.h>
-
-#include "avatar.h"
-#include "resource.h"
-#include "file_transfer.h"
-#include "im.h"
-#include "search.h"
-
-void CYahooProto::logoff_buddies()
-{
- //set all contacts to 'offline'
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- setWord(hContact, "Status", ID_STATUS_OFFLINE);
- setDword(hContact, "IdleTS", 0);
- setDword(hContact, "PictLastCheck", 0);
- setDword(hContact, "PictLoading", 0);
- db_unset(hContact, "CList", "StatusMsg");
- delSetting(hContact, "YMsg");
- delSetting(hContact, "YGMsg");
- }
-}
-
-//=======================================================
-//Broadcast the user status
-//=======================================================
-void CYahooProto::BroadcastStatus(int s)
-{
- int oldStatus = m_iStatus;
- if (oldStatus == s)
- return;
-
- //m_iStatus = s;
- switch (s) {
- case ID_STATUS_OFFLINE:
- case ID_STATUS_CONNECTING:
- case ID_STATUS_ONLINE:
- case ID_STATUS_AWAY:
- case ID_STATUS_NA:
- case ID_STATUS_OCCUPIED:
- case ID_STATUS_ONTHEPHONE:
- case ID_STATUS_OUTTOLUNCH:
- case ID_STATUS_INVISIBLE:
- m_iStatus = s;
- break;
- case ID_STATUS_DND:
- m_iStatus = ID_STATUS_OCCUPIED;
- break;
- default:
- m_iStatus = ID_STATUS_ONLINE;
- }
-
- debugLogA("[yahoo_util_broadcaststatus] Old Status: %S (%d), New Status: %S (%d)",
- pcli->pfnGetStatusModeDescription(oldStatus, 0), oldStatus,
- pcli->pfnGetStatusModeDescription(m_iStatus, 0), m_iStatus);
- ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, (LPARAM)m_iStatus);
-}
-
-//=======================================================
-//Contact deletion event
-//=======================================================
-int __cdecl CYahooProto::OnContactDeleted(WPARAM hContact, LPARAM)
-{
- debugLogA("[YahooContactDeleted]");
-
- if (!m_bLoggedIn) {//should never happen for Yahoo contacts
- debugLogA("[YahooContactDeleted] We are not Logged On!!!");
- return 0;
- }
-
- // he is not a permanent contact!
- if (db_get_b(hContact, "CList", "NotOnList") != 0) {
- debugLogA("[YahooContactDeleted] Not a permanent buddy!!!");
- return 0;
- }
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- debugLogA("[YahooContactDeleted] Removing %s", dbv.pszVal);
- remove_buddy(dbv.pszVal, getWord(hContact, "yprotoid", 0));
-
- db_free(&dbv);
- }
- else debugLogA("[YahooContactDeleted] Can't retrieve contact Yahoo ID");
-
- return 0;
-}
-
-//=======================================================
-//Custom status message windows handling
-//=======================================================
-static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- DBVARIANT dbv;
-
- switch (msg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
- {
- CYahooProto* ppro = (CYahooProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
-
- Window_SetIcon_IcoLib(hwndDlg, GetIconHandle(IDI_YAHOO));
-
- if (!ppro->getString(YAHOO_CUSTSTATDB, &dbv)) {
- SetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, dbv.pszVal);
-
- EnableWindow(GetDlgItem(hwndDlg, IDOK), mir_strlen(dbv.pszVal) > 0);
- db_free(&dbv);
- }
- else {
- SetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, "");
- EnableWindow(GetDlgItem(hwndDlg, IDOK), FALSE);
- }
-
- CheckDlgButton(hwndDlg, IDC_CUSTSTATBUSY, ppro->getByte("BusyCustStat", 0) ? BST_CHECKED : BST_UNCHECKED);
- }
- return TRUE;
-
- case WM_COMMAND:
- switch (wParam) {
- case IDOK:
- {
- char str[255 + 1];
- CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- /* Get String from dialog */
- GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, _countof(str));
-
- /* Save it for later use */
- ppro->setString(YAHOO_CUSTSTATDB, str);
- ppro->setByte("BusyCustStat", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CUSTSTATBUSY));
-
- /* set for Idle/AA */
- if (ppro->m_startMsg) mir_free(ppro->m_startMsg);
- ppro->m_startMsg = mir_strdup(str);
-
- /* notify Server about status change */
- ppro->set_status(YAHOO_CUSTOM_STATUS, str, (BYTE)IsDlgButtonChecked(hwndDlg, IDC_CUSTSTATBUSY));
-
- /* change local/miranda status */
- ppro->BroadcastStatus((BYTE)IsDlgButtonChecked(hwndDlg, IDC_CUSTSTATBUSY) ? ID_STATUS_AWAY : ID_STATUS_ONLINE);
- }
- case IDCANCEL:
- DestroyWindow(hwndDlg);
- break;
- }
-
- if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
- if (LOWORD(wParam) == IDC_CUSTSTAT) {
- char str[255 + 1];
-
- BOOL toSet;
-
- toSet = GetDlgItemTextA(hwndDlg, IDC_CUSTSTAT, str, _countof(str)) != 0;
-
- EnableWindow(GetDlgItem(hwndDlg, IDOK), toSet);
- }
- }
- break; /* case WM_COMMAND */
-
- case WM_CLOSE:
- DestroyWindow(hwndDlg);
- break;
-
- case WM_DESTROY:
- Window_FreeIcon_IcoLib(hwndDlg);
- break;
- }
- return FALSE;
-}
-
-INT_PTR __cdecl CYahooProto::SetCustomStatCommand(WPARAM, LPARAM)
-{
- if (!m_bLoggedIn) {
- ShowNotification(TranslateT("Yahoo Error"), TranslateT("You need to be connected to set the custom message"), NIIF_ERROR);
- return 0;
- }
-
- HWND hwndSetCustomStatus = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_SETCUSTSTAT), NULL, DlgProcSetCustStat, (LPARAM)this);
- SetForegroundWindow(hwndSetCustomStatus);
- SetFocus(hwndSetCustomStatus);
- ShowWindow(hwndSetCustomStatus, SW_SHOW);
- return 0;
-}
-
-//=======================================================
-//Open URL
-//=======================================================
-void CYahooProto::OpenURL(const char *url, int autoLogin)
-{
- char tUrl[4096];
-
- debugLogA("[YahooOpenURL] url: %s Auto Login: %d", url, autoLogin);
-
- if (autoLogin && getByte("MailAutoLogin", 0) && m_bLoggedIn && m_id > 0) {
- char *y, *t, *u;
-
- y = yahoo_urlencode(yahoo_get_cookie(m_id, "y"));
- t = yahoo_urlencode(yahoo_get_cookie(m_id, "t"));
- u = yahoo_urlencode(url);
- mir_snprintf(tUrl,
- "http://msg.edit.yahoo.com/config/reset_cookies?&.y=Y=%s&.w=T=%s&.ver=2&.done=http%%3a//us.rd.yahoo.com/messenger/client/%%3f%s",
- y, t, u);
-
- FREE(y);
- FREE(t);
- FREE(u);
- }
- else {
- mir_snprintf(tUrl, url);
- }
-
- debugLogA("[YahooOpenURL] url: %s Final URL: %s", url, tUrl);
- Utils_OpenUrl(tUrl);
-}
-
-//=======================================================
-// Show buddy profile
-//=======================================================
-INT_PTR __cdecl CYahooProto::OnShowProfileCommand(WPARAM wParam, LPARAM)
-{
- char tUrl[4096];
- DBVARIANT dbv;
-
- /**
- * We don't show profile for users using other IM clients through the IM server bridge
- */
- if (getWord(wParam, "yprotoid", 0) != 0) {
- return 0;
- }
-
- if (getString(wParam, YAHOO_LOGINID, &dbv))
- return 0;
-
- mir_snprintf(tUrl, "http://profiles.yahoo.com/%s", dbv.pszVal);
- db_free(&dbv);
-
- OpenURL(tUrl, 0);
- return 0;
-}
-
-INT_PTR __cdecl CYahooProto::OnEditMyProfile(WPARAM, LPARAM)
-{
- OpenURL("http://edit.yahoo.com/config/eval_profile", 1);
- return 0;
-}
-
-//=======================================================
-//Show My profile
-//=======================================================
-INT_PTR __cdecl CYahooProto::OnShowMyProfileCommand(WPARAM, LPARAM)
-{
- DBVARIANT dbv;
-
- if (getString(YAHOO_LOGINID, &dbv) != 0) {
- ShowError(TranslateT("Yahoo Error"), TranslateT("Please enter your Yahoo ID in Options -> Network -> Yahoo"));
- return 0;
- }
-
- char tUrl[4096];
- mir_snprintf(tUrl, "http://profiles.yahoo.com/%s", dbv.pszVal);
- db_free(&dbv);
-
- OpenURL(tUrl, 0);
- return 0;
-}
-
-//=======================================================
-//Show Goto mailbox
-//=======================================================
-INT_PTR __cdecl CYahooProto::OnGotoMailboxCommand(WPARAM, LPARAM)
-{
- OpenURL("http://mail.yahoo.com/", 1);
- return 0;
-}
-
-INT_PTR __cdecl CYahooProto::OnABCommand(WPARAM, LPARAM)
-{
- OpenURL("http://address.yahoo.com/yab/", 1);
- return 0;
-}
-
-INT_PTR __cdecl CYahooProto::OnCalendarCommand(WPARAM, LPARAM)
-{
- OpenURL("http://calendar.yahoo.com/", 1);
- return 0;
-}
-
-//=======================================================
-//Refresh Yahoo
-//=======================================================
-INT_PTR __cdecl CYahooProto::OnRefreshCommand(WPARAM, LPARAM)
-{
- if (!m_bLoggedIn) {
- ShowNotification(TranslateT("Yahoo Error"), TranslateT("You need to be connected to refresh your buddy list"), NIIF_ERROR);
- return 0;
- }
-
- yahoo_refresh(m_id);
- return 0;
-}
-
-int __cdecl CYahooProto::OnIdleEvent(WPARAM, LPARAM lParam)
-{
- BOOL bIdle = (lParam & IDF_ISIDLE);
-
- debugLogA("[YAHOO_IDLE_EVENT] Idle: %s", bIdle ? "Yes" : "No");
-
- if (lParam & IDF_PRIVACY)
- return 0; /* we support Privacy settings */
-
- if (m_bLoggedIn) {
- /* set me to idle or back */
- if (m_iStatus == ID_STATUS_INVISIBLE)
- debugLogA("[YAHOO_IDLE_EVENT] WARNING: INVISIBLE! Don't change my status!");
- else
- set_status(m_iStatus, m_startMsg, (bIdle) ? 2 : (m_iStatus == ID_STATUS_ONLINE) ? 0 : 1);
- }
- else {
- debugLogA("[YAHOO_IDLE_EVENT] WARNING: NOT LOGGED IN???");
- }
-
- return 0;
-}
-
-INT_PTR __cdecl CYahooProto::GetUnreadEmailCount(WPARAM, LPARAM)
-{
- return m_bLoggedIn ? m_unreadMessages : 0;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-void CYahooProto::MenuMainInit(void)
-{
- CMenuItem mi;
- mi.flags = 0;
- mi.root = Menu_GetProtocolRoot(this);
-
- // Show custom status menu
- mi.pszService = YAHOO_SET_CUST_STAT;
- CreateProtoService(mi.pszService, &CYahooProto::SetCustomStatCommand);
- mi.position = 290000;
- mi.hIcolibItem = GetIconHandle(IDI_SET_STATUS);
- mi.name.a = LPGEN("Set &Custom Status");
- menuItemsAll[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Edit My profile
- mi.pszService = YAHOO_EDIT_MY_PROFILE;
- CreateProtoService(mi.pszService, &CYahooProto::OnEditMyProfile);
- mi.position = 290005;
- mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
- mi.name.a = LPGEN("&Edit My Profile");
- menuItemsAll[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Show My profile
- mi.pszService = YAHOO_SHOW_MY_PROFILE;
- CreateProtoService(mi.pszService, &CYahooProto::OnShowMyProfileCommand);
- mi.position = 290006;
- mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
- mi.name.a = LPGEN("&My Profile");
- menuItemsAll[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Show Yahoo mail
- mi.pszService = YAHOO_YAHOO_MAIL;
- CreateProtoService(mi.pszService, &CYahooProto::OnGotoMailboxCommand);
- mi.position = 290010;
- mi.hIcolibItem = GetIconHandle(IDI_INBOX);
- mi.name.a = LPGEN("&Yahoo Mail");
- menuItemsAll[3] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Show Address Book
- mi.pszService = YAHOO_AB;
- CreateProtoService(mi.pszService, &CYahooProto::OnABCommand);
- mi.position = 290015;
- mi.hIcolibItem = GetIconHandle(IDI_YAB);
- mi.name.a = LPGEN("&Address Book");
- menuItemsAll[4] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Show Calendar
- mi.pszService = YAHOO_CALENDAR;
- CreateProtoService(mi.pszService, &CYahooProto::OnCalendarCommand);
- mi.position = 290017;
- mi.hIcolibItem = GetIconHandle(IDI_CALENDAR);
- mi.name.a = LPGEN("&Calendar");
- menuItemsAll[5] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-
- // Join chatroom
- mi.pszService = "/JoinChatRoom";
- CreateProtoService(mi.pszService, &CYahooProto::CreateConference);
- mi.position = 290018;
- mi.hIcolibItem = GetIconHandle(IDI_YAHOO);
- mi.name.a = LPGEN("Create Conference");
- menuItemsAll[6] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
-}
-
-void CYahooProto::MenuContactInit(void)
-{
- // Show Profile
- CreateProtoService(YAHOO_SHOW_PROFILE, &CYahooProto::OnShowProfileCommand);
-
- CMenuItem mi;
- SET_UID(mi, 0x4f006492, 0x9fe5, 0x4d10, 0x88, 0xce, 0x47, 0x53, 0xba, 0x27, 0xe9, 0xc9);
- mi.pszService = YAHOO_SHOW_PROFILE;
- mi.position = -2000006000;
- mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
- mi.name.a = LPGEN("&Show Profile");
- hShowProfileMenuItem = Menu_AddContactMenuItem(&mi, m_szModuleName);
-}
-
-void CYahooProto::MenuUninit(void)
-{
- Menu_RemoveItem(hShowProfileMenuItem);
-}
-
-int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM)
-{
- if (!IsMyContact(hContact)) {
- debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!");
- return 0;
- }
-
- Menu_ShowItem(hShowProfileMenuItem, getWord(hContact, "yprotoid", 0) == 0);
- return 0;
-}
-
-
-//=======================================================================================
-// Load the yahoo service/plugin
-//=======================================================================================
-void CYahooProto::LoadYahooServices(void)
-{
- //----| Events hooking |--------------------------------------------------------------
- HookProtoEvent(ME_OPT_INITIALISE, &CYahooProto::OnOptionsInit);
-
- //----| Create nudge event |----------------------------------------------------------
- hYahooNudge = CreateProtoEvent(PE_NUDGE);
-
- //----| Service creation |------------------------------------------------------------
- CreateProtoService(PS_CREATEACCMGRUI, &CYahooProto::SvcCreateAccMgrUI);
-
- CreateProtoService(PS_GETAVATARINFO, &CYahooProto::GetAvatarInfo);
- CreateProtoService(PS_GETMYAVATAR, &CYahooProto::GetMyAvatar);
- CreateProtoService(PS_SETMYAVATAR, &CYahooProto::SetMyAvatar);
- CreateProtoService(PS_GETAVATARCAPS, &CYahooProto::GetAvatarCaps);
-
- CreateProtoService(PS_GETMYAWAYMSG, &CYahooProto::GetMyAwayMsg);
- CreateProtoService(PS_SEND_NUDGE, &CYahooProto::SendNudge);
-
- CreateProtoService(PS_GETUNREADEMAILCOUNT, &CYahooProto::GetUnreadEmailCount);
-
- //----| Set resident variables |------------------------------------------------------
-
- db_set_resident(m_szModuleName, "Mobile");
- db_set_resident(m_szModuleName, "IdleTS");
- db_set_resident(m_szModuleName, "PictLastCheck");
- db_set_resident(m_szModuleName, "PictLoading");
-
- db_set_resident(m_szModuleName, "YAway");
- db_set_resident(m_szModuleName, "YGMsg");
- db_set_resident(m_szModuleName, "YStatus");
-}
diff --git a/tools/_deprecated/Yahoo/src/stdafx.cxx b/tools/_deprecated/Yahoo/src/stdafx.cxx deleted file mode 100644 index 0765fbaa6f..0000000000 --- a/tools/_deprecated/Yahoo/src/stdafx.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/*
-Copyright (C) 2012-16 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 <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
\ No newline at end of file diff --git a/tools/_deprecated/Yahoo/src/stdafx.h b/tools/_deprecated/Yahoo/src/stdafx.h deleted file mode 100644 index 381af7ee77..0000000000 --- a/tools/_deprecated/Yahoo/src/stdafx.h +++ /dev/null @@ -1,142 +0,0 @@ -/*
- * $Id: yahoo.h 14085 2012-02-13 10:55:56Z george.hazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#ifndef _YAHOO_YAHOO_H_
-#define _YAHOO_YAHOO_H_
-
-#pragma warning(disable:4302 4311 4312)
-
-#include <windows.h>
-#include <shlwapi.h>
-
-#include <malloc.h>
-#include <sys/stat.h>
-#include <io.h>
-#include <time.h>
-
-/*
- * Yahoo Services
- */
-#define USE_STRUCT_CALLBACKS
-
-#include "libyahoo2/yahoo2.h"
-#include "libyahoo2/yahoo2_callbacks.h"
-#include "libyahoo2/yahoo_util.h"
-
-#include <newpluginapi.h>
-#include <m_system.h>
-
-#include <m_system_cpp.h>
-#include <m_database.h>
-#include <m_netlib.h>
-#include <m_idle.h>
-#include <m_icolib.h>
-#include <m_clist.h>
-#include <m_protosvc.h>
-#include <m_protoint.h>
-#include <m_langpack.h>
-#include <win2k.h>
-
-//=======================================================
-// Definitions
-//=======================================================
-// Build is a cvs build
-//
-// If defined, the build will add cvs info to the plugin info
-#define YAHOO_CVSBUILD
-
-#define YAHOO_LOGINSERVER "LoginServer"
-#define YAHOO_LOGINPORT "LoginPort"
-#define YAHOO_LOGINID "yahoo_id"
-#define YAHOO_PASSWORD "Password"
-#define YAHOO_PWTOKEN "PWToken"
-#define YAHOO_CHECKMAIL "CheckMail"
-#define YAHOO_CUSTSTATDB "CustomStat"
-#define YAHOO_DEFAULT_PORT 5050
-#define YAHOO_DEFAULT_LOGIN_SERVER "mcs.msg.yahoo.com"
-#define YAHOO_CUSTOM_STATUS 99
-
-extern int do_yahoo_debug;
-
-#define LOG(x) if (do_yahoo_debug) { debugLogA("%s:%d: ", __FILE__, __LINE__); \
- debugLogA x; \
- debugLogA(" ");}
-
-#define YAHOO_SET_CUST_STAT "/SetCustomStatCommand"
-#define YAHOO_EDIT_MY_PROFILE "/YahooEditMyProfileCommand"
-#define YAHOO_SHOW_PROFILE "/YahooShowProfileCommand"
-#define YAHOO_SHOW_MY_PROFILE "/YahooShowMyProfileCommand"
-#define YAHOO_YAHOO_MAIL "/YahooGotoMailboxCommand"
-#define YAHOO_REFRESH "/YahooRefreshCommand"
-#define YAHOO_AB "/YahooAddressBook"
-#define YAHOO_CALENDAR "/YahooCalendar"
-
-#define STYLE_DEFAULTBGCOLOUR RGB(173,206,247)
-
-struct _conn {
- unsigned int tag;
- int id;
- INT_PTR fd;
- yahoo_input_condition cond;
- void *data;
- int remove;
-};
-
-#include "proto.h"
-
-//=======================================================
-// Defines
-//=======================================================
-extern HINSTANCE hInstance;
-
-#ifdef HTTP_GATEWAY
-extern int iHTTPGateway;
-#endif
-
-struct YAHOO_SEARCH_RESULT : public PROTOSEARCHRESULT
-{
- yahoo_im_protocols protocol;
-};
-
-#define YAHOO_hasnotification() ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)
-
-int YAHOO_util_dbsettingchanged(WPARAM wParam, LPARAM lParam);
-
-// icolib.cpp
-void IconsInit(void);
-HICON LoadIconEx(const char* name, bool big = false);
-HANDLE GetIconHandle(int iconId);
-void ReleaseIconEx(const char* name, bool big = false);
-
-// Services.c
-int SetStatus(WPARAM wParam,LPARAM lParam);
-int GetStatus(WPARAM wParam,LPARAM lParam);
-
-yahoo_status miranda_to_yahoo(int myyahooStatus);
-
-void register_callbacks();
-
-#ifdef __GNUC__
- int debugLogA( const char *fmt, ... ) __attribute__ ((format (printf, 1, 2)));
-#else
- int debugLogA( const char *fmt, ... );
-#endif
-
-void SetButtonCheck(HWND hwndDlg, int CtrlID, BOOL bCheck);
-
-char * yahoo_status_code(enum yahoo_status s);
-void yahoo_callback(struct _conn *c, yahoo_input_condition cond);
-
-CYahooProto* __fastcall getProtoById( int id );
-#define GETPROTOBYID(A) CYahooProto* ppro = getProtoById(A); if ( ppro ) ppro
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/user_info.cpp b/tools/_deprecated/Yahoo/src/user_info.cpp deleted file mode 100644 index 965e51acd4..0000000000 --- a/tools/_deprecated/Yahoo/src/user_info.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/*
- * $Id: proto.cpp 9802 2009-05-18 03:03:48Z gena01 $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "stdafx.h"
-
-#include <m_options.h>
-#include <m_skin.h>
-#include <m_userinfo.h>
-
-#include "resource.h"
-
-#include <commctrl.h>
-
-static INT_PTR CALLBACK YahooUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lParam)
-{
- switch (msg) {
- case WM_INITDIALOG:
- // lParam is hContact
- TranslateDialogDefault(hwndDlg);
- break;
-
- case WM_NOTIFY:
- if (((LPNMHDR)lParam)->idFrom == 0) {
- switch (((LPNMHDR)lParam)->code) {
- case PSN_PARAMCHANGED:
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, ((PSHNOTIFY*)lParam)->lParam);
- break;
- case PSN_INFOCHANGED:
- {
- CYahooProto* ppro = (CYahooProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
-
- if (!ppro)
- break;
-
- char* szProto;
- MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
-
- if (hContact == NULL) {
- szProto = ppro->m_szModuleName;
- }
- else {
- szProto = GetContactProto(hContact);
- }
-
- if (!szProto)
- break;
-
- if (hContact) {
- DBVARIANT dbv;
- char z[128];
-
- if (ppro->getString(hContact, YAHOO_LOGINID, &dbv) == 0) {
- mir_strcpy(z, dbv.pszVal);
- db_free(&dbv);
- }
- else {
- mir_strcpy(z, "???");
- }
-
- SetDlgItemTextA(hwndDlg, IDC_SEARCH_ID, z);
-
- if (ppro->getString(hContact, "Transport", &dbv) == 0) {
- mir_strcpy(z, dbv.pszVal);
- db_free(&dbv);
- }
- else {
- mir_strcpy(z, "Yahoo");
- }
-
- SetDlgItemTextA(hwndDlg, IDC_SEARCH_PROTOCOL, z);
-
- if (ppro->getString(hContact, "MirVer", &dbv) == 0) {
- mir_strcpy(z, dbv.pszVal);
- db_free(&dbv);
- }
- else {
- mir_strcpy(z, "???");
- }
-
- SetDlgItemTextA(hwndDlg, IDC_NFO_CLIENT, z);
-
- }
- else {
- }
- }
- break;
- }
- }
- break;
-
- case WM_CLOSE:
- DestroyWindow(hwndDlg);
- break;
-
- case WM_DESTROY:
-
- break;
- }
- return FALSE;
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// OnInfoInit - initializes user info option dialogs
-
-int __cdecl CYahooProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = hInstance;
- odp.dwInitParam = (LPARAM)this;
- odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE;
-
- MCONTACT hContact = lParam;
- if (IsMyContact(hContact)) {
- odp.pfnDlgProc = YahooUserInfoDlgProc;
- odp.position = -1900000000;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_USER_INFO);
- odp.pwszTitle = m_tszUserName;
- UserInfo_AddPage(wParam, &odp);
- }
- return 0;
-}
diff --git a/tools/_deprecated/Yahoo/src/util.cpp b/tools/_deprecated/Yahoo/src/util.cpp deleted file mode 100644 index 656135fbb0..0000000000 --- a/tools/_deprecated/Yahoo/src/util.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/*
- * $Id: util.cpp 13557 2011-04-09 02:26:58Z borkra $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include "stdafx.h"
-#include <windowsx.h>
-#include <m_popup.h>
-#include <m_protosvc.h>
-#include <m_langpack.h>
-#include <m_skin.h>
-#include <m_utils.h>
-#include <m_options.h>
-
-#include "resource.h"
-
-extern HANDLE g_hNetlibUser;
-
-int debugLogA(const char *fmt, ...)
-{
- char str[4096];
- va_list vararg;
- va_start(vararg, fmt);
-
- int tBytes = mir_vsnprintf(str, sizeof(str), fmt, vararg);
- if (tBytes > 0)
- str[tBytes] = 0;
-
- va_end(vararg);
-
- return CallService(MS_NETLIB_LOG, (WPARAM)g_hNetlibUser, (LPARAM)str);
-}
-
-DWORD CYahooProto::Set_Protocol(MCONTACT hContact, int protocol)
-{
- char *s = NULL;
-
- setWord(hContact, "yprotoid", protocol);
-
- switch (protocol) {
- case YAHOO_IM_YAHOO: s = "Yahoo"; break; /* Yahoo, nothing special here */
- case YAHOO_IM_MSN: s = "Windows Live (MSN)"; break;
- case YAHOO_IM_LCS: s = "LCS"; break;
- case YAHOO_IM_SAMETIME: s = "Lotus Sametime"; break;
- }
-
- if (protocol != YAHOO_IM_YAHOO)
- setString(hContact, "MirVer", s);
-
- setString(hContact, "Transport", s);
- return 0;
-}
-
-int CYahooProto::GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result)
-{
- return db_get_utf(hContact, m_szModuleName, name, result);
-}
-
-DWORD CYahooProto::SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue)
-{
- return db_set_utf(hContact, m_szModuleName, valueName, parValue);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Popups
-
-static LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- switch (message) {
- case WM_COMMAND:
- debugLogA("[PopupWindowProc] WM_COMMAND");
- if (HIWORD(wParam) == STN_CLICKED) {
- char *szURL = (char*)PUGetPluginData(hWnd);
- if (szURL != NULL)
- Utils_OpenUrl(szURL);
-
- PUDeletePopup(hWnd);
- return 0;
- }
- break;
-
- case WM_CONTEXTMENU:
- debugLogA("[PopupWindowProc] WM_CONTEXTMENU");
- PUDeletePopup(hWnd);
- return TRUE;
-
- case UM_FREEPLUGINDATA:
- debugLogA("[PopupWindowProc] UM_FREEPLUGINDATA");
- {
- char *szURL = (char *)PUGetPluginData(hWnd);
- if (szURL != NULL)
- free(szURL);
- }
-
- return TRUE;
- }
-
- return DefWindowProc(hWnd, message, wParam, lParam);
-}
-
-int CYahooProto::ShowPopup(const wchar_t* nickname, const wchar_t* msg, const char *szURL)
-{
- if (!ServiceExists(MS_POPUP_ADDPOPUPT))
- return 0;
-
- POPUPDATAT ppd = { 0 };
- ppd.PluginWindowProc = PopupWindowProc;
- mir_wstrncpy(ppd.lptzContactName, nickname, _countof(ppd.lptzContactName));
- mir_wstrncpy(ppd.lptzText, msg, _countof(ppd.lptzText));
-
- if (szURL != NULL) {
- ppd.lchIcon = LoadIconEx(!mir_strcmpi(szURL, "http://mail.yahoo.com") ? "mail" : "calendar");
- ppd.PluginData = (void*)strdup(szURL);
- }
- else ppd.lchIcon = LoadIconEx("yahoo");
-
- debugLogA("[MS_POPUP_ADDPOPUP] Generating a popup for [%S] %S", nickname, msg);
-
- PUAddPopupT(&ppd);
- return 1;
-}
-
-int CYahooProto::ShowNotification(const wchar_t *title, const wchar_t *info, DWORD flags)
-{
- int ret = Clist_TrayNotifyW(m_szModuleName, title, info, flags, 1000 * 3);
- if (ret == 0)
- return 1;
-
- MessageBox(NULL, info, title, MB_OK | MB_ICONINFORMATION);
- return 0;
-}
-
-void CYahooProto::ShowError(const wchar_t *title, const wchar_t *buff)
-{
- if (getByte("ShowErrors", 1))
- if (!ShowPopup(title, buff, NULL))
- ShowNotification(title, buff, NIIF_ERROR);
-}
-
-int __cdecl CYahooProto::OnSettingChanged(WPARAM hContact, LPARAM lParam)
-{
- if (!hContact || !m_bLoggedIn)
- return 0;
-
- DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (!strcmp(cws->szSetting, "ApparentMode")) {
- debugLogA("DB Setting changed. YAHOO user's visible setting changed.");
-
- DBVARIANT dbv;
- if (!getString(hContact, YAHOO_LOGINID, &dbv)) {
- int iAdd = (ID_STATUS_OFFLINE == getWord(hContact, "ApparentMode", 0));
- stealth(dbv.pszVal, iAdd);
- db_free(&dbv);
- }
- }
- return 0;
-}
-
-bool CYahooProto::IsMyContact(MCONTACT hContact)
-{
- if (!hContact)
- return false;
-
- char* szProto = GetContactProto(hContact);
- return szProto && !mir_strcmp(szProto, m_szModuleName);
-}
-
-extern PLUGININFOEX pluginInfo;
-
-/*
- * Thanks Robert for the following function. Copied from AIM plugin.
- */
-void CYahooProto::YAHOO_utils_logversion()
-{
- char str[256];
- mir_snprintf(str, "Yahoo v%d.%d.%d.%d", (pluginInfo.version >> 24) & 0xFF, (pluginInfo.version >> 16) & 0xFF,
- (pluginInfo.version >> 8) & 0xFF, pluginInfo.version & 0xFF);
- debugLogA(str);
-}
-
-void SetButtonCheck(HWND hwndDlg, int CtrlID, BOOL bCheck)
-{
- HWND hwndCtrl = GetDlgItem(hwndDlg, CtrlID);
-
- Button_SetCheck(hwndCtrl, (bCheck) ? BST_CHECKED : BST_UNCHECKED);
-}
diff --git a/tools/_deprecated/Yahoo/src/version.h b/tools/_deprecated/Yahoo/src/version.h deleted file mode 100644 index 5fa300b8a7..0000000000 --- a/tools/_deprecated/Yahoo/src/version.h +++ /dev/null @@ -1,13 +0,0 @@ -#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 95
-#define __RELEASE_NUM 5
-#define __BUILD_NUM 1
-
-#include <stdver.h>
-
-#define __PLUGIN_NAME "Yahoo protocol"
-#define __DESCRIPTION "Yahoo protocol support for Miranda NG."
-#define __AUTHOR "Gennady Feldman"
-#define __AUTHOREMAIL "gena01@miranda-im.org"
-#define __COPYRIGHT "© 2003-2010 Gennady Feldman, Laurent Marechal"
-#define __AUTHORWEB "http://miranda-ng.org/p/Yahoo/"
diff --git a/tools/_deprecated/Yahoo/src/webcam.cpp b/tools/_deprecated/Yahoo/src/webcam.cpp deleted file mode 100644 index 49888e7da0..0000000000 --- a/tools/_deprecated/Yahoo/src/webcam.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/*
- * $Id: webcam.cpp 9228 2009-03-26 13:47:12Z ghazan $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-#include <time.h>
-#include <sys/stat.h>
-#include <malloc.h>
-#include <io.h>
-
-/*
- * Miranda headers
- */
-#include "stdafx.h"
-#include <m_protosvc.h>
-#include <m_langpack.h>
-#include <m_message.h>
-
-/* WEBCAM callbacks */
-void ext_yahoo_got_webcam_image(int, const char*, const unsigned char*, unsigned int, unsigned int, unsigned int)
-{
- LOG(("ext_yahoo_got_webcam_image"));
-}
-
-void ext_yahoo_webcam_viewer(int, const char*, int)
-{
- LOG(("ext_yahoo_webcam_viewer"));
-}
-
-void ext_yahoo_webcam_closed(int, const char*, int)
-{
- LOG(("ext_yahoo_webcam_closed"));
-}
-
-void ext_yahoo_webcam_data_request(int, int)
-{
- LOG(("ext_yahoo_webcam_data_request"));
-}
-
-void ext_yahoo_webcam_invite(int id, const char *me, const char *from)
-{
- LOG(("ext_yahoo_webcam_invite"));
-
- GETPROTOBYID(id)->ext_got_im(me, from, 0, Translate("[miranda] Got webcam invite. (not currently supported)"), 0, 0, 0, -1);
-}
-
-void ext_yahoo_webcam_invite_reply(int, const char*, const char*, int)
-{
- LOG(("ext_yahoo_webcam_invite_reply"));
-}
diff --git a/tools/_deprecated/Yahoo/src/webcam.h b/tools/_deprecated/Yahoo/src/webcam.h deleted file mode 100644 index c33b7c5781..0000000000 --- a/tools/_deprecated/Yahoo/src/webcam.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * $Id: webcam.h 3627 2006-08-28 16:11:15Z gena01 $ - * - * myYahoo Miranda Plugin - * - * Authors: Gennady Feldman (aka Gena01) - * Laurent Marechal (aka Peorth) - * - * This code is under GPL and is based on AIM, MSN and Miranda source code. - * I want to thank Robert Rainwater and George Hazan for their code and support - * and for answering some of my questions during development of this plugin. - */ -#ifndef _YAHOO_WEBCAM_H_
-#define _YAHOO_WEBCAM_H_
-
-/* WEBCAM callbacks */
-void ext_yahoo_got_webcam_image(int id, const char *who,
- const unsigned char *image, unsigned int image_size, unsigned int real_size,
- unsigned int timestamp);
-
-void ext_yahoo_webcam_viewer(int id, const char *who, int connect);
-
-void ext_yahoo_webcam_closed(int id, const char *who, int reason);
-
-void ext_yahoo_webcam_data_request(int id, int send);
-
-void ext_yahoo_webcam_invite(int id, const char *me, const char *from);
-
-void ext_yahoo_webcam_invite_reply(int id, const char *me, const char *from, int accept);
-
-#endif
diff --git a/tools/_deprecated/Yahoo/src/yahoo.cpp b/tools/_deprecated/Yahoo/src/yahoo.cpp deleted file mode 100644 index 5baf2caf4c..0000000000 --- a/tools/_deprecated/Yahoo/src/yahoo.cpp +++ /dev/null @@ -1,1798 +0,0 @@ -/*
- * $Id: yahoo.cpp 13557 2011-04-09 02:26:58Z borkra $
- *
- * myYahoo Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-/*
- * Miranda headers
- */
-#include "stdafx.h"
-#include <m_protosvc.h>
-#include <m_langpack.h>
-#include <m_skin.h>
-#include <m_popup.h>
-#include <m_message.h>
-
-#include "avatar.h"
-#include "chat.h"
-#include "webcam.h"
-#include "file_transfer.h"
-#include "im.h"
-#include "search.h"
-#include "ignore.h"
-
-struct yahoo_idlabel
-{
- int id;
- char *label;
-};
-
-struct yahoo_authorize_data
-{
- int id;
- char *who;
-};
-
-yahoo_idlabel yahoo_status_codes[] = {
- { YAHOO_STATUS_AVAILABLE, "" },
- { YAHOO_STATUS_BRB, "BRB" },
- { YAHOO_STATUS_BUSY, "Busy" },
- { YAHOO_STATUS_NOTATHOME, "Not At Home" },
- { YAHOO_STATUS_NOTATDESK, "Not At my Desk" },
- { YAHOO_STATUS_NOTINOFFICE, "Not In The Office" },
- { YAHOO_STATUS_ONPHONE, "On The Phone" },
- { YAHOO_STATUS_ONVACATION, "On Vacation" },
- { YAHOO_STATUS_OUTTOLUNCH, "Out To Lunch" },
- { YAHOO_STATUS_STEPPEDOUT, "Stepped Out" },
- { YAHOO_STATUS_INVISIBLE, "Invisible" },
- { YAHOO_STATUS_IDLE, "Idle" },
- { YAHOO_STATUS_OFFLINE, "Offline" },
- { YAHOO_STATUS_CUSTOM, "[Custom]" },
- // {YAHOO_STATUS_NOTIFY, "Notify"},
- { 0, NULL }
-};
-
-#define MAX_PREF_LEN 255
-
-int do_yahoo_debug = 0;
-#ifdef HTTP_GATEWAY
-int iHTTPGateway = 0;
-#endif
-extern int poll_loop;
-
-char * yahoo_status_code(enum yahoo_status s)
-{
- for (int i = 0; yahoo_status_codes[i].label; i++)
- if (yahoo_status_codes[i].id == s)
- return yahoo_status_codes[i].label;
-
- return "Unknown";
-}
-
-yahoo_status miranda_to_yahoo(int myyahooStatus)
-{
- switch (myyahooStatus) {
- case ID_STATUS_OFFLINE:
- return YAHOO_STATUS_OFFLINE;
- case ID_STATUS_FREECHAT:
- case ID_STATUS_ONLINE:
- return YAHOO_STATUS_AVAILABLE;
- case ID_STATUS_AWAY:
- return YAHOO_STATUS_STEPPEDOUT;
- case ID_STATUS_NA:
- return YAHOO_STATUS_BRB;
- case ID_STATUS_OCCUPIED:
- return YAHOO_STATUS_BUSY;
- case ID_STATUS_DND:
- return YAHOO_STATUS_BUSY;
- case ID_STATUS_ONTHEPHONE:
- return YAHOO_STATUS_ONPHONE;
- case ID_STATUS_OUTTOLUNCH:
- return YAHOO_STATUS_OUTTOLUNCH;
- case ID_STATUS_INVISIBLE:
- return YAHOO_STATUS_INVISIBLE;
- default:
- return YAHOO_STATUS_AVAILABLE;
- }
-}
-
-int yahoo_to_miranda_status(int m_iStatus, int away)
-{
- switch (m_iStatus) {
- case YAHOO_STATUS_AVAILABLE:
- return ID_STATUS_ONLINE;
- case YAHOO_STATUS_BRB:
- return ID_STATUS_NA;
- case YAHOO_STATUS_BUSY:
- return ID_STATUS_OCCUPIED;
- case YAHOO_STATUS_ONPHONE:
- return ID_STATUS_ONTHEPHONE;
- case YAHOO_STATUS_OUTTOLUNCH:
- return ID_STATUS_OUTTOLUNCH;
- case YAHOO_STATUS_INVISIBLE:
- return ID_STATUS_INVISIBLE;
- case YAHOO_STATUS_NOTATHOME:
- case YAHOO_STATUS_NOTATDESK:
- case YAHOO_STATUS_NOTINOFFICE:
- case YAHOO_STATUS_ONVACATION:
- case YAHOO_STATUS_STEPPEDOUT:
- case YAHOO_STATUS_IDLE:
- return ID_STATUS_AWAY;
- case YAHOO_STATUS_CUSTOM:
- return (away ? ID_STATUS_AWAY : ID_STATUS_ONLINE);
- default:
- return ID_STATUS_OFFLINE;
- }
-}
-
-void CYahooProto::set_status(int myyahooStatus, char *msg, int away)
-{
- LOG(("[set_status] myyahooStatus: %d, msg: %s, away: %d", myyahooStatus, msg, away));
-
- /* Safety check, don't dereference Invalid pointers */
- if (m_id > 0) {
-
- if (YAHOO_CUSTOM_STATUS != myyahooStatus)
- yahoo_set_away(m_id, miranda_to_yahoo(myyahooStatus), msg, away);
- else
- yahoo_set_away(m_id, (yahoo_status)YAHOO_CUSTOM_STATUS, msg, away);
- }
-}
-
-void CYahooProto::stealth(const char *buddy, int add)
-{
- LOG(("[stealth] buddy: %s, add: %d", buddy, add));
-
- /* Safety check, don't dereference Invalid pointers */
- if (m_id > 0)
- yahoo_set_stealth(m_id, buddy, getWord(getbuddyH(buddy), "yprotoid", 0), add);
-}
-
-void CYahooProto::remove_buddy(const char *who, int protocol)
-{
- LOG(("[remove_buddy] Buddy: '%s' protocol: %d", who, protocol));
-
- DBVARIANT dbv;
- if (GetStringUtf(getbuddyH(who), "YGroup", &dbv)) {
- LOG(("WARNING NO DATABASE GROUP using 'miranda'!"));
- yahoo_remove_buddy(m_id, who, protocol, "miranda");
- return;
- }
-
- yahoo_remove_buddy(m_id, who, protocol, dbv.pszVal);
- db_free(&dbv);
-}
-
-void CYahooProto::sendtyping(const char *who, int protocol, int stat)
-{
- LOG(("[sendtyping] Sending Typing Notification to '%s' protocol: %d, state: %d", who, protocol, stat));
- yahoo_send_typing(m_id, NULL, who, protocol, stat);
-}
-
-void CYahooProto::accept(const char *myid, const char *who, int protocol)
-{
- yahoo_accept_buddy(m_id, myid, who, protocol);
-}
-
-void CYahooProto::reject(const char *myid, const char *who, int protocol, const char *msg)
-{
- yahoo_reject_buddy(m_id, myid, who, protocol, msg);
-}
-
-void CYahooProto::logout()
-{
- LOG(("[yahoo_logout]"));
-
- if (m_bLoggedIn) {
- ChatLeaveAll();
- yahoo_logoff(m_id);
- }
-
- /* need to stop the server and close all the connections */
- poll_loop = 0;
-}
-
-void CYahooProto::AddBuddy(MCONTACT hContact, const char *group, const wchar_t *msg)
-{
- /* We adding a buddy to our list.
- 2 Stages.
- 1. We send add buddy packet.
- 2. We get a packet back from the server confirming add.
-
- No refresh needed. */
-
- ptrA who(getStringA(hContact, YAHOO_LOGINID));
- if (who == NULL)
- return;
-
- int protocol = getWord(hContact, "yprotoid", 0);
- T2Utf u_msg(msg);
-
- ptrA ident(getStringA(hContact, "MyIdentity"));
- ptrW fname(getWStringA(NULL, "FirstName"));
- ptrW lname(getWStringA(NULL, "LastName"));
-
- SetStringUtf(hContact, "YGroup", group);
-
- debugLogA("Adding Permanently %s to list. Auth: %s", who, u_msg ? u_msg : "<None>");
- yahoo_add_buddy(m_id, ident, T2Utf(fname), T2Utf(lname), who, protocol, group, u_msg);
-}
-
-MCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
-{
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- DBVARIANT dbv;
- if (getString(hContact, YAHOO_LOGINID, &dbv))
- continue;
-
- int tCompareResult = mir_strcmpi(dbv.pszVal, yahoo_id);
- db_free(&dbv);
- if (tCompareResult)
- continue;
-
- return hContact;
- }
-
- return NULL;
-}
-
-MCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags)
-{
- char *yid = NEWSTR_ALLOCA(yahoo_id);
- strlwr(yid);
-
- MCONTACT hContact = getbuddyH(yid);
- if (hContact != NULL) {
- LOG(("[add_buddy] Found buddy id: %s, handle: %p", yid, hContact));
- if (!(flags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 1)) {
- LOG(("[add_buddy] Making Perm id: %s, flags: %lu", yahoo_id, flags));
- db_unset(hContact, "CList", "NotOnList");
- db_unset(hContact, "CList", "Hidden");
- }
-
- return hContact;
- }
-
- //not already there: add
- LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
- hContact = db_add_contact();
- Proto_AddToContact(hContact, m_szModuleName);
- setString(hContact, YAHOO_LOGINID, yid);
- Set_Protocol(hContact, protocol);
-
- if (mir_strlen(yahoo_name) > 0)
- SetStringUtf(hContact, "Nick", yahoo_name);
- else
- SetStringUtf(hContact, "Nick", yahoo_id);
-
- if (flags & PALF_TEMPORARY) {
- db_set_b(hContact, "CList", "NotOnList", 1);
- db_set_b(hContact, "CList", "Hidden", 1);
- }
-
- return hContact;
-}
-
-const char* CYahooProto::find_buddy(const char *yahoo_id)
-{
- static char nick[128];
- DBVARIANT dbv;
-
- MCONTACT hContact = getbuddyH(yahoo_id);
- if (hContact != NULL) {
- if (GetStringUtf(hContact, "Nick", &dbv))
- return NULL;
-
- strncpy(nick, dbv.pszVal, sizeof(nick) - 1);
- db_free(&dbv);
- return nick;
- }
-
- return NULL;
-}
-
-/* Required handlers below */
-
-/* Other handlers */
-void CYahooProto::ext_status_changed(const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int utf8)
-{
- debugLogA("[ext_status_changed] %s (prot: %d) with msg %s utf8: %d, stat: %s (%d), away: %d, idle: %d seconds",
- who,
- protocol,
- msg,
- utf8,
- (stat == 0) ? "Online" : yahoo_status_code((yahoo_status)stat),
- stat,
- away,
- idle);
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL) {
- debugLogA("Buddy Not Found. Adding...");
- hContact = add_buddy(who, who, protocol, 0);
- }
-
- if (!mobile)
- setWord(hContact, "Status", yahoo_to_miranda_status(stat, away));
- else
- setWord(hContact, "Status", ID_STATUS_ONTHEPHONE);
-
- setDword(hContact, "YStatus", stat);
- setWord(hContact, "YAway", away);
- setWord(hContact, "Mobile", mobile);
-
- if (msg) {
- debugLogA("[ext_status_changed] %s custom message '%s'", who, msg);
-
- if (utf8)
- db_set_utf(hContact, "CList", "StatusMsg", msg);
- else
- db_set_s(hContact, "CList", "StatusMsg", msg);
- }
- else db_unset(hContact, "CList", "StatusMsg");
-
- if (stat == YAHOO_STATUS_OFFLINE) {
- /*
- * Delete the IdleTS if the user went offline
- */
- delSetting(hContact, "IdleTS");
- }
- else {
- time_t idlets = 0;
- if ((away == 2) || (stat == YAHOO_STATUS_IDLE) || (idle > 0)) {
- /* TODO: set Idle=-1, because of key 138=1 and don't set idlets then */
- if (stat > 0) {
- debugLogA("[ext_status_changed] %s idle for %d:%02d:%02d", who, idle / 3600, (idle / 60) % 60, idle % 60);
-
- time(&idlets);
- idlets -= idle;
- }
- }
-
- setDword(hContact, "IdleTS", idlets);
- }
-
- debugLogA("[ext_status_changed] exiting");
-}
-
-void CYahooProto::ext_status_logon(const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int cksum, int buddy_icon, long client_version, int utf8)
-{
- debugLogA("[ext_status_logon] %s (prot: %d) with msg %s utf8: %d, (stat: %d, away: %d, idle: %d seconds, checksum: %d buddy_icon: %d client_version: %ld)", who, protocol, msg, utf8, stat, away, idle, cksum, buddy_icon, client_version);
-
- ext_status_changed(who, protocol, stat, msg, away, idle, mobile, utf8);
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL) {
- debugLogA("[ext_status_logon] Can't find handle for %s??? PANIC!!!", who);
- return;
- }
-
- /**
- * We only do real client detection when using Yahoo client. Other option is to fill in the protocol info
- */
- if (protocol == 0) {
- char *s = NULL;
-
- switch (client_version & 0x1FFFFBF) {
- case 2:
- s = "Yahoo Mobile";
- break;
-
- case 6:
- s = "Yahoo PingBox";
- break;
-
- case 3075:
- case 0x00880C03:
- s = "Yahoo Web Messenger";
- break;
-
- case 35846:
- s = "Go!Chat for Android";
- break;
-
- case 262651:
- s = "libyahoo2";
- break;
-
- case 262655:
- s = "< Yahoo 6.x (Yahoo 5.x?)";
- break;
-
- case 278527:
- s = "Yahoo 6.x";
- break;
-
- case 524223:
- //Yahoo 7.4
- //Yahoo 7.5
- s = "Yahoo 7.x";
- break;
-
- case 888327:
- s = "Yahoo 9.0 for Vista";
- break;
-
- case 822366: /* Yahoo! Messenger 2.1.37 by RIM */
- s = "Yahoo for Blackberry";
- break;
-
- case 822543: /* ? "Yahoo Version 3.0 beta 1 (build 18274) OSX" */
- case 1572799: /* 8.0.x ?? */
- case 2097087: /* 8.1.0.195 */
- case 0x009FFFBF:
- s = "Yahoo 8.x";
- break;
-
- case 2088895:
- case 4194239:
- case 0x00BFFFBF:
- s = "Yahoo 9.0";
- break;
-
- case 8388543:
- s = "Yahoo 10.0";
- break;
-
- case 0x01FFFFBF:
- s = "Yahoo 11.0";
- break;
-
- case 0x01498C06:
- s = "Yahoo for iPhone";
- break;
-
- case 0x01498C07:
- s = "Yahoo for Android";
- break;
-
- case 0x00AD9F1F:
- s = "Yahoo for Mac v3";
- break;
- }
-
- if (s != NULL)
- setString(hContact, "MirVer", s);
- else
- delSetting(hContact, "MirVer");
- }
- else Set_Protocol(hContact, protocol);
-
- /* Add the client_Version # to the contact DB entry */
- setDword(hContact, "ClientVersion", client_version);
-
- /* Last thing check the checksum and request new one if we need to */
- if (buddy_icon == -1) {
- debugLogA("[ext_status_logon] No avatar information in this packet? Not touching stuff!");
- }
- else {
- // we got some avatartype info
- setByte(hContact, "AvatarType", buddy_icon);
-
- if (cksum == 0 || cksum == -1) {
- // no avatar
- setDword(hContact, "PictCK", 0);
- }
- else if (getDword(hContact, "PictCK", 0) != (unsigned)cksum) {
- //char szFile[MAX_PATH];
-
- // Save new Checksum
- setDword(hContact, "PictCK", cksum);
-
- // Need to delete the Avatar File!!
- //GetAvatarFileName(hContact, szFile, sizeof szFile, 0);
- //DeleteFile(szFile);
- }
-
- // Cleanup the type? and reset things...
- reset_avatar(hContact);
- }
-
- debugLogA("[ext_status_logon] exiting");
-}
-
-void CYahooProto::ext_got_audible(const char *me, const char *who, const char *aud, const char *msg, const char *aud_hash)
-{
- /* aud = file class name
- GAIM: the audible, in foo.bar.baz format
-
- Actually this is the filename.
- Full URL:
-
- http://us.dl1.yimg.com/download.yahoo.com/dl/aud/us/aud.swf
-
- where aud in foo.bar.baz format
- */
-
- LOG(("ext_got_audible for %s aud: %s msg:'%s' hash: %s", who, aud, msg, aud_hash));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact == NULL) {
- LOG(("Buddy Not Found. Skipping avatar update"));
- return;
- }
-
- char z[1028];
- mir_snprintf(z, "[miranda-audible] %s", msg ? msg : "");
- ext_got_im((char*)me, (char*)who, 0, z, 0, 0, 1, -1, NULL, 0);
-}
-
-void CYahooProto::ext_got_calendar(const char *url, int type, const char *msg, int svc)
-{
- LOG(("[ext_got_calendar] URL:%s type: %d msg: %s svc: %d", url, type, msg, svc));
-
- ptrW tszMsg(mir_utf8decodeW(msg));
- if (!ShowPopup(TranslateT("Calendar Reminder"), tszMsg, url))
- ShowNotification(TranslateT("Calendar Reminder"), tszMsg, NIIF_INFO);
-}
-
-void CYahooProto::ext_got_stealth(char *stealthlist)
-{
- char **stealth = NULL;
-
- LOG(("[ext_got_stealth] list: %s", stealthlist));
-
- if (stealthlist)
- stealth = y_strsplit(stealthlist, ",", -1);
-
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- DBVARIANT dbv;
- if (getString(hContact, YAHOO_LOGINID, &dbv))
- continue;
-
- bool found = false;
- for (char **s = stealth; s && *s; s++) {
- if (mir_strcmpi(*s, dbv.pszVal) == 0) {
- debugLogA("GOT id = %s", dbv.pszVal);
- found = true;
- break;
- }
- }
-
- /* Check the stealth list */
- if (found) { /* we have him on our Stealth List */
- debugLogA("Setting STEALTH for id = %s", dbv.pszVal);
- /* need to set the ApparentMode thingy */
- if (ID_STATUS_OFFLINE != getWord(hContact, "ApparentMode", 0))
- getWord(hContact, "ApparentMode", ID_STATUS_OFFLINE);
-
- }
- else { /* he is not on the Stealth List */
- //LOG(("Resetting STEALTH for id = %s", dbv.pszVal));
- /* need to delete the ApparentMode thingy */
- if (getWord(hContact, "ApparentMode", 0))
- delSetting(hContact, "ApparentMode");
- }
- db_free(&dbv);
- }
- y_strfreev(stealth);
-}
-
-void CYahooProto::ext_got_buddies(YList * buds)
-{
- LOG(("[ext_got_buddies] "));
-
- if (buds == NULL) {
- LOG(("No Buddies to work on!"));
- return;
- }
-
- debugLogA(("[ext_got_buddies] Walking buddy list..."));
- for (; buds; buds = buds->next) {
- MCONTACT hContact;
-
- yahoo_buddy *bud = (yahoo_buddy*)buds->data;
- if (bud == NULL) {
- LOG(("[ext_got_buddies] EMPTY BUDDY LIST??"));
- continue;
- }
-
- debugLogA("[ext_got_buddies] id = %s, protocol = %d, group = %s, auth = %d", bud->id, bud->protocol, bud->group, bud->auth);
-
- hContact = getbuddyH(bud->id);
- if (hContact == NULL)
- hContact = add_buddy(bud->id, (bud->real_name != NULL) ? bud->real_name : bud->id, bud->protocol, 0);
-
- if (bud->protocol != 0)
- Set_Protocol(hContact, bud->protocol);
-
- if (bud->group)
- SetStringUtf(hContact, "YGroup", bud->group);
-
- if (bud->stealth) { /* we have him on our Stealth List */
- debugLogA("Setting STEALTH for id = %s", bud->id);
- /* need to set the ApparentMode thingy */
- if (ID_STATUS_OFFLINE != getWord(hContact, "ApparentMode", 0))
- setWord(hContact, "ApparentMode", (WORD)ID_STATUS_OFFLINE);
-
- }
- else { /* he is not on the Stealth List */
- //LOG(("Resetting STEALTH for id = %s", dbv.pszVal));
- /* need to delete the ApparentMode thingy */
- if (getWord(hContact, "ApparentMode", 0))
- delSetting(hContact, "ApparentMode");
- }
-
- //if (bud->auth)
- // debugLogA("Auth request waiting for: %s", bud->id );
- setByte(hContact, "YAuth", bud->auth);
-
- if (bud->real_name) {
- debugLogA("id = %s name = %s", bud->id, bud->real_name);
- SetStringUtf(hContact, "Nick", bud->real_name);
- }
-
- if (bud->yab_entry) {
- //LOG(("YAB_ENTRY"));
-
- if (bud->yab_entry->fname)
- SetStringUtf(hContact, "FirstName", bud->yab_entry->fname);
-
- if (bud->yab_entry->lname)
- SetStringUtf(hContact, "LastName", bud->yab_entry->lname);
-
- if (bud->yab_entry->email)
- setString(hContact, "e-mail", bud->yab_entry->email);
-
- if (bud->yab_entry->mphone)
- setString(hContact, "Cellular", bud->yab_entry->mphone);
-
- if (bud->yab_entry->hphone)
- setString(hContact, "Phone", bud->yab_entry->hphone);
-
- if (bud->yab_entry->wphone)
- setString(hContact, "CompanyPhone", bud->yab_entry->wphone);
-
- setWord(hContact, "YabID", bud->yab_entry->dbid);
- }
- }
-
- debugLogA(("[ext_got_buddies] buddy list Finished."));
-}
-
-void CYahooProto::ext_rejected(const char *who, const char *msg)
-{
- LOG(("[ext_rejected] who: %s msg: %s", who, msg));
-
- MCONTACT hContact = getbuddyH(who);
- if (hContact != NULL) {
- /*
- * Make sure the contact is temporary so we could delete it w/o extra traffic
- */
- db_set_b(hContact, "CList", "NotOnList", 1);
- db_delete_contact(hContact);
- }
- else LOG(("[ext_rejected] Buddy not on our buddy list"));
-
- ptrW tszWho(mir_utf8decodeW(who));
- ptrW tszMsg(mir_utf8decodeW(msg));
-
- wchar_t buff[1024];
- mir_snwprintf(buff, TranslateT("%s has rejected your request and sent the following message:"), (wchar_t*)tszWho);
- MessageBox(NULL, tszMsg, buff, MB_OK | MB_ICONINFORMATION);
-}
-
-void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status, int auth)
-{
- MCONTACT hContact = getbuddyH(who);
-
- LOG(("[ext_buddy_added] %s authorized you as %s group: %s status: %d auth: %d", who, myid, group, status, auth));
-
- switch (status) {
- case 0: /* we are ok */
- case 2: /* seems that we ok, not sure what this means.. we already on buddy list? */
- case 40: /* When adding MSN Live contacts we get this one? */
- db_unset(hContact, "CList", "NotOnList");
- db_unset(hContact, "CList", "Hidden");
- break;
-
- case 1: /* invalid ID? */
- case 3: /* invalid ID */
- if (hContact != NULL) {
- ShowPopup(TranslateT("Invalid Contact"), TranslateT("The ID you tried to add is invalid."), NULL);
- /* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
- db_set_b(hContact, "CList", "NotOnList", 1);
- db_delete_contact(hContact);
- }
- break;
-
- default:
- /* ??? */
- if (hContact != NULL) {
- ShowPopup(TranslateT("Invalid Contact"), TranslateT("Unknown Error."), NULL);
- /* Make it TEMP first, we don't want to send any extra packets for FALSE ids */
- db_set_b(hContact, "CList", "NotOnList", 1);
- db_delete_contact(hContact);
- }
-
- break;
- }
-}
-
-void CYahooProto::ext_contact_added(const char *myid, const char *who, const char *fname, const char *lname, const char *msg, int protocol)
-{
- char nick[128];
- BYTE *pCurBlob;
- MCONTACT hContact = NULL;
- PROTORECVEVENT pre = { 0 };
-
- /* NOTE: Msg is actually in UTF8 unless stated otherwise!! */
- LOG(("[ext_contact_added] %s %s (%s:%d) added you as %s w/ msg '%s'", fname, lname, who, protocol, myid, msg));
-
- if (BuddyIgnored(who)) {
- LOG(("User '%s' on our Ignore List. Dropping Authorization Request.", who));
- return;
- }
-
- nick[0] = '\0';
-
- if (lname && fname)
- mir_snprintf(nick, "%s %s", fname, lname);
- else if (lname)
- strncpy_s(nick, lname, _TRUNCATE);
- else if (fname)
- strncpy_s(nick, fname, _TRUNCATE);
-
- if (nick[0] == '\0')
- strncpy_s(nick, who, _TRUNCATE);
-
- if (fname) SetStringUtf(hContact, "FirstName", fname);
- if (lname) SetStringUtf(hContact, "LastName", lname);
-
- hContact = add_buddy(who, nick, protocol, PALF_TEMPORARY);
-
- if (mir_strcmp(nick, who) != 0)
- SetStringUtf(hContact, "Nick", nick);
-
- if (mir_strcmp(myid, m_yahoo_id))
- setString(hContact, "MyIdentity", myid);
- else
- delSetting(hContact, "MyIdentity");
-
- //setWord(hContact, "yprotoid", protocol);
- Set_Protocol(hContact, protocol);
-
- pre.timestamp = time(NULL);
- pre.lParam = sizeof(DWORD) + sizeof(HANDLE) + mir_strlen(who) + mir_strlen(nick) + 5;
-
- if (fname != NULL)
- pre.lParam += mir_strlen(fname);
-
- if (lname != NULL)
- pre.lParam += mir_strlen(lname);
-
- if (msg != NULL)
- pre.lParam += mir_strlen(msg);
-
- pCurBlob = (PBYTE)malloc(pre.lParam);
- pre.szMessage = (char *)pCurBlob;
-
- // UIN
- *(PDWORD)pCurBlob = 0;
- pCurBlob += sizeof(DWORD);
-
- // hContact
- *(PDWORD)pCurBlob = (DWORD)hContact;
- pCurBlob += sizeof(DWORD);
-
- // NICK
- mir_strcpy((char*)pCurBlob, nick);
-
- pCurBlob += mir_strlen((char *)pCurBlob) + 1;
-
- // FIRST
- mir_strcpy((char*)pCurBlob, (fname != NULL) ? fname : "");
- pCurBlob += mir_strlen((char *)pCurBlob) + 1;
-
- // LAST
- mir_strcpy((char*)pCurBlob, (lname != NULL) ? lname : "");
- pCurBlob += mir_strlen((char *)pCurBlob) + 1;
-
- // E-mail
- mir_strcpy((char*)pCurBlob, who);
- pCurBlob += mir_strlen((char *)pCurBlob) + 1;
-
- // Reason
- mir_strcpy((char*)pCurBlob, (msg != NULL) ? msg : "");
-
- ProtoChainRecv(hContact, PSR_AUTH, 0, (LPARAM)&pre);
-}
-
-void CYahooProto::ext_typing_notify(const char *me, const char *who, int protocol, int stat)
-{
- LOG(("[ext_typing_notify] me: '%s' who: '%s' protocol: %d stat: %d ", me, who, protocol, stat));
-
- MCONTACT hContact = getbuddyH(who);
-
- if (hContact)
- CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)stat ? 10 : 0);
-}
-
-void CYahooProto::ext_game_notify(const char *me, const char *who, int stat, const char *msg)
-{
- /* There's also game invite packet:
- [17:36:44 YAHOO] libyahoo2/libyahoo2.c:3093: debug:
- [17:36:44 YAHOO] Yahoo Service: (null) (0xb7) Status: YAHOO_STATUS_BRB (1)
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] libyahoo2/libyahoo2.c:863: debug:
- [17:36:44 YAHOO] [Reading packet] len: 88
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: From (4) Value: 'xxxxx'
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: To (5) Value: 'zxzxxx'
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: (null) (180) Value: 'pl'
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: (null) (183) Value: ''
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: (null) (181) Value: ''
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: session (11) Value: 'o8114ik_lixyxtdfrxbogw--'
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] Key: stat/location (13) Value: '1'
- [17:36:44 YAHOO]
- [17:36:44 YAHOO] libyahoo2/libyahoo2.c:908: debug:
- [17:36:44 YAHOO] [Reading packet done]
- */
- LOG(("[ext_game_notify] me: %s, who: %s, stat: %d, msg: %s", me, who, stat, msg));
- /* FIXME - Not Implemented - this informs you someone else is playing on Yahoo! Games */
- /* Also Stubbed in Sample Client */
- MCONTACT hContact = getbuddyH(who);
- if (!hContact)
- return;
-
- if (stat == 2)
- setString(hContact, "YGMsg", "");
- else if (msg) {
- const char *l = msg, *u = NULL;
- char *z, *c;
- int i = 0;
-
- /* Parse and Set a custom Message
- *
- * Format: 1 [09] ygamesp [09] 1 [09] 0 [09] ante?room=yahoo_1078798506&follow=rrrrrrr
- * [09] Yahoo! Poker\nRoom: Intermediate Lounge 2
- *
- * Sign-in:
- * [17:13:42 YAHOO] [ext_yahoo_game_notify] id: 1, me: xxxxx, who: rrrrrrr,
- * stat: 1, msg: 1 ygamesa 1 0 ante?room=yahoo_1043183792&follow=lotesdelere
- * Yahoo! Backgammon Room: Social Lounge 12
- *
- * Sign-out:
- * [17:18:38 YAHOO] [ext_yahoo_game_notify] id: 1, me: xxxxx, who: rrrrr,
- * stat: 2, msg: 1 ygamesa 2
- */
- z = (char *)_alloca(mir_strlen(l) + 50);
-
- z[0] = '\0';
- do {
- c = (char*)strchr(l, 0x09);
- i++;
- if (c != NULL) {
- l = c;
- l++;
- if (i == 4)
- u = l;
- }
- } while (c != NULL && i < 5);
-
- if (c != NULL) {
- // insert \r before \n
- do {
- c = (char*)strchr(l, '\n');
-
- if (c != NULL) {
- (*c) = '\0';
- mir_strcat(z, l);
- mir_strcat(z, "\r\n");
- l = c + 1;
- }
- else {
- mir_strcat(z, l);
- }
- } while (c != NULL);
-
- mir_strcat(z, "\r\n\r\nhttp://games.yahoo.com/games/");
- mir_strcat(z, u);
- c = strchr(z, 0x09);
- if (c) (*c) = '\0';
- }
-
- SetStringUtf(hContact, "YGMsg", z);
-
- }
- else {
- /* ? no information / reset custom message */
- setString(hContact, "YGMsg", "");
- }
-}
-
-void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt)
-{
- LOG(("[ext_mail_notify] from: %s subject: %s count: %d", from, subj, cnt));
-
- if (cnt > 0) {
- SkinPlaySound("mail");
-
- if (!getByte("DisableYahoomail", 0)) {
- wchar_t z[MAX_SECONDLINE], title[MAX_CONTACTNAME];
-
- if (from == NULL) {
- mir_snwprintf(title, L"%s: %s", m_tszUserName, TranslateT("New Mail"));
- mir_snwprintf(z, TranslateT("You have %i unread messages"), cnt);
- }
- else {
- mir_snwprintf(title, TranslateT("New Mail (%i messages)"), cnt);
-
- ptrW tszFrom(mir_utf8decodeW(from));
- ptrW tszSubj(mir_utf8decodeW(subj));
- mir_snwprintf(z, TranslateT("From: %s\nSubject: %s"), (wchar_t*)tszFrom, (wchar_t*)tszSubj);
- }
-
- if (!ShowPopup(title, z, "http://mail.yahoo.com"))
- ShowNotification(title, z, NIIF_INFO);
- }
- }
-
- m_unreadMessages = cnt;
- ProtoBroadcastAck(NULL, ACKTYPE_EMAIL, ACKRESULT_STATUS, NULL, 0);
-}
-
-void CYahooProto::ext_system_message(const char *me, const char *who, const char *msg)
-{
- LOG(("[ext_system_message] System Message to: %s from: %s msg: %s", me, who, msg));
-
- ptrW tszWho(mir_utf8decodeW(who));
- ptrW tszMsg(mir_utf8decodeW(msg));
- ShowPopup((who != NULL) ? tszWho : TranslateT("Yahoo System Message"), tszMsg, NULL);
-}
-
-void CYahooProto::ext_got_identities(const char*, const char *fname, const char *lname, YList*)
-{
- LOG(("[ext_got_identities] First Name: %s, Last Name: %s", fname, lname));
-
- /* FIXME - Not implemented - Got list of Yahoo! identities */
- /* We currently only use the default identity */
- /* Also Stubbed in Sample Client */
- SetStringUtf(NULL, "FirstName", fname ? fname : "");
- SetStringUtf(NULL, "LastName", lname ? lname : "");
-}
-
-void __cdecl yahoo_get_yab_thread(void *psf)
-{
- int id = (int)psf;
-
- yahoo_get_yab(id);
-}
-
-
-void ext_yahoo_got_cookies(int id)
-{
- // char z[1024];
-
- LOG(("[ext_got_cookies] id: %d", id));
- /* LOG(("Y Cookie: '%s'", yahoo_get_cookie(id, "y")));
- LOG(("T Cookie: '%s'", yahoo_get_cookie(id, "t")));
- LOG(("C Cookie: '%s'", yahoo_get_cookie(id, "c")));
- LOG(("Login Cookie: '%s'", yahoo_get_cookie(id, "login")));
-
- //wsprintfA(z, "Cookie: %s; C=%s; Y=%s; T=%s", Bcookie, yahoo_get_cookie(id, "c"), yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
- //wsprintfA(z, "Cookie: %s; Y=%s", Bcookie, yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
- mir_snprintf(z, "Cookie: Y=%s; T=%s", yahoo_get_cookie(id, "y"), yahoo_get_cookie(id, "t"));
- LOG(("Our Cookie: '%s'", z));
- CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hnuMain, (LPARAM)z);*/
-
-#ifdef HTTP_GATEWAY
- if (iHTTPGateway) {
- char z[1024];
-
- // need to add Cookie header to our requests or we get booted w/ "Bad Cookie" message.
- mir_snprintf(z, "Cookie: Y=%s; T=%s; C=%s", yahoo_get_cookie(id, "y"),
- yahoo_get_cookie(id, "t"), yahoo_get_cookie(id, "c"));
- LOG(("Our Cookie: '%s'", z));
- CallService(MS_NETLIB_SETSTICKYHEADERS, (WPARAM)hNetlibUser, (LPARAM)z);
- }
-#endif
-
-}
-
-void CYahooProto::ext_got_ping(const char *errormsg)
-{
- LOG(("[ext_got_ping]"));
-
- if (errormsg) {
- LOG(("[ext_got_ping] Error msg: %s", errormsg));
- ptrW tszMsg(mir_utf8decodeW(errormsg));
- ShowError(TranslateT("Yahoo Ping Error"), tszMsg);
- return;
- }
-
- if (m_iStatus == ID_STATUS_CONNECTING) {
- LOG(("[ext_got_ping] We are connecting. Checking for different status. Start: %d, Current: %d", m_startStatus, m_iStatus));
- if (m_startStatus != m_iStatus) {
- LOG(("[COOKIES] Updating Status to %d ", m_startStatus));
-
- if (m_startStatus != ID_STATUS_INVISIBLE) {// don't generate a bogus packet for Invisible state
- if (m_startMsg != NULL) {
- set_status(YAHOO_STATUS_CUSTOM, m_startMsg, (m_startStatus != ID_STATUS_ONLINE) ? 1 : 0);
- }
- else
- set_status(m_startStatus, NULL, (m_startStatus != ID_STATUS_ONLINE) ? 1 : 0);
- }
-
- BroadcastStatus(m_startStatus);
- m_bLoggedIn = TRUE;
-
- /**
- * Now load the YAB.
- */
- if (getByte("UseYAB", 1)) {
- LOG(("[ext_got_ping] GET YAB"));
- if (m_iStatus != ID_STATUS_OFFLINE)
- mir_forkthread(yahoo_get_yab_thread, (void *)m_id);
- }
-
- }
- }
-}
-
-void CYahooProto::ext_login_response(int succ, const char *url)
-{
- wchar_t buff[1024];
-
- LOG(("[ext_login_response] succ: %d, url: %s", succ, url));
-
- if (succ == YAHOO_LOGIN_OK) {
- const char *c;
-
- m_status = yahoo_current_status(m_id);
- LOG(("logged in status-> %d", m_status));
-
- c = yahoo_get_pw_token(m_id);
-
- setString(YAHOO_PWTOKEN, c);
-
- LOG(("PW Token-> %s", c));
- return;
- }
-
- if (succ == YAHOO_LOGIN_UNAME) {
- mir_snwprintf(buff, TranslateT("Could not log into Yahoo service - username not recognized. Please verify that your username is correctly typed."));
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_BADUSERID);
- }
- else if (succ == YAHOO_LOGIN_PASSWD) {
- mir_snwprintf(buff, TranslateT("Could not log into Yahoo service - password incorrect. Please verify that your username and password are correctly typed."));
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
- }
- else if (succ == YAHOO_LOGIN_LOCK) {
- mir_snwprintf(buff, TranslateT("Could not log into Yahoo service. Your account has been locked.\nVisit %s to reactivate it."), _A2T(url));
- }
- else if (succ == YAHOO_LOGIN_DUPL) {
- mir_snwprintf(buff, TranslateT("You have been logged out of the Yahoo service, possibly due to a duplicate login."));
- ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
- }
- else if (succ == YAHOO_LOGIN_LOGOFF) {
- //mir_snwprintf(buff, TranslateT("You have been logged out of the Yahoo service."));
- //ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
- return; // we logged out.. so just sign-off..
- }
- else if (succ == -1) {
- /// Can't Connect or got disconnected.
- if (m_iStatus == ID_STATUS_CONNECTING)
- mir_snwprintf(buff, TranslateT("Could not connect to the Yahoo service. Check your server/port and proxy settings."));
- else
- return;
- }
- else mir_snwprintf(buff, TranslateT("Could not log in, unknown reason: %d."), succ);
-
- delSetting(YAHOO_PWTOKEN);
-
- debugLogA("ERROR: %s", buff);
-
- /*
- * Show Error Message
- */
- ShowError(TranslateT("Yahoo Login Error"), buff);
-
- /*
- * Stop the server thread and let Server cleanup
- */
- poll_loop = 0;
-}
-
-void CYahooProto::ext_error(const char *err, int fatal, int num)
-{
- ptrW tszErr(mir_utf8decodeW(err));
- wchar_t buff[1024];
-
- LOG(("[ext_error] Error: fatal: %d, num: %d, err: %s", fatal, num, err));
-
- switch (num) {
- case E_UNKNOWN:
- mir_snwprintf(buff, TranslateT("Unknown error %s"), (wchar_t*)tszErr);
- break;
- case E_CUSTOM:
- mir_snwprintf(buff, TranslateT("Custom error %s"), (wchar_t*)tszErr);
- break;
- case E_CONFNOTAVAIL:
- mir_snwprintf(buff, TranslateT("%s is not available for the conference"), (wchar_t*)tszErr);
- break;
- case E_IGNOREDUP:
- mir_snwprintf(buff, TranslateT("%s is already ignored"), (wchar_t*)tszErr);
- break;
- case E_IGNORENONE:
- mir_snwprintf(buff, TranslateT("%s is not in the ignore list"), (wchar_t*)tszErr);
- break;
- case E_IGNORECONF:
- mir_snwprintf(buff, TranslateT("%s is in buddy list - cannot ignore"), (wchar_t*)tszErr);
- break;
- case E_SYSTEM:
- mir_snwprintf(buff, TranslateT("System Error: %s"), (wchar_t*)tszErr);
- break;
- case E_CONNECTION:
- mir_snwprintf(buff, TranslateT("Server Connection Error: %s"), (wchar_t*)tszErr);
- debugLogA("Error: %S", buff);
- return;
- }
-
- debugLogA("Error: %S", buff);
-
- /*
- * Show Error Message
- */
- ShowError(TranslateT("Yahoo Error"), buff);
-}
-
-extern HANDLE g_hNetlibUser;
-
-INT_PTR CYahooProto::ext_connect(const char *h, int p, int type)
-{
- LOG(("[ext_connect] %s:%d type: %d", h, p, type));
-
- HANDLE hUser = m_hNetlibUser;
- NETLIBOPENCONNECTION ncon = { 0 };
- ncon.cbSize = sizeof(ncon);
- ncon.flags = NLOCF_V2;
- ncon.szHost = h;
- ncon.wPort = p;
- ncon.timeout = 5;
-
- if (type != YAHOO_CONNECTION_PAGER) {
- ncon.flags |= NLOCF_HTTP;
- hUser = g_hNetlibUser;
- }
-
- HANDLE con = (HANDLE)CallService(MS_NETLIB_OPENCONNECTION, (WPARAM)hUser, (LPARAM)&ncon);
- if (con == NULL) {
- LOG(("ERROR: Connect Failed!"));
- return -1;
- }
-
- LOG(("[ext_connect] Got: %d", (int)con));
-
- return (INT_PTR)con;
-}
-
-void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const char *method, const char *url,
- const char *cookies, long content_length, yahoo_get_fd_callback callback, void *callback_data)
-{
- /* if (mir_strcmpi(method, "GET") == 0)
- yahoo_http_get(id, url, cookies, callback, callback_data);
- else if (mir_strcmpi(method, "POST") == 0)
- yahoo_http_post(id, url, cookies, content_length, callback, callback_data);
- else
- LOG(("ERROR: Unknown method: %s", method));
- */
- NETLIBHTTPREQUEST nlhr = { 0 };
- NETLIBHTTPHEADER httpHeaders[5];
- int error = 0;
- INT_PTR fd;
- char host[255];
- int port = 80, i = 0;
- char path[255];
- char z[1024];
-
- LOG(("[ext_send_http_request] type: %d, method: %s, url: %s, cookies: %s, content length: %ld",
- type, method, url, cookies, content_length));
-
- if (!url_to_host_port_path(url, host, &port, path))
- return;
-
- fd = ext_connect(host, port, type);
-
- if (fd < 0) {
- LOG(("[ext_send_http_request] Can't connect?? Exiting..."));
- //return;
- }
- else {
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType = (mir_strcmpi(method, "GET") == 0) ? REQUEST_GET : REQUEST_POST;
- nlhr.flags = NLHRF_DUMPASTEXT | NLHRF_HTTP11;
- nlhr.szUrl = (char *)path;
- nlhr.headers = httpHeaders;
- nlhr.headersCount = 3;
-
- if (cookies != NULL && cookies[0] != '\0') {
- httpHeaders[i].szName = "Cookie";
- httpHeaders[i].szValue = (char *)cookies;
- nlhr.headersCount = 4;
- i++;
- }
-
- httpHeaders[i].szName = "User-Agent";
- httpHeaders[i].szValue = NETLIB_USER_AGENT;
- i++;
-
- httpHeaders[i].szName = "Host";
- httpHeaders[i].szValue = host;
- i++;
-
- if (nlhr.requestType == REQUEST_POST) {
- httpHeaders[nlhr.headersCount].szName = "Content-Length";
- mir_snprintf(z, "%d", content_length);
- httpHeaders[nlhr.headersCount].szValue = z;
-
- nlhr.headersCount++;
- }
-
- httpHeaders[i].szName = "Cache-Control";
- httpHeaders[i].szValue = "no-cache";
- i++;
-
- error = CallService(MS_NETLIB_SENDHTTPREQUEST, (WPARAM)fd, (LPARAM)&nlhr);
- }
-
- callback(m_id, fd, error == SOCKET_ERROR, callback_data);
-}
-
-/*************************************
- * Callback handling code starts here
- */
-unsigned int CYahooProto::ext_add_handler(int fd, yahoo_input_condition cond, void *data)
-{
- _conn *c = y_new0(_conn, 1);
-
- c->tag = ++m_connection_tags;
- c->id = m_id;
- c->fd = fd;
- c->cond = cond;
- c->data = data;
-
- LOG(("[ext_add_handler] fd:%d, id:%d, cond: %d, tag %d", fd, m_id, cond, c->tag));
-
- m_connections = y_list_prepend(m_connections, c);
-
- return c->tag;
-}
-
-void CYahooProto::ext_remove_handler(unsigned int tag)
-{
- LOG(("[ext_remove_handler] id:%d tag:%d ", m_id, tag));
-
- for (YList *l = m_connections; l; l = y_list_next(l)) {
- _conn *c = (_conn*)l->data;
- if (c->tag == tag) {
- /* don't actually remove it, just mark it for removal */
- /* we'll remove when we start the next poll cycle */
- LOG(("Marking id:%d fd:%d tag:%d for removal", c->id, c->fd, c->tag));
- c->remove = 1;
- return;
- }
- }
-}
-
-struct connect_callback_data
-{
- yahoo_connect_callback callback;
- void * callback_data;
- int id;
- int tag;
-};
-
-void ext_yahoo_remove_handler(int id, unsigned int tag);
-
-static void connect_complete(void *data, int source, yahoo_input_condition)
-{
- connect_callback_data *ccd = (connect_callback_data*)data;
- int error = 0;//, err_size = sizeof(error);
- NETLIBSELECT tSelect = { 0 };
-
- ext_yahoo_remove_handler(ccd->id, ccd->tag);
-
- tSelect.cbSize = sizeof(tSelect);
- tSelect.dwTimeout = 1;
- tSelect.hReadConns[0] = (HANDLE)source;
- error = CallService(MS_NETLIB_SELECT, 0, (LPARAM)&tSelect);
-
- if (error) {
- //close(source);
- Netlib_CloseHandle((HANDLE)source);
- source = -1;
- }
-
- LOG(("Connected fd: %d, error: %d", source, error));
-
- ccd->callback(source, error, ccd->callback_data);
- FREE(ccd);
-}
-
-void yahoo_callback(_conn *c, yahoo_input_condition cond)
-{
- int ret = 1;
-
- if (c->id < 0)
- connect_complete(c->data, c->fd, cond);
- else if (c->fd > 0) {
- if (cond & YAHOO_INPUT_READ)
- ret = yahoo_read_ready(c->id, c->fd, c->data);
- if (ret > 0 && cond & YAHOO_INPUT_WRITE)
- ret = yahoo_write_ready(c->id, c->fd, c->data);
-
- if (ret == -1) {
- LOG(("Yahoo read error (%d): %s", errno, strerror(errno)));
- }
- else if (ret == 0)
- LOG(("Yahoo read error: Server closed socket"));
- }
-
- //LOG(("[yahoo_callback] id: %d exiting...", c->id));
-}
-
-int CYahooProto::ext_connect_async(const char *host, int port, int type, yahoo_connect_callback callback, void *data)
-{
- int err = 0;
- INT_PTR res;
-
- LOG(("[ext_connect_async] %s:%d type: %d", host, port, type));
-
- res = ext_connect(host, port, type);
-
- LOG(("[ext_connect_async] %s:%d type: %d, result: %d", host, port, type, res));
-
- if (type == YAHOO_CONNECTION_PAGER && res < 1) {
- err = 1;
- }
-
- /*
- * need to call the callback so we could handle the failure condition!!!
- * fd = -1 in case of an error
- */
- callback(res, err, data);
-
- /*
- * Return proper thing: 0 - ok, -1 - failed, >0 - pending connect
- */
- return (res <= 0) ? -1 : 0;
-}
-/*
- * Callback handling code ends here
- ***********************************/
-char * CYahooProto::ext_send_https_request(yahoo_data *yd, const char *host, const char *path)
-{
- NETLIBHTTPREQUEST nlhr = { 0 }, *nlhrReply;
- char z[4096], *result = NULL;
- int i;
-
- mir_snprintf(z, "https://%s%s", host, path);
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType = REQUEST_GET;
- nlhr.flags = NLHRF_HTTP11 | NLHRF_NODUMPSEND | NLHRF_DUMPASTEXT; /* Use HTTP/1.1 and don't dump the requests to the log */
- nlhr.szUrl = z;
-
- nlhr.headersCount = 3;
- nlhr.headers = (NETLIBHTTPHEADER*)mir_alloc(sizeof(NETLIBHTTPHEADER)*(nlhr.headersCount + 5));
- nlhr.headers[0].szName = "User-Agent";
- nlhr.headers[0].szValue = NETLIB_USER_AGENT;
- nlhr.headers[1].szName = "Cache-Control";
- nlhr.headers[1].szValue = "no-cache";
- nlhr.headers[2].szName = "Connection";
- nlhr.headers[2].szValue = "close"; /*"Keep-Alive";*/
-
- nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)g_hNetlibUser, (LPARAM)&nlhr);
- if (nlhrReply) {
-
- if (nlhrReply->resultCode == 200 && nlhrReply->pData != NULL) {
- result = strdup(nlhrReply->pData);
- }
- else {
- LOG(("[ext_send_https_request] Got result code: %d, content length: %d", nlhrReply->resultCode, nlhrReply->dataLength));
- }
-
- LOG(("Got %d headers!", nlhrReply->headersCount));
-
- for (i = 0; i < nlhrReply->headersCount; i++) {
- //LOG(("%s: %s", nlhrReply->headers[i].szName, nlhrReply->headers[i].szValue));
-
- if (mir_strcmpi(nlhrReply->headers[i].szName, "Set-Cookie") == 0) {
- //LOG(("Found Cookie... Yum yum..."));
-
- if (nlhrReply->headers[i].szValue[0] == 'B' && nlhrReply->headers[i].szValue[1] == '=') {
-
- FREE(yd->cookie_b);
- yd->cookie_b = getcookie(nlhrReply->headers[i].szValue);
-
- LOG(("Got B Cookie: %s", yd->cookie_b));
- }
- }
- }
-
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
- }
- else {
- LOG(("No Response???"));
- }
-
- mir_free(nlhr.headers);
-
- return result;
-}
-
-void CYahooProto::ext_login(enum yahoo_status login_mode)
-{
- char host[128];
- int port = 0;
- DBVARIANT dbv;
-#ifdef HTTP_GATEWAY
- NETLIBUSERSETTINGS nlus = { 0 };
-#endif
-
- LOG(("[ext_login]"));
-
- host[0] = '\0';
-
- /**
- * Implementing Yahoo 9 2 Stage Login using their VIP server/services
- */
- NETLIBHTTPREQUEST nlhr = { 0 };
- nlhr.cbSize = sizeof(nlhr);
- nlhr.requestType = REQUEST_GET;
- nlhr.flags = NLHRF_HTTP11;
- nlhr.szUrl = "http://vcs.msg.yahoo.com/capacity";
-
- NETLIBHTTPREQUEST *nlhrReply = (NETLIBHTTPREQUEST*)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)g_hNetlibUser, (LPARAM)&nlhr);
- if (nlhrReply) {
- if (nlhrReply->resultCode == 200 && nlhrReply->pData != NULL) {
- char *c = strstr(nlhrReply->pData, "CS_IP_ADDRESS=");
-
- if (c != NULL) {
- char *t = c;
-
- while ((*t) != '=') t++; /* scan until = */
- t++;
-
- while ((*c) != '\0' && (*c) != '\r' && (*c) != '\n') c++;
-
- memcpy(host, t, c - t);
- host[c - t] = '\0';
-
- LOG(("Got Host: %s", host));
- }
- }
- else {
- LOG(("Problem retrieving a response from VIP server."));
- }
-
- CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, 0, (LPARAM)nlhrReply);
- }
-
- if (host[0] == '\0') {
- if (!getString(YAHOO_LOGINSERVER, &dbv)) {
- strncpy_s(host, dbv.pszVal, _TRUNCATE);
- db_free(&dbv);
- }
- else strncpy_s(host, YAHOO_DEFAULT_LOGIN_SERVER, _TRUNCATE);
- }
-
- port = getWord(NULL, YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT);
-
-#ifdef HTTP_GATEWAY
- nlus.cbSize = sizeof( nlus );
- if (CallService(MS_NETLIB_GETUSERSETTINGS, (WPARAM) hNetlibUser, (LPARAM) &nlus) == 0) {
- LOG(("ERROR: Problem retrieving miranda network settings!!!"));
- }
-
- iHTTPGateway = (nlus.useProxy && nlus.proxyType == PROXYTYPE_HTTP) ? 1:0;
- LOG(("Proxy Type: %d HTTP Gateway: %d", nlus.proxyType, iHTTPGateway));
-#endif
-
- m_id = yahoo_init_with_attributes(m_yahoo_id, m_password, m_pw_token,
- "pager_host", host,
- "pager_port", port,
- "filetransfer_host", "filetransfer.msg.yahoo.com",
- "picture_checksum", getDword("AvatarHash", -1),
-#ifdef HTTP_GATEWAY
- "web_messenger", iHTTPGateway,
-#endif
- "login_host", "login.yahoo.com",
- NULL);
-
- m_status = YAHOO_STATUS_OFFLINE;
- yahoo_login(m_id, login_mode);
-
- if (m_id <= 0) {
- LOG(("Could not connect to Yahoo server. Please verify that you are connected to the net and the pager host and port are correctly entered."));
- ShowError(TranslateT("Yahoo Login Error"), TranslateT("Could not connect to Yahoo server. Please verify that you are connected to the net and the pager host and port are correctly entered."));
- return;
- }
-
- //rearm(&pingTimer, 600);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// stubs
-
-CYahooProto* __fastcall getProtoById(int id)
-{
- for (int i = 0; i < g_instances.getCount(); i++)
- if (g_instances[i]->m_id == id)
- return g_instances[i];
-
- return NULL;
-}
-
-unsigned int ext_yahoo_add_handler(int id, INT_PTR fd, yahoo_input_condition cond, void *data)
-{
- CYahooProto* ppro = getProtoById(id);
- if (ppro)
- return ppro->ext_add_handler(fd, cond, data);
-
- return 0;
-}
-
-void ext_yahoo_remove_handler(int id, unsigned int tag)
-{
- GETPROTOBYID(id)->ext_remove_handler(tag);
-}
-
-void ext_yahoo_status_changed(int id, const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int utf8)
-{
- GETPROTOBYID(id)->ext_status_changed(who, protocol, stat, msg, away, idle, mobile, utf8);
-}
-
-void ext_yahoo_status_logon(int id, const char *who, int protocol, int stat, const char *msg, int away, int idle, int mobile, int cksum, int buddy_icon, long client_version, int utf8)
-{
- GETPROTOBYID(id)->ext_status_logon(who, protocol, stat, msg, away, idle, mobile, cksum, buddy_icon, client_version, utf8);
-}
-
-void ext_yahoo_got_audible(int id, const char *me, const char *who, const char *aud, const char *msg, const char *aud_hash)
-{
- GETPROTOBYID(id)->ext_got_audible(me, who, aud, msg, aud_hash);
-}
-
-void ext_yahoo_got_calendar(int id, const char *url, int type, const char *msg, int svc)
-{
- GETPROTOBYID(id)->ext_got_calendar(url, type, msg, svc);
-}
-
-void ext_yahoo_got_stealth(int id, char *stealthlist)
-{
- GETPROTOBYID(id)->ext_got_stealth(stealthlist);
-}
-
-void ext_yahoo_got_buddies(int id, YList * buds)
-{
- GETPROTOBYID(id)->ext_got_buddies(buds);
-}
-
-void ext_yahoo_rejected(int id, const char *who, const char *msg)
-{
- GETPROTOBYID(id)->ext_rejected(who, msg);
-}
-
-void ext_yahoo_buddy_added(int id, char *myid, char *who, char *group, int status, int auth)
-{
- GETPROTOBYID(id)->ext_buddy_added(myid, who, group, status, auth);
-}
-
-void ext_yahoo_buddy_group_changed(int, char*, char *who, char *old_group, char *new_group)
-{
- LOG(("[ext_yahoo_buddy_group_changed] %s has been moved from group: %s to: %s", who, old_group, new_group));
-}
-
-void ext_yahoo_contact_added(int id, const char *myid, const char *who, const char *fname, const char *lname, const char *msg, int protocol)
-{
- GETPROTOBYID(id)->ext_contact_added(myid, who, fname, lname, msg, protocol);
-}
-
-void ext_yahoo_typing_notify(int id, const char *me, const char *who, int protocol, int stat)
-{
- GETPROTOBYID(id)->ext_typing_notify(me, who, protocol, stat);
-}
-
-void ext_yahoo_game_notify(int id, const char *me, const char *who, int stat, const char *msg)
-{
- GETPROTOBYID(id)->ext_game_notify(me, who, stat, msg);
-}
-
-void ext_yahoo_mail_notify(int id, const char *from, const char *subj, int cnt)
-{
- GETPROTOBYID(id)->ext_mail_notify(from, subj, cnt);
-}
-
-void ext_yahoo_system_message(int id, const char *me, const char *who, const char *msg)
-{
- GETPROTOBYID(id)->ext_system_message(me, who, msg);
-}
-
-void ext_yahoo_got_identities(int id, const char *nick, const char *fname, const char *lname, YList * ids)
-{
- GETPROTOBYID(id)->ext_got_identities(nick, fname, lname, ids);
-}
-
-void ext_yahoo_got_ping(int id, const char *errormsg)
-{
- GETPROTOBYID(id)->ext_got_ping(errormsg);
-}
-
-void ext_yahoo_error(int id, const char *err, int fatal, int num)
-{
- GETPROTOBYID(id)->ext_error(err, fatal, num);
-}
-
-void ext_yahoo_login_response(int id, int succ, const char *url)
-{
- GETPROTOBYID(id)->ext_login_response(succ, url);
-}
-
-void ext_yahoo_got_im(int id, const char *me, const char *who, int protocol, const char *msg, long tm, int stat, int utf8, int buddy_icon, const char *seqn, int sendn)
-{
- GETPROTOBYID(id)->ext_got_im(me, who, protocol, msg, tm, stat, utf8, buddy_icon, seqn, sendn);
-}
-
-void ext_yahoo_got_search_result(int id, int found, int start, int total, YList *contacts)
-{
- GETPROTOBYID(id)->ext_got_search_result(found, start, total, contacts);
-}
-
-void ext_yahoo_got_picture(int id, const char *me, const char *who, const char *pic_url, int cksum, int type)
-{
- GETPROTOBYID(id)->ext_got_picture(me, who, pic_url, cksum, type);
-}
-
-void ext_yahoo_got_picture_checksum(int id, const char *me, const char *who, int cksum)
-{
- GETPROTOBYID(id)->ext_got_picture_checksum(me, who, cksum);
-}
-
-void ext_yahoo_got_picture_update(int id, const char *me, const char *who, int buddy_icon)
-{
- GETPROTOBYID(id)->ext_got_picture_update(me, who, buddy_icon);
-}
-
-void ext_yahoo_got_picture_status(int id, const char *me, const char *who, int buddy_icon)
-{
- GETPROTOBYID(id)->ext_got_picture_status(me, who, buddy_icon);
-}
-
-void ext_yahoo_got_picture_upload(int id, const char *me, const char *url, unsigned int ts)
-{
- GETPROTOBYID(id)->ext_got_picture_upload(me, url, ts);
-}
-
-void ext_yahoo_got_avatar_share(int id, int buddy_icon)
-{
- GETPROTOBYID(id)->ext_got_avatar_share(buddy_icon);
-}
-
-void ext_yahoo_got_file(int id, const char *me, const char *who, const char *url, long expires, const char *msg, const char *fname, unsigned long fesize, const char *ft_token, int y7)
-{
- GETPROTOBYID(id)->ext_got_file(me, who, url, expires, msg, fname, fesize, ft_token, y7);
-}
-
-void ext_yahoo_got_files(int id, const char *me, const char *who, const char *ft_token, int y7, YList* files)
-{
- GETPROTOBYID(id)->ext_got_files(me, who, ft_token, y7, files);
-}
-
-void ext_yahoo_got_file7info(int id, const char *me, const char *who, const char *url, const char *fname, const char *ft_token)
-{
- GETPROTOBYID(id)->ext_got_file7info(me, who, url, fname, ft_token);
-}
-
-void ext_yahoo_ft7_send_file(int id, const char *me, const char *who, const char *filename, const char *token, const char *ft_token)
-{
- GETPROTOBYID(id)->ext_ft7_send_file(me, who, filename, token, ft_token);
-}
-
-int ext_yahoo_connect_async(int id, const char *host, int port, int type, yahoo_connect_callback callback, void *data)
-{
- CYahooProto* ppro = getProtoById(id);
- if (ppro)
- return ppro->ext_connect_async(host, port, type, callback, data);
- return SOCKET_ERROR;
-}
-
-void ext_yahoo_send_http_request(int id, enum yahoo_connection_type type, const char *method, const char *url, const char *cookies, long content_length, yahoo_get_fd_callback callback, void *callback_data)
-{
- GETPROTOBYID(id)->ext_send_http_request(type, method, url, cookies, content_length, callback, callback_data);
-}
-
-char *ext_yahoo_send_https_request(yahoo_data *yd, const char *host, const char *path)
-{
- CYahooProto* ppro = getProtoById(yd->client_id);
- if (ppro)
- return ppro->ext_send_https_request(yd, host, path);
- return NULL;
-}
-
-void ext_yahoo_got_ignore(int id, YList * igns)
-{
- GETPROTOBYID(id)->ext_got_ignore(igns);
-}
-
-void register_callbacks()
-{
- static yahoo_callbacks yc;
-
- yc.ext_yahoo_login_response = ext_yahoo_login_response;
- yc.ext_yahoo_got_buddies = ext_yahoo_got_buddies;
- yc.ext_yahoo_got_ignore = ext_yahoo_got_ignore;
- yc.ext_yahoo_got_identities = ext_yahoo_got_identities;
- yc.ext_yahoo_got_cookies = ext_yahoo_got_cookies;
- yc.ext_yahoo_status_changed = ext_yahoo_status_changed;
- yc.ext_yahoo_status_logon = ext_yahoo_status_logon;
- yc.ext_yahoo_got_im = ext_yahoo_got_im;
- yc.ext_yahoo_got_conf_invite = ext_yahoo_got_conf_invite;
- yc.ext_yahoo_conf_userdecline = ext_yahoo_conf_userdecline;
- yc.ext_yahoo_conf_userjoin = ext_yahoo_conf_userjoin;
- yc.ext_yahoo_conf_userleave = ext_yahoo_conf_userleave;
- yc.ext_yahoo_conf_message = ext_yahoo_conf_message;
- yc.ext_yahoo_chat_cat_xml = ext_yahoo_chat_cat_xml;
- yc.ext_yahoo_chat_join = ext_yahoo_chat_join;
- yc.ext_yahoo_chat_userjoin = ext_yahoo_chat_userjoin;
- yc.ext_yahoo_chat_userleave = ext_yahoo_chat_userleave;
- yc.ext_yahoo_chat_message = ext_yahoo_chat_message;
- yc.ext_yahoo_chat_yahoologout = ext_yahoo_chat_yahoologout;
- yc.ext_yahoo_chat_yahooerror = ext_yahoo_chat_yahooerror;
- yc.ext_yahoo_got_webcam_image = ext_yahoo_got_webcam_image;
- yc.ext_yahoo_webcam_invite = ext_yahoo_webcam_invite;
- yc.ext_yahoo_webcam_invite_reply = ext_yahoo_webcam_invite_reply;
- yc.ext_yahoo_webcam_closed = ext_yahoo_webcam_closed;
- yc.ext_yahoo_webcam_viewer = ext_yahoo_webcam_viewer;
- yc.ext_yahoo_webcam_data_request = ext_yahoo_webcam_data_request;
- yc.ext_yahoo_got_file = ext_yahoo_got_file;
- yc.ext_yahoo_got_files = ext_yahoo_got_files;
- yc.ext_yahoo_got_file7info = ext_yahoo_got_file7info;
- yc.ext_yahoo_send_file7info = ext_yahoo_send_file7info;
- yc.ext_yahoo_ft7_send_file = ext_yahoo_ft7_send_file;
- yc.ext_yahoo_contact_added = ext_yahoo_contact_added;
- yc.ext_yahoo_rejected = ext_yahoo_rejected;
- yc.ext_yahoo_typing_notify = ext_yahoo_typing_notify;
- yc.ext_yahoo_game_notify = ext_yahoo_game_notify;
- yc.ext_yahoo_mail_notify = ext_yahoo_mail_notify;
- yc.ext_yahoo_got_search_result = ext_yahoo_got_search_result;
- yc.ext_yahoo_system_message = ext_yahoo_system_message;
- yc.ext_yahoo_error = ext_yahoo_error;
- yc.ext_yahoo_log = debugLogA;
- yc.ext_yahoo_add_handler = ext_yahoo_add_handler;
- yc.ext_yahoo_remove_handler = ext_yahoo_remove_handler;
- //yc.ext_yahoo_connect = ext_yahoo_connect; not needed in fact
- yc.ext_yahoo_connect_async = ext_yahoo_connect_async;
- yc.ext_yahoo_send_http_request = ext_yahoo_send_http_request;
-
- yc.ext_yahoo_got_stealthlist = ext_yahoo_got_stealth;
- yc.ext_yahoo_got_ping = ext_yahoo_got_ping;
- yc.ext_yahoo_got_picture = ext_yahoo_got_picture;
- yc.ext_yahoo_got_picture_checksum = ext_yahoo_got_picture_checksum;
- yc.ext_yahoo_got_picture_update = ext_yahoo_got_picture_update;
- yc.ext_yahoo_got_avatar_share = ext_yahoo_got_avatar_share;
-
- yc.ext_yahoo_buddy_added = ext_yahoo_buddy_added;
- yc.ext_yahoo_got_picture_upload = ext_yahoo_got_picture_upload;
- yc.ext_yahoo_got_picture_status = ext_yahoo_got_picture_status;
- yc.ext_yahoo_got_audible = ext_yahoo_got_audible;
- yc.ext_yahoo_got_calendar = ext_yahoo_got_calendar;
- yc.ext_yahoo_buddy_group_changed = ext_yahoo_buddy_group_changed;
-
- yc.ext_yahoo_send_https_request = ext_yahoo_send_https_request;
-
- yahoo_register_callbacks(&yc);
-}
diff --git a/tools/_deprecated/YahooGroups/YahooGroups.vcxproj b/tools/_deprecated/YahooGroups/YahooGroups.vcxproj deleted file mode 100644 index ff220ea5b0..0000000000 --- a/tools/_deprecated/YahooGroups/YahooGroups.vcxproj +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{0E73244B-30D7-4A62-B4B3-9A32B96EC1B7}</ProjectGuid>
- <ProjectName>YahooGroups</ProjectName>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/YahooGroups.vcxproj.filters b/tools/_deprecated/YahooGroups/YahooGroups.vcxproj.filters deleted file mode 100644 index de5ad9f66c..0000000000 --- a/tools/_deprecated/YahooGroups/YahooGroups.vcxproj.filters +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
-</Project>
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/docs/YahooGroups_readme.txt b/tools/_deprecated/YahooGroups/docs/YahooGroups_readme.txt deleted file mode 100644 index ad15484fc2..0000000000 --- a/tools/_deprecated/YahooGroups/docs/YahooGroups_readme.txt +++ /dev/null @@ -1,23 +0,0 @@ -Yahoo Groups plugin v.0.0.1.1
-Copyright © 2007-2008 Cristian Libotean
-
-The plugin will move all your Yahoo contacts into the groups from the official Yahoo Messenger.
-
-Warning: Use with care!!! Please backup your profile before using this plugin !!!
-
-Changes:
-
-+ : new feature
-* : changed
-! : bufgix
-- : feature removed or disabled because of pending bugs
-
-v. 0.0.1.1 - 2008/01/24
- * Changed beta versions server.
-
-v. 0.0.1.0 - 2007/12/03
- ! Fixed subgroups bug. Subgroups should now be created correctly.
- + Create unicode groups if unicode core found, ansi groups with ansi core.
-
-v. 0.0.0.1 - 2007/11/16
- + Initial release.
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/res/YahooGroups.rc b/tools/_deprecated/YahooGroups/res/YahooGroups.rc deleted file mode 100644 index 9a3ff16b44..0000000000 --- a/tools/_deprecated/YahooGroups/res/YahooGroups.rc +++ /dev/null @@ -1,98 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "..\src\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\src\\resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_OPTIONS DIALOGEX 0, 0, 231, 46
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- PUSHBUTTON "Move Yahoo contacts to groups now",IDC_YAHOOGROUPS,4,5,223,14
- CONTROL "Move Yahoo contacts automatically on startup",IDC_MOVEAUTOMATICALLY,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,25,223,10
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_OPTIONS, DIALOG
- BEGIN
- LEFTMARGIN, 4
- RIGHTMARGIN, 227
- TOPMARGIN, 5
- BOTTOMMARGIN, 42
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/tools/_deprecated/YahooGroups/res/version.rc b/tools/_deprecated/YahooGroups/res/version.rc deleted file mode 100644 index 5bfbab4754..0000000000 --- a/tools/_deprecated/YahooGroups/res/version.rc +++ /dev/null @@ -1,38 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#ifdef APSTUDIO_INVOKED
-#error this file is not editable by Microsoft Visual C++
-#endif //APSTUDIO_INVOKED
-
-#include "afxres.h"
-#include "..\src\version.h"
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION __FILEVERSION_STRING
- PRODUCTVERSION __FILEVERSION_STRING
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x0L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "000004b0"
- BEGIN
- VALUE "FileDescription", __DESCRIPTION
- VALUE "InternalName", __PLUGIN_NAME
- VALUE "LegalCopyright", __COPYRIGHT
- VALUE "OriginalFilename", __FILENAME
- VALUE "ProductName", __PLUGIN_NAME
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0, 1200
- END
-END
diff --git a/tools/_deprecated/YahooGroups/src/YahooGroups.cpp b/tools/_deprecated/YahooGroups/src/YahooGroups.cpp deleted file mode 100644 index da71a8f752..0000000000 --- a/tools/_deprecated/YahooGroups/src/YahooGroups.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-CLIST_INTERFACE *pcli;
-char ModuleName[] = "YahooGroups";
-HINSTANCE hInstance;
-
-UINT currentCodePage = 0;
-int hLangpack = 0;
-
-PLUGININFOEX pluginInfo = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESCRIPTION,
- __AUTHOR,
- __AUTHOREMAIL,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- // {2F3FE8B9-7327-4008-A60D-93F0F4F7F0F1}
- {0x2f3fe8b9, 0x7327, 0x4008, {0xa6, 0x0d, 0x93, 0xf0, 0xf4, 0xf7, 0xf0, 0xf1}}
-};
-
-extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfo;
-}
-
-extern "C" int __declspec(dllexport) Load()
-{
- mir_getLP(&pluginInfo);
- pcli = Clist_GetInterface();
-
- currentCodePage = Langpack_GetDefaultCodePage();
-
- InitServices();
-
- HookEvents();
-
- return 0;
-}
-
-extern "C" int __declspec(dllexport) Unload()
-{
- DestroyServices();
-
- UnhookEvents();
- return 0;
-}
-
-bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID)
-{
- hInstance = hinstDLL;
- if (fdwReason == DLL_PROCESS_ATTACH)
- DisableThreadLibraryCalls(hinstDLL);
-
- return TRUE;
-}
diff --git a/tools/_deprecated/YahooGroups/src/dlg_handlers.cpp b/tools/_deprecated/YahooGroups/src/dlg_handlers.cpp deleted file mode 100644 index 1bb4ae8b58..0000000000 --- a/tools/_deprecated/YahooGroups/src/dlg_handlers.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hWnd);
-
- int autoMove = db_get_b(NULL, ModuleName, "MoveAutomatically", 0);
- CheckDlgButton(hWnd, IDC_MOVEAUTOMATICALLY, autoMove ? BST_CHECKED : BST_UNCHECKED);
-
- return 0;
- break;
- }
-
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
- {
- case IDC_YAHOOGROUPS:
- {
- YahooGroupsMoveService(0,0);
- break;
- }
-
- case IDC_MOVEAUTOMATICALLY:
- {
- SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
- break;
- }
- }
-
- break;
- }
-
- case WM_NOTIFY:
- {
- switch(((LPNMHDR)lParam)->idFrom)
- {
- case 0:
- {
- switch (((LPNMHDR)lParam)->code)
- {
- case PSN_APPLY:
- {
- int autoMove = IsDlgButtonChecked(hWnd, IDC_MOVEAUTOMATICALLY);
- db_set_b(NULL, ModuleName, "MoveAutomatically", autoMove);
- break;
- }
- }
-
- break;
- }
- }
-
- break;
- }
-
- }
-
- return 0;
-}
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/dlg_handlers.h b/tools/_deprecated/YahooGroups/src/dlg_handlers.h deleted file mode 100644 index e1fe1b8115..0000000000 --- a/tools/_deprecated/YahooGroups/src/dlg_handlers.h +++ /dev/null @@ -1,29 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_YAHOOGROUPS_DLGHANDLERS_H
-#define M_YAHOOGROUPS_DLGHANDLERS_H
-
-#include "stdafx.h"
-
-INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
-
-
-#endif //M_YAHOOGROUPS_DLG_HANDLERS_H
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/hooked_events.cpp b/tools/_deprecated/YahooGroups/src/hooked_events.cpp deleted file mode 100644 index 722075e1f6..0000000000 --- a/tools/_deprecated/YahooGroups/src/hooked_events.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-HANDLE hModulesLoaded;
-HANDLE hOptionsInitialize;
-
-
-int HookEvents()
-{
- hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
- hOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
-
- return 0;
-}
-
-int UnhookEvents()
-{
- UnhookEvent(hModulesLoaded);
- UnhookEvent(hOptionsInitialize);
-
- return 0;
-}
-
-int OnModulesLoaded(WPARAM, LPARAM)
-{
- int autoMove = db_get_b(NULL, ModuleName, "MoveAutomatically", 0);
- if (autoMove)
- YahooGroupsMoveService(0,0);
-
- return 0;
-}
-
-int OnOptionsInitialise(WPARAM wParam, LPARAM)
-{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.position = 100000000;
- odp.hInstance = hInstance;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pwszTitle = LPGENW("Yahoo Groups");
- odp.pwszGroup = LPGENW("Plugins");
- odp.groupPosition = 810000000;
- odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
- odp.pfnDlgProc = DlgProcOptions;
- Options_AddPage(wParam, &odp);
- return 0;
-}
diff --git a/tools/_deprecated/YahooGroups/src/hooked_events.h b/tools/_deprecated/YahooGroups/src/hooked_events.h deleted file mode 100644 index 555fe570e9..0000000000 --- a/tools/_deprecated/YahooGroups/src/hooked_events.h +++ /dev/null @@ -1,36 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef M_YAHOOGROUPS_HOOKED_EVENTS_H
-#define M_YAHOOGROUPS_HOOKED_EVENTS_H
-
-#include "stdafx.h"
-
-extern HANDLE hModulesLoaded;
-extern HANDLE hOptionsInitialise;
-
-int HookEvents();
-int UnhookEvents();
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
-int OnOptionsInitialise(WPARAM wParam, LPARAM lParam);
-
-#endif
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/list.cpp b/tools/_deprecated/YahooGroups/src/list.cpp deleted file mode 100644 index 491867af2d..0000000000 --- a/tools/_deprecated/YahooGroups/src/list.cpp +++ /dev/null @@ -1,106 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-CGroupsList availableGroups;
-
-void CGroupsList::Enlarge(int amount)
-{
- size += amount;
- groups = (char **) realloc(groups, size * sizeof(char *));
-}
-
-void CGroupsList::EnsureCapacity()
-{
- if (count >= size - 1)
- {
- Enlarge(size / 2);
- }
-}
-
-CGroupsList::CGroupsList()
-{
- groups = NULL;
- size = 0;
- count = 0;
- Enlarge(10);
-}
-
-CGroupsList::~CGroupsList()
-{
- Clear();
-
- free(groups);
- groups = NULL;
-}
-
-void CGroupsList::Clear()
-{
- if (groups)
- {
- for (int i = 0; i < count; i++)
- {
- delete groups[i];
- }
-
- count = 0;
- }
-}
-
-void CGroupsList::Add(char *group)
-{
- EnsureCapacity();
- groups[count++] = group;
-}
-
-char *CGroupsList::operator [](int index)
-{
- if ((index < 0) || (index >= count))
- {
- return NULL;
- }
-
- return groups[index];
-}
-
-int CGroupsList::Count()
-{
- return count;
-}
-
-int CGroupsList::Contains(const char *group)
-{
- return (Index(group) >= 0);
-}
-
-int CGroupsList::Index(const char *group)
-{
- int i;
- for (i = 0; i < count; i++)
- {
- if (_stricmp(groups[i], group) == 0)
- {
- return i;
- }
- }
-
- return -1;
-}
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/list.h b/tools/_deprecated/YahooGroups/src/list.h deleted file mode 100644 index 87ff6b93a6..0000000000 --- a/tools/_deprecated/YahooGroups/src/list.h +++ /dev/null @@ -1,53 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_YAHOOGROUPS_LIST_H
-#define M_YAHOOGROUPS_LIST_H
-
-#include "stdafx.h"
-
-class CGroupsList
-{
- protected:
- char **groups;
- int size;
- int count;
-
- void Enlarge(int amount);
- void EnsureCapacity();
-
- public:
- CGroupsList();
- ~CGroupsList();
-
- void Add(char *group);
- void Clear();
-
- int Count();
-
- int Contains(const char *group);
- int Index(const char *group);
-
- char *operator [](int index);
-};
-
-extern CGroupsList availableGroups;
-
-#endif //M_VIUPLOADER_LIST_H
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/resource.h b/tools/_deprecated/YahooGroups/src/resource.h deleted file mode 100644 index 1f15e3a8a1..0000000000 --- a/tools/_deprecated/YahooGroups/src/resource.h +++ /dev/null @@ -1,19 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by YahooGroups.rc
-//
-#define IDD_OPTIONS 101
-#define IDC_YAHOOGROUPS 1001
-#define IDC_CHECK1 1003
-#define IDC_MOVEAUTOMATICALLY 1003
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1004
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/tools/_deprecated/YahooGroups/src/services.cpp b/tools/_deprecated/YahooGroups/src/services.cpp deleted file mode 100644 index 16e58a2add..0000000000 --- a/tools/_deprecated/YahooGroups/src/services.cpp +++ /dev/null @@ -1,193 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-#define CLIST_GROUPS "CListGroups"
-
-HANDLE hsYGMove = NULL;
-HANDLE hsYGReset = NULL;
-
-int InitServices()
-{
- hsYGMove = CreateServiceFunction(MS_YAHOOGROUPS_MOVE, YahooGroupsMoveService);
- hsYGReset = CreateServiceFunction(MS_YAHOOGROUPS_RESET, YahooGroupsResetService);
-
- ReadAvailableGroups();
-
- return 0;
-}
-
-int DestroyServices()
-{
- DestroyServiceFunction(hsYGMove);
- DestroyServiceFunction(hsYGReset);
-
- return 0;
-}
-
-void ReadAvailableGroups()
-{
- int ok = 1;
- int index = 0;
-
- char group[1024] = {0};
- char tmp[128] = {0};
-
- while (ok)
- {
- mir_snprintf(tmp, "%d", index);
- GetStringFromDatabase(NULL, CLIST_GROUPS, tmp, NULL, group, sizeof(group));
- if (mir_strlen(group) > 0)
- {
- availableGroups.Add(_strdup(group + 1));
- index += 1;
- }
- else{
- ok = 0;
- }
- }
-}
-
-int GetNextGroupIndex()
-{
- int index = 0;
- int found = 0;
-
- char buffer[1024] = {0};
- char tmp[128] = {0};
-
- while (!found)
- {
- mir_snprintf(tmp, "%d", index++);
-
- if (GetStringFromDatabase(NULL, CLIST_GROUPS, tmp, NULL, buffer, sizeof(buffer)))
- {
- found = 1;
- }
- }
-
- return index - 1;
-}
-
-void AddNewGroup(const char *newGroup)
-{
- int index = GetNextGroupIndex();
-
- char tmp[128];
- char group[1024];
-
- *group = 1;
- strncpy_s((group + 1), (_countof(group) - 1), newGroup, _TRUNCATE);
-
- mir_snprintf(tmp, "%d", index);
- const int MAX_SIZE = 1024;
- wchar_t wide[MAX_SIZE] = {0};
- *wide = 1;
- MultiByteToWideChar(currentCodePage, 0, group + 1, -1, wide + 1, MAX_SIZE - 1);
- db_set_ws(NULL, CLIST_GROUPS, tmp, wide);
-
- availableGroups.Add(_strdup(group + 1));
-}
-
-void AddContactToGroup(MCONTACT hContact, char *group)
-{
- const int MAX_SIZE = 1024;
- wchar_t wide[MAX_SIZE] = {0};
- MultiByteToWideChar(currentCodePage, 0, group, -1, wide, MAX_SIZE);
- db_set_ws(hContact, "CList", "Group", wide);
-}
-
-void CreateGroup(char *group)
-{
- char *p = group;
- char *sub = group;
-
- CMStringA buf;
- while ((p = strchr(sub, '\\')))
- {
- *p = 0;
- if (!buf.IsEmpty())
- buf.AppendChar('\\');
- buf.Append(sub);
-
- if (!availableGroups.Contains(buf))
- AddNewGroup(buf);
-
- *p++ = '\\';
- sub = p;
- }
-
- if (sub) {
- if (!buf.IsEmpty())
- buf.AppendChar('\\');
- buf.Append(sub);
-
- if (!availableGroups.Contains(buf))
- AddNewGroup(buf);
- }
-}
-
-void ProcessContacts(void (*callback)(MCONTACT, char *), char *protocol)
-{
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
- callback(hContact, protocol);
-}
-
-void YahooMoveCallback(MCONTACT hContact, char*)
-{
- char protocol[128] = {0};
- GetContactProtocol(hContact, protocol, sizeof(protocol));
-
- if (mir_strlen(protocol) > 0)
- {
- char ygroup[128] = {0};
-
- if (!GetStringFromDatabase(hContact, protocol, "YGroup", NULL, ygroup, sizeof(ygroup)))
- {
- CreateGroup(ygroup);
- AddContactToGroup(hContact, ygroup);
- }
- }
-}
-
-void ResetGroupCallback(MCONTACT hContact, char *protocol)
-{
- char p[128] = {0};
-
- GetContactProtocol(hContact, p, sizeof(protocol));
-
- if ((!protocol) || (_stricmp(protocol, p) == 0))
- {
- db_unset(hContact, "CList", "Group");
- }
-}
-
-INT_PTR YahooGroupsMoveService(WPARAM, LPARAM)
-{
- ProcessContacts(YahooMoveCallback, NULL);
- return 0;
-}
-
-INT_PTR YahooGroupsResetService(WPARAM, LPARAM)
-{
- ProcessContacts(ResetGroupCallback, NULL);
- return 0;
-}
diff --git a/tools/_deprecated/YahooGroups/src/services.h b/tools/_deprecated/YahooGroups/src/services.h deleted file mode 100644 index b6a2237815..0000000000 --- a/tools/_deprecated/YahooGroups/src/services.h +++ /dev/null @@ -1,38 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef M_YAHOOGROUPS_SERVICES_H
-#define M_YAHOOGROUPS_SERVICES_H
-
-#include "stdafx.h"
-
-#define MS_YAHOOGROUPS_MOVE "YahooGroups/Groups/MoveToOfficialGroups"
-#define MS_YAHOOGROUPS_RESET "YahooGroups/Groups/Reset"
-
-int InitServices();
-int DestroyServices();
-
-INT_PTR YahooGroupsMoveService(WPARAM wParam, LPARAM lParam);
-INT_PTR YahooGroupsResetService(WPARAM wParam, LPARAM lParam);
-
-void ReadAvailableGroups();
-
-#endif //M_CMDLINE_SERVICES_H
diff --git a/tools/_deprecated/YahooGroups/src/stdafx.cxx b/tools/_deprecated/YahooGroups/src/stdafx.cxx deleted file mode 100644 index 0765fbaa6f..0000000000 --- a/tools/_deprecated/YahooGroups/src/stdafx.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/*
-Copyright (C) 2012-16 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 <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/stdafx.h b/tools/_deprecated/YahooGroups/src/stdafx.h deleted file mode 100644 index a42495ae84..0000000000 --- a/tools/_deprecated/YahooGroups/src/stdafx.h +++ /dev/null @@ -1,51 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef M_YAHOOGROUPS_COMMONHEADERS_H
-#define M_YAHOOGROUPS_COMMONHEADERS_H
-
-#include <windows.h>
-
-#include <newpluginapi.h>
-#include <m_utils.h>
-#include <m_clist.h>
-#include <m_contacts.h>
-#include <m_langpack.h>
-#include <m_options.h>
-#include <m_protosvc.h>
-#include <m_popup.h>
-#include <m_string.h>
-#include <win2k.h>
-
-#include "version.h"
-#include "dlg_handlers.h"
-#include "hooked_events.h"
-#include "services.h"
-#include "list.h"
-#include "services.h"
-#include "utils.h"
-#include "resource.h"
-
-extern char ModuleName[];
-extern HINSTANCE hInstance;
-extern UINT currentCodePage;
-
-#endif //M_YAHOOGROUPS_COMMONHEADERS_H
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/utils.cpp b/tools/_deprecated/YahooGroups/src/utils.cpp deleted file mode 100644 index 7b9ff8ec90..0000000000 --- a/tools/_deprecated/YahooGroups/src/utils.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#include "stdafx.h"
-
-int Info(char *title, char *format, ...)
-{
- char str[4096];
- va_list vararg;
- int tBytes;
- va_start(vararg, format);
- tBytes = mir_vsnprintf(str, sizeof(str), format, vararg);
- if (tBytes > 0)
- str[tBytes] = 0;
-
- va_end(vararg);
- return MessageBoxA(0, str, title, MB_OK | MB_ICONINFORMATION);
-}
-
-int MyPUShowMessage(wchar_t *lpzText, BYTE kind)
-{
- if (ServiceExists(MS_POPUP_SHOWMESSAGE))
- {
- return PUShowMessageT(lpzText, kind);
- }
- else{
- wchar_t *title = (kind == SM_NOTIFY) ? TranslateT("Notify") : TranslateT("Warning");
-
- return MessageBox(NULL, lpzText, title, MB_OK | (kind == SM_NOTIFY) ? MB_ICONINFORMATION : MB_ICONEXCLAMATION);
- }
-}
-
-#define HEX_SIZE 8
-
-char *BinToHex(int size, PBYTE data)
-{
- char *szresult = NULL;
- char buffer[32] = {0}; //should be more than enough
- int maxSize = size * 2 + HEX_SIZE + 1;
- szresult = (char *) new char[ maxSize ];
- memset(szresult, 0, maxSize);
- mir_snprintf(buffer, "%0*X", HEX_SIZE, size);
- mir_strcpy(szresult, buffer);
- int i;
- for (i = 0; i < size; i++)
- {
- mir_snprintf(buffer, "%02X", data[i]);
- mir_strcpy(szresult + (HEX_SIZE + i * 2), buffer);
- }
- return szresult;
-}
-
-void HexToBin(char *inData, ULONG &size, LPBYTE &outData)
-{
- char buffer[32] = {0};
- mir_strcpy(buffer, "0x");
- strncpy(buffer + 2, inData, HEX_SIZE);
- sscanf(buffer, "%x", &size);
- outData = (unsigned char*)new char[size*2];
- UINT i;
- //size = i;
- char *tmp = inData + HEX_SIZE;
- buffer[4] = '\0'; //mark the end of the string
- for (i = 0; i < size; i++)
- {
- strncpy(buffer + 2, &tmp[i * 2], 2);
- sscanf(buffer, "%hhx", &outData[i]);
- }
- i = size;
-}
-
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size)
-{
- DBVARIANT dbv = {0};
- int res = 1;
- int len;
- dbv.type = DBVT_ASCIIZ;
- if (db_get_s(hContact, szModule, szSettingName, &dbv) == 0)
- {
- res = 0;
- int tmp = (int)mir_strlen(dbv.pszVal);
- len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, dbv.pszVal, len);
- szResult[len] = '\0';
- mir_free(dbv.pszVal);
- }
- else{
- res = 1;
- if (szError)
- {
- int tmp = (int)mir_strlen(szError);
- len = (tmp < size - 1) ? tmp : size - 1;
- strncpy(szResult, szError, len);
- szResult[len] = '\0';
- }
- else{
- szResult[0] = '\0';
- }
- }
- return res;
-}
-
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
-{
- DBVARIANT dbv = {0};
- int res = 1;
- int len;
- dbv.type = DBVT_WCHAR;
- if ( db_get_s(hContact, szModule, szSettingName, &dbv, 0) == 0) {
- res = 0;
- if (dbv.type != DBVT_WCHAR)
- MultiByteToWideChar(CP_ACP, 0, dbv.pszVal, -1, szResult, count);
- else {
- int tmp = (int)mir_wstrlen(dbv.pwszVal);
- len = (tmp < count - 1) ? tmp : count - 1;
- wcsncpy(szResult, dbv.pwszVal, len);
- szResult[len] = L'\0';
- }
- mir_free(dbv.pwszVal);
- }
- else {
- res = 1;
- if (szError) {
- int tmp = (int)mir_wstrlen(szError);
- len = (tmp < count - 1) ? tmp : count - 1;
- wcsncpy(szResult, szError, len);
- szResult[len] = L'\0';
- }
- else szResult[0] = L'\0';
- }
- return res;
-}
-
-int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size)
-{
- return GetStringFromDatabase(NULL, ModuleName, szSettingName, szError, szResult, size);
-}
-
-int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
-{
- return GetStringFromDatabase(NULL, ModuleName, szSettingName, szError, szResult, count);
-}
-
-wchar_t* GetContactName(MCONTACT hContact, char *szProto)
-{
- ptrW id(Contact_GetInfo(CNF_DISPLAYUID, hContact, szProto));
- return (id != NULL) ? wcsdup(id) : NULL;
-}
-
-void GetContactProtocol(MCONTACT hContact, char *szProto, int size)
-{
- GetStringFromDatabase(hContact, "Protocol", "p", NULL, szProto, size);
-}
-
-wchar_t *GetContactID(MCONTACT hContact)
-{
- char protocol[256];
- GetContactProtocol(hContact, protocol, sizeof(protocol));
-
- return GetContactID(hContact, protocol);
-}
-
-wchar_t* GetContactID(MCONTACT hContact, char *szProto)
-{
- ptrW id(Contact_GetInfo(CNF_DISPLAY, hContact, szProto));
- return (id != NULL) ? wcsdup(id) : NULL;
-}
-
-MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
-{
- wchar_t *szHandle;
- wchar_t dispName[1024];
- char cProtocol[256];
- wchar_t *tmp;
-
- int found = 0;
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- GetContactProtocol(hContact, cProtocol, sizeof(cProtocol));
- szHandle = GetContactID(hContact, cProtocol);
-
- tmp = pcli->pfnGetContactDisplayName(hContact, 0);
- wcsncpy(dispName, tmp, _countof(dispName));
-
- if ((szHandle) && ((mir_wstrcmpi(szHandle, szID) == 0) || (mir_wstrcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0)))
- found = 1;
-
- if (szHandle) { free(szHandle); }
-
- if (found)
- return hContact;
- }
-
- return NULL;
-}
-#pragma warning (default: 4312)
-
-#pragma warning (disable: 4312)
-MCONTACT GetContactFromID(wchar_t *szID, wchar_t *szProto)
-{
- char protocol[1024];
- WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
- return GetContactFromID(szID, protocol);
-}
-#pragma warning (default: 4312)
-
-void ScreenToClient(HWND hWnd, LPRECT rect)
-{
- POINT pt;
- int cx = rect->right - rect->left;
- int cy = rect->bottom - rect->top;
- pt.x = rect->left;
- pt.y = rect->top;
- ScreenToClient(hWnd, &pt);
- rect->left = pt.x;
- rect->top = pt.y;
- rect->right = pt.x + cx;
- rect->bottom = pt.y + cy;
-}
-
-void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors)
-{
- RECT rParent;
- RECT rChild;
-
- if (parentPos->flags & SWP_NOSIZE)
- {
- return;
- }
- GetWindowRect(parentPos->hwnd, &rParent);
- rChild = AnchorCalcPos(window, &rParent, parentPos, anchors);
- MoveWindow(window, rChild.left, rChild.top, rChild.right - rChild.left, rChild.bottom - rChild.top, FALSE);
-}
-
-RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors)
-{
- RECT rChild;
- RECT rTmp;
-
- GetWindowRect(window, &rChild);
- ScreenToClient(parentPos->hwnd, &rChild);
-
- int cx = rParent->right - rParent->left;
- int cy = rParent->bottom - rParent->top;
- if ((cx == parentPos->cx) && (cy == parentPos->cy))
- {
- return rChild;
- }
- if (parentPos->flags & SWP_NOSIZE)
- {
- return rChild;
- }
-
- rTmp.left = parentPos->x - rParent->left;
- rTmp.right = (parentPos->x + parentPos->cx) - rParent->right;
- rTmp.bottom = (parentPos->y + parentPos->cy) - rParent->bottom;
- rTmp.top = parentPos->y - rParent->top;
-
- cx = (rTmp.left) ? -rTmp.left : rTmp.right;
- cy = (rTmp.top) ? -rTmp.top : rTmp.bottom;
-
- rChild.right += cx;
- rChild.bottom += cy;
- //expanded the window accordingly, now we need to enforce the anchors
- if ((anchors & ANCHOR_LEFT) && (!(anchors & ANCHOR_RIGHT)))
- {
- rChild.right -= cx;
- }
- if ((anchors & ANCHOR_TOP) && (!(anchors & ANCHOR_BOTTOM)))
- {
- rChild.bottom -= cy;
- }
- if ((anchors & ANCHOR_RIGHT) && (!(anchors & ANCHOR_LEFT)))
- {
- rChild.left += cx;
- }
- if ((anchors & ANCHOR_BOTTOM) && (!(anchors & ANCHOR_TOP)))
- {
- rChild.top += cy;
- }
- return rChild;
-}
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/utils.h b/tools/_deprecated/YahooGroups/src/utils.h deleted file mode 100644 index fc94116254..0000000000 --- a/tools/_deprecated/YahooGroups/src/utils.h +++ /dev/null @@ -1,56 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-
-#ifndef M_YAHOOGROUPS_UTILS_H
-#define M_YAHOOGROUPS_UTILS_H
-
-#include "stdafx.h"
-
-#define ANCHOR_LEFT 0x000001
-#define ANCHOR_RIGHT 0x000002
-#define ANCHOR_TOP 0x000004
-#define ANCHOR_BOTTOM 0x000008
-#define ANCHOR_ALL ANCHOR_LEFT | ANCHOR_RIGHT | ANCHOR_TOP | ANCHOR_BOTTOM
-
-int Info(char *title, char *format, ...);
-
-char *BinToHex(int size, PBYTE data);
-void HexToBin(char *inData, ULONG &size, PBYTE &outData);
-
-void ScreenToClient(HWND hWnd, LPRECT rect);
-void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
-RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
-
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size);
-int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
-int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size);
-int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
-
-wchar_t *GetContactName(MCONTACT hContact, char *szProto);
-wchar_t *GetContactID(MCONTACT hContact);
-wchar_t *GetContactID(MCONTACT hContact, char *szProto);
-MCONTACT GetContactFromID(wchar_t *szID, char *szProto);
-MCONTACT GetContactFromID(wchar_t *szID, wchar_t *szProto);
-void GetContactProtocol(MCONTACT hContact, char *szProto, int size);
-
-int MyPUShowMessage(char *lpzText, BYTE kind);
-
-#endif
\ No newline at end of file diff --git a/tools/_deprecated/YahooGroups/src/version.h b/tools/_deprecated/YahooGroups/src/version.h deleted file mode 100644 index 653b67ebc8..0000000000 --- a/tools/_deprecated/YahooGroups/src/version.h +++ /dev/null @@ -1,39 +0,0 @@ -/*
-YahooGroups plugin for Miranda IM
-
-Copyright © 2007 Cristian Libotean
-
-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, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CMDLINE_VERSION_H
-#define M_CMDLINE_VERSION_H
-
-#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 0
-#define __RELEASE_NUM 1
-#define __BUILD_NUM 1
-
-#include <stdver.h>
-
-#define __PLUGIN_NAME "Yahoo groups"
-#define __FILENAME "YahooGroups.dll"
-#define __DESCRIPTION "This plugin imports and creates the Yahoo groups defined in Yahoo Messenger."
-#define __AUTHOR "Cristian Libotean"
-#define __AUTHOREMAIL "eblis102@yahoo.com"
-#define __AUTHORWEB "http://miranda-ng.org/p/YahooGroups/"
-#define __COPYRIGHT "© 2007 Cristian Libotean"
-
-#endif //M_CMDLINE_VERSION_H
diff --git a/tools/_deprecated/installer_im/graphics/header.bmp b/tools/_deprecated/installer_im/graphics/header.bmp Binary files differdeleted file mode 100644 index a38da57046..0000000000 --- a/tools/_deprecated/installer_im/graphics/header.bmp +++ /dev/null diff --git a/tools/_deprecated/installer_im/graphics/install.ico b/tools/_deprecated/installer_im/graphics/install.ico Binary files differdeleted file mode 100644 index dbca9ca6dc..0000000000 --- a/tools/_deprecated/installer_im/graphics/install.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/graphics/uninstall.ico b/tools/_deprecated/installer_im/graphics/uninstall.ico Binary files differdeleted file mode 100644 index d284adc9a2..0000000000 --- a/tools/_deprecated/installer_im/graphics/uninstall.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/graphics/welcome.bmp b/tools/_deprecated/installer_im/graphics/welcome.bmp Binary files differdeleted file mode 100644 index 7f1e8e7d6d..0000000000 --- a/tools/_deprecated/installer_im/graphics/welcome.bmp +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_AIM.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_AIM.dll Binary files differdeleted file mode 100644 index 3a6c1bd3b5..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_AIM.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_GG.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_GG.dll Binary files differdeleted file mode 100644 index 9d9a660653..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_GG.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_ICQ.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_ICQ.dll Binary files differdeleted file mode 100644 index 98ddfd0d15..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_ICQ.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_IRC.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_IRC.dll Binary files differdeleted file mode 100644 index 8332b384ba..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_IRC.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Jabber.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Jabber.dll Binary files differdeleted file mode 100644 index 0857d9de6b..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Jabber.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_MSN.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_MSN.dll Binary files differdeleted file mode 100644 index 57884e960f..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_MSN.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Yahoo.dll b/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Yahoo.dll Binary files differdeleted file mode 100644 index 9a16971a21..0000000000 --- a/tools/_deprecated/installer_im/icons/bin/hicolor/Proto_Yahoo.dll +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/i386pe-ico.x b/tools/_deprecated/installer_im/icons/i386pe-ico.x deleted file mode 100644 index 6db53b6bc6..0000000000 --- a/tools/_deprecated/installer_im/icons/i386pe-ico.x +++ /dev/null @@ -1,18 +0,0 @@ -/* Default linker script, for normal executables */ -OUTPUT_FORMAT(pei-i386) -SECTIONS -{ - /* Make the virtual address and file offset synced if the alignment is - lower than the target page size. */ - . = SIZEOF_HEADERS; - . = ALIGN(__section_alignment__); - .rsrc __image_base__ + BLOCK(__section_alignment__) : - { - *(.rsrc) - *(SORT(.rsrc$*)) - } - /DISCARD/ : - { - *(.edata) - } -} diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Away.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Away.ico Binary files differdeleted file mode 100644 index 9f668b4fe7..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_DND.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_DND.ico Binary files differdeleted file mode 100644 index 0ace68680a..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_FFC.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_FFC.ico Binary files differdeleted file mode 100644 index f3ecc5fcc3..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Invisible.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Invisible.ico Binary files differdeleted file mode 100644 index 932356b398..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Lunch.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Lunch.ico Binary files differdeleted file mode 100644 index 7f6587e73c..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_NA.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_NA.ico Binary files differdeleted file mode 100644 index f6dc93b5ac..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Occupied.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Occupied.ico Binary files differdeleted file mode 100644 index f89c39625d..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Offline.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Offline.ico Binary files differdeleted file mode 100644 index 54fabffaa7..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Online.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Online.ico Binary files differdeleted file mode 100644 index 429afcc9ff..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Phone.ico b/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Phone.ico Binary files differdeleted file mode 100644 index 5c568d67bf..0000000000 --- a/tools/_deprecated/installer_im/icons/res/AIM/32_aim_Phone.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Away.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_Away.ico Binary files differdeleted file mode 100644 index a3df6d4e79..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_DND.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_DND.ico Binary files differdeleted file mode 100644 index 5f98ae7ab8..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_FFC.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_FFC.ico Binary files differdeleted file mode 100644 index d145072f08..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Invisible.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_Invisible.ico Binary files differdeleted file mode 100644 index a6949e34f9..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_NA.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_NA.ico Binary files differdeleted file mode 100644 index a0b460624c..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Offline.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_Offline.ico Binary files differdeleted file mode 100644 index f4093b78cc..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Online.ico b/tools/_deprecated/installer_im/icons/res/GG/32_gg_Online.ico Binary files differdeleted file mode 100644 index acbba11077..0000000000 --- a/tools/_deprecated/installer_im/icons/res/GG/32_gg_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Away.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Away.ico Binary files differdeleted file mode 100644 index 248a3e9916..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_DND.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_DND.ico Binary files differdeleted file mode 100644 index 4833160eac..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_FFC.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_FFC.ico Binary files differdeleted file mode 100644 index e7ec4d3ae2..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Invisible.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Invisible.ico Binary files differdeleted file mode 100644 index 42f80a84cc..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Lunch.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Lunch.ico Binary files differdeleted file mode 100644 index e88dd35a2e..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_NA.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_NA.ico Binary files differdeleted file mode 100644 index ec0621dc9f..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Occupied.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Occupied.ico Binary files differdeleted file mode 100644 index 04ea2a5855..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Offline.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Offline.ico Binary files differdeleted file mode 100644 index af862168cd..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Online.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Online.ico Binary files differdeleted file mode 100644 index 2e33305a76..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Phone.ico b/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Phone.ico Binary files differdeleted file mode 100644 index 74c80b66ed..0000000000 --- a/tools/_deprecated/installer_im/icons/res/ICQ/32_icq_Phone.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Away.ico b/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Away.ico Binary files differdeleted file mode 100644 index a2391df85e..0000000000 --- a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Offline.ico b/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Offline.ico Binary files differdeleted file mode 100644 index a521360232..0000000000 --- a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Online.ico b/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Online.ico Binary files differdeleted file mode 100644 index 37b885a806..0000000000 --- a/tools/_deprecated/installer_im/icons/res/IRC/32_irc_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Away.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Away.ico Binary files differdeleted file mode 100644 index fc97a61763..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_DND.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_DND.ico Binary files differdeleted file mode 100644 index 026c7256a7..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_FFC.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_FFC.ico Binary files differdeleted file mode 100644 index dbc899c02a..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Invisible.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Invisible.ico Binary files differdeleted file mode 100644 index 9b6cc549e1..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Lunch.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Lunch.ico Binary files differdeleted file mode 100644 index aad1ab9791..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_NA.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_NA.ico Binary files differdeleted file mode 100644 index c23f527379..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Occupied.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Occupied.ico Binary files differdeleted file mode 100644 index ed8697bea3..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Offline.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Offline.ico Binary files differdeleted file mode 100644 index e86406abbc..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Online.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Online.ico Binary files differdeleted file mode 100644 index 0d3b5e0ce2..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Phone.ico b/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Phone.ico Binary files differdeleted file mode 100644 index b66544261c..0000000000 --- a/tools/_deprecated/installer_im/icons/res/JABBER/32_jabber_Phone.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Away.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Away.ico Binary files differdeleted file mode 100644 index 7d058cea73..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_DND.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_DND.ico Binary files differdeleted file mode 100644 index c59387be4d..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_FFC.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_FFC.ico Binary files differdeleted file mode 100644 index 1f8a5b199f..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Invisible.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Invisible.ico Binary files differdeleted file mode 100644 index b54168cc94..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Lunch.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Lunch.ico Binary files differdeleted file mode 100644 index 712bac8b31..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_NA.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_NA.ico Binary files differdeleted file mode 100644 index 790436c42d..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Occupied.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Occupied.ico Binary files differdeleted file mode 100644 index 7699d5bd16..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Offline.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Offline.ico Binary files differdeleted file mode 100644 index dffd80e7a0..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Online.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Online.ico Binary files differdeleted file mode 100644 index 818824f3a0..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Phone.ico b/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Phone.ico Binary files differdeleted file mode 100644 index 01a806af22..0000000000 --- a/tools/_deprecated/installer_im/icons/res/MSN/32_msn_Phone.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Away.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Away.ico Binary files differdeleted file mode 100644 index 82d132c8d3..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Away.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_DND.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_DND.ico Binary files differdeleted file mode 100644 index f6357e08bc..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_DND.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_FFC.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_FFC.ico Binary files differdeleted file mode 100644 index e213ec5f59..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_FFC.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Invisible.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Invisible.ico Binary files differdeleted file mode 100644 index 8e2c4744f5..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Invisible.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Lunch.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Lunch.ico Binary files differdeleted file mode 100644 index 9dc1968611..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Lunch.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_NA.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_NA.ico Binary files differdeleted file mode 100644 index 534691e78b..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_NA.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Occupied.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Occupied.ico Binary files differdeleted file mode 100644 index 0e7fd434a3..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Occupied.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Offline.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Offline.ico Binary files differdeleted file mode 100644 index fd0d04104e..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Offline.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Online.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Online.ico Binary files differdeleted file mode 100644 index 1d559e0676..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Online.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Phone.ico b/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Phone.ico Binary files differdeleted file mode 100644 index 9279d34c86..0000000000 --- a/tools/_deprecated/installer_im/icons/res/YAHOO/32_yahoo_Phone.ico +++ /dev/null diff --git a/tools/_deprecated/installer_im/icons/resource.rc b/tools/_deprecated/installer_im/icons/resource.rc deleted file mode 100644 index 19c1ccd32d..0000000000 --- a/tools/_deprecated/installer_im/icons/resource.rc +++ /dev/null @@ -1,150 +0,0 @@ -#include <windows.h>
-
-#define IDI_OFFLINE 105
-#define IDI_ONLINE 104
-#define IDI_AWAY 128
-#define IDI_INVISIBLE 130
-#define IDI_NA 131
-#define IDI_DND 158
-#define IDI_OCCUPIED 159
-#define IDI_FREE4CHAT 129
-#define IDI_OUTTOLUNCH 1003
-#define IDI_ONTHEPHONE 1002
-
-#ifdef ICO_AIMHI
-IDI_OFFLINE ICON DISCARDABLE "res\\AIM\\32_aim_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\AIM\\32_aim_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\AIM\\32_aim_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\AIM\\32_aim_Invisible.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\AIM\\32_aim_Phone.ico"
-#endif
-
-#ifdef ICO_AIMLO
-IDI_OFFLINE ICON DISCARDABLE "res\\AIM\\8_aim_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\AIM\\8_aim_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\AIM\\8_aim_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\AIM\\8_aim_Invisible.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\AIM\\8_aim_Phone.ico"
-#endif
-
-#ifdef ICO_GGHI
-IDI_OFFLINE ICON DISCARDABLE "res\\GG\\32_gg_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\GG\\32_gg_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\GG\\32_gg_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\GG\\32_gg_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\GG\\32_gg_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\GG\\32_gg_DND.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\GG\\32_gg_FFC.ico"
-#endif
-
-#ifdef ICO_GGLO
-IDI_OFFLINE ICON DISCARDABLE "res\\GG\\8_gg_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\GG\\8_gg_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\GG\\8_gg_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\GG\\8_gg_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\GG\\8_gg_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\GG\\8_gg_DND.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\GG\\8_gg_FFC.ico"
-#endif
-
-#ifdef ICO_ICQHI
-IDI_OFFLINE ICON DISCARDABLE "res\\ICQ\\32_icq_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\ICQ\\32_icq_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\ICQ\\32_icq_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\ICQ\\32_icq_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\ICQ\\32_icq_Na.ico"
-IDI_DND ICON DISCARDABLE "res\\ICQ\\32_icq_Dnd.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\ICQ\\32_icq_Occupied.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\ICQ\\32_icq_FFC.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\ICQ\\32_icq_Phone.ico"
-#endif
-
-#ifdef ICO_ICQLO
-IDI_OFFLINE ICON DISCARDABLE "res\\ICQ\\8_icq_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\ICQ\\8_icq_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\ICQ\\8_icq_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\ICQ\\8_icq_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\ICQ\\8_icq_Na.ico"
-IDI_DND ICON DISCARDABLE "res\\ICQ\\8_icq_Dnd.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\ICQ\\8_icq_Occupied.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\ICQ\\8_icq_FFC.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\ICQ\\8_icq_Phone.ico"
-#endif
-
-#ifdef ICO_IRCHI
-IDI_OFFLINE ICON DISCARDABLE "res\\IRC\\32_irc_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\IRC\\32_irc_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\IRC\\32_irc_Away.ico"
-#endif
-
-#ifdef ICO_IRCLO
-IDI_OFFLINE ICON DISCARDABLE "res\\IRC\\8_irc_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\IRC\\8_irc_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\IRC\\8_irc_Away.ico"
-#endif
-
-#ifdef ICO_JABBERHI
-IDI_OFFLINE ICON DISCARDABLE "res\\JABBER\\32_jabber_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\JABBER\\32_jabber_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\JABBER\\32_jabber_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\JABBER\\32_jabber_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\JABBER\\32_jabber_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\JABBER\\32_jabber_DND.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\JABBER\\32_jabber_FFC.ico"
-#endif
-
-#ifdef ICO_JABBERLO
-IDI_OFFLINE ICON DISCARDABLE "res\\JABBER\\8_jabber_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\JABBER\\8_jabber_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\JABBER\\8_jabber_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\JABBER\\8_jabber_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\JABBER\\8_jabber_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\JABBER\\8_jabber_DND.ico"
-IDI_FREE4CHAT ICON DISCARDABLE "res\\JABBER\\8_jabber_FFC.ico"
-#endif
-
-#ifdef ICO_MSNHI
-IDI_OFFLINE ICON DISCARDABLE "res\\MSN\\32_msn_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\MSN\\32_msn_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\MSN\\32_msn_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\MSN\\32_msn_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\MSN\\32_msn_NA.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\MSN\\32_msn_Occupied.ico"
-IDI_OUTTOLUNCH ICON DISCARDABLE "res\\MSN\\32_msn_Lunch.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\MSN\\32_msn_Phone.ico"
-#endif
-
-#ifdef ICO_MSNLO
-IDI_OFFLINE ICON DISCARDABLE "res\\MSN\\8_msn_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\MSN\\8_msn_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\MSN\\8_msn_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\MSN\\8_msn_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\MSN\\8_msn_NA.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\MSN\\8_msn_Occupied.ico"
-IDI_OUTTOLUNCH ICON DISCARDABLE "res\\MSN\\8_msn_Lunch.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\MSN\\8_msn_Phone.ico"
-#endif
-
-#ifdef ICO_YAHOOHI
-IDI_OFFLINE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\YAHOO\\32_yahoo_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\YAHOO\\32_yahoo_DND.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Occupied.ico"
-IDI_OUTTOLUNCH ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Lunch.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\YAHOO\\32_yahoo_Phone.ico"
-#endif
-
-#ifdef ICO_YAHOOLO
-IDI_OFFLINE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Offline.ico"
-IDI_ONLINE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Online.ico"
-IDI_AWAY ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Away.ico"
-IDI_INVISIBLE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Invisible.ico"
-IDI_NA ICON DISCARDABLE "res\\YAHOO\\8_yahoo_NA.ico"
-IDI_DND ICON DISCARDABLE "res\\YAHOO\\8_yahoo_DND.ico"
-IDI_OCCUPIED ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Occupied.ico"
-IDI_OUTTOLUNCH ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Lunch.ico"
-IDI_ONTHEPHONE ICON DISCARDABLE "res\\YAHOO\\8_yahoo_Phone.ico"
-#endif
diff --git a/tools/_deprecated/installer_im/miranda-core.nsi b/tools/_deprecated/installer_im/miranda-core.nsi deleted file mode 100644 index 90ee6ce249..0000000000 --- a/tools/_deprecated/installer_im/miranda-core.nsi +++ /dev/null @@ -1,390 +0,0 @@ -!include "MUI.nsh"
-!include "Sections.nsh"
-!include "WinVer.nsh"
-!include "LogicLib.nsh"
-
-!include "miranda-version.nsi"
-
-!define MIM_NAME "Miranda IM"
-
-!define MIM_BUILD_ICONS_LOW "icons\bin\locolor"
-!define MIM_BUILD_ICONS_HI "icons\bin\hicolor"
-!define MIM_BUILD_OPTIONS_FILE "miranda32.lst"
-!define MIM_BUILD_OPTIONS_SECT "InstalledSections"
-
-!ifdef MIM_BUILD_UNICODE
-!define MIM_BUILD_TYPE "unicode"
-!define MIM_BUILD_DIR "..\..\miranda\bin\Release Unicode"
-!else
-!define MIM_BUILD_TYPE "ansi"
-!define MIM_BUILD_DIR "..\..\miranda\bin\Release"
-!endif
-!define MIM_BUILD_DIRANSI "..\..\miranda\bin\Release"
-!define MIM_BUILD_SRC "..\..\miranda"
-
-
-!if ${MIM_BETA} != 0
-Name "${MIM_NAME} ${MIM_VERSION} Beta ${MIM_BETA}"
-!if ${MIM_BUILD_TYPE} = "unicode"
-OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}b${MIM_BETA}w.exe"
-!else
-OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}b${MIM_BETA}.exe"
-!endif
-!else
-Name "${MIM_NAME} ${MIM_VERSION}"
-OutFile "..\..\miranda\bin\miranda-im-v${MIM_VERSION}-${MIM_BUILD_TYPE}.exe"
-!endif
-
-InstallDir "$PROGRAMFILES\Miranda IM"
-InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path"
-SetCompressor lzma
-SetOverWrite on
-BrandingText "www.miranda-im.org"
-
-VAR INST_UPGRADE
-VAR INST_SUCCESS
-VAR INST_MODE
-VAR INST_DIR
-
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_BITMAP "Graphics\header.bmp"
-!define MUI_HEADERIMAGE_UNBITMAP "Graphics\header.bmp"
-!define MUI_WELCOMEFINISHPAGE_BITMAP "Graphics\welcome.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "Graphics\welcome.bmp"
-!define MUI_ICON "Graphics\install.ico"
-!define MUI_UNICON "Graphics\uninstall.ico"
-!define MUI_ABORTWARNING
-!define MUI_COMPONENTSPAGE_NODESC
-!define MUI_LICENSEPAGE_BGCOLOR /grey
-!define MUI_FINISHPAGE_RUN $INSTDIR\miranda32.exe
-!define MUI_FINISHPAGE_RUN_TEXT "Start Miranda IM"
-!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\readme.txt
-!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Readme"
-!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
-!define MUI_FINISHPAGE_LINK "Support Miranda IM"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://www.miranda-im.org/donate/"
-
-!insertmacro MUI_PAGE_LICENSE "${MIM_BUILD_SRC}\docs\license.txt"
-Page Custom CustomInstallPage CustomInstallPageLeave
-!define MUI_DIRECTORYPAGE_VARIABLE $INST_DIR
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VerifyInstallDir
-!define MUI_PAGE_CUSTOMFUNCTION_PRE VerifyDirectoryDisplay
-!insertmacro MUI_PAGE_DIRECTORY
-!define MUI_PAGE_CUSTOMFUNCTION_PRE VerifyComponentDisplay
-!insertmacro MUI_PAGE_COMPONENTS
-!insertmacro MUI_PAGE_INSTFILES
-!insertmacro MUI_PAGE_FINISH
-
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-
-!insertmacro MUI_LANGUAGE "English"
-
-!macro PrintInstallerDetails Details
- SetDetailsPrint textonly
- DetailPrint "${Details}"
- SetDetailsPrint listonly
-!macroend
-
-!macro InstallMirandaProtoIcon IconFile
- SetOutPath "$INSTDIR\Icons"
- SetOverWrite off
- !ifdef MIM_BUILD_UNICODE
- ${If} ${AtLeastWinXP}
- File "${MIM_BUILD_ICONS_HI}\proto_${IconFile}.dll"
- ${Else}
- File "${MIM_BUILD_ICONS_LOW}\proto_${IconFile}.dll"
- ${EndIf}
- !else
- File "${MIM_BUILD_ICONS_LOW}\proto_${IconFile}.dll"
- !endif
- SetOverWrite on
-!macroend
-
-!macro InstallMirandaPlugin PluginFile
- SetOutPath "$INSTDIR\Plugins"
- File "${MIM_BUILD_DIR}\plugins\${PluginFile}"
-!macroend
-
-!macro InstallMirandaPluginANSI PluginFile
- SetOutPath "$INSTDIR\Plugins"
- File "${MIM_BUILD_DIRANSI}\plugins\${PluginFile}"
-!macroend
-
-!macro WriteInstallerOption IniOption IniValue
- ${If} $INST_MODE = 0
- SetOutPath "$INSTDIR"
- WriteINIStr "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" "${MIM_BUILD_OPTIONS_SECT}" "${IniValue}" "${IniOption}"
- ${EndIf}
-!macroend
-
-Section "Miranda IM (core)"
- SectionIn RO
- !insertmacro PrintInstallerDetails "Installing Miranda IM Core Files..."
-
- !insertmacro WriteInstallerOption "0" "Import"
- !insertmacro WriteInstallerOption "0" "StartMenuShortCut"
- !insertmacro WriteInstallerOption "0" "DesktopShortCut"
- !insertmacro WriteInstallerOption "0" "QuickLaunchShortCut"
-
- SetOutPath "$INSTDIR"
- File "${MIM_BUILD_DIR}\miranda32.exe"
- File "${MIM_BUILD_DIR}\dbtool.exe"
- File "${MIM_BUILD_DIR}\zlib.dll"
- File "${MIM_BUILD_SRC}\docs\contributors.txt"
- File "${MIM_BUILD_SRC}\docs\readme.txt"
- File "${MIM_BUILD_SRC}\docs\changelog.txt"
- File "${MIM_BUILD_SRC}\docs\license.txt"
-
- ${If} $INST_UPGRADE = 0
- SetOverWrite off
- File "${MIM_BUILD_SRC}\docs\mirandaboot.ini"
- SetOverWrite on
- ${EndIf}
- ${If} ${FileExists} "$INSTDIR\mirandaboot.ini"
- ${If} $INST_UPGRADE = 0
- ${If} $INST_MODE = 0
- !ifdef MIM_BUILD_UNICODE
- WriteINIStr "$INSTDIR\mirandaboot.ini" "Database" "ProfileDir" "%APPDATA%\Miranda"
- !endif
- ${ElseIf} $INST_MODE = 1
- CreateDirectory "$INSTDIR\Profiles"
- WriteINIStr "$INSTDIR\mirandaboot.ini" "Database" "ProfileDir" "Profiles"
- ${EndIf}
- ${EndIf}
- ${EndIf}
-
- !insertmacro InstallMirandaPlugin "clist_classic.dll"
- !insertmacro InstallMirandaPlugin "srmm.dll"
- !insertmacro InstallMirandaPlugin "avs.dll"
- !insertmacro InstallMirandaPluginANSI "advaimg.dll"
- !ifdef MIM_BUILD_UNICODE
- !insertmacro InstallMirandaPlugin "dbx_mmap.dll"
- Delete "$INSTDIR\Plugins\dbx_3x.dll"
- !else
- !insertmacro InstallMirandaPluginANSI "dbx_3x.dll"
- Delete "$INSTDIR\Plugins\dbx_mmap.dll"
- !endif
- !insertmacro InstallMirandaPlugin "chat.dll"
-
- ${If} $INST_MODE = 0
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM" "DisplayName" "Miranda IM ${MIM_VERSION}"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM" "UninstallString" "$INSTDIR\Uninstall.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "" "$INSTDIR\miranda32.exe"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path" "$INSTDIR"
- ${EndIf}
-
- ; AIM
- !insertmacro PrintInstallerDetails "Installing AIM Protocol..."
- !insertmacro InstallMirandaPlugin "Aim.dll"
- !insertmacro InstallMirandaProtoIcon "AIM"
-
- ; Gadu-Gadu
- !insertmacro PrintInstallerDetails "Installing Gadu-Gadu Protocol..."
- !insertmacro InstallMirandaPluginANSI "GG.dll"
- !insertmacro InstallMirandaProtoIcon "GG"
-
- ; ICQ
- !insertmacro PrintInstallerDetails "Installing ICQ Protocol..."
- !insertmacro InstallMirandaPlugin "icq.dll"
- SetOutPath "$INSTDIR\Icons"
- File "${MIM_BUILD_DIRANSI}\Icons\xstatus_ICQ.dll"
- !insertmacro InstallMirandaProtoIcon "ICQ"
-
- ; IRC
- !insertmacro PrintInstallerDetails "Installing IRC Protocol..."
- !insertmacro InstallMirandaPlugin "irc.dll"
- ${If} $INST_UPGRADE = 0
- SetOverWrite off
- File "${MIM_BUILD_SRC}\protocols\IRCG\Docs\irc_servers.ini"
- SetOverWrite on
- ${EndIf}
- !insertmacro InstallMirandaProtoIcon "IRC"
-
- ; Jabber
- !insertmacro PrintInstallerDetails "Installing Jabber Protocol..."
- !insertmacro InstallMirandaPlugin "jabber.dll"
- SetOutPath "$INSTDIR\Icons"
- File "${MIM_BUILD_DIRANSI}\Icons\xstatus_jabber.dll"
- !insertmacro InstallMirandaProtoIcon "Jabber"
-
- ; MSN
- !insertmacro PrintInstallerDetails "Installing MSN Protocol..."
- !insertmacro InstallMirandaPlugin "msn.dll"
- !insertmacro InstallMirandaProtoIcon "MSN"
-
- ; Yahoo
- !insertmacro PrintInstallerDetails "Installing Yahoo Protocol..."
- !insertmacro InstallMirandaPlugin "yahoo.dll"
- !insertmacro InstallMirandaProtoIcon "Yahoo"
-
- ; Import (installs automatically on new installs and if the file exists)
- ${If} ${FileExists} "$INSTDIR\plugins\import.dll"
- !insertmacro InstallMirandaPlugin "import.dll"
- ${ElseIf} $INST_UPGRADE = 0
- !insertmacro InstallMirandaPlugin "import.dll"
- ${EndIf}
-
- ${If} $INST_MODE = 0
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- ${EndIf}
-SectionEnd
-
-SubSection /e "Options" pOptions
- Section "Install Start Menu Shortcuts" pSCStartMenu
- !insertmacro PrintInstallerDetails "Installing Start Menu Shortcuts..."
- !insertmacro WriteInstallerOption "1" "StartMenuShortCut"
- SetOutPath "$INSTDIR"
- RMDir /r "$SMPROGRAMS\Miranda IM"
- CreateDirectory "$SMPROGRAMS\Miranda IM"
- CreateShortCut "$SMPROGRAMS\Miranda IM\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
- CreateShortCut "$SMPROGRAMS\Miranda IM\Database Tool.lnk" "$INSTDIR\dbtool.exe"
- WriteINIStr "$SMPROGRAMS\Miranda IM\Homepage.url" "InternetShortcut" "URL" "http://www.miranda-im.org/"
- WriteINIStr "$SMPROGRAMS\Miranda IM\Get More Addons.url" "InternetShortcut" "URL" "http://addons.miranda-im.org/"
- SectionEnd
-
- Section "Install Desktop Shortcut" pSCDesktop
- !insertmacro PrintInstallerDetails "Installing Desktop Shortcut..."
- !insertmacro WriteInstallerOption "1" "DesktopShortCut"
- SetOutPath "$INSTDIR"
- CreateShortCut "$DESKTOP\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
- SectionEnd
-
- Section "Install Quicklaunch Shortcut" pSCQuickLaunch
- !insertmacro PrintInstallerDetails "Installing Quicklaunch Shortcut..."
- !insertmacro WriteInstallerOption "1" "QuickLaunchShortCut"
- SetOutPath "$INSTDIR"
- CreateShortCut "$QUICKLAUNCH\Miranda IM.lnk" "$INSTDIR\miranda32.exe"
- SectionEnd
-SubSectionEnd
-
-Section Uninstall
- SetShellVarContext "all"
- RMDir /r "$SMPROGRAMS\Miranda IM"
- Delete "$DESKTOP\Miranda IM.lnk"
- Delete "$QUICKLAUNCH\Miranda IM.lnk"
- SetShellVarContext "current"
- RMDir /r "$SMPROGRAMS\Miranda IM"
- Delete "$DESKTOP\Miranda IM.lnk"
- Delete "$QUICKLAUNCH\Miranda IM.lnk"
-
- RMDir /r "$INSTDIR\Icons"
- RMDir /r "$INSTDIR\Plugins"
- Delete "$INSTDIR\dbtool.exe"
- Delete "$INSTDIR\miranda32.exe"
- Delete "$INSTDIR\zlib.dll"
- Delete "$INSTDIR\mirandaboot.ini"
- Delete "$INSTDIR\license.txt"
- Delete "$INSTDIR\contributors.txt"
- Delete "$INSTDIR\readme.txt"
- Delete "$INSTDIR\changelog.txt"
- Delete "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}"
- Delete "$INSTDIR\uninstall.exe"
- RMDir "$INSTDIR"
-
- DeleteRegKey HKLM "SOFTWARE\Miranda"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Miranda IM"
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe"
-SectionEnd
-
-Function .onInit
- SetShellVarContext "current"
- FindWindow $R0 "Miranda"
- IsWindow $R0 showwarn
- FindWindow $R0 "Miranda IM"
- IsWindow $R0 0 norun
- showwarn:
- MessageBox MB_OK "Miranda IM is currently running. It is recommended that you close Miranda IM so the installation can complete successfully."
- Sleep 1000
- norun:
- StrCpy $INST_SUCCESS 0
- StrCpy $INST_MODE 0
-FunctionEnd
-
-Function .onInstSuccess
- StrCpy $INST_SUCCESS 1
-FunctionEnd
-
-Function VerifyInstallDir
- StrCpy $INSTDIR $INST_DIR
- ${If} ${FileExists} "$INSTDIR\miranda32.exe"
- StrCpy $INST_UPGRADE 1
- ${Else}
- StrCpy $INST_UPGRADE 0
- ${EndIf}
- ${If} $INST_MODE = 1
- !insertmacro ClearSectionFlag ${pSCStartMenu} ${SF_SELECTED}
- SectionSetText ${pSCStartMenu} ""
- !insertmacro ClearSectionFlag ${pSCDesktop} ${SF_SELECTED}
- SectionSetText ${pSCDesktop} ""
- !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
- SectionSetText ${pSCQuickLaunch} ""
- !insertmacro ClearSectionFlag ${pOptions} ${SF_SELECTED}
- SectionSetText ${pOptions} ""
- ${Else}
- ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "StartMenuShortCut"
- ${If} $0 == "0"
- !insertmacro ClearSectionFlag ${pSCStartMenu} ${SF_SELECTED}
- ${Else}
- !insertmacro SetSectionFlag ${pSCStartMenu} ${SF_SELECTED}
- ${EndIf}
- ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "DesktopShortCut"
- ${If} $0 == "0"
- !insertmacro ClearSectionFlag ${pSCDesktop} ${SF_SELECTED}
- ${Else}
- !insertmacro SetSectionFlag ${pSCDesktop} ${SF_SELECTED}
- ${EndIf}
- ReadINIStr $0 "$INSTDIR\${MIM_BUILD_OPTIONS_FILE}" ${MIM_BUILD_OPTIONS_SECT} "QuickLaunchShortCut"
- ${If} $0 == "0"
- !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
- ${Else}
- !insertmacro SetSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
- ${EndIf}
- ${If} ${AtLeastWin7}
- !insertmacro ClearSectionFlag ${pSCQuickLaunch} ${SF_SELECTED}
- SectionSetText ${pSCQuickLaunch} ""
- ${EndIf}
- ${Endif}
-FunctionEnd
-
-Function VerifyDirectoryDisplay
- ${If} $INST_MODE = 1
- GetDlgItem $1 $HWNDPARENT 1
- SendMessage $1 ${WM_SETTEXT} 0 "STR:$(^InstallBtn)"
- ${EndIf}
-FunctionEnd
-
-Function CustomInstallPage
- !insertmacro MUI_HEADER_TEXT "Installation Mode" "Select the type of installation to perform."
- ReserveFile "miranda-ui-type.ini"
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "miranda-ui-type.ini"
- ${If} $INST_MODE = 0
- !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 2" "State" "1"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 3" "State" "0"
- ${Else}
- !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 2" "State" "0"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "miranda-ui-type.ini" "Field 3" "State" "1"
- ${EndIf}
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "miranda-ui-type.ini"
-FunctionEnd
-
-Function CustomInstallPageLeave
- !insertmacro MUI_INSTALLOPTIONS_READ $INST_MODE "miranda-ui-type.ini" "Field 3" "State"
- ${If} $INST_MODE = 1
- StrCpy $R0 $WINDIR 2
- StrCpy $INST_DIR "$R0\Miranda IM"
- ${Else}
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\miranda32.exe" "Path"
- ${If} $0 == ""
- StrCpy $INST_DIR "$PROGRAMFILES\Miranda IM"
- ${Else}
- StrCpy $INST_DIR $0
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-Function VerifyComponentDisplay
- ${If} $INST_MODE = 1
- Abort
- ${EndIf}
-FunctionEnd
\ No newline at end of file diff --git a/tools/_deprecated/installer_im/miranda-install-ansi.nsi b/tools/_deprecated/installer_im/miranda-install-ansi.nsi deleted file mode 100644 index 61da1563b2..0000000000 --- a/tools/_deprecated/installer_im/miranda-install-ansi.nsi +++ /dev/null @@ -1 +0,0 @@ -!include "miranda-core.nsi"
diff --git a/tools/_deprecated/installer_im/miranda-install-unicode.nsi b/tools/_deprecated/installer_im/miranda-install-unicode.nsi deleted file mode 100644 index cf99e8f071..0000000000 --- a/tools/_deprecated/installer_im/miranda-install-unicode.nsi +++ /dev/null @@ -1,2 +0,0 @@ -!define MIM_BUILD_UNICODE
-!include "miranda-core.nsi"
diff --git a/tools/_deprecated/installer_im/miranda-ui-type.ini b/tools/_deprecated/installer_im/miranda-ui-type.ini deleted file mode 100644 index 86707ea0f6..0000000000 --- a/tools/_deprecated/installer_im/miranda-ui-type.ini +++ /dev/null @@ -1,28 +0,0 @@ -[Settings]
-NumFields=3
-
-[Field 1]
-Type=Label
-Text=Please select the type of installation you wish to peform. Most users should choose "Normal Installation". However, if you need to install Miranda IM to be portable, please select that option.
-Left=10
-Top=3
-Right=288
-Bottom=35
-
-[Field 2]
-Type=RadioButton
-Text=Normal Installation (recommended)
-State=1
-Left=25
-Right=180
-Top=47
-Bottom=56
-
-[Field 3]
-Type=RadioButton
-Text=Portable Installation
-State=0
-Left=25
-Right=140
-Top=65
-Bottom=74
\ No newline at end of file diff --git a/tools/_deprecated/installer_im/miranda-version.nsi b/tools/_deprecated/installer_im/miranda-version.nsi deleted file mode 100644 index 97dc0dd71c..0000000000 --- a/tools/_deprecated/installer_im/miranda-version.nsi +++ /dev/null @@ -1,4 +0,0 @@ -; Miranda Version Info
-
-!define MIM_VERSION "0.9.1"
-!define MIM_BETA "0" ; 0 for final build
diff --git a/tools/_deprecated/lpgen_im/lpgen.pl b/tools/_deprecated/lpgen_im/lpgen.pl deleted file mode 100644 index 0b25b54333..0000000000 --- a/tools/_deprecated/lpgen_im/lpgen.pl +++ /dev/null @@ -1,452 +0,0 @@ -#!/usr/bin/perl
-#
-# Script generating translation templates from sources
-#
-# Miranda IM: the free IM client for Microsoft* Windows*
-#
-# Copyright 2000-2008 Miranda ICQ/IM project,
-# all portions of this codebase are copyrighted to the people
-# listed in contributors.txt.
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-use POSIX;
-use File::Find;
-use strict;
-
-my $rootdir = '';
-my %hash = ();
-my $clines = 0;
-
-my $version = '0.7svn';
-my $time = localtime();
-
-if (@ARGV && $ARGV[0] eq "version") {
- shift @ARGV;
- # 1st arg version major i.e. 07 for "0.7"
- if (@ARGV) {
- my $vermaj = shift @ARGV;
- if ($vermaj =~ /^([0-9]*)([0-9])$/) {
- if ($1 eq "") {
- $version = $2;
- } else {
- $version = "$1.$2";
- }
- } else {
- $version = $vermaj;
- }
- }
- # 2nd arg version minor i.e. 1 for "0.7.1"
- if (@ARGV) {
- my $vermin = shift @ARGV;
- if ($vermin =~ /^[0-9]+$/) {
- $version .= ".$vermin";
- } else {
- $version .= $vermin;
- }
- }
- # 3rd arg build number i.e. 36 for "0.7.1 build 36"
- if (@ARGV) {
- my $build = shift @ARGV;
- if ($build =~ /^[0-9]+$/) {
- $version .= " build $build";
- } else {
- $version .= $build;
- }
- }
-}
-
-#Language Files
-#if (!@ARGV) {
- #create_langfile(
- #'../..',
- #'../../i18n/langpack_english.txt',
- #'English (US)', '0809',
- #'Miranda IM Development Team',
- #'project-info@miranda-im.org',
- #'Scriver,avs,chat,clist,clist_nicer,db3x,db3x_mmap,dbrw,advaimg,import,modernb,mwclist,png2dib,srmm,tabsrmm,AimOscar,Gadu-Gadu,IRC,IcqOscarJ,JabberG,MSN,Yahoo');
-#}
-if (!@ARGV) {
- create_langfile('../../src',
- '../../src/!core-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
- create_langfile('../../plugins/AddContactPlus/',
- '../../plugins/AddContactPlus/addcontactplus-translation.txt');
- create_langfile('../../plugins/Alarms/',
- '../../plugins/Alarms/alarms-translation.txt');
- create_langfile('../../plugins/AssocMgr/',
- '../../plugins/AssocMgr/assocmgr-translation.txt');
- create_langfile('../../plugins/AuthState/',
- '../../plugins/AuthState/authstate-translation.txt');
- create_langfile('../../plugins/AutoRun/',
- '../../plugins/AutoRun/autorun-translation.txt');
- create_langfile('../../plugins/AVS/',
- '../../plugins/AVS/avs-translation.txt');
- create_langfile('../../plugins/BasicHistory/',
- '../../plugins/BasicHistory/basichistory-translation.txt');
- create_langfile('../../plugins/BASS_interface/',
- '../../plugins/BASS_interface/bass_interface-translation.txt');
- create_langfile('../../plugins/Boltun/',
- '../../plugins/Boltun/boltun-translation.txt');
- create_langfile('../../plugins/AddContactPlus/',
- '../../plugins/AddContactPlus/addcontactplus-translation.txt');
- create_langfile('../../plugins/BossKeyPlus/',
- '../../plugins/BossKeyPlus/bosskeyplus-translation.txt');
- create_langfile('../../plugins/BuddyExpectator/',
- '../../plugins/BuddyExpectator/buddyexpectator-translation.txt');
- create_langfile('../../plugins/ChangeKeyboardLayout/',
- '../../plugins/ChangeKeyboardLayout/changekeyboardlayout-translation.txt');
- create_langfile('../../plugins/Chat/',
- '../../plugins/Chat/chat-translation.txt');
- create_langfile('../../plugins/ClientChangeNotify/',
- '../../plugins/ClientChangeNotify/clientchangenotify-translation.txt');
- create_langfile('../../plugins/Clist_classic/',
- '../../plugins/Clist_classic/clist_classic-translation.txt');
- create_langfile('../../plugins/Clist_modern/',
- '../../plugins/Clist_modern/clist_modern-translation.txt');
- create_langfile('../../plugins/Clist_mw/',
- '../../plugins/Clist_mw/clist_mw-translation.txt');
- create_langfile('../../plugins/Clist_nicer/',
- '../../plugins/Clist_nicer/clist_nicer-translation.txt');
- create_langfile('../../plugins/Console/',
- '../../plugins/Console/console-translation.txt');
- create_langfile('../../plugins/ContactsPlus/',
- '../../plugins/ContactsPlus/contactsplus-translation.txt');
- create_langfile('../../plugins/CountryFlags/',
- '../../plugins/CountryFlags/countryflags-translation.txt');
- create_langfile('../../plugins/CSList/',
- '../../plugins/CSList/cslist-translation.txt');
- create_langfile('../../plugins/CyrTranslit/',
- '../../plugins/CyrTranslit/cyrtranslit-translation.txt');
- create_langfile('../../plugins/Db3x/',
- '../../plugins/Db3x/db3x-translation.txt');
- create_langfile('../../plugins/Db3x_mmap/',
- '../../plugins/Db3x_mmap/db3x_mmap-translation.txt');
- create_langfile('../../plugins/Dbx_mmap_SA/',
- '../../plugins/Dbx_mmap_SA/dbx_mmap_sa-translation.txt');
- create_langfile('../../plugins/Dbx_tree/',
- '../../plugins/Dbx_tree/dbx_tree-translation.txt');
- create_langfile('../../plugins/Db_autobackups/',
- '../../plugins/Db_autobackups/db_autobackups-translation.txt');
- create_langfile('../../plugins/ExtraIcons/',
- '../../plugins/ExtraIcons/extraicons-translation.txt');
- create_langfile('../../plugins/FavContacts/',
- '../../plugins/FavContacts/favcontacts-translation.txt');
- create_langfile('../../plugins/FingerPrintModPlus/',
- '../../plugins/FingerPrintModPlus/fingerprintmodplus-translation.txt');
- create_langfile('../../plugins/FirstRun/',
- '../../plugins/FirstRun/firstrun-translation.txt');
- create_langfile('../../plugins/FlashAvatars/',
- '../../plugins/FlashAvatars/flashavatars-translation.txt');
- create_langfile('../../plugins/FloatingContacts/',
- '../../plugins/FloatingContacts/floatingcontacts-translation.txt');
- create_langfile('../../plugins/Folders/',
- '../../plugins/Folders/folders-translation.txt');
- create_langfile('../../plugins/FreeImage/',
- '../../plugins/FreeImage/freeimage-translation.txt');
- create_langfile('../../plugins/Gender/',
- '../../plugins/Gender/gender-translation.txt');
- create_langfile('../../plugins/HistoryLinkListPlus/',
- '../../plugins/HistoryLinkListPlus/historylinklistplus-translation.txt');
- create_langfile('../../plugins/HistorySweeperLight/',
- '../../plugins/HistorySweeperLight/historysweeperlight-translation.txt');
- create_langfile('../../plugins/IEView/',
- '../../plugins/IEView/ieview-translation.txt');
- create_langfile('../../plugins/IgnoreState/',
- '../../plugins/IgnoreState/ignorestate-translation.txt');
- create_langfile('../../plugins/Import/',
- '../../plugins/Import/import-translation.txt');
- create_langfile('../../plugins/ImportTXT/',
- '../../plugins/ImportTXT/importtxt-translation.txt');
- create_langfile('../../plugins/KeyboardNotify/',
- '../../plugins/KeyboardNotify/keyboardnotify-translation.txt');
- create_langfile('../../plugins/LangMan/',
- '../../plugins/LangMan/langman-translation.txt');
- create_langfile('../../plugins/ListeningTo/',
- '../../plugins/ListeningTo/listeningto-translation.txt');
- create_langfile('../../plugins/MenuItemEx/',
- '../../plugins/MenuItemEx/menuitemex-translation.txt');
- create_langfile('../../plugins/MetaContacts/',
- '../../plugins/MetaContacts/metacontacts-translation.txt');
- create_langfile('../../plugins/MirOTR/',
- '../../plugins/MirOTR/mirotr-translation.txt');
- create_langfile('../../plugins/ModernOpt/',
- '../../plugins/ModernOpt/modernopt-translation.txt');
- create_langfile('../../plugins/mTextControl/',
- '../../plugins/mTextControl/mtextcontrol-translation.txt');
- create_langfile('../../plugins/NewAwaySysMod/',
- '../../plugins/NewAwaySysMod/newawaysysmod-translation.txt');
- create_langfile('../../plugins/NewEventNotify/',
- '../../plugins/NewEventNotify/neweventnotify-translation.txt');
- create_langfile('../../plugins/NewXstatusNotify/',
- '../../plugins/NewXstatusNotify/newxstatusnotify-translation.txt');
- create_langfile('../../plugins/Nudge/',
- '../../plugins/Nudge/nudge-translation.txt');
- create_langfile('../../plugins/PackUpdater/',
- '../../plugins/PackUpdater/packupdater-translation.txt');
- create_langfile('../../plugins/Popup/',
- '../../plugins/Popup/popup-translation.txt');
- create_langfile('../../plugins/ProfileManager/',
- '../../plugins/ProfileManager/profilemanager-translation.txt');
- create_langfile('../../plugins/QuickMessages/',
- '../../plugins/QuickMessages/quickmessages-translation.txt');
- create_langfile('../../plugins/QuickReplies/',
- '../../plugins/QuickReplies/quickreplies-translation.txt');
- create_langfile('../../plugins/Rate/',
- '../../plugins/Rate/rate-translation.txt');
- create_langfile('../../plugins/RecentContacts/',
- '../../plugins/RecentContacts/recentcontacts-translation.txt');
- create_langfile('../../plugins/Scriver/',
- '../../plugins/Scriver/scriver-translation.txt');
- create_langfile('../../plugins/SecureIM/',
- '../../plugins/SecureIM/secureim-translation.txt');
- create_langfile('../../plugins/SeenPlugin/',
- '../../plugins/SeenPlugin/seenplugin-translation.txt');
- create_langfile('../../plugins/Sessions/',
- '../../plugins/Sessions/sessions-translation.txt');
- create_langfile('../../plugins/SimpleAR/',
- '../../plugins/SimpleAR/simplear-translation.txt');
- create_langfile('../../plugins/SimpleStatusMsg/',
- '../../plugins/SimpleStatusMsg/simplestatusmsg-translation.txt');
- create_langfile('../../plugins/SmileyAdd/',
- '../../plugins/SmileyAdd/smileyadd-translation.txt');
- create_langfile('../../plugins/SpellChecker/',
- '../../plugins/SpellChecker/spellchecker-translation.txt');
- create_langfile('../../plugins/SplashScreen/',
- '../../plugins/SplashScreen/splashscreen-translation.txt');
- create_langfile('../../plugins/SRMM/',
- '../../plugins/SRMM/srmm-translation.txt');
- create_langfile('../../plugins/StatusPlugins/',
- '../../plugins/StatusPlugins/statusplugins-translation.txt');
- create_langfile('../../plugins/StopSpamPlus/',
- '../../plugins/StopSpamPlus/stopspamplus-translation.txt');
- create_langfile('../../plugins/Svc_crshdmp/',
- '../../plugins/Svc_crshdmp/svc_crshdmp-translation.txt');
- create_langfile('../../plugins/Svc_dbepp/',
- '../../plugins/Svc_dbepp/svc_dbepp-translation.txt');
- create_langfile('../../plugins/Svc_vi/',
- '../../plugins/Svc_vi/svc_vi-translation.txt');
- create_langfile('../../plugins/TabSRMM/',
- '../../plugins/TabSRMM/tabsrmm-translation.txt');
- create_langfile('../../plugins/TipperYM/',
- '../../plugins/TipperYM/tipperym-translation.txt');
- create_langfile('../../plugins/TooltipNotify/',
- '../../plugins/TooltipNotify/tooltipnotify-translation.txt');
- create_langfile('../../plugins/TopToolBar/',
- '../../plugins/TopToolBar/toptoolbar-translation.txt');
- create_langfile('../../plugins/TranslitSwitcher/',
- '../../plugins/TranslitSwitcher/translitswitcher-translation.txt');
- create_langfile('../../plugins/Updater/',
- '../../plugins/Updater/updater-translation.txt');
- create_langfile('../../plugins/UserGuide/',
- '../../plugins/UserGuide/userguide-translation.txt');
- create_langfile('../../plugins/UserInfoEx/',
- '../../plugins/UserInfoEx/userinfoex-translation.txt');
- create_langfile('../../plugins/Variables/',
- '../../plugins/Variables/variables-translation.txt');
- create_langfile('../../plugins/W7UI/',
- '../../plugins/W7UI/w7ui-translation.txt');
- create_langfile('../../plugins/WhenWasIt/',
- '../../plugins/WhenWasIt/whenwasit-translation.txt');
- create_langfile('../../plugins/YAPP/',
- '../../plugins/YAPP/yapp-translation.txt');
- create_langfile('../../plugins/ZeroNotification/',
- '../../plugins/ZeroNotification/zeronotification-translation.txt');
- create_langfile('../../protocols/AimOscar/',
- '../../protocols/AimOscar/aimoscar-translation.txt');
- create_langfile('../../protocols/FacebookRM/',
- '../../protocols/FacebookRM/facebookrm-translation.txt');
- create_langfile('../../protocols/Gadu-Gadu/',
- '../../protocols/Gadu-Gadu/gadu-gadu-translation.txt');
- create_langfile('../../protocols/GTalkExt/',
- '../../protocols/GTalkExt/gtalkext-translation.txt');
- create_langfile('../../protocols/IcqOscarJ/',
- '../../protocols/IcqOscarJ/icqoscarj-translation.txt');
- create_langfile('../../protocols/IRCG/',
- '../../protocols/IRCG/ircg-translation.txt');
- create_langfile('../../protocols/JabberG/',
- '../../protocols/JabberG/jabberg-translation.txt');
- create_langfile('../../protocols/MRA/',
- '../../protocols/MRA/mra-translation.txt');
- create_langfile('../../protocols/MSN/',
- '../../protocols/MSN/msn-translation.txt');
- create_langfile('../../protocols/NewsAggregator/',
- '../../protocols/NewsAggregator/newsaggregator-translation.txt');
- create_langfile('../../protocols/Omegle/',
- '../../protocols/Omegle/omegle-translation.txt');
- create_langfile('../../protocols/Quotes/',
- '../../protocols/Quotes/quotes-translation.txt');
- create_langfile('../../protocols/Twitter/',
- '../../protocols/Twitter/twitter-translation.txt');
- create_langfile('../../protocols/Weather/',
- '../../protocols/Weather/weather-translation.txt');
- create_langfile('../../protocols/Yahoo/',
- '../../protocols/Yahoo/yahoo-translation.txt');
- create_langfile('../../protocols/YAMN/',
- '../../protocols/YAMN/yamn-translation.txt');
- create_langfile('../dbtool/',
- '../dbtool/dbtool-translation.txt');
- }
-elsif ($ARGV[0] eq "core") {
- create_langfile('../../src',
- '../../i18n/core-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-elsif ($ARGV[0] eq "srmm") {
- create_langfile('../../plugins/SRMM/',
- '../../plugins/SRMM/Docs/srmm-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-elsif ($ARGV[0] eq "import") {
- create_langfile('../../plugins/Import/',
- '../../plugins/Import/docs/import-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-else {
- print "Error: Unknown module $ARGV[0]\n";
- exit 1;
-}
-
-sub create_langfile {
- $rootdir = shift(@_);
- my $outfile = shift(@_);
- my $lang = shift(@_);
- my $locale = shift(@_);
- my $author = shift(@_);
- my $email = shift(@_);
- my $plugins = @_ ? shift(@_) : '';
- %hash = ();
- my %common = ();
- $clines = 0;
- print "Building language file for $rootdir:\n";
- find({ wanted => \&csearch, preprocess => \&pre_dir }, $rootdir);
- find({ wanted => \&rcsearch, preprocess => \&pre_dir }, $rootdir);
- open(WRITE, "> $outfile") or die;
- if ($outfile eq "../../src/!core-translation.txt") {
- print WRITE <<HEADER; }
-Miranda Language Pack Version 1
-Locale: $locale
-Authors: $author
-Author-email: $email
-Last-Modified-Using: Miranda IM $version
-Plugins-included: $plugins
-; Generated by lpgen on $time
-; Translations: $clines
-
-HEADER
- foreach my $trans (keys %hash) {
- if ($hash{$trans} =~ /^\d+$/) {
- $common{$trans} = $hash{$trans};
- delete $hash{$trans};
- }
- }
-
- my @sorted = sort { (floor($common{$b}/20) == floor($common{$a}/20)) ? ($a cmp $b) : ($common{$b} <=> $common{$a}) } keys %common;
- print WRITE "; Common strings that belong to many files\n;[";
- print WRITE join "]\n;[", @sorted;
- print WRITE "]\n";
-
- my $file = '';
- foreach my $trans (sort { ($hash{$a} eq $hash{$b}) ? ($a cmp $b) : ($hash{$a} cmp $hash{$b}) } keys %hash) {
- if ($hash{$trans} ne $file) {
- $file = $hash{$trans};
- print WRITE "\n; $file\n";
- }
- print WRITE ";[$trans]\n";
- }
-
- close(WRITE);
- print " $outfile is complete ($clines)\n\n";
-}
-
-sub pre_dir {
- # avoid parsing some ext SDKs
- my @files = ();
- return @files if (
- $File::Find::name =~/..\/extplugins/ or
- $File::Find::name =~/freeimage\/Source/ or
- $File::Find::name =~/dbrw\/sqlite3/);
- @files = grep { not /^\.\.?$/ } @_;
- return sort @files;
-}
-
-sub append_str {
- my $str = shift(@_);
- my $found = shift(@_);
- $str = substr($str, 1, length($str) - 2);
- if (length($str) gt 0 and $str ne "List1" and $str ne "Tree1" and $str =~ /[a-zA-Z]+/g) {
- my $path = $File::Find::name;
- $path =~ s/(\.\.\/)+miranda\///;
- if (!$hash{$str}) {
- $hash{$str} = $path;
- $clines ++;
- return 1;
- } elsif ($hash{$str} ne $path) {
- if ($hash{$str} =~ /^\d+$/) {
- $hash{$str} ++;
- } else {
- $hash{$str} = 1;
- }
- }
- }
- return 0;
-}
-
-sub csearch {
- if (-f $_ and ($_ =~ m/\.c(pp)?$/i or $_ =~ m/\.h(pp)?$/i)) {
- my $found = 0;
- my $file = $_;
- print " Processing $_ ";
- open(READ, "< $_") or return;
- my $all = '';
- while (my $lines = <READ>) {
- $all = $all.$lines;
- }
- close(READ);
- $_ = $all;
- while (/(?:Button_SetIcon_IcoLib|Translate[A-Z]{0,2}|LPGENT?|ICQTranslateUtfStatic)\s*\(\s*(\"[^\\]*?(\\.[^\\]*?)*\")\s*[,\)]/g) {
- $found += append_str($1, $found);
- }
- print "($found)\n";
- }
-}
-
-sub rcsearch {
- if ( -f $_ and $_ =~ m/\.rc$/i) {
- my $found = 0;
- my $file = $_;
- print " Processing $_ ";
- open(READ, "< $_") or return;
- my $all = '';
- while (my $lines = <READ>) {
- $all = $all.$lines;
- }
- close(READ);
- $_ = $all;
- s/\"\"/\\\"/g;
- while (/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|GROUPBOX|CAPTION|MENUITEM|POPUP)\s*(\"[^\\]*?(\\.[^\\]*?)*\")/g) {
- $found += append_str($1, $found);
- }
- print "($found)\n";
- }
-}
diff --git a/tools/_deprecated/lpgen_im/lpgen.pl.bat b/tools/_deprecated/lpgen_im/lpgen.pl.bat deleted file mode 100644 index 5bf3c05946..0000000000 --- a/tools/_deprecated/lpgen_im/lpgen.pl.bat +++ /dev/null @@ -1,20 +0,0 @@ -call lpgen.pl
-
-for /F %%i in ('dir /B /S ..\..\plugins\*-translation.txt') do copy /Y %%i ..\..\i18n
-
-for /F %%i in ('dir /B /S ..\..\protocols\*-translation.txt') do copy /Y %%i ..\..\i18n
-
-for /F %%i in ('dir /B /S ..\..\src\*-translation.txt') do copy /Y %%i ..\..\i18n
-
-for /F %%i in ('dir /B /S ..\..\tools\*-translation.txt') do copy /Y %%i ..\..\i18n
-
-pushd ..\..\i18n
-
-if exist langpack_english.txt del /Q langpack_english.txt
-
-
-for %%j in (*-translation.txt) do type "%%j" >> langpack_english.txt
-
-del /Q *-translation.txt
-
-popd
\ No newline at end of file diff --git a/tools/_deprecated/lpgen_im/lpgen_old.pl b/tools/_deprecated/lpgen_im/lpgen_old.pl deleted file mode 100644 index e58c7dbe7a..0000000000 --- a/tools/_deprecated/lpgen_im/lpgen_old.pl +++ /dev/null @@ -1,228 +0,0 @@ -#!/usr/bin/perl
-#
-# Script generating translation templates from sources
-#
-# Miranda IM: the free IM client for Microsoft* Windows*
-#
-# Copyright 2000-2008 Miranda ICQ/IM project,
-# all portions of this codebase are copyrighted to the people
-# listed in contributors.txt.
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-use POSIX;
-use File::Find;
-use strict;
-
-my $rootdir = '';
-my %hash = ();
-my $clines = 0;
-
-my $version = '0.7svn';
-my $time = localtime();
-
-if (@ARGV && $ARGV[0] eq "version") {
- shift @ARGV;
- # 1st arg version major i.e. 07 for "0.7"
- if (@ARGV) {
- my $vermaj = shift @ARGV;
- if ($vermaj =~ /^([0-9]*)([0-9])$/) {
- if ($1 eq "") {
- $version = $2;
- } else {
- $version = "$1.$2";
- }
- } else {
- $version = $vermaj;
- }
- }
- # 2nd arg version minor i.e. 1 for "0.7.1"
- if (@ARGV) {
- my $vermin = shift @ARGV;
- if ($vermin =~ /^[0-9]+$/) {
- $version .= ".$vermin";
- } else {
- $version .= $vermin;
- }
- }
- # 3rd arg build number i.e. 36 for "0.7.1 build 36"
- if (@ARGV) {
- my $build = shift @ARGV;
- if ($build =~ /^[0-9]+$/) {
- $version .= " build $build";
- } else {
- $version .= $build;
- }
- }
-}
-
-#Language Files
-if (!@ARGV) {
- create_langfile(
- '../../miranda',
- '../../miranda/i18n/langpack_english.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org',
- 'Scriver,avs,chat,clist,clist_nicer,db3x,db3x_mmap,dbrw,advaimg,import,modernb,mwclist,png2dib,srmm,tabsrmm,AimOscar,Gadu-Gadu,IRC,IcqOscarJ,JabberG,MSN,Yahoo');
-}
-elsif ($ARGV[0] eq "core") {
- create_langfile('../../miranda/src',
- '../../miranda/i18n/core-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-elsif ($ARGV[0] eq "srmm") {
- create_langfile('../../miranda/plugins/SRMM/',
- '../../miranda/plugins/SRMM/Docs/srmm-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-elsif ($ARGV[0] eq "import") {
- create_langfile('../../miranda/plugins/Import/',
- '../../miranda/plugins/Import/docs/import-translation.txt',
- 'English (US)', '0809',
- 'Miranda IM Development Team',
- 'project-info@miranda-im.org');
-}
-else {
- print "Error: Unknown module $ARGV[0]\n";
- exit 1;
-}
-
-sub create_langfile {
- $rootdir = shift(@_);
- my $outfile = shift(@_);
- my $lang = shift(@_);
- my $locale = shift(@_);
- my $author = shift(@_);
- my $email = shift(@_);
- my $plugins = @_ ? shift(@_) : '';
- %hash = ();
- my %common = ();
- $clines = 0;
- print "Building language file for $rootdir:\n";
- find({ wanted => \&csearch, preprocess => \&pre_dir }, $rootdir);
- find({ wanted => \&rcsearch, preprocess => \&pre_dir }, $rootdir);
- open(WRITE, "> $outfile") or die;
- print WRITE <<HEADER;
-Miranda Language Pack Version 1
-Locale: $locale
-Authors: $author
-Author-email: $email
-Last-Modified-Using: Miranda IM $version
-Plugins-included: $plugins
-; Generated by lpgen on $time
-; Translations: $clines
-
-HEADER
- foreach my $trans (keys %hash) {
- if ($hash{$trans} =~ /^\d+$/) {
- $common{$trans} = $hash{$trans};
- delete $hash{$trans};
- }
- }
-
- my @sorted = sort { (floor($common{$b}/20) == floor($common{$a}/20)) ? ($a cmp $b) : ($common{$b} <=> $common{$a}) } keys %common;
- print WRITE "; Common strings that belong to many files\n;[";
- print WRITE join "]\n;[", @sorted;
- print WRITE "]\n";
-
- my $file = '';
- foreach my $trans (sort { ($hash{$a} eq $hash{$b}) ? ($a cmp $b) : ($hash{$a} cmp $hash{$b}) } keys %hash) {
- if ($hash{$trans} ne $file) {
- $file = $hash{$trans};
- print WRITE "\n; $file\n";
- }
- print WRITE ";[$trans]\n";
- }
-
- close(WRITE);
- print " $outfile is complete ($clines)\n\n";
-}
-
-sub pre_dir {
- # avoid parsing some ext SDKs
- my @files = ();
- return @files if (
- $File::Find::name =~/..\/extplugins/ or
- $File::Find::name =~/freeimage\/Source/ or
- $File::Find::name =~/dbrw\/sqlite3/);
- @files = grep { not /^\.\.?$/ } @_;
- return sort @files;
-}
-
-sub append_str {
- my $str = shift(@_);
- my $found = shift(@_);
- $str = substr($str, 1, length($str) - 2);
- if (length($str) gt 0 and $str ne "List1" and $str ne "Tree1" and $str =~ /[a-zA-Z]+/g) {
- my $path = $File::Find::name;
- $path =~ s/(\.\.\/)+miranda\///;
- if (!$hash{$str}) {
- $hash{$str} = $path;
- $clines ++;
- return 1;
- } elsif ($hash{$str} ne $path) {
- if ($hash{$str} =~ /^\d+$/) {
- $hash{$str} ++;
- } else {
- $hash{$str} = 1;
- }
- }
- }
- return 0;
-}
-
-sub csearch {
- if (-f $_ and ($_ =~ m/\.c(pp)?$/i or $_ =~ m/\.h(pp)?$/i)) {
- my $found = 0;
- my $file = $_;
- print " Processing $_ ";
- open(READ, "< $_") or return;
- my $all = '';
- while (my $lines = <READ>) {
- $all = $all.$lines;
- }
- close(READ);
- $_ = $all;
- while (/(?:Button_SetIcon_IcoLib|Translate[A-Z]{0,2}|LPGENT?|ICQTranslateUtfStatic)\s*\(\s*(\"[^\\]*?(\\.[^\\]*?)*\")\s*[,\)]/g) {
- $found += append_str($1, $found);
- }
- print "($found)\n";
- }
-}
-
-sub rcsearch {
- if ( -f $_ and $_ =~ m/\.rc$/i) {
- my $found = 0;
- my $file = $_;
- print " Processing $_ ";
- open(READ, "< $_") or return;
- my $all = '';
- while (my $lines = <READ>) {
- $all = $all.$lines;
- }
- close(READ);
- $_ = $all;
- s/\"\"/\\\"/g;
- while (/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|GROUPBOX|CAPTION|MENUITEM|POPUP)\s*(\"[^\\]*?(\\.[^\\]*?)*\")/g) {
- $found += append_str($1, $found);
- }
- print "($found)\n";
- }
-}
diff --git a/tools/_deprecated/lpgen_im/trans.pl b/tools/_deprecated/lpgen_im/trans.pl deleted file mode 100644 index 5bd15f57ce..0000000000 --- a/tools/_deprecated/lpgen_im/trans.pl +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl
-#
-# Script generating new translation from template, using old translation
-#
-# Miranda IM: the free IM client for Microsoft* Windows*
-#
-# Copyright 2000-2008 Miranda ICQ/IM project,
-# all portions of this codebase are copyrighted to the people
-# listed in contributors.txt.
-#
-# 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-use POSIX;
-
-if(@ARGV < 2)
-{
- print "trans <to translate> <old translation> [<next old translation> ...]\n";
- exit;
-}
-
-my $key;
-my %trans;
-my $totrans = shift @ARGV;
-while(@ARGV)
-{
- my $oldtrans = shift @ARGV;
- open OT, "<$oldtrans" or die "Error: Cannot open translation";
- while(<OT>)
- {
- chop;
- if(m/^\[(.*)\]/)
- { $key = $1; next; }
- elsif($key and !$trans{$key} and !m/^;/)
- { $trans{$key} = $_; $key = 0; }
- }
-}
-
-open TT, "<$totrans" or die "Error: Cannot open file to translate";
-while(<TT>)
-{
- if(m/^;\[(.*)\]/ and $trans{$1})
- {
- print "[$1]\n";
- print $trans{$1};
- print "\n";
- }
- else
- { print; }
-}
-
-close TT;
-close OT;
|