diff options
Diffstat (limited to 'vcnet')
-rw-r--r-- | vcnet/cups.sln | 15 | ||||
-rw-r--r-- | vcnet/dns_sd.c | 59 | ||||
-rw-r--r-- | vcnet/ippfind.vcxproj | 8 | ||||
-rw-r--r-- | vcnet/ippserver.vcxproj | 8 | ||||
-rw-r--r-- | vcnet/libcups2.vcxproj | 17 | ||||
-rw-r--r-- | vcnet/libcups2.vcxproj.filters | 6 |
6 files changed, 99 insertions, 14 deletions
diff --git a/vcnet/cups.sln b/vcnet/cups.sln index 664e1b1dc..a06e7e3fa 100644 --- a/vcnet/cups.sln +++ b/vcnet/cups.sln @@ -10,16 +10,31 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testfile", "testfile.vcxproj", "{CE75FC5F-E0CF-45DC-AD27-84666D3FBA30}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testhttp", "testhttp.vcxproj", "{90B0058C-8393-411F-BD3B-E2C831D4E883}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0899B3A-43E7-4BC3-A785-659E1FD2EA83} = {C0899B3A-43E7-4BC3-A785-659E1FD2EA83}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cupstestppd", "cupstestppd.vcxproj", "{6BE0CDD3-4ED7-409C-A80F-19DF73664B1F}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0899B3A-43E7-4BC3-A785-659E1FD2EA83} = {C0899B3A-43E7-4BC3-A785-659E1FD2EA83}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ipptool", "ipptool.vcxproj", "{B246D91E-61F2-4433-BFD2-6C2A96FBD4D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0899B3A-43E7-4BC3-A785-659E1FD2EA83} = {C0899B3A-43E7-4BC3-A785-659E1FD2EA83}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "regex", "regex.vcxproj", "{18950A1B-D37A-40C7-B2DF-C12986C0526E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ippfind", "ippfind.vcxproj", "{B484DA0C-62C8-4C32-83B6-CCEB58968B85}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0899B3A-43E7-4BC3-A785-659E1FD2EA83} = {C0899B3A-43E7-4BC3-A785-659E1FD2EA83}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ippserver", "ippserver.vcxproj", "{82A03BC7-0746-4B85-8908-3C7A3FAA58A9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0899B3A-43E7-4BC3-A785-659E1FD2EA83} = {C0899B3A-43E7-4BC3-A785-659E1FD2EA83}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dnssdstub", "dnssdstub.vcxproj", "{C0899B3A-43E7-4BC3-A785-659E1FD2EA83}"
EndProject
diff --git a/vcnet/dns_sd.c b/vcnet/dns_sd.c index d135e9aa8..25131dd6c 100644 --- a/vcnet/dns_sd.c +++ b/vcnet/dns_sd.c @@ -34,7 +34,10 @@ static DNSServiceErrorType (*dnssd_update_record)(DNSServiceRef sdRef, DNSRecord static void (*dnssd_txt_create)(TXTRecordRef *txtRecord, uint16_t bufferLen, void *buffer); static void (*dnssd_txt_deallocate)(TXTRecordRef *txtRecord); static const void *(*dnssd_txt_get_bytes_ptr)(const TXTRecordRef *txtRecord); +static uint16_t (*dnssd_txt_get_count)(uint16_t txtLen, const void *txtRecord); static uint16_t (*dnssd_txt_get_length)(const TXTRecordRef *txtRecord); +static DNSServiceErrorType (*dnssd_txt_get_item_at_index)(uint16_t txtLen, const void *txtRecord, uint16_t itemIndex, uint16_t keyBufLen, char *key, uint8_t *valueLen, const void **value); +static const void *(*dnssd_txt_get_value_ptr)(uint16_t txtLen, const void *txtRecord, const char *key, uint8_t *valueLen); static DNSServiceErrorType (*dnssd_txt_set_value)(TXTRecordRef *txtRecord, const char *key, uint8_t valueSize, const void *value); @@ -68,7 +71,10 @@ dnssd_init(void) dnssd_txt_create = (void (*)(TXTRecordRef *, uint16_t, void *))GetProcAddress(dll_handle, "TXTRecordCreate"); dnssd_txt_deallocate = (void (*)(TXTRecordRef *))GetProcAddress(dll_handle, "TXTRecordDeallocate"); dnssd_txt_get_bytes_ptr = (const void *(*)(const TXTRecordRef *))GetProcAddress(dll_handle, "TXTRecordGetBytesPtr"); + dnssd_txt_get_count = (uint16_t (*)(uint16_t, const void *))GetProcAddress(dll_handle, "TXTRecordGetCount"); + dnssd_txt_get_item_at_index = (DNSServiceErrorType (*)(uint16_t, const void *, uint16_t, uint16_t, char *, uint8_t *, const void **))GetProcAddress(dll_handle, "TXTRecordGetItemAtIndex"); dnssd_txt_get_length = (uint16_t (*)(const TXTRecordRef *))GetProcAddress(dll_handle, "TXTRecordGetLength"); + dnssd_txt_get_value_ptr = (const void *(*)(uint16_t, const void *, const char *, uint8_t *))GetProcAddress(dll_handle, "TXTRecordGetValuePtr"); dnssd_txt_set_value = (DNSServiceErrorType (*)(TXTRecordRef *, const char *, uint8_t, const void *))GetProcAddress(dll_handle, "TXTRecordSetValue"); } @@ -383,3 +389,56 @@ DNSServiceErrorType DNSSD_API TXTRecordSetValue } +// TXTRecordGetCount +uint16_t DNSSD_API +TXTRecordGetCount( + uint16_t txtLen, + const void *txtRecord) +{ + if (!dnssd_initialized) + dnssd_init(); + + if (dnssd_txt_get_count) + return (*dnssd_txt_get_count)(txtLen, txtRecord); + else + return (0); +} + + +// TXTRecordGetItemAtIndex +DNSServiceErrorType DNSSD_API +TXTRecordGetItemAtIndex( + uint16_t txtLen, + const void *txtRecord, + uint16_t itemIndex, + uint16_t keyBufLen, + char *key, + uint8_t *valueLen, + const void **value) +{ + if (!dnssd_initialized) + dnssd_init(); + + if (dnssd_txt_get_item_at_index) + return (*dnssd_txt_get_item_at_index)(txtLen, txtRecord, itemIndex, keyBufLen, key, valueLen, value); + else + return (-1); +} + + +// TXTRecordGetValuePtr +const void * DNSSD_API +TXTRecordGetValuePtr( + uint16_t txtLen, + const void *txtRecord, + const char *key, + uint8_t *valueLen) +{ + if (!dnssd_initialized) + dnssd_init(); + + if (dnssd_txt_get_value_ptr) + return (*dnssd_txt_get_value_ptr)(txtLen, txtRecord, key, valueLen); + else + return (NULL); +} diff --git a/vcnet/ippfind.vcxproj b/vcnet/ippfind.vcxproj index 8a3010e10..66b5d65a6 100644 --- a/vcnet/ippfind.vcxproj +++ b/vcnet/ippfind.vcxproj @@ -99,7 +99,7 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> @@ -123,7 +123,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> @@ -141,7 +141,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> @@ -164,7 +164,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> diff --git a/vcnet/ippserver.vcxproj b/vcnet/ippserver.vcxproj index 490470336..212d89609 100644 --- a/vcnet/ippserver.vcxproj +++ b/vcnet/ippserver.vcxproj @@ -99,7 +99,7 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> @@ -123,7 +123,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> @@ -141,7 +141,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> @@ -164,7 +164,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> - <AdditionalDependencies>dnssd.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> + <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> diff --git a/vcnet/libcups2.vcxproj b/vcnet/libcups2.vcxproj index cb656618d..0cabd0ed8 100644 --- a/vcnet/libcups2.vcxproj +++ b/vcnet/libcups2.vcxproj @@ -28,7 +28,7 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <PlatformToolset>v141</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -38,7 +38,7 @@ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <PlatformToolset>v141</PlatformToolset> - <CharacterSet>Unicode</CharacterSet> + <CharacterSet>MultiByte</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> @@ -92,7 +92,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>ZLIB_WINAPI;WIN32;DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -122,7 +122,7 @@ <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>ZLIB_WINAPI;WIN32;DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>DEBUG;_DEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> @@ -146,7 +146,7 @@ <ClCompile> <Optimization>MinSpace</Optimization> <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>ZLIB_WINAPI;WIN32;DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader /> <WarningLevel>Level3</WarningLevel> @@ -178,7 +178,7 @@ <ClCompile> <Optimization>MinSpace</Optimization> <AdditionalIncludeDirectories>..\vcnet;..;..\vcnet\regex;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>ZLIB_WINAPI;WIN32;DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>DEBUG;NDEBUG;_WINDOWS;_USRDLL;LIBCUPS2_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader /> <WarningLevel>Level3</WarningLevel> @@ -284,12 +284,14 @@ xcopy /I/Y "$(TargetPath)" <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <ClCompile Include="..\cups\ipp-file.c" /> <ClCompile Include="..\cups\ipp-support.c"> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> + <ClCompile Include="..\cups\ipp-vars.c" /> <ClCompile Include="..\cups\ipp.c"> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -423,6 +425,9 @@ xcopy /I/Y "$(TargetPath)" <ClInclude Include="config.h" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="dnssdstub.vcxproj"> + <Project>{c0899b3a-43e7-4bc3-a785-659e1fd2ea83}</Project> + </ProjectReference> <ProjectReference Include="regex.vcxproj"> <Project>{18950a1b-d37a-40c7-b2df-c12986c0526e}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> diff --git a/vcnet/libcups2.vcxproj.filters b/vcnet/libcups2.vcxproj.filters index 43c138bee..348b72155 100644 --- a/vcnet/libcups2.vcxproj.filters +++ b/vcnet/libcups2.vcxproj.filters @@ -171,6 +171,12 @@ <ClCompile Include="..\cups\raster-stubs.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\cups\ipp-file.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="..\cups\ipp-vars.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <None Include="..\cups\libcups2.def"> |