mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-02 14:03:41 +01:00
new trunk (base for 1.5)
windows build only
This commit is contained in:
40
Net/Makefile
Normal file
40
Net/Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# $Id: //poco/1.4/Net/Makefile#3 $
|
||||
#
|
||||
# Makefile for Poco Net
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
SHAREDOPT_CXX += -DNet_EXPORTS
|
||||
|
||||
objects = \
|
||||
DNS HTTPResponse HostEntry Socket \
|
||||
DatagramSocket HTTPServer IPAddress SocketAddress \
|
||||
HTTPBasicCredentials HTTPCookie HTMLForm MediaType DialogSocket \
|
||||
DatagramSocketImpl FilePartSource HTTPServerConnection MessageHeader \
|
||||
HTTPChunkedStream HTTPServerConnectionFactory MulticastSocket SocketStream \
|
||||
HTTPClientSession HTTPServerParams MultipartReader StreamSocket SocketImpl \
|
||||
HTTPFixedLengthStream HTTPServerRequest HTTPServerRequestImpl MultipartWriter StreamSocketImpl \
|
||||
HTTPHeaderStream HTTPServerResponse HTTPServerResponseImpl NameValueCollection TCPServer \
|
||||
HTTPMessage HTTPServerSession NetException TCPServerConnection HTTPBufferAllocator \
|
||||
HTTPAuthenticationParams HTTPCredentials HTTPDigestCredentials \
|
||||
HTTPRequest HTTPSession HTTPSessionInstantiator HTTPSessionFactory NetworkInterface \
|
||||
HTTPRequestHandler HTTPStream HTTPIOStream ServerSocket TCPServerDispatcher TCPServerConnectionFactory \
|
||||
HTTPRequestHandlerFactory HTTPStreamFactory ServerSocketImpl TCPServerParams \
|
||||
QuotedPrintableEncoder QuotedPrintableDecoder StringPartSource \
|
||||
FTPClientSession FTPStreamFactory PartHandler PartSource NullPartHandler \
|
||||
SocketReactor SocketNotifier SocketNotification AbstractHTTPRequestHandler \
|
||||
MailRecipient MailMessage MailStream SMTPClientSession POP3ClientSession \
|
||||
RawSocket RawSocketImpl ICMPClient ICMPEventArgs ICMPPacket ICMPPacketImpl \
|
||||
ICMPSocket ICMPSocketImpl ICMPv4PacketImpl \
|
||||
RemoteSyslogChannel RemoteSyslogListener \
|
||||
WebSocket WebSocketImpl
|
||||
|
||||
target = PocoNet
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
19
Net/Net.progen
Normal file
19
Net/Net.progen
Normal file
@@ -0,0 +1,19 @@
|
||||
vc.project.guid = B057A1FE-09F7-465E-B8B5-E1B659051D76
|
||||
vc.project.name = Net
|
||||
vc.project.target = Poco${vc.project.name}
|
||||
vc.project.type = library
|
||||
vc.project.pocobase = ..
|
||||
vc.project.outdir = ${vc.project.pocobase}
|
||||
vc.project.platforms = Win32, x64, WinCE
|
||||
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
|
||||
vc.project.prototype = ${vc.project.name}_vs90.vcproj
|
||||
vc.project.compiler.include = ..\\Foundation\\include
|
||||
vc.project.compiler.defines =
|
||||
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
|
||||
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
|
||||
vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.x64 = ws2_32.lib iphlpapi.lib
|
||||
vc.project.linker.dependencies.WinCE = ws2.lib iphlpapi.lib
|
||||
vc.solution.create = true
|
||||
vc.solution.include = testsuite\\TestSuite
|
||||
7
Net/Net.vmsbuild
Normal file
7
Net/Net.vmsbuild
Normal file
@@ -0,0 +1,7 @@
|
||||
#
|
||||
# Net.vmsbuild
|
||||
#
|
||||
# $Id: //poco/1.4/Net/Net.vmsbuild#1 $
|
||||
#
|
||||
LIB=PocoNet
|
||||
<SourceFilesHere>
|
||||
96
Net/Net.vxbuild
Normal file
96
Net/Net.vxbuild
Normal file
@@ -0,0 +1,96 @@
|
||||
#
|
||||
# Net.vxbuild
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
TARGET=pocoNet
|
||||
CFLAGS="-I../../../Foundation/include"
|
||||
SOURCES="
|
||||
AbstractHTTPRequestHandler.cpp
|
||||
DNS.cpp
|
||||
DatagramSocket.cpp
|
||||
DatagramSocketImpl.cpp
|
||||
DialogSocket.cpp
|
||||
FTPClientSession.cpp
|
||||
FTPStreamFactory.cpp
|
||||
FilePartSource.cpp
|
||||
HTMLForm.cpp
|
||||
HTTPAuthenticationParams.cpp
|
||||
HTTPBasicCredentials.cpp
|
||||
HTTPBufferAllocator.cpp
|
||||
HTTPChunkedStream.cpp
|
||||
HTTPClientSession.cpp
|
||||
HTTPCookie.cpp
|
||||
HTTPCredentials.cpp
|
||||
HTTPDigestCredentials.cpp
|
||||
HTTPFixedLengthStream.cpp
|
||||
HTTPHeaderStream.cpp
|
||||
HTTPIOStream.cpp
|
||||
HTTPMessage.cpp
|
||||
HTTPRequest.cpp
|
||||
HTTPRequestHandler.cpp
|
||||
HTTPRequestHandlerFactory.cpp
|
||||
HTTPResponse.cpp
|
||||
HTTPServer.cpp
|
||||
HTTPServerConnection.cpp
|
||||
HTTPServerConnectionFactory.cpp
|
||||
HTTPServerParams.cpp
|
||||
HTTPServerRequest.cpp
|
||||
HTTPServerRequestImpl.cpp
|
||||
HTTPServerResponse.cpp
|
||||
HTTPServerResponseImpl.cpp
|
||||
HTTPServerSession.cpp
|
||||
HTTPSession.cpp
|
||||
HTTPSessionFactory.cpp
|
||||
HTTPSessionInstantiator.cpp
|
||||
HTTPStream.cpp
|
||||
HTTPStreamFactory.cpp
|
||||
HostEntry.cpp
|
||||
ICMPClient.cpp
|
||||
ICMPEventArgs.cpp
|
||||
ICMPPacket.cpp
|
||||
ICMPPacketImpl.cpp
|
||||
ICMPSocket.cpp
|
||||
ICMPSocketImpl.cpp
|
||||
ICMPv4PacketImpl.cpp
|
||||
IPAddress.cpp
|
||||
MailMessage.cpp
|
||||
MailRecipient.cpp
|
||||
MailStream.cpp
|
||||
MediaType.cpp
|
||||
MessageHeader.cpp
|
||||
MulticastSocket.cpp
|
||||
MultipartReader.cpp
|
||||
MultipartWriter.cpp
|
||||
NameValueCollection.cpp
|
||||
NetException.cpp
|
||||
NetworkInterface.cpp
|
||||
NullPartHandler.cpp
|
||||
POP3ClientSession.cpp
|
||||
PartHandler.cpp
|
||||
PartSource.cpp
|
||||
QuotedPrintableDecoder.cpp
|
||||
QuotedPrintableEncoder.cpp
|
||||
RawSocket.cpp
|
||||
RawSocketImpl.cpp
|
||||
RemoteSyslogChannel.cpp
|
||||
RemoteSyslogListener.cpp
|
||||
SMTPClientSession.cpp
|
||||
ServerSocket.cpp
|
||||
ServerSocketImpl.cpp
|
||||
Socket.cpp
|
||||
SocketAddress.cpp
|
||||
SocketImpl.cpp
|
||||
SocketNotification.cpp
|
||||
SocketNotifier.cpp
|
||||
SocketReactor.cpp
|
||||
SocketStream.cpp
|
||||
StreamSocket.cpp
|
||||
StreamSocketImpl.cpp
|
||||
StringPartSource.cpp
|
||||
TCPServer.cpp
|
||||
TCPServerConnection.cpp
|
||||
TCPServerConnectionFactory.cpp
|
||||
TCPServerDispatcher.cpp
|
||||
TCPServerParams.cpp
|
||||
"
|
||||
60
Net/Net_CE_vs90.sln
Normal file
60
Net/Net_CE_vs90.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_CE_vs90.vcproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_CE_vs90.vcproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Digi JumpStart (ARMV4I) = debug_shared|Digi JumpStart (ARMV4I)
|
||||
release_shared|Digi JumpStart (ARMV4I) = release_shared|Digi JumpStart (ARMV4I)
|
||||
debug_static_mt|Digi JumpStart (ARMV4I) = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
release_static_mt|Digi JumpStart (ARMV4I) = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
debug_static_md|Digi JumpStart (ARMV4I) = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
release_static_md|Digi JumpStart (ARMV4I) = release_static_md|Digi JumpStart (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I)
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Digi JumpStart (ARMV4I).ActiveCfg = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Digi JumpStart (ARMV4I).Build.0 = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Digi JumpStart (ARMV4I).Deploy.0 = debug_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Digi JumpStart (ARMV4I).ActiveCfg = release_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Digi JumpStart (ARMV4I).Build.0 = release_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Digi JumpStart (ARMV4I).Deploy.0 = release_shared|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Digi JumpStart (ARMV4I).Build.0 = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Digi JumpStart (ARMV4I).ActiveCfg = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Digi JumpStart (ARMV4I).Build.0 = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Digi JumpStart (ARMV4I).Deploy.0 = release_static_mt|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Digi JumpStart (ARMV4I).ActiveCfg = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Digi JumpStart (ARMV4I).Build.0 = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Digi JumpStart (ARMV4I).Deploy.0 = debug_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Digi JumpStart (ARMV4I).ActiveCfg = release_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Digi JumpStart (ARMV4I).Build.0 = release_static_md|Digi JumpStart (ARMV4I)
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Digi JumpStart (ARMV4I).Deploy.0 = release_static_md|Digi JumpStart (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
962
Net/Net_CE_vs90.vcproj
Normal file
962
Net/Net_CE_vs90.vcproj
Normal file
@@ -0,0 +1,962 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="Net"
|
||||
Version="9.00"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
RootNamespace="Net"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Digi JumpStart (ARMV4I)"/>
|
||||
</Platforms>
|
||||
<ToolFiles/>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
RuntimeTypeInfo="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_UNICODE;UNICODE;_WIN32_WCE"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/FORCE:MULTIPLE"
|
||||
AdditionalDependencies="ws2.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\$(PlatformName)\PocoNetd.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="..\lib\$(PlatformName)"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\bin\$(PlatformName)\PocoNetd.pdb"
|
||||
SubSystem="0"
|
||||
StackReserveSize="65536"
|
||||
StackCommitSize="4096"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
RandomizedBaseAddress="1"
|
||||
ImportLibrary="..\lib\$(PlatformName)\PocoNetd.lib"
|
||||
TargetMachine="0"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="4"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;$(ProjectName)_EXPORTS;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
RuntimeTypeInfo="true"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_UNICODE;UNICODE;_WIN32_WCE"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/FORCE:MULTIPLE"
|
||||
AdditionalDependencies="ws2.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\$(PlatformName)\PocoNet.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="..\lib\$(PlatformName)"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="false"
|
||||
ProgramDatabaseFile=""
|
||||
SubSystem="0"
|
||||
StackReserveSize="65536"
|
||||
StackCommitSize="4096"
|
||||
OptimizeReferences="0"
|
||||
EnableCOMDATFolding="0"
|
||||
ImportLibrary="..\lib\$(PlatformName)\PocoNet.lib"
|
||||
TargetMachine="0"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\$(PlatformName)\PocoNetmtd.pdb"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\$(PlatformName)\PocoNetmtd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="4"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\$(PlatformName)\PocoNetmt.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\$(PlatformName)\PocoNetmdd.pdb"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\$(PlatformName)\PocoNetmdd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Digi JumpStart (ARMV4I)"
|
||||
OutputDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="1"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="4"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;WINCE;_LIB;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;POCO_STATIC;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"
|
||||
CompileForArchitecture="2"
|
||||
InterworkCalls="false"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\$(PlatformName)\PocoNetmd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""/>
|
||||
<DebuggerTool/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="NetCore">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DNS.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HostEntry.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\IPAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Net.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketDefs.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DNS.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HostEntry.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\IPAddress.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketAddress.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Sockets">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DialogSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MulticastSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetworkInterface.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Socket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DialogSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MulticastSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetworkInterface.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Socket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Messages">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FilePartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MediaType.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MessageHeader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartReader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartWriter.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NameValueCollection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NullPartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StringPartSource.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FilePartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MediaType.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MessageHeader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartReader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartWriter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NameValueCollection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NullPartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableDecoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableEncoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StringPartSource.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCookie.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStream.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPAuthenticationParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBasicCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBufferAllocator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPChunkedStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCookie.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPDigestCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPFixedLengthStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPHeaderStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStream.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TCPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerParams.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\TCPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerDispatcher.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerParams.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequestImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponseImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPIOStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPIOStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionInstantiator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTMLForm.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTMLForm.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\FTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reactor">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAcceptor.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketConnector.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotification.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotifier.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketReactor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\SocketNotification.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketNotifier.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mail">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailRecipient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\POP3ClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SMTPClientSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\MailMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailRecipient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\POP3ClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SMTPClientSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ICMP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPClient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ICMPClient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPEventArgs.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPv4PacketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Logging">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogChannel.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogListener.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="WebSocket">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\WebSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\WebSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\DLLVersion.rc">
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Digi JumpStart (ARMV4I)">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Digi JumpStart (ARMV4I)">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Digi JumpStart (ARMV4I)"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Digi JumpStart (ARMV4I)"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Digi JumpStart (ARMV4I)"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Digi JumpStart (ARMV4I)"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
60
Net/Net_vs100.sln
Normal file
60
Net/Net_vs100.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_vs100.vcxproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs100.vcxproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
466
Net/Net_vs100.vcxproj
Normal file
466
Net/Net_vs100.vcxproj
Normal file
@@ -0,0 +1,466 @@
|
||||
<?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_shared|Win32">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|Win32">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|Win32">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|Win32">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|Win32">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|Win32">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>Net</ProjectName>
|
||||
<ProjectGuid>{B057A1FE-09F7-465E-B8B5-E1B659051D76}</ProjectGuid>
|
||||
<RootNamespace>Net</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">..\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">..\bin\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">..\lib\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">..\lib\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">..\lib\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">..\lib\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">obj\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoNetd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoNetmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoNetmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">PocoNet</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">PocoNetmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">PocoNetmt</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\bin\PocoNetd.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\bin\PocoNetd.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\lib\PocoNetd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\bin\PocoNet.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\lib\PocoNet.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\lib\PocoNetmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib\PocoNetmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib\PocoNetmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\lib\PocoNetmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib\PocoNetmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\lib\PocoNetmd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\lib\PocoNetmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Net\DNS.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HostEntry.h"/>
|
||||
<ClInclude Include="include\Poco\Net\IPAddress.h"/>
|
||||
<ClInclude Include="include\Poco\Net\Net.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NetException.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketAddress.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketDefs.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DialogSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MulticastSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NetworkInterface.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RawSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RawSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\Socket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FilePartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MediaType.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MessageHeader.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MultipartReader.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MultipartWriter.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NameValueCollection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NullPartHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\PartHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\PartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StringPartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCookie.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPMessage.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequest.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPResponse.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServer.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServer.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPIOStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTMLForm.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FTPStreamFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketAcceptor.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketConnector.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotification.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotifier.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketReactor.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailMessage.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailRecipient.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\POP3ClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SMTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPClient.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
<ClInclude Include="include\Poco\Net\WebSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\WebSocketImpl.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DNS.cpp"/>
|
||||
<ClCompile Include="src\HostEntry.cpp"/>
|
||||
<ClCompile Include="src\IPAddress.cpp"/>
|
||||
<ClCompile Include="src\NetException.cpp"/>
|
||||
<ClCompile Include="src\SocketAddress.cpp"/>
|
||||
<ClCompile Include="src\DatagramSocket.cpp"/>
|
||||
<ClCompile Include="src\DatagramSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\DialogSocket.cpp"/>
|
||||
<ClCompile Include="src\MulticastSocket.cpp"/>
|
||||
<ClCompile Include="src\NetworkInterface.cpp"/>
|
||||
<ClCompile Include="src\RawSocket.cpp"/>
|
||||
<ClCompile Include="src\RawSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\ServerSocket.cpp"/>
|
||||
<ClCompile Include="src\ServerSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\Socket.cpp"/>
|
||||
<ClCompile Include="src\SocketImpl.cpp"/>
|
||||
<ClCompile Include="src\SocketStream.cpp"/>
|
||||
<ClCompile Include="src\StreamSocket.cpp"/>
|
||||
<ClCompile Include="src\StreamSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\FilePartSource.cpp"/>
|
||||
<ClCompile Include="src\MediaType.cpp"/>
|
||||
<ClCompile Include="src\MessageHeader.cpp"/>
|
||||
<ClCompile Include="src\MultipartReader.cpp"/>
|
||||
<ClCompile Include="src\MultipartWriter.cpp"/>
|
||||
<ClCompile Include="src\NameValueCollection.cpp"/>
|
||||
<ClCompile Include="src\NullPartHandler.cpp"/>
|
||||
<ClCompile Include="src\PartHandler.cpp"/>
|
||||
<ClCompile Include="src\PartSource.cpp"/>
|
||||
<ClCompile Include="src\QuotedPrintableDecoder.cpp"/>
|
||||
<ClCompile Include="src\QuotedPrintableEncoder.cpp"/>
|
||||
<ClCompile Include="src\StringPartSource.cpp"/>
|
||||
<ClCompile Include="src\HTTPAuthenticationParams.cpp"/>
|
||||
<ClCompile Include="src\HTTPBasicCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPBufferAllocator.cpp"/>
|
||||
<ClCompile Include="src\HTTPChunkedStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPCookie.cpp"/>
|
||||
<ClCompile Include="src\HTTPCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPDigestCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPFixedLengthStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPHeaderStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPMessage.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequest.cpp"/>
|
||||
<ClCompile Include="src\HTTPResponse.cpp"/>
|
||||
<ClCompile Include="src\HTTPSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPStream.cpp"/>
|
||||
<ClCompile Include="src\TCPServer.cpp"/>
|
||||
<ClCompile Include="src\TCPServerConnection.cpp"/>
|
||||
<ClCompile Include="src\TCPServerConnectionFactory.cpp"/>
|
||||
<ClCompile Include="src\TCPServerDispatcher.cpp"/>
|
||||
<ClCompile Include="src\TCPServerParams.cpp"/>
|
||||
<ClCompile Include="src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequestHandler.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPServer.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerConnection.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerConnectionFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerParams.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerRequest.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerRequestImpl.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerResponse.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerResponseImpl.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPIOStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPSessionFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPSessionInstantiator.cpp"/>
|
||||
<ClCompile Include="src\HTTPStreamFactory.cpp"/>
|
||||
<ClCompile Include="src\HTMLForm.cpp"/>
|
||||
<ClCompile Include="src\FTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\FTPStreamFactory.cpp"/>
|
||||
<ClCompile Include="src\SocketNotification.cpp"/>
|
||||
<ClCompile Include="src\SocketNotifier.cpp"/>
|
||||
<ClCompile Include="src\SocketReactor.cpp"/>
|
||||
<ClCompile Include="src\MailMessage.cpp"/>
|
||||
<ClCompile Include="src\MailRecipient.cpp"/>
|
||||
<ClCompile Include="src\MailStream.cpp"/>
|
||||
<ClCompile Include="src\POP3ClientSession.cpp"/>
|
||||
<ClCompile Include="src\SMTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\ICMPClient.cpp"/>
|
||||
<ClCompile Include="src\ICMPEventArgs.cpp"/>
|
||||
<ClCompile Include="src\ICMPPacket.cpp"/>
|
||||
<ClCompile Include="src\ICMPPacketImpl.cpp"/>
|
||||
<ClCompile Include="src\ICMPSocket.cpp"/>
|
||||
<ClCompile Include="src\ICMPSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\ICMPv4PacketImpl.cpp"/>
|
||||
<ClCompile Include="src\RemoteSyslogChannel.cpp"/>
|
||||
<ClCompile Include="src\RemoteSyslogListener.cpp"/>
|
||||
<ClCompile Include="src\WebSocket.cpp"/>
|
||||
<ClCompile Include="src\WebSocketImpl.cpp"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\DLLVersion.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|Win32'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
687
Net/Net_vs100.vcxproj.filters
Normal file
687
Net/Net_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,687 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="NetCore">
|
||||
<UniqueIdentifier>{066be63d-d2cc-4543-84b7-282616920aa3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Header Files">
|
||||
<UniqueIdentifier>{c9e9606c-ff7b-450c-8571-d7088758f525}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Source Files">
|
||||
<UniqueIdentifier>{0158f8b7-311d-417e-a868-887ee734f17a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets">
|
||||
<UniqueIdentifier>{f07c41b9-24ca-4c1d-94c1-056bd8c9fb24}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Header Files">
|
||||
<UniqueIdentifier>{db59fa3e-f109-4ce7-aeaf-53e79ddceb8c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Source Files">
|
||||
<UniqueIdentifier>{7b94eb13-e6f1-4fe8-bf58-569ca841da39}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages">
|
||||
<UniqueIdentifier>{d634c5ce-8eda-4d77-aaf8-71674c1ab2dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Header Files">
|
||||
<UniqueIdentifier>{b1145a9f-595c-4467-bc37-0a7f6cb54aab}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Source Files">
|
||||
<UniqueIdentifier>{44844c83-fa28-4cbd-8e77-9b01ebbc24f2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP">
|
||||
<UniqueIdentifier>{e481d2dd-ee7b-44d6-85b8-e1e1b37a1d2b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Header Files">
|
||||
<UniqueIdentifier>{f041d7f1-38bc-4538-aaba-8941f4ac748e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Source Files">
|
||||
<UniqueIdentifier>{40ad861e-9c6f-4046-8e87-4e60ac89aecc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer">
|
||||
<UniqueIdentifier>{c26fe2a2-a8b5-4c8e-b9e9-d7e78ef2f5d8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Header Files">
|
||||
<UniqueIdentifier>{752aa25a-4a0f-45c0-84e6-e1e6f38eb44c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Source Files">
|
||||
<UniqueIdentifier>{c9b95086-8b4f-4a92-ba0a-418dcf4b4c1b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer">
|
||||
<UniqueIdentifier>{4435ba77-db96-4761-a0e8-347ea63fa4df}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Header Files">
|
||||
<UniqueIdentifier>{2708469d-6e2a-403e-ae38-3bf62df98060}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Source Files">
|
||||
<UniqueIdentifier>{51936df3-5b33-45da-9825-5aceb690d9d5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient">
|
||||
<UniqueIdentifier>{1a83f690-c71b-4609-a33b-1f0102f3291b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Header Files">
|
||||
<UniqueIdentifier>{702383f8-3dc4-4b66-9a5d-34cc4b9701a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Source Files">
|
||||
<UniqueIdentifier>{de5c5312-d7eb-4138-a508-2a06c4014947}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML">
|
||||
<UniqueIdentifier>{c77b11ad-2e6a-46a0-8f44-81fa011c241d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Header Files">
|
||||
<UniqueIdentifier>{99f1cb0e-885d-4d05-89dd-00e8169e8999}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Source Files">
|
||||
<UniqueIdentifier>{86e322c5-7d9a-4869-a09c-e6b3666c885b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient">
|
||||
<UniqueIdentifier>{41c6f33f-cb1c-4774-a238-8a14416c7487}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Header Files">
|
||||
<UniqueIdentifier>{370c3e91-aa68-40f4-9f46-3576897e14e4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Source Files">
|
||||
<UniqueIdentifier>{7246c556-8412-497c-9d2a-c5d972c17255}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor">
|
||||
<UniqueIdentifier>{0db14096-e483-401c-9e9e-5cec77cfc300}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Header Files">
|
||||
<UniqueIdentifier>{4c562d06-e01c-440f-bfa7-8d0d8428a5f9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Source Files">
|
||||
<UniqueIdentifier>{2c4b4ff7-3587-4ccc-8c77-839ec4fffbef}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail">
|
||||
<UniqueIdentifier>{ee71d9c6-1031-41ce-b165-7baba46fc19d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Header Files">
|
||||
<UniqueIdentifier>{973b0e54-9251-4db0-bc1c-012d6c9854dc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Source Files">
|
||||
<UniqueIdentifier>{78bbcb54-a180-4ef7-a493-be6ab57332af}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP">
|
||||
<UniqueIdentifier>{da0623d5-73b4-4836-8e1a-6068c3d96dee}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Header Files">
|
||||
<UniqueIdentifier>{6bbc87fd-7d32-4479-8c3a-5ce15b99dac6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Source Files">
|
||||
<UniqueIdentifier>{8578c488-e746-41f0-8a3e-ada7e77fabe2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging">
|
||||
<UniqueIdentifier>{70f5663a-0a88-41de-8e3e-b6c2475a0716}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Header Files">
|
||||
<UniqueIdentifier>{4be74d06-2af9-416c-8810-854a9c4f0201}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Source Files">
|
||||
<UniqueIdentifier>{5141345c-f280-4e44-ad68-8415eb808b81}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket">
|
||||
<UniqueIdentifier>{5c57283f-b250-412b-97f4-0ff65d9f8b8d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Header Files">
|
||||
<UniqueIdentifier>{e874dd57-43d2-4788-9cea-a749e7581142}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Source Files">
|
||||
<UniqueIdentifier>{6c199931-d024-4c71-aa2e-ef7e4741a958}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Net\DNS.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HostEntry.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\IPAddress.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\Net.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NetException.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketAddress.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketDefs.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DialogSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MulticastSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NetworkInterface.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RawSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RawSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\Socket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketStream.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FilePartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MediaType.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MessageHeader.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MultipartReader.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MultipartWriter.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NameValueCollection.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NullPartHandler.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\PartHandler.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\PartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableDecoder.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableEncoder.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StringPartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPAuthenticationParams.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicStreamBuf.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBufferAllocator.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPChunkedStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCookie.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPDigestCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPFixedLengthStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPHeaderStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPMessage.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPResponse.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSession.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServer.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnection.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnectionFactory.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerDispatcher.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerParams.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\AbstractHTTPRequestHandler.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandler.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandlerFactory.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServer.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnection.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnectionFactory.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerParams.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequest.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequestImpl.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponse.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponseImpl.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerSession.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPClientSession.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPIOStream.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionFactory.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionInstantiator.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStreamFactory.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTMLForm.h">
|
||||
<Filter>HTML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FTPClientSession.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FTPStreamFactory.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketAcceptor.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketConnector.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotification.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotifier.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketReactor.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailMessage.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailRecipient.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailStream.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\POP3ClientSession.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SMTPClientSession.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPClient.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPEventArgs.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacket.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocket.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPv4PacketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogChannel.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogListener.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\WebSocket.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\WebSocketImpl.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DNS.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HostEntry.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IPAddress.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetException.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketAddress.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetworkInterface.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ServerSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ServerSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Socket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketStream.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StreamSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StreamSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FilePartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MediaType.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessageHeader.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartReader.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartWriter.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NameValueCollection.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NullPartHandler.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PartHandler.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableDecoder.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableEncoder.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StringPartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPAuthenticationParams.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPBasicCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPBufferAllocator.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPChunkedStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCookie.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPDigestCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPFixedLengthStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPHeaderStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPMessage.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPResponse.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSession.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServer.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerConnection.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerConnectionFactory.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerDispatcher.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerParams.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\AbstractHTTPRequestHandler.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestHandler.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestHandlerFactory.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServer.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerConnection.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerConnectionFactory.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerParams.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerRequest.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerRequestImpl.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerResponse.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerResponseImpl.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerSession.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientSession.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPIOStream.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSessionFactory.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSessionInstantiator.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStreamFactory.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLForm.cpp">
|
||||
<Filter>HTML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientSession.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPStreamFactory.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketNotification.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketNotifier.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactor.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessage.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailRecipient.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailStream.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\POP3ClientSession.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SMTPClientSession.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClient.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPEventArgs.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPPacket.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPPacketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocket.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPv4PacketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RemoteSyslogChannel.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RemoteSyslogListener.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocket.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketImpl.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\DLLVersion.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
50
Net/Net_vs71.sln
Normal file
50
Net/Net_vs71.sln
Normal file
@@ -0,0 +1,50 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_vs71.vcproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs71.vcproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
debug_shared = debug_shared
|
||||
release_shared = release_shared
|
||||
debug_static_mt = debug_static_mt
|
||||
release_static_mt = release_static_mt
|
||||
debug_static_md = debug_static_md
|
||||
release_static_md = release_static_md
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared.ActiveCfg = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared.Build.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared.ActiveCfg = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared.Build.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt.Build.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt.ActiveCfg = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt.Build.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md.ActiveCfg = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md.Build.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md.ActiveCfg = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md.Build.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared.ActiveCfg = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared.Build.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared.ActiveCfg = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared.Build.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt.ActiveCfg = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt.Build.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt.ActiveCfg = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt.Build.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md.ActiveCfg = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md.Build.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md.ActiveCfg = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md.Build.0 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
894
Net/Net_vs71.vcproj
Normal file
894
Net/Net_vs71.vcproj
Normal file
@@ -0,0 +1,894 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="Net"
|
||||
Version="7.10"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
RootNamespace="Net"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc70.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNetd.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="..\bin\PocoNetd.pdb"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
ImportLibrary="..\lib\PocoNetd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="FALSE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc70.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNet.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="FALSE"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="..\lib\PocoNet.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmtd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmtd.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="FALSE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc70.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmt.lib"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="TRUE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="TRUE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmdd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmdd.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="FALSE"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(IntDir)\vc70.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings="4800;"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmd.lib"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="NetCore">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DNS.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HostEntry.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\IPAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Net.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketDefs.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DNS.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HostEntry.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\IPAddress.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketAddress.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Sockets">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DialogSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MulticastSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetworkInterface.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Socket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DialogSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MulticastSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetworkInterface.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Socket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Messages">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FilePartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MediaType.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MessageHeader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartReader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartWriter.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NameValueCollection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NullPartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StringPartSource.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FilePartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MediaType.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MessageHeader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartReader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartWriter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NameValueCollection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NullPartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableDecoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableEncoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StringPartSource.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCookie.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStream.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPAuthenticationParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBasicCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBufferAllocator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPChunkedStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCookie.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPDigestCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPFixedLengthStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPHeaderStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStream.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TCPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerParams.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\TCPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerDispatcher.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerParams.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequestImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponseImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPIOStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPIOStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionInstantiator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTMLForm.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTMLForm.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\FTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reactor">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAcceptor.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketConnector.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotification.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotifier.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketReactor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\SocketNotification.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketNotifier.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mail">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailRecipient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\POP3ClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SMTPClientSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\MailMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailRecipient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\POP3ClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SMTPClientSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ICMP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPClient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ICMPClient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPEventArgs.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPv4PacketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Logging">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogChannel.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogListener.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="WebSocket">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\WebSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\WebSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\DLLVersion.rc">
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
60
Net/Net_vs80.sln
Normal file
60
Net/Net_vs80.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_vs80.vcproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs80.vcproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
915
Net/Net_vs80.vcproj
Normal file
915
Net/Net_vs80.vcproj
Normal file
@@ -0,0 +1,915 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="Net"
|
||||
Version="8.00"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
RootNamespace="Net"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<ToolFiles/>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNetd.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\bin\PocoNetd.pdb"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
ImportLibrary="..\lib\PocoNetd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNet.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="false"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="0"
|
||||
ImportLibrary="..\lib\PocoNet.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmtd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmtd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmt.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmdd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmdd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="NetCore">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DNS.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HostEntry.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\IPAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Net.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketDefs.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DNS.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HostEntry.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\IPAddress.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketAddress.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Sockets">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DialogSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MulticastSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetworkInterface.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Socket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DialogSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MulticastSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetworkInterface.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Socket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Messages">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FilePartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MediaType.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MessageHeader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartReader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartWriter.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NameValueCollection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NullPartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StringPartSource.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FilePartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MediaType.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MessageHeader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartReader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartWriter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NameValueCollection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NullPartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableDecoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableEncoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StringPartSource.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCookie.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStream.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPAuthenticationParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBasicCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBufferAllocator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPChunkedStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCookie.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPDigestCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPFixedLengthStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPHeaderStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStream.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TCPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerParams.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\TCPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerDispatcher.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerParams.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequestImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponseImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPIOStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPIOStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionInstantiator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTMLForm.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTMLForm.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\FTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reactor">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAcceptor.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketConnector.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotification.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotifier.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketReactor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\SocketNotification.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketNotifier.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mail">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailRecipient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\POP3ClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SMTPClientSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\MailMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailRecipient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\POP3ClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SMTPClientSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ICMP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPClient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ICMPClient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPEventArgs.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPv4PacketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Logging">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogChannel.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogListener.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="WebSocket">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\WebSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\WebSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\DLLVersion.rc">
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
60
Net/Net_vs90.sln
Normal file
60
Net/Net_vs90.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_vs90.vcproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs90.vcproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|Win32 = debug_shared|Win32
|
||||
release_shared|Win32 = release_shared|Win32
|
||||
debug_static_mt|Win32 = debug_static_mt|Win32
|
||||
release_static_mt|Win32 = release_static_mt|Win32
|
||||
debug_static_md|Win32 = debug_static_md|Win32
|
||||
release_static_md|Win32 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Build.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.ActiveCfg = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Build.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|Win32.Deploy.0 = release_shared|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Build.0 = release_static_md|Win32
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
914
Net/Net_vs90.vcproj
Normal file
914
Net/Net_vs90.vcproj
Normal file
@@ -0,0 +1,914 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="Net"
|
||||
Version="9.00"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
RootNamespace="Net"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<ToolFiles/>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNetd.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\bin\PocoNetd.pdb"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
ImportLibrary="..\lib\PocoNetd.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin\PocoNet.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="false"
|
||||
AdditionalLibraryDirectories="..\lib"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
ImportLibrary="..\lib\PocoNet.lib"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmtd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmtd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmt.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib\PocoNetmdd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmdd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|Win32"
|
||||
OutputDirectory="obj\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib\PocoNetmd.lib"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="NetCore">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DNS.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HostEntry.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\IPAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Net.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketDefs.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DNS.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HostEntry.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\IPAddress.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketAddress.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Sockets">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DialogSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MulticastSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetworkInterface.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Socket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DialogSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MulticastSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetworkInterface.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Socket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Messages">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FilePartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MediaType.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MessageHeader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartReader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartWriter.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NameValueCollection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NullPartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StringPartSource.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FilePartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MediaType.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MessageHeader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartReader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartWriter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NameValueCollection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NullPartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableDecoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableEncoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StringPartSource.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCookie.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStream.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPAuthenticationParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBasicCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBufferAllocator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPChunkedStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCookie.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPDigestCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPFixedLengthStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPHeaderStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStream.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TCPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerParams.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\TCPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerDispatcher.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerParams.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequestImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponseImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPIOStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPIOStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionInstantiator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTMLForm.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTMLForm.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\FTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reactor">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAcceptor.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketConnector.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotification.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotifier.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketReactor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\SocketNotification.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketNotifier.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mail">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailRecipient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\POP3ClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SMTPClientSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\MailMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailRecipient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\POP3ClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SMTPClientSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ICMP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPClient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ICMPClient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPEventArgs.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPv4PacketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Logging">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogChannel.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogListener.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="WebSocket">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\WebSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\WebSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\DLLVersion.rc">
|
||||
<FileConfiguration
|
||||
Name="debug_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|Win32">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|Win32"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
60
Net/Net_x64_vs100.sln
Normal file
60
Net/Net_x64_vs100.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_x64_vs100.vcxproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs100.vcxproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|x64 = debug_shared|x64
|
||||
release_shared|x64 = release_shared|x64
|
||||
debug_static_mt|x64 = debug_static_mt|x64
|
||||
release_static_mt|x64 = release_static_mt|x64
|
||||
debug_static_md|x64 = debug_static_md|x64
|
||||
release_static_md|x64 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
464
Net/Net_x64_vs100.vcxproj
Normal file
464
Net/Net_x64_vs100.vcxproj
Normal file
@@ -0,0 +1,464 @@
|
||||
<?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_shared|x64">
|
||||
<Configuration>debug_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_md|x64">
|
||||
<Configuration>debug_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="debug_static_mt|x64">
|
||||
<Configuration>debug_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_shared|x64">
|
||||
<Configuration>release_shared</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_md|x64">
|
||||
<Configuration>release_static_md</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="release_static_mt|x64">
|
||||
<Configuration>release_static_mt</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>Net</ProjectName>
|
||||
<ProjectGuid>{B057A1FE-09F7-465E-B8B5-E1B659051D76}</ProjectGuid>
|
||||
<RootNamespace>Net</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props"/>
|
||||
<ImportGroup Label="ExtensionSettings"/>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'" Label="PropertySheets">
|
||||
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros"/>
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">..\bin64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">..\bin64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">..\lib64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">..\lib64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">..\lib64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">..\lib64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">obj64\$(Configuration)\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoNet64d</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoNetmdd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoNetmtd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">PocoNet64</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">PocoNetmd</TargetName>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">PocoNetmt</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\bin64\PocoNet64d.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>..\bin64\PocoNet64d.pdb</ProgramDatabaseFile>
|
||||
<AdditionalLibraryDirectories>..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<ImportLibrary>..\lib64\PocoNetd.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_shared|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>..\bin64\PocoNet64.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ImportLibrary>..\lib64\PocoNet.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\lib64\PocoNetmtd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib64\PocoNetmtd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib64\PocoNetmt.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<ProgramDataBaseFileName>..\lib64\PocoNetmdd.pdb</ProgramDataBaseFileName>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib64\PocoNetmdd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader/>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat/>
|
||||
<CompileAs>Default</CompileAs>
|
||||
<DisableSpecificWarnings>%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>..\lib64\PocoNetmd.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Net\DNS.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HostEntry.h"/>
|
||||
<ClInclude Include="include\Poco\Net\IPAddress.h"/>
|
||||
<ClInclude Include="include\Poco\Net\Net.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NetException.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketAddress.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketDefs.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\DialogSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MulticastSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NetworkInterface.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RawSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RawSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\Socket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FilePartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MediaType.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MessageHeader.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MultipartReader.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MultipartWriter.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NameValueCollection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\NullPartHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\PartHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\PartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<ClInclude Include="include\Poco\Net\StringPartSource.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCookie.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPMessage.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequest.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPResponse.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServer.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServer.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerParams.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPIOStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\HTMLForm.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\FTPStreamFactory.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketAcceptor.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketConnector.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotification.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotifier.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SocketReactor.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailMessage.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailRecipient.h"/>
|
||||
<ClInclude Include="include\Poco\Net\MailStream.h"/>
|
||||
<ClInclude Include="include\Poco\Net\POP3ClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\SMTPClientSession.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPClient.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
<ClInclude Include="include\Poco\Net\WebSocket.h"/>
|
||||
<ClInclude Include="include\Poco\Net\WebSocketImpl.h"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DNS.cpp"/>
|
||||
<ClCompile Include="src\HostEntry.cpp"/>
|
||||
<ClCompile Include="src\IPAddress.cpp"/>
|
||||
<ClCompile Include="src\NetException.cpp"/>
|
||||
<ClCompile Include="src\SocketAddress.cpp"/>
|
||||
<ClCompile Include="src\DatagramSocket.cpp"/>
|
||||
<ClCompile Include="src\DatagramSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\DialogSocket.cpp"/>
|
||||
<ClCompile Include="src\MulticastSocket.cpp"/>
|
||||
<ClCompile Include="src\NetworkInterface.cpp"/>
|
||||
<ClCompile Include="src\RawSocket.cpp"/>
|
||||
<ClCompile Include="src\RawSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\ServerSocket.cpp"/>
|
||||
<ClCompile Include="src\ServerSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\Socket.cpp"/>
|
||||
<ClCompile Include="src\SocketImpl.cpp"/>
|
||||
<ClCompile Include="src\SocketStream.cpp"/>
|
||||
<ClCompile Include="src\StreamSocket.cpp"/>
|
||||
<ClCompile Include="src\StreamSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\FilePartSource.cpp"/>
|
||||
<ClCompile Include="src\MediaType.cpp"/>
|
||||
<ClCompile Include="src\MessageHeader.cpp"/>
|
||||
<ClCompile Include="src\MultipartReader.cpp"/>
|
||||
<ClCompile Include="src\MultipartWriter.cpp"/>
|
||||
<ClCompile Include="src\NameValueCollection.cpp"/>
|
||||
<ClCompile Include="src\NullPartHandler.cpp"/>
|
||||
<ClCompile Include="src\PartHandler.cpp"/>
|
||||
<ClCompile Include="src\PartSource.cpp"/>
|
||||
<ClCompile Include="src\QuotedPrintableDecoder.cpp"/>
|
||||
<ClCompile Include="src\QuotedPrintableEncoder.cpp"/>
|
||||
<ClCompile Include="src\StringPartSource.cpp"/>
|
||||
<ClCompile Include="src\HTTPAuthenticationParams.cpp"/>
|
||||
<ClCompile Include="src\HTTPBasicCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPBufferAllocator.cpp"/>
|
||||
<ClCompile Include="src\HTTPChunkedStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPCookie.cpp"/>
|
||||
<ClCompile Include="src\HTTPCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPDigestCredentials.cpp"/>
|
||||
<ClCompile Include="src\HTTPFixedLengthStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPHeaderStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPMessage.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequest.cpp"/>
|
||||
<ClCompile Include="src\HTTPResponse.cpp"/>
|
||||
<ClCompile Include="src\HTTPSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPStream.cpp"/>
|
||||
<ClCompile Include="src\TCPServer.cpp"/>
|
||||
<ClCompile Include="src\TCPServerConnection.cpp"/>
|
||||
<ClCompile Include="src\TCPServerConnectionFactory.cpp"/>
|
||||
<ClCompile Include="src\TCPServerDispatcher.cpp"/>
|
||||
<ClCompile Include="src\TCPServerParams.cpp"/>
|
||||
<ClCompile Include="src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequestHandler.cpp"/>
|
||||
<ClCompile Include="src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPServer.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerConnection.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerConnectionFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerParams.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerRequest.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerRequestImpl.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerResponse.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerResponseImpl.cpp"/>
|
||||
<ClCompile Include="src\HTTPServerSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\HTTPIOStream.cpp"/>
|
||||
<ClCompile Include="src\HTTPSessionFactory.cpp"/>
|
||||
<ClCompile Include="src\HTTPSessionInstantiator.cpp"/>
|
||||
<ClCompile Include="src\HTTPStreamFactory.cpp"/>
|
||||
<ClCompile Include="src\HTMLForm.cpp"/>
|
||||
<ClCompile Include="src\FTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\FTPStreamFactory.cpp"/>
|
||||
<ClCompile Include="src\SocketNotification.cpp"/>
|
||||
<ClCompile Include="src\SocketNotifier.cpp"/>
|
||||
<ClCompile Include="src\SocketReactor.cpp"/>
|
||||
<ClCompile Include="src\MailMessage.cpp"/>
|
||||
<ClCompile Include="src\MailRecipient.cpp"/>
|
||||
<ClCompile Include="src\MailStream.cpp"/>
|
||||
<ClCompile Include="src\POP3ClientSession.cpp"/>
|
||||
<ClCompile Include="src\SMTPClientSession.cpp"/>
|
||||
<ClCompile Include="src\ICMPClient.cpp"/>
|
||||
<ClCompile Include="src\ICMPEventArgs.cpp"/>
|
||||
<ClCompile Include="src\ICMPPacket.cpp"/>
|
||||
<ClCompile Include="src\ICMPPacketImpl.cpp"/>
|
||||
<ClCompile Include="src\ICMPSocket.cpp"/>
|
||||
<ClCompile Include="src\ICMPSocketImpl.cpp"/>
|
||||
<ClCompile Include="src\ICMPv4PacketImpl.cpp"/>
|
||||
<ClCompile Include="src\RemoteSyslogChannel.cpp"/>
|
||||
<ClCompile Include="src\RemoteSyslogListener.cpp"/>
|
||||
<ClCompile Include="src\WebSocket.cpp"/>
|
||||
<ClCompile Include="src\WebSocketImpl.cpp"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\DLLVersion.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release_static_mt|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
|
||||
<ImportGroup Label="ExtensionTargets"/>
|
||||
</Project>
|
||||
687
Net/Net_x64_vs100.vcxproj.filters
Normal file
687
Net/Net_x64_vs100.vcxproj.filters
Normal file
@@ -0,0 +1,687 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="NetCore">
|
||||
<UniqueIdentifier>{5f22a693-d39d-4dc3-967e-4e534ed1debc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Header Files">
|
||||
<UniqueIdentifier>{34cea09f-94e5-4872-a3e7-07fb5e32e78e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="NetCore\Source Files">
|
||||
<UniqueIdentifier>{a2b078e6-4ced-434d-9fc5-db7db484ebd9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets">
|
||||
<UniqueIdentifier>{eac0b7e4-1f28-445a-a089-92c7ce19a029}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Header Files">
|
||||
<UniqueIdentifier>{3cb90562-bdfd-4046-a149-cc475564ab77}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Sockets\Source Files">
|
||||
<UniqueIdentifier>{fe6f4050-70e7-4c36-8e14-f2dace433a4c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages">
|
||||
<UniqueIdentifier>{3ed5fbf3-179c-4108-83ba-97cebdd1ab97}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Header Files">
|
||||
<UniqueIdentifier>{76a47096-1f91-4c92-998c-476b4bba8895}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Messages\Source Files">
|
||||
<UniqueIdentifier>{2648308d-2bbe-4aaf-86e5-b276aca34258}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP">
|
||||
<UniqueIdentifier>{7e55249d-eb6f-49de-abe2-23f02d59b8d2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Header Files">
|
||||
<UniqueIdentifier>{f3883ba3-3a90-4b51-9196-d16cd740a3d7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTP\Source Files">
|
||||
<UniqueIdentifier>{4b8e7973-d93a-4322-a189-c41eb8d0ba68}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer">
|
||||
<UniqueIdentifier>{ad828f54-b5e5-47a1-9593-5d36c7456d43}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Header Files">
|
||||
<UniqueIdentifier>{bf8d6b46-870e-4741-88f7-88830d56b2fd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="TCPServer\Source Files">
|
||||
<UniqueIdentifier>{91a0ac23-4142-470a-9e3a-32832925ae9f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer">
|
||||
<UniqueIdentifier>{605cd2ff-5b47-47ba-84e6-6301f8321464}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Header Files">
|
||||
<UniqueIdentifier>{e4c59611-a9a7-48c2-bd62-270045cf2857}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPServer\Source Files">
|
||||
<UniqueIdentifier>{218086d8-9ad4-413d-9295-6f5fcb7dbda6}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient">
|
||||
<UniqueIdentifier>{6a3f39d2-b27d-436b-bb9f-6643ce7b5c3b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Header Files">
|
||||
<UniqueIdentifier>{d6c5961e-85f5-4f4b-98c6-171547bed41c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTTPClient\Source Files">
|
||||
<UniqueIdentifier>{10f35426-cbb2-4022-bb4b-88b3ed3b5b59}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML">
|
||||
<UniqueIdentifier>{f533777b-fcab-4d44-a38f-cd2852031ae5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Header Files">
|
||||
<UniqueIdentifier>{ff1761ab-d8f6-4141-984d-d9a7a81e91d2}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="HTML\Source Files">
|
||||
<UniqueIdentifier>{797280a5-0093-4074-8141-c7f38ffc4a4d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient">
|
||||
<UniqueIdentifier>{c9d19c34-5444-4159-8e18-da4f1d1c7313}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Header Files">
|
||||
<UniqueIdentifier>{93fbf4ac-7093-4a56-b922-f4f58576c365}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="FTPClient\Source Files">
|
||||
<UniqueIdentifier>{0f444170-7d07-47fd-9805-f83049863494}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor">
|
||||
<UniqueIdentifier>{6ac380ec-f26f-4507-a1f0-73f15e3ff809}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Header Files">
|
||||
<UniqueIdentifier>{37ea1f2d-2174-4209-b2bb-cd48af88b124}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reactor\Source Files">
|
||||
<UniqueIdentifier>{81b637d4-2086-477d-a5e1-273d1ffce5e8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail">
|
||||
<UniqueIdentifier>{92830cd6-adda-4b08-b957-703c6da92639}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Header Files">
|
||||
<UniqueIdentifier>{5743e50a-1942-4cb9-abcd-3c9a4931be07}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Mail\Source Files">
|
||||
<UniqueIdentifier>{27603c44-bc41-47a2-9519-8acafae28c91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP">
|
||||
<UniqueIdentifier>{336ac4ee-c320-4497-b94a-70368aafc63b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Header Files">
|
||||
<UniqueIdentifier>{73cba921-73bc-4468-8f02-fb2b02ab2ece}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="ICMP\Source Files">
|
||||
<UniqueIdentifier>{57b3e9b4-a6a4-43f3-8f21-e6e47946915d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging">
|
||||
<UniqueIdentifier>{ff3677e5-c5b5-42d4-b721-9bd9866a9551}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Header Files">
|
||||
<UniqueIdentifier>{b43b0ff9-3f9c-413c-af12-3b377d2b451e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Logging\Source Files">
|
||||
<UniqueIdentifier>{27fadf1f-d277-4205-b580-afb7ce0f9ce1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket">
|
||||
<UniqueIdentifier>{aa103f12-0aa7-4a2a-b0bc-b18e41d30804}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Header Files">
|
||||
<UniqueIdentifier>{44d5fd89-073a-4596-9e98-730e14369891}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="WebSocket\Source Files">
|
||||
<UniqueIdentifier>{6a67a9ab-652b-4573-a211-1fa470660c91}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="include\Poco\Net\DNS.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HostEntry.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\IPAddress.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\Net.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NetException.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketAddress.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketDefs.h">
|
||||
<Filter>NetCore\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DatagramSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\DialogSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MulticastSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NetworkInterface.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RawSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RawSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ServerSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\Socket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketStream.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocket.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StreamSocketImpl.h">
|
||||
<Filter>Sockets\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FilePartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MediaType.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MessageHeader.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MultipartReader.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MultipartWriter.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NameValueCollection.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\NullPartHandler.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\PartHandler.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\PartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableDecoder.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\QuotedPrintableEncoder.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\StringPartSource.h">
|
||||
<Filter>Messages\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPAuthenticationParams.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBasicStreamBuf.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPBufferAllocator.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPChunkedStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCookie.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPDigestCredentials.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPFixedLengthStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPHeaderStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPMessage.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequest.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPResponse.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSession.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStream.h">
|
||||
<Filter>HTTP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServer.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnection.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerConnectionFactory.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerDispatcher.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\TCPServerParams.h">
|
||||
<Filter>TCPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\AbstractHTTPRequestHandler.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandler.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPRequestHandlerFactory.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServer.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnection.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerConnectionFactory.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerParams.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequest.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerRequestImpl.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponse.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerResponseImpl.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPServerSession.h">
|
||||
<Filter>HTTPServer\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPClientSession.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPIOStream.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionFactory.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPSessionInstantiator.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTTPStreamFactory.h">
|
||||
<Filter>HTTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\HTMLForm.h">
|
||||
<Filter>HTML\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FTPClientSession.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\FTPStreamFactory.h">
|
||||
<Filter>FTPClient\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketAcceptor.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketConnector.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotification.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketNotifier.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SocketReactor.h">
|
||||
<Filter>Reactor\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailMessage.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailRecipient.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\MailStream.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\POP3ClientSession.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\SMTPClientSession.h">
|
||||
<Filter>Mail\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPClient.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPEventArgs.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacket.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPPacketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocket.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPSocketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\ICMPv4PacketImpl.h">
|
||||
<Filter>ICMP\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogChannel.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\RemoteSyslogListener.h">
|
||||
<Filter>Logging\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\WebSocket.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\Poco\Net\WebSocketImpl.h">
|
||||
<Filter>WebSocket\Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="src\DNS.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HostEntry.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\IPAddress.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetException.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketAddress.cpp">
|
||||
<Filter>NetCore\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DatagramSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\DialogSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MulticastSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NetworkInterface.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RawSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ServerSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ServerSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\Socket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketStream.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StreamSocket.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StreamSocketImpl.cpp">
|
||||
<Filter>Sockets\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FilePartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MediaType.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MessageHeader.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartReader.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MultipartWriter.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NameValueCollection.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\NullPartHandler.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PartHandler.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\PartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableDecoder.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\QuotedPrintableEncoder.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\StringPartSource.cpp">
|
||||
<Filter>Messages\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPAuthenticationParams.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPBasicCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPBufferAllocator.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPChunkedStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCookie.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPDigestCredentials.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPFixedLengthStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPHeaderStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPMessage.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequest.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPResponse.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSession.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStream.cpp">
|
||||
<Filter>HTTP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServer.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerConnection.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerConnectionFactory.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerDispatcher.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\TCPServerParams.cpp">
|
||||
<Filter>TCPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\AbstractHTTPRequestHandler.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestHandler.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPRequestHandlerFactory.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServer.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerConnection.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerConnectionFactory.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerParams.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerRequest.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerRequestImpl.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerResponse.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerResponseImpl.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPServerSession.cpp">
|
||||
<Filter>HTTPServer\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPClientSession.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPIOStream.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSessionFactory.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPSessionInstantiator.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTTPStreamFactory.cpp">
|
||||
<Filter>HTTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\HTMLForm.cpp">
|
||||
<Filter>HTML\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPClientSession.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\FTPStreamFactory.cpp">
|
||||
<Filter>FTPClient\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketNotification.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketNotifier.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SocketReactor.cpp">
|
||||
<Filter>Reactor\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailMessage.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailRecipient.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\MailStream.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\POP3ClientSession.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\SMTPClientSession.cpp">
|
||||
<Filter>Mail\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPClient.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPEventArgs.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPPacket.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPPacketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocket.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPSocketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\ICMPv4PacketImpl.cpp">
|
||||
<Filter>ICMP\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RemoteSyslogChannel.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\RemoteSyslogListener.cpp">
|
||||
<Filter>Logging\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocket.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="src\WebSocketImpl.cpp">
|
||||
<Filter>WebSocket\Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\DLLVersion.rc" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
60
Net/Net_x64_vs90.sln
Normal file
60
Net/Net_x64_vs90.sln
Normal file
@@ -0,0 +1,60 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Net", "Net_x64_vs90.vcproj", "{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_x64_vs90.vcproj", "{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76} = {B057A1FE-09F7-465E-B8B5-E1B659051D76}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
debug_shared|x64 = debug_shared|x64
|
||||
release_shared|x64 = release_shared|x64
|
||||
debug_static_mt|x64 = debug_static_mt|x64
|
||||
release_static_mt|x64 = release_static_mt|x64
|
||||
debug_static_md|x64 = debug_static_md|x64
|
||||
release_static_md|x64 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{B057A1FE-09F7-465E-B8B5-E1B659051D76}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.ActiveCfg = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.Build.0 = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_shared|x64.Deploy.0 = debug_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.ActiveCfg = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.Build.0 = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_shared|x64.Deploy.0 = release_shared|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.Build.0 = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.Build.0 = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.ActiveCfg = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.Build.0 = release_static_md|x64
|
||||
{D5EFBF27-B934-4B8D-8AE5-6EC00374819C}.release_static_md|x64.Deploy.0 = release_static_md|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
919
Net/Net_x64_vs90.vcproj
Normal file
919
Net/Net_x64_vs90.vcproj
Normal file
@@ -0,0 +1,919 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
Name="Net"
|
||||
Version="9.00"
|
||||
ProjectType="Visual C++"
|
||||
ProjectGUID="{B057A1FE-09F7-465E-B8B5-E1B659051D76}"
|
||||
RootNamespace="Net"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="x64"/>
|
||||
</Platforms>
|
||||
<ToolFiles/>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="debug_shared|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin64\PocoNet64d.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="..\bin64\PocoNet64d.pdb"
|
||||
AdditionalLibraryDirectories="..\lib64"
|
||||
SubSystem="1"
|
||||
ImportLibrary="..\lib64\PocoNetd.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_shared|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;Net_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ws2_32.lib iphlpapi.lib"
|
||||
OutputFile="..\bin64\PocoNet64.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
GenerateDebugInformation="false"
|
||||
AdditionalLibraryDirectories="..\lib64"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="0"
|
||||
ImportLibrary="..\lib64\PocoNet.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCManifestTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_mt|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib64\PocoNetmtd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib64\PocoNetmtd.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_mt|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib64\PocoNetmt.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="debug_static_md|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="true"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="..\lib64\PocoNetmdd.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib64\PocoNetmdd.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="release_static_md|x64"
|
||||
OutputDirectory="obj64\$(ConfigurationName)"
|
||||
IntermediateDirectory="obj64\$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="4"
|
||||
InlineFunctionExpansion="1"
|
||||
EnableIntrinsicFunctions="true"
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories=".\include;..\Foundation\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;POCO_STATIC;"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="true"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="0"
|
||||
DisableSpecificWarnings=""/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\lib64\PocoNetmd.lib"
|
||||
TargetMachine="17"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References/>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="NetCore">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DNS.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HostEntry.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\IPAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Net.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetException.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAddress.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketDefs.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DNS.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HostEntry.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\IPAddress.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetException.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketAddress.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Sockets">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DatagramSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\DialogSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MulticastSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NetworkInterface.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RawSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ServerSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\Socket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StreamSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DatagramSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\DialogSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MulticastSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NetworkInterface.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RawSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ServerSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\Socket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StreamSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Messages">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FilePartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MediaType.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MessageHeader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartReader.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MultipartWriter.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NameValueCollection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\NullPartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\PartSource.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableDecoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\QuotedPrintableEncoder.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\StringPartSource.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FilePartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MediaType.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MessageHeader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartReader.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MultipartWriter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NameValueCollection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\NullPartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\PartSource.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableDecoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\QuotedPrintableEncoder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\StringPartSource.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPAuthenticationParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBasicStreamBuf.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPBufferAllocator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPChunkedStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCookie.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPDigestCredentials.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPFixedLengthStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPHeaderStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStream.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPAuthenticationParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBasicCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPBufferAllocator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPChunkedStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCookie.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPDigestCredentials.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPFixedLengthStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPHeaderStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStream.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TCPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerDispatcher.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\TCPServerParams.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\TCPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerDispatcher.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\TCPServerParams.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPServer">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\AbstractHTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandler.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPRequestHandlerFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServer.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnection.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerConnectionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerParams.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequest.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerRequestImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponse.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerResponseImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPServerSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\AbstractHTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandler.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPRequestHandlerFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServer.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnection.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerConnectionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerParams.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequest.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerRequestImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponse.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerResponseImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPServerSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPIOStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionFactory.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPSessionInstantiator.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPIOStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionFactory.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPSessionInstantiator.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\HTTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="HTML">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\HTMLForm.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\HTMLForm.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="FTPClient">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\FTPStreamFactory.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\FTPClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\FTPStreamFactory.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Reactor">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketAcceptor.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketConnector.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotification.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketNotifier.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SocketReactor.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\SocketNotification.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketNotifier.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SocketReactor.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Mail">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailMessage.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailRecipient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\MailStream.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\POP3ClientSession.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\SMTPClientSession.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\MailMessage.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailRecipient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\MailStream.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\POP3ClientSession.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\SMTPClientSession.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ICMP">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPClient.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPEventArgs.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPPacketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPSocketImpl.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\ICMPv4PacketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\ICMPClient.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPEventArgs.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPPacketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPSocketImpl.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\ICMPv4PacketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Logging">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogChannel.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\RemoteSyslogListener.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogChannel.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\RemoteSyslogListener.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="WebSocket">
|
||||
<Filter
|
||||
Name="Header Files">
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocket.h"/>
|
||||
<File
|
||||
RelativePath=".\include\Poco\Net\WebSocketImpl.h"/>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files">
|
||||
<File
|
||||
RelativePath=".\src\WebSocket.cpp"/>
|
||||
<File
|
||||
RelativePath=".\src\WebSocketImpl.cpp"/>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\DLLVersion.rc">
|
||||
<FileConfiguration
|
||||
Name="debug_shared|x64">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_shared|x64">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_mt|x64"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_mt|x64"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="debug_static_md|x64"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="release_static_md|x64"
|
||||
ExcludedFromBuild="true">
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals/>
|
||||
</VisualStudioProject>
|
||||
1
Net/dependencies
Normal file
1
Net/dependencies
Normal file
@@ -0,0 +1 @@
|
||||
Foundation
|
||||
158
Net/include/Poco/Net/AbstractHTTPRequestHandler.h
Normal file
158
Net/include/Poco/Net/AbstractHTTPRequestHandler.h
Normal file
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// AbstractHTTPRequestHandler.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/AbstractHTTPRequestHandler.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: AbstractHTTPRequestHandler
|
||||
//
|
||||
// Definition of the AbstractHTTPRequestHandler class.
|
||||
//
|
||||
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_AbstractHTTPRequestHandler_INCLUDED
|
||||
#define Net_AbstractHTTPRequestHandler_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/HTTPRequestHandler.h"
|
||||
#include "Poco/Net/HTTPResponse.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTMLForm;
|
||||
|
||||
|
||||
class Net_API AbstractHTTPRequestHandler: public HTTPRequestHandler
|
||||
/// The abstract base class for AbstractHTTPRequestHandlers
|
||||
/// created by HTTPServer.
|
||||
///
|
||||
/// Derived classes must override the run() method.
|
||||
|
||||
/// Contrary to a HTTPRequestHandler, an AbstractHTTPRequestHandler
|
||||
/// stores request and response as member variables to avoid having
|
||||
/// to pass them around as method parameters. Additionally, a
|
||||
/// HTMLForm object is created for use by subclasses.
|
||||
///
|
||||
/// The run() method must perform the complete handling
|
||||
/// of the HTTP request connection. As soon as the run()
|
||||
/// method returns, the request handler object is destroyed.
|
||||
///
|
||||
/// A new AbstractHTTPRequestHandler object will be created for
|
||||
/// each new HTTP request that is received by the HTTPServer.
|
||||
{
|
||||
public:
|
||||
AbstractHTTPRequestHandler();
|
||||
/// Creates the AbstractHTTPRequestHandler.
|
||||
|
||||
virtual ~AbstractHTTPRequestHandler();
|
||||
/// Destroys the AbstractHTTPRequestHandler.
|
||||
|
||||
void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response);
|
||||
/// This class implements some common behavior,
|
||||
/// before calling run() to actually handle the request:
|
||||
/// - save request and response objects;
|
||||
/// - call authorize();
|
||||
/// - if authorize() returns true call run(),
|
||||
/// else send 401 (Unauthorized) response.
|
||||
///
|
||||
/// If run() throws an exception and the response has not been
|
||||
/// sent yet, sends a 500 (Internal Server Error) response with
|
||||
/// the exception's display text.
|
||||
|
||||
HTTPServerRequest& request();
|
||||
/// Returns the request.
|
||||
|
||||
HTTPServerResponse& response();
|
||||
/// Returns the response.
|
||||
|
||||
HTMLForm& form();
|
||||
/// Returns a HTMLForm for the given request.
|
||||
/// The HTMLForm object is created when this
|
||||
/// member function is executed the first time.
|
||||
|
||||
void sendErrorResponse(HTTPResponse::HTTPStatus status, const std::string& message);
|
||||
/// Sends a HTML error page for the given status code.
|
||||
/// The given message is added to the page:
|
||||
/// <HTML>
|
||||
/// <HEAD>
|
||||
/// <TITLE>status - reason</TITLE>
|
||||
/// </HEAD>
|
||||
/// <BODY>
|
||||
/// <H1>status - reason</H1>
|
||||
/// <P>message</P>
|
||||
/// </BODY>
|
||||
/// </HTML>
|
||||
|
||||
protected:
|
||||
virtual void run() = 0;
|
||||
/// Must be overridden by subclasses.
|
||||
///
|
||||
/// Handles the given request.
|
||||
|
||||
virtual bool authenticate();
|
||||
/// Check authentication; returns true if okay, false if failed to authenticate.
|
||||
/// The default implementation always returns true.
|
||||
///
|
||||
/// Subclasses can override this member function to perform
|
||||
/// some form of client or request authentication before
|
||||
/// the request is actually handled.
|
||||
|
||||
private:
|
||||
HTTPServerRequest* _pRequest;
|
||||
HTTPServerResponse* _pResponse;
|
||||
HTMLForm* _pForm;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline HTTPServerRequest& AbstractHTTPRequestHandler::request()
|
||||
{
|
||||
poco_check_ptr (_pRequest);
|
||||
|
||||
return *_pRequest;
|
||||
}
|
||||
|
||||
|
||||
inline HTTPServerResponse& AbstractHTTPRequestHandler::response()
|
||||
{
|
||||
poco_check_ptr (_pResponse);
|
||||
|
||||
return *_pResponse;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_AbstractHTTPRequestHandler_INCLUDED
|
||||
143
Net/include/Poco/Net/DNS.h
Normal file
143
Net/include/Poco/Net/DNS.h
Normal file
@@ -0,0 +1,143 @@
|
||||
//
|
||||
// DNS.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/DNS.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: DNS
|
||||
//
|
||||
// Definition of the DNS class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_DNS_INCLUDED
|
||||
#define Net_DNS_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
#include "Poco/Net/IPAddress.h"
|
||||
#include "Poco/Net/HostEntry.h"
|
||||
#include "Poco/Mutex.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API DNS
|
||||
/// This class provides an interface to the
|
||||
/// domain name service.
|
||||
///
|
||||
/// An internal DNS cache is used to speed up name lookups.
|
||||
{
|
||||
public:
|
||||
static HostEntry hostByName(const std::string& hostname);
|
||||
/// Returns a HostEntry object containing the DNS information
|
||||
/// for the host with the given name.
|
||||
///
|
||||
/// Throws a HostNotFoundException if a host with the given
|
||||
/// name cannot be found.
|
||||
///
|
||||
/// Throws a NoAddressFoundException if no address can be
|
||||
/// found for the hostname.
|
||||
///
|
||||
/// Throws a DNSException in case of a general DNS error.
|
||||
///
|
||||
/// Throws an IOException in case of any other error.
|
||||
|
||||
static HostEntry hostByAddress(const IPAddress& address);
|
||||
/// Returns a HostEntry object containing the DNS information
|
||||
/// for the host with the given IP address.
|
||||
///
|
||||
/// Throws a HostNotFoundException if a host with the given
|
||||
/// name cannot be found.
|
||||
///
|
||||
/// Throws a DNSException in case of a general DNS error.
|
||||
///
|
||||
/// Throws an IOException in case of any other error.
|
||||
|
||||
static HostEntry resolve(const std::string& address);
|
||||
/// Returns a HostEntry object containing the DNS information
|
||||
/// for the host with the given IP address or host name.
|
||||
///
|
||||
/// Throws a HostNotFoundException if a host with the given
|
||||
/// name cannot be found.
|
||||
///
|
||||
/// Throws a NoAddressFoundException if no address can be
|
||||
/// found for the hostname.
|
||||
///
|
||||
/// Throws a DNSException in case of a general DNS error.
|
||||
///
|
||||
/// Throws an IOException in case of any other error.
|
||||
|
||||
static IPAddress resolveOne(const std::string& address);
|
||||
/// Convenience method that calls resolve(address) and returns
|
||||
/// the first address from the HostInfo.
|
||||
|
||||
static HostEntry thisHost();
|
||||
/// Returns a HostEntry object containing the DNS information
|
||||
/// for this host.
|
||||
///
|
||||
/// Throws a HostNotFoundException if DNS information
|
||||
/// for this host cannot be found.
|
||||
///
|
||||
/// Throws a NoAddressFoundException if no address can be
|
||||
/// found for this host.
|
||||
///
|
||||
/// Throws a DNSException in case of a general DNS error.
|
||||
///
|
||||
/// Throws an IOException in case of any other error.
|
||||
|
||||
//@ deprecated
|
||||
static void flushCache();
|
||||
/// Flushes the internal DNS cache.
|
||||
///
|
||||
/// As of 1.4.2, the DNS cache is no longer used
|
||||
/// and this method does not do anything.
|
||||
|
||||
static std::string hostName();
|
||||
/// Returns the host name of this host.
|
||||
|
||||
protected:
|
||||
static int lastError();
|
||||
/// Returns the code of the last error.
|
||||
|
||||
static void error(int code, const std::string& arg);
|
||||
/// Throws an exception according to the error code.
|
||||
|
||||
static void aierror(int code, const std::string& arg);
|
||||
/// Throws an exception according to the getaddrinfo() error code.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_DNS_INCLUDED
|
||||
169
Net/include/Poco/Net/DatagramSocket.h
Normal file
169
Net/include/Poco/Net/DatagramSocket.h
Normal file
@@ -0,0 +1,169 @@
|
||||
//
|
||||
// DatagramSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/DatagramSocket.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: DatagramSocket
|
||||
//
|
||||
// Definition of the DatagramSocket class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_DatagramSocket_INCLUDED
|
||||
#define Net_DatagramSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API DatagramSocket: public Socket
|
||||
/// This class provides an interface to an
|
||||
/// UDP stream socket.
|
||||
{
|
||||
public:
|
||||
DatagramSocket();
|
||||
/// Creates an unconnected IPv4 datagram socket.
|
||||
|
||||
explicit DatagramSocket(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
DatagramSocket(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Creates a datagram socket and binds it
|
||||
/// to the given address.
|
||||
///
|
||||
/// Depending on the address family, the socket
|
||||
/// will be either an IPv4 or an IPv6 socket.
|
||||
|
||||
DatagramSocket(const Socket& socket);
|
||||
/// Creates the DatagramSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a DatagramSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
~DatagramSocket();
|
||||
/// Destroys the DatagramSocket.
|
||||
|
||||
DatagramSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
void connect(const SocketAddress& address);
|
||||
/// Restricts incoming and outgoing
|
||||
/// packets to the specified address.
|
||||
///
|
||||
/// Cannot be used together with bind().
|
||||
|
||||
void bind(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Bind a local address to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
///
|
||||
/// Cannot be used together with connect().
|
||||
|
||||
int sendBytes(const void* buffer, int length, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
/// the socket.
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
|
||||
int receiveBytes(void* buffer, int length, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
|
||||
int sendTo(const void* buffer, int length, const SocketAddress& address, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
/// the socket to the given address.
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
|
||||
int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
|
||||
void setBroadcast(bool flag);
|
||||
/// Sets the value of the SO_BROADCAST socket option.
|
||||
///
|
||||
/// Setting this flag allows sending datagrams to
|
||||
/// the broadcast address.
|
||||
|
||||
bool getBroadcast() const;
|
||||
/// Returns the value of the SO_BROADCAST socket option.
|
||||
|
||||
protected:
|
||||
DatagramSocket(SocketImpl* pImpl);
|
||||
/// Creates the Socket and attaches the given SocketImpl.
|
||||
/// The socket takes owership of the SocketImpl.
|
||||
///
|
||||
/// The SocketImpl must be a StreamSocketImpl, otherwise
|
||||
/// an InvalidArgumentException will be thrown.
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void DatagramSocket::setBroadcast(bool flag)
|
||||
{
|
||||
impl()->setBroadcast(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool DatagramSocket::getBroadcast() const
|
||||
{
|
||||
return impl()->getBroadcast();
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_DatagramSocket_INCLUDED
|
||||
81
Net/include/Poco/Net/DatagramSocketImpl.h
Normal file
81
Net/include/Poco/Net/DatagramSocketImpl.h
Normal file
@@ -0,0 +1,81 @@
|
||||
//
|
||||
// DatagramSocketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/DatagramSocketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: DatagramSocketImpl
|
||||
//
|
||||
// Definition of the DatagramSocketImpl class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_DatagramSocketImpl_INCLUDED
|
||||
#define Net_DatagramSocketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API DatagramSocketImpl: public SocketImpl
|
||||
/// This class implements an UDP socket.
|
||||
{
|
||||
public:
|
||||
DatagramSocketImpl();
|
||||
/// Creates a StreamSocketImpl.
|
||||
///
|
||||
/// If the system supports IPv6, the socket will
|
||||
/// be an IPv6 socket. Otherwise, it will be
|
||||
/// an IPv4 socket.
|
||||
|
||||
explicit DatagramSocketImpl(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
DatagramSocketImpl(poco_socket_t sockfd);
|
||||
/// Creates a StreamSocketImpl using the given native socket.
|
||||
|
||||
protected:
|
||||
void init(int af);
|
||||
|
||||
~DatagramSocketImpl();
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_DatagramSocketImpl_INCLUDED
|
||||
231
Net/include/Poco/Net/DialogSocket.h
Normal file
231
Net/include/Poco/Net/DialogSocket.h
Normal file
@@ -0,0 +1,231 @@
|
||||
//
|
||||
// DialogSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/DialogSocket.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: DialogSocket
|
||||
//
|
||||
// Definition of the DialogSocket class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_DialogSocket_INCLUDED
|
||||
#define Net_DialogSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API DialogSocket: public StreamSocket
|
||||
/// DialogSocket is a subclass of StreamSocket that
|
||||
/// can be used for implementing request-response
|
||||
/// based client server connections.
|
||||
///
|
||||
/// A request is always a single-line command terminated
|
||||
/// by CR-LF.
|
||||
///
|
||||
/// A response can either be a single line of text terminated
|
||||
/// by CR-LF, or multiple lines of text in the format used
|
||||
/// by the FTP and SMTP protocols.
|
||||
///
|
||||
/// Limited support for the TELNET protocol (RFC 854) is
|
||||
/// available.
|
||||
///
|
||||
/// Warning: Do not call receiveBytes() on a DialogSocket.
|
||||
/// Due to internal buffering in DialogSocket, receiveBytes()
|
||||
/// may return an unexpected result and interfere with
|
||||
/// DialogSocket's buffering. Use receiveRawBytes() instead.
|
||||
{
|
||||
public:
|
||||
DialogSocket();
|
||||
/// Creates an unconnected stream socket.
|
||||
///
|
||||
/// Before sending or receiving data, the socket
|
||||
/// must be connected with a call to connect().
|
||||
|
||||
explicit DialogSocket(const SocketAddress& address);
|
||||
/// Creates a stream socket and connects it to
|
||||
/// the socket specified by address.
|
||||
|
||||
DialogSocket(const Socket& socket);
|
||||
/// Creates the DialogSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a StreamSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
DialogSocket(const DialogSocket& socket);
|
||||
/// Creates the DialogSocket as copy of another dialog socket.
|
||||
|
||||
~DialogSocket();
|
||||
/// Destroys the DialogSocket.
|
||||
|
||||
DialogSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
DialogSocket& operator = (const DialogSocket& socket);
|
||||
/// Assignment operator.
|
||||
|
||||
void sendByte(unsigned char ch);
|
||||
/// Sends a single byte over the socket connection.
|
||||
|
||||
void sendString(const char* str);
|
||||
/// Sends the given null-terminated string over
|
||||
/// the socket connection.
|
||||
|
||||
void sendString(const std::string& str);
|
||||
/// Sends the given string over the socket connection.
|
||||
|
||||
void sendMessage(const std::string& message);
|
||||
/// Appends a CR-LF sequence to the message and sends it
|
||||
/// over the socket connection.
|
||||
|
||||
void sendMessage(const std::string& message, const std::string& arg);
|
||||
/// Concatenates message and arg, separated by a space, appends a
|
||||
/// CR-LF sequence, and sends the result over the socket connection.
|
||||
|
||||
void sendMessage(const std::string& message, const std::string& arg1, const std::string& arg2);
|
||||
/// Concatenates message and args, separated by a space, appends a
|
||||
/// CR-LF sequence, and sends the result over the socket connection.
|
||||
|
||||
bool receiveMessage(std::string& message);
|
||||
/// Receives a single-line message, terminated by CR-LF,
|
||||
/// from the socket connection and appends it to response.
|
||||
///
|
||||
/// Returns true if a message has been read or false if
|
||||
/// the connection has been closed by the peer.
|
||||
|
||||
int receiveStatusMessage(std::string& message);
|
||||
/// Receives a single-line or multi-line response from
|
||||
/// the socket connection. The format must be according to
|
||||
/// one of the response formats specified in the FTP (RFC 959)
|
||||
/// or SMTP (RFC 2821) specifications.
|
||||
///
|
||||
/// The first line starts with a 3-digit status code.
|
||||
/// Following the status code is either a space character (' ' )
|
||||
/// (in case of a single-line response) or a minus character ('-')
|
||||
/// in case of a multi-line response. The following lines can have
|
||||
/// a three-digit status code followed by a minus-sign and some
|
||||
/// text, or some arbitrary text only. The last line again begins
|
||||
/// with a three-digit status code (which must be the same as the
|
||||
/// one in the first line), followed by a space and some arbitrary
|
||||
/// text. All lines must be terminated by a CR-LF sequence.
|
||||
///
|
||||
/// The response contains all response lines, separated by a newline
|
||||
/// character, including the status code. The status code is returned.
|
||||
/// If the response line does not contain a status code, 0 is returned.
|
||||
|
||||
int get();
|
||||
/// Reads one character from the connection.
|
||||
///
|
||||
/// Returns -1 (EOF_CHAR) if no more characters are available.
|
||||
|
||||
int peek();
|
||||
/// Returns the character that would be returned by the next call
|
||||
/// to get(), without actually extracting the character from the
|
||||
/// buffer.
|
||||
///
|
||||
/// Returns -1 (EOF_CHAR) if no more characters are available.
|
||||
|
||||
int receiveRawBytes(void* buffer, int length);
|
||||
/// Read up to length bytes from the connection and place
|
||||
/// them into buffer. If there are data bytes in the internal
|
||||
/// buffer, these bytes are returned first.
|
||||
///
|
||||
/// Use this member function instead of receiveBytes().
|
||||
///
|
||||
/// Returns the number of bytes read, which may be
|
||||
/// less than requested.
|
||||
|
||||
void synch();
|
||||
/// Sends a TELNET SYNCH signal over the connection.
|
||||
///
|
||||
/// According to RFC 854, a TELNET_DM char is sent
|
||||
/// via sendUrgent().
|
||||
|
||||
void sendTelnetCommand(unsigned char command);
|
||||
/// Sends a TELNET command sequence (TELNET_IAC followed
|
||||
/// by the given command) over the connection.
|
||||
|
||||
void sendTelnetCommand(unsigned char command, unsigned char arg);
|
||||
/// Sends a TELNET command sequence (TELNET_IAC followed
|
||||
/// by the given command, followed by arg) over the connection.
|
||||
|
||||
enum TelnetCodes
|
||||
{
|
||||
TELNET_SE = 240,
|
||||
TELNET_NOP = 241,
|
||||
TELNET_DM = 242,
|
||||
TELNET_BRK = 243,
|
||||
TELNET_IP = 244,
|
||||
TELNET_AO = 245,
|
||||
TELNET_AYT = 246,
|
||||
TELNET_EC = 247,
|
||||
TELNET_EL = 248,
|
||||
TELNET_GA = 249,
|
||||
TELNET_SB = 250,
|
||||
TELNET_WILL = 251,
|
||||
TELNET_WONT = 252,
|
||||
TELNET_DO = 253,
|
||||
TELNET_DONT = 254,
|
||||
TELNET_IAC = 255
|
||||
};
|
||||
|
||||
protected:
|
||||
void allocBuffer();
|
||||
void refill();
|
||||
bool receiveLine(std::string& line);
|
||||
int receiveStatusLine(std::string& line);
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
RECEIVE_BUFFER_SIZE = 1024,
|
||||
EOF_CHAR = -1
|
||||
};
|
||||
|
||||
char* _pBuffer;
|
||||
char* _pNext;
|
||||
char* _pEnd;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_DialogSocket_INCLUDED
|
||||
387
Net/include/Poco/Net/FTPClientSession.h
Normal file
387
Net/include/Poco/Net/FTPClientSession.h
Normal file
@@ -0,0 +1,387 @@
|
||||
//
|
||||
// FTPClientSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/FTPClientSession.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: FTP
|
||||
// Module: FTPClientSession
|
||||
//
|
||||
// Definition of the FTPClientSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_FTPClientSession_INCLUDED
|
||||
#define Net_FTPClientSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/DialogSocket.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class SocketStream;
|
||||
|
||||
|
||||
class Net_API FTPClientSession
|
||||
/// This class implements an File Transfer Protocol
|
||||
/// (FTP, RFC 959) client.
|
||||
///
|
||||
/// Most of the features of the FTP protocol, as specified
|
||||
/// in RFC 959, are supported. Not supported are EBCDIC and
|
||||
/// LOCAL data types and format control and structured files.
|
||||
///
|
||||
/// Also supported are the EPRT and EPSV commands from
|
||||
/// RFC 1738 (FTP Extensions for IPv6 and NAT).
|
||||
/// The client will first attempt to use the EPRT and EPSV
|
||||
/// commands. If the server does not supports these commands,
|
||||
/// the client will fall back to PORT and PASV.
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
FTP_PORT = 21
|
||||
};
|
||||
|
||||
enum FileType
|
||||
{
|
||||
TYPE_TEXT, // TYPE A (ASCII)
|
||||
TYPE_BINARY // TYPE I (Image)
|
||||
};
|
||||
|
||||
explicit FTPClientSession(const StreamSocket& socket);
|
||||
/// Creates an FTPClientSession using the given
|
||||
/// connected socket for the control connection.
|
||||
///
|
||||
/// Passive mode will be used for data transfers.
|
||||
|
||||
FTPClientSession(const std::string& host, Poco::UInt16 port = FTP_PORT);
|
||||
/// Creates an FTPClientSession using a socket connected
|
||||
/// to the given host and port.
|
||||
///
|
||||
/// Passive mode will be used for data transfers.
|
||||
|
||||
virtual ~FTPClientSession();
|
||||
/// Destroys the FTPClientSession.
|
||||
|
||||
void setTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the timeout for socket operations.
|
||||
|
||||
Poco::Timespan getTimeout() const;
|
||||
/// Returns the timeout for socket operations.
|
||||
|
||||
void setPassive(bool flag, bool useRFC1738 = true);
|
||||
/// Enables (default) or disables FTP passive mode for this session.
|
||||
///
|
||||
/// If useRFC1738 is true (the default), the RFC 1738
|
||||
/// EPSV command is used (with a fallback to PASV if EPSV fails)
|
||||
/// for switching to passive mode. The same applies to
|
||||
/// EPRT and PORT for active connections.
|
||||
|
||||
bool getPassive() const;
|
||||
/// Returns true iff passive mode is enabled for this connection.
|
||||
|
||||
void login(const std::string& username, const std::string& password);
|
||||
/// Authenticates the user against the FTP server. Must be
|
||||
/// called before any other commands (except QUIT) can be sent.
|
||||
///
|
||||
/// Sends a USER command followed by a PASS command with the
|
||||
/// respective arguments to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void close();
|
||||
/// Sends a QUIT command and closes the connection to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
std::string systemType();
|
||||
/// Returns the system type of the FTP server.
|
||||
///
|
||||
/// Sends a SYST command to the server and returns the result.
|
||||
|
||||
void setFileType(FileType type);
|
||||
/// Sets the file type for transferring files.
|
||||
///
|
||||
/// Sends a TYPE command with a corresponsing argument to the
|
||||
/// server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
FileType getFileType() const;
|
||||
/// Returns the file type for transferring files.
|
||||
|
||||
void setWorkingDirectory(const std::string& path);
|
||||
/// Changes the current working directory on the server.
|
||||
///
|
||||
/// Sends a CWD command with the given path as argument to the
|
||||
/// server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
std::string getWorkingDirectory();
|
||||
/// Returns the current working directory on the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void cdup();
|
||||
/// Moves one directory up from the current working directory
|
||||
/// on teh server.
|
||||
///
|
||||
/// Sends a CDUP command to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void rename(const std::string& oldName, const std::string& newName);
|
||||
/// Renames the file on the server given by oldName to newName.
|
||||
///
|
||||
/// Sends a RNFR command, followed by a RNTO command to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void remove(const std::string& path);
|
||||
/// Deletes the file specified by path on the server.
|
||||
///
|
||||
/// Sends a DELE command with path as argument to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void createDirectory(const std::string& path);
|
||||
/// Creates a new directory with the given path on the server.
|
||||
///
|
||||
/// Sends a MKD command with path as argument to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void removeDirectory(const std::string& path);
|
||||
/// Removes the directory specified by path from the server.
|
||||
///
|
||||
/// Sends a RMD command with path as argument to the server.
|
||||
///
|
||||
/// Throws a FTPException in case of a FTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
std::istream& beginDownload(const std::string& path);
|
||||
/// Starts downloading the file with the given name.
|
||||
/// After all data has been read from the returned stream,
|
||||
/// endDownload() must be called to finish the download.
|
||||
///
|
||||
/// A stream for reading the file's content is returned.
|
||||
/// The stream is valid until endDownload() is called.
|
||||
///
|
||||
/// Creates a data connection between the client and the
|
||||
/// server. If passive mode is on, then the server waits for
|
||||
/// a connection request from the client. Otherwise, the
|
||||
/// client waits for a connection request from the server.
|
||||
/// After establishing the data connection, a SocketStream
|
||||
/// for transferring the data is created.
|
||||
///
|
||||
/// If ASCII transfer mode is selected, the caller is
|
||||
/// responsible for converting the received data to
|
||||
/// the native text file format.
|
||||
/// The InputLineEndingConverter class from the Foundation
|
||||
/// library can be used for that purpose.
|
||||
|
||||
void endDownload();
|
||||
/// Must be called to complete a download initiated with
|
||||
/// beginDownload().
|
||||
|
||||
std::ostream& beginUpload(const std::string& path);
|
||||
/// Starts uploading the file with the given name.
|
||||
/// After all data has been written to the returned stream,
|
||||
/// endUpload() must be called to finish the download.
|
||||
///
|
||||
/// A stream for reading the file's content is returned.
|
||||
/// The stream is valid until endUpload() is called.
|
||||
///
|
||||
/// Creates a data connection between the client and the
|
||||
/// server. If passive mode is on, then the server waits for
|
||||
/// a connection request from the client. Otherwise, the
|
||||
/// client waits for a connection request from the server.
|
||||
/// After establishing the data connection, a SocketStream
|
||||
/// for transferring the data is created.
|
||||
///
|
||||
/// If ASCII transfer mode is selected, the caller is
|
||||
/// responsible for converting the data to be sent
|
||||
/// into network (CR-LF line endings) format.
|
||||
/// The OutputLineEndingConverter class from the Foundation
|
||||
/// library can be used for that purpose.
|
||||
|
||||
void endUpload();
|
||||
/// Must be called to complete an upload initiated with
|
||||
/// beginUpload().
|
||||
|
||||
std::istream& beginList(const std::string& path = "", bool extended = false);
|
||||
/// Starts downloading a directory listing.
|
||||
/// After all data has been read from the returned stream,
|
||||
/// endList() must be called to finish the download.
|
||||
///
|
||||
/// A stream for reading the directory data is returned.
|
||||
/// The stream is valid until endList() is called.
|
||||
///
|
||||
/// Optionally, a path to a directory or file can be specified.
|
||||
/// According to the FTP prototol, if a path to a filename is
|
||||
/// given, only information for the specific file is returned.
|
||||
/// If a path to a directory is given, a listing of that directory
|
||||
/// is returned. If no path is given, a listing of the current
|
||||
/// working directory is returned.
|
||||
///
|
||||
/// If extended is false, only a filenames (one per line) are
|
||||
/// returned. Otherwise, a full directory listing including
|
||||
/// file attributes is returned. The format of this listing
|
||||
/// depends on the FTP server. No attempt is made to interpret
|
||||
/// this data.
|
||||
///
|
||||
/// Creates a data connection between the client and the
|
||||
/// server. If passive mode is on, then the server waits for
|
||||
/// a connection request from the client. Otherwise, the
|
||||
/// client waits for a connection request from the server.
|
||||
/// After establishing the data connection, a SocketStream
|
||||
/// for transferring the data is created.
|
||||
|
||||
void endList();
|
||||
/// Must be called to complete a directory listing download
|
||||
/// initiated with beginList().
|
||||
|
||||
void abort();
|
||||
/// Aborts the download or upload currently in progress.
|
||||
///
|
||||
/// Sends a TELNET IP/SYNCH sequence, followed by an ABOR
|
||||
/// command to the server.
|
||||
///
|
||||
/// A separate call to endDownload() or endUpload() is
|
||||
/// not necessary.
|
||||
|
||||
int sendCommand(const std::string& command, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
|
||||
int sendCommand(const std::string& command, const std::string& arg, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
|
||||
protected:
|
||||
enum StatusClass
|
||||
{
|
||||
FTP_POSITIVE_PRELIMINARY = 1,
|
||||
FTP_POSITIVE_COMPLETION = 2,
|
||||
FTP_POSITIVE_INTERMEDIATE = 3,
|
||||
FTP_TRANSIENT_NEGATIVE = 4,
|
||||
FTP_PERMANENT_NEGATIVE = 5
|
||||
};
|
||||
enum
|
||||
{
|
||||
DEFAULT_TIMEOUT = 30000000 // 30 seconds default timeout for socket operations
|
||||
};
|
||||
|
||||
static bool isPositivePreliminary(int status);
|
||||
static bool isPositiveCompletion(int status);
|
||||
static bool isPositiveIntermediate(int status);
|
||||
static bool isTransientNegative(int status);
|
||||
static bool isPermanentNegative(int status);
|
||||
std::string extractPath(const std::string& response);
|
||||
StreamSocket establishDataConnection(const std::string& command, const std::string& arg);
|
||||
StreamSocket activeDataConnection(const std::string& command, const std::string& arg);
|
||||
StreamSocket passiveDataConnection(const std::string& command, const std::string& arg);
|
||||
void sendPortCommand(const SocketAddress& addr);
|
||||
SocketAddress sendPassiveCommand();
|
||||
bool sendEPRT(const SocketAddress& addr);
|
||||
void sendPORT(const SocketAddress& addr);
|
||||
bool sendEPSV(SocketAddress& addr);
|
||||
void sendPASV(SocketAddress& addr);
|
||||
void parseAddress(const std::string& str, SocketAddress& addr);
|
||||
void parseExtAddress(const std::string& str, SocketAddress& addr);
|
||||
void endTransfer();
|
||||
|
||||
private:
|
||||
FTPClientSession();
|
||||
FTPClientSession(const FTPClientSession&);
|
||||
FTPClientSession& operator = (const FTPClientSession&);
|
||||
|
||||
DialogSocket _controlSocket;
|
||||
SocketStream* _pDataStream;
|
||||
bool _passiveMode;
|
||||
FileType _fileType;
|
||||
bool _supports1738;
|
||||
bool _isOpen;
|
||||
Poco::Timespan _timeout;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool FTPClientSession::isPositivePreliminary(int status)
|
||||
{
|
||||
return status/100 == FTP_POSITIVE_PRELIMINARY;
|
||||
}
|
||||
|
||||
|
||||
inline bool FTPClientSession::isPositiveCompletion(int status)
|
||||
{
|
||||
return status/100 == FTP_POSITIVE_COMPLETION;
|
||||
}
|
||||
|
||||
|
||||
inline bool FTPClientSession::isPositiveIntermediate(int status)
|
||||
{
|
||||
return status/100 == FTP_POSITIVE_INTERMEDIATE;
|
||||
}
|
||||
|
||||
|
||||
inline bool FTPClientSession::isTransientNegative(int status)
|
||||
{
|
||||
return status/100 == FTP_TRANSIENT_NEGATIVE;
|
||||
}
|
||||
|
||||
|
||||
inline bool FTPClientSession::isPermanentNegative(int status)
|
||||
{
|
||||
return status/100 == FTP_PERMANENT_NEGATIVE;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_FTPClientSession_INCLUDED
|
||||
138
Net/include/Poco/Net/FTPStreamFactory.h
Normal file
138
Net/include/Poco/Net/FTPStreamFactory.h
Normal file
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// FTPStreamFactory.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/FTPStreamFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: FTP
|
||||
// Module: FTPStreamFactory
|
||||
//
|
||||
// Definition of the FTPStreamFactory class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_FTPStreamFactory_INCLUDED
|
||||
#define Net_FTPStreamFactory_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPSession.h"
|
||||
#include "Poco/URIStreamFactory.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API FTPPasswordProvider
|
||||
/// The base class for all password providers.
|
||||
/// An instance of a subclass of this class can be
|
||||
/// registered with the FTPStreamFactory to
|
||||
/// provide a password
|
||||
{
|
||||
public:
|
||||
virtual std::string password(const std::string& username, const std::string& host) = 0;
|
||||
/// Provide the password for the given user on the given host.
|
||||
|
||||
protected:
|
||||
FTPPasswordProvider();
|
||||
virtual ~FTPPasswordProvider();
|
||||
};
|
||||
|
||||
|
||||
class Net_API FTPStreamFactory: public Poco::URIStreamFactory
|
||||
/// An implementation of the URIStreamFactory interface
|
||||
/// that handles File Transfer Protocol (ftp) URIs.
|
||||
///
|
||||
/// The URI's path may end with an optional type specification
|
||||
/// in the form (;type=<typecode>), where <typecode> is
|
||||
/// one of a, i or d. If type=a, the file identified by the path
|
||||
/// is transferred in ASCII (text) mode. If type=i, the file
|
||||
/// is transferred in Image (binary) mode. If type=d, a directory
|
||||
/// listing (in NLST format) is returned. This corresponds with
|
||||
/// the FTP URL format specified in RFC 1738.
|
||||
///
|
||||
/// If the URI does not contain a username and password, the
|
||||
/// username "anonymous" and the password "
|
||||
{
|
||||
public:
|
||||
FTPStreamFactory();
|
||||
/// Creates the FTPStreamFactory.
|
||||
|
||||
~FTPStreamFactory();
|
||||
/// Destroys the FTPStreamFactory.
|
||||
|
||||
std::istream* open(const Poco::URI& uri);
|
||||
/// Creates and opens a HTTP stream for the given URI.
|
||||
/// The URI must be a ftp://... URI.
|
||||
///
|
||||
/// Throws a NetException if anything goes wrong.
|
||||
|
||||
static void setAnonymousPassword(const std::string& password);
|
||||
/// Sets the password used for anonymous FTP.
|
||||
///
|
||||
/// WARNING: Setting the anonymous password is not
|
||||
/// thread-safe, so it's best to call this method
|
||||
/// during application initialization, before the
|
||||
/// FTPStreamFactory is used for the first time.
|
||||
|
||||
static const std::string& getAnonymousPassword();
|
||||
/// Returns the password used for anonymous FTP.
|
||||
|
||||
static void setPasswordProvider(FTPPasswordProvider* pProvider);
|
||||
/// Sets the FTPPasswordProvider. If NULL is given,
|
||||
/// no password provider is used.
|
||||
///
|
||||
/// WARNING: Setting the password provider is not
|
||||
/// thread-safe, so it's best to call this method
|
||||
/// during application initialization, before the
|
||||
/// FTPStreamFactory is used for the first time.
|
||||
|
||||
static FTPPasswordProvider* getPasswordProvider();
|
||||
/// Returns the FTPPasswordProvider currently in use,
|
||||
/// or NULL if no one has been set.
|
||||
|
||||
static void registerFactory();
|
||||
/// Registers the FTPStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
protected:
|
||||
static void splitUserInfo(const std::string& userInfo, std::string& username, std::string& password);
|
||||
static void getUserInfo(const Poco::URI& uri, std::string& username, std::string& password);
|
||||
static void getPathAndType(const Poco::URI& uri, std::string& path, char& type);
|
||||
|
||||
private:
|
||||
static std::string _anonymousPassword;
|
||||
static FTPPasswordProvider* _pPasswordProvider;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_FTPStreamFactory_INCLUDED
|
||||
95
Net/include/Poco/Net/FilePartSource.h
Normal file
95
Net/include/Poco/Net/FilePartSource.h
Normal file
@@ -0,0 +1,95 @@
|
||||
//
|
||||
// FilePartSource.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/FilePartSource.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: FilePartSource
|
||||
//
|
||||
// Definition of the FilePartSource class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_FilePartSource_INCLUDED
|
||||
#define Net_FilePartSource_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/PartSource.h"
|
||||
#include "Poco/FileStream.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API FilePartSource: public PartSource
|
||||
/// An implementation of PartSource for
|
||||
/// plain files.
|
||||
{
|
||||
public:
|
||||
FilePartSource(const std::string& path);
|
||||
/// Creates the FilePartSource for the given path.
|
||||
///
|
||||
/// The MIME type is set to application/octet-stream.
|
||||
///
|
||||
/// Throws an OpenFileException if the file cannot be opened.
|
||||
|
||||
FilePartSource(const std::string& path, const std::string& mediaType);
|
||||
/// Creates the FilePartSource for the given
|
||||
/// path and MIME type.
|
||||
///
|
||||
/// Throws an OpenFileException if the file cannot be opened.
|
||||
|
||||
FilePartSource(const std::string& path, const std::string& filename, const std::string& mediaType);
|
||||
/// Creates the FilePartSource for the given
|
||||
/// path and MIME type. The given filename is
|
||||
/// used as part filename (see filename()) only.
|
||||
///
|
||||
/// Throws an OpenFileException if the file cannot be opened.
|
||||
|
||||
~FilePartSource();
|
||||
/// Destroys the FilePartSource.
|
||||
|
||||
std::istream& stream();
|
||||
/// Returns a file input stream for the given file.
|
||||
|
||||
const std::string& filename();
|
||||
/// Returns the filename portion of the path.
|
||||
|
||||
private:
|
||||
std::string _filename;
|
||||
Poco::FileInputStream _istr;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_FilePartSource_INCLUDED
|
||||
260
Net/include/Poco/Net/HTMLForm.h
Normal file
260
Net/include/Poco/Net/HTMLForm.h
Normal file
@@ -0,0 +1,260 @@
|
||||
//
|
||||
// HTMLForm.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTMLForm.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTML
|
||||
// Module: HTMLForm
|
||||
//
|
||||
// Definition of the HTMLForm class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTMLForm_INCLUDED
|
||||
#define Net_HTMLForm_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/NameValueCollection.h"
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
class PartHandler;
|
||||
class PartSource;
|
||||
|
||||
|
||||
class Net_API HTMLForm: public NameValueCollection
|
||||
/// HTMLForm is a helper class for working with HTML forms,
|
||||
/// both on the client and on the server side.
|
||||
///
|
||||
/// The maximum number of form fields can be restricted
|
||||
/// by calling setFieldLimit(). This is useful to
|
||||
/// defend against certain kinds of denial-of-service
|
||||
/// attacks. The limit is only enforced when parsing
|
||||
/// form data from a stream or string, not when adding
|
||||
/// form fields programmatically. The default limit is 100.
|
||||
{
|
||||
public:
|
||||
HTMLForm();
|
||||
/// Creates an empty HTMLForm and sets the
|
||||
/// encoding to "application/x-www-form-urlencoded".
|
||||
|
||||
explicit HTMLForm(const std::string& encoding);
|
||||
/// Creates an empty HTMLForm that uses
|
||||
/// the given encoding.
|
||||
///
|
||||
/// Encoding must be either "application/x-www-form-urlencoded"
|
||||
/// (which is the default) or "multipart/form-data".
|
||||
|
||||
HTMLForm(const HTTPRequest& request, std::istream& requestBody, PartHandler& handler);
|
||||
/// Creates a HTMLForm from the given HTTP request.
|
||||
///
|
||||
/// Uploaded files are passed to the given PartHandler.
|
||||
|
||||
HTMLForm(const HTTPRequest& request, std::istream& requestBody);
|
||||
/// Creates a HTMLForm from the given HTTP request.
|
||||
///
|
||||
/// Uploaded files are silently discarded.
|
||||
|
||||
explicit HTMLForm(const HTTPRequest& request);
|
||||
/// Creates a HTMLForm from the given HTTP request.
|
||||
///
|
||||
/// The request must be a GET request and the form data
|
||||
/// must be in the query string (URL encoded).
|
||||
///
|
||||
/// For POST requests, you must use one of the constructors
|
||||
/// taking an additional input stream for the request body.
|
||||
|
||||
~HTMLForm();
|
||||
/// Destroys the HTMLForm.
|
||||
|
||||
void setEncoding(const std::string& encoding);
|
||||
/// Sets the encoding used for posting the form.
|
||||
///
|
||||
/// Encoding must be either "application/x-www-form-urlencoded"
|
||||
/// (which is the default) or "multipart/form-data".
|
||||
|
||||
const std::string& getEncoding() const;
|
||||
/// Returns the encoding used for posting the form.
|
||||
|
||||
void addPart(const std::string& name, PartSource* pSource);
|
||||
/// Adds an part/attachment (file upload) to the form.
|
||||
///
|
||||
/// The form takes ownership of the PartSource and deletes it
|
||||
/// when it is no longer needed.
|
||||
///
|
||||
/// The part will only be sent if the encoding
|
||||
/// set for the form is "multipart/form-data"
|
||||
|
||||
void load(const HTTPRequest& request, std::istream& requestBody, PartHandler& handler);
|
||||
/// Reads the form data from the given HTTP request.
|
||||
///
|
||||
/// Uploaded files are passed to the given PartHandler.
|
||||
|
||||
void load(const HTTPRequest& request, std::istream& requestBody);
|
||||
/// Reads the form data from the given HTTP request.
|
||||
///
|
||||
/// Uploaded files are silently discarded.
|
||||
|
||||
void load(const HTTPRequest& request);
|
||||
/// Reads the form data from the given HTTP request.
|
||||
///
|
||||
/// The request must be a GET request and the form data
|
||||
/// must be in the query string (URL encoded).
|
||||
///
|
||||
/// For POST requests, you must use one of the overloads
|
||||
/// taking an additional input stream for the request body.
|
||||
|
||||
void read(std::istream& istr, PartHandler& handler);
|
||||
/// Reads the form data from the given input stream.
|
||||
///
|
||||
/// The form data read from the stream must be
|
||||
/// in the encoding specified for the form.
|
||||
///
|
||||
/// Note that read() does not clear the form before
|
||||
/// reading the new values.
|
||||
|
||||
void read(std::istream& istr);
|
||||
/// Reads the URL-encoded form data from the given input stream.
|
||||
///
|
||||
/// Note that read() does not clear the form before
|
||||
/// reading the new values.
|
||||
|
||||
void read(const std::string& queryString);
|
||||
/// Reads the form data from the given HTTP query string.
|
||||
///
|
||||
/// Note that read() does not clear the form before
|
||||
/// reading the new values.
|
||||
|
||||
void prepareSubmit(HTTPRequest& request);
|
||||
/// Fills out the request object for submitting the form.
|
||||
///
|
||||
/// If the request method is GET, the encoded form is appended to the
|
||||
/// request URI as query string. Otherwise (the method is
|
||||
/// POST), the form's content type is set to the form's encoding.
|
||||
/// The form's parameters must be written to the
|
||||
/// request body separately, with a call to write.
|
||||
/// If the request's HTTP version is HTTP/1.0:
|
||||
/// - persistent connections are disabled
|
||||
/// - the content transfer encoding is set to identity encoding
|
||||
/// Otherwise, if the request's HTTP version is HTTP/1.1:
|
||||
/// - the request's persistent connection state is left unchanged
|
||||
/// - the content transfer encoding is set to chunked
|
||||
|
||||
void write(std::ostream& ostr, const std::string& boundary);
|
||||
/// Writes the form data to the given output stream,
|
||||
/// using the specified encoding.
|
||||
|
||||
void write(std::ostream& ostr);
|
||||
/// Writes the form data to the given output stream,
|
||||
/// using the specified encoding.
|
||||
|
||||
const std::string& boundary() const;
|
||||
/// Returns the MIME boundary used for writing
|
||||
/// multipart form data.
|
||||
|
||||
int getFieldLimit() const;
|
||||
/// Returns the maximum number of header fields
|
||||
/// allowed.
|
||||
///
|
||||
/// See setFieldLimit() for more information.
|
||||
|
||||
void setFieldLimit(int limit);
|
||||
/// Sets the maximum number of header fields
|
||||
/// allowed. This limit is used to defend certain
|
||||
/// kinds of denial-of-service attacks.
|
||||
/// Specify 0 for unlimited (not recommended).
|
||||
///
|
||||
/// The default limit is 100.
|
||||
|
||||
static const std::string ENCODING_URL; /// "application/x-www-form-urlencoded"
|
||||
static const std::string ENCODING_MULTIPART; /// "multipart/form-data"
|
||||
|
||||
protected:
|
||||
void readUrl(std::istream& istr);
|
||||
void readMultipart(std::istream& istr, PartHandler& handler);
|
||||
void writeUrl(std::ostream& ostr);
|
||||
void writeMultipart(std::ostream& ostr);
|
||||
|
||||
private:
|
||||
HTMLForm(const HTMLForm&);
|
||||
HTMLForm& operator = (const HTMLForm&);
|
||||
|
||||
enum Limits
|
||||
{
|
||||
DFL_FIELD_LIMIT = 100
|
||||
};
|
||||
|
||||
struct Part
|
||||
{
|
||||
std::string name;
|
||||
PartSource* pSource;
|
||||
};
|
||||
|
||||
typedef std::vector<Part> PartVec;
|
||||
|
||||
int _fieldLimit;
|
||||
std::string _encoding;
|
||||
std::string _boundary;
|
||||
PartVec _parts;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTMLForm::getEncoding() const
|
||||
{
|
||||
return _encoding;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTMLForm::boundary() const
|
||||
{
|
||||
return _boundary;
|
||||
}
|
||||
|
||||
|
||||
inline int HTMLForm::getFieldLimit() const
|
||||
{
|
||||
return _fieldLimit;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTMLForm_INCLUDED
|
||||
123
Net/include/Poco/Net/HTTPAuthenticationParams.h
Normal file
123
Net/include/Poco/Net/HTTPAuthenticationParams.h
Normal file
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// HTTPAuthenticationParams.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPAuthenticationParams.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPAuthenticationParams
|
||||
//
|
||||
// Definition of the HTTPAuthenticationParams class.
|
||||
//
|
||||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru).
|
||||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPAuthenticationParams_INCLUDED
|
||||
#define Net_HTTPAuthenticationParams_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/NameValueCollection.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
class HTTPResponse;
|
||||
|
||||
|
||||
class Net_API HTTPAuthenticationParams: public NameValueCollection
|
||||
/// Collection of name-value pairs of HTTP authentication header (i.e.
|
||||
/// "realm", "qop", "nonce" in case of digest authentication header).
|
||||
{
|
||||
public:
|
||||
HTTPAuthenticationParams();
|
||||
/// Creates an empty authentication parameters collection.
|
||||
|
||||
explicit HTTPAuthenticationParams(const std::string& authInfo);
|
||||
/// See fromAuthInfo() documentation.
|
||||
|
||||
explicit HTTPAuthenticationParams(const HTTPRequest& request);
|
||||
/// See fromRequest() documentation.
|
||||
|
||||
explicit HTTPAuthenticationParams(const HTTPResponse& response);
|
||||
/// See fromResponse() documentation.
|
||||
|
||||
virtual ~HTTPAuthenticationParams();
|
||||
/// Destroys the HTTPAuthenticationParams.
|
||||
|
||||
HTTPAuthenticationParams& operator = (const HTTPAuthenticationParams& authParams);
|
||||
/// Assigns the content of another HTTPAuthenticationParams.
|
||||
|
||||
void fromAuthInfo(const std::string& authInfo);
|
||||
/// Creates an HTTPAuthenticationParams by parsing authentication
|
||||
/// information.
|
||||
|
||||
void fromRequest(const HTTPRequest& request);
|
||||
/// Extracts authentication information from the request and creates
|
||||
/// HTTPAuthenticationParams by parsing it.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if no authentication
|
||||
/// information is contained in request.
|
||||
/// Throws a InvalidArgumentException if authentication scheme is
|
||||
/// unknown or invalid.
|
||||
|
||||
void fromResponse(const HTTPResponse& response);
|
||||
/// Extracts authentication information from the response and creates
|
||||
/// HTTPAuthenticationParams by parsing it.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if no authentication
|
||||
/// information is contained in response.
|
||||
/// Throws a InvalidArgumentException if authentication scheme is
|
||||
/// unknown or invalid.
|
||||
|
||||
void setRealm(const std::string& realm);
|
||||
/// Sets the "realm" parameter to the provided string.
|
||||
|
||||
const std::string& getRealm() const;
|
||||
/// Returns value of the "realm" parameter.
|
||||
///
|
||||
/// Throws NotFoundException is there is no "realm" set in the
|
||||
/// HTTPAuthenticationParams.
|
||||
|
||||
std::string toString() const;
|
||||
/// Formats the HTTPAuthenticationParams for inclusion in HTTP
|
||||
/// request or response authentication header.
|
||||
|
||||
static const std::string REALM;
|
||||
|
||||
private:
|
||||
void parse(std::string::const_iterator first, std::string::const_iterator last);
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPAuthenticationParams_INCLUDED
|
||||
133
Net/include/Poco/Net/HTTPBasicCredentials.h
Normal file
133
Net/include/Poco/Net/HTTPBasicCredentials.h
Normal file
@@ -0,0 +1,133 @@
|
||||
//
|
||||
// HTTPBasicCredentials.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPBasicCredentials.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPBasicCredentials
|
||||
//
|
||||
// Definition of the HTTPBasicCredentials class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPBasicCredentials_INCLUDED
|
||||
#define Net_HTTPBasicCredentials_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
|
||||
|
||||
class Net_API HTTPBasicCredentials
|
||||
/// This is a utility class for working with
|
||||
/// HTTP Basic Authentication in HTTPRequest
|
||||
/// objects.
|
||||
{
|
||||
public:
|
||||
HTTPBasicCredentials();
|
||||
/// Creates an empty HTTPBasicCredentials object.
|
||||
|
||||
HTTPBasicCredentials(const std::string& username, const std::string& password);
|
||||
/// Creates a HTTPBasicCredentials object with the given username and password.
|
||||
|
||||
explicit HTTPBasicCredentials(const HTTPRequest& request);
|
||||
/// Creates a HTTPBasicCredentials object with the authentication information
|
||||
/// from the given request.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if the request does
|
||||
/// not contain basic authentication information.
|
||||
|
||||
explicit HTTPBasicCredentials(const std::string& authInfo);
|
||||
/// Creates a HTTPBasicCredentials object with the authentication information
|
||||
/// in the given string. The authentication information can be extracted
|
||||
/// from a HTTPRequest object by calling HTTPRequest::getCredentials().
|
||||
|
||||
~HTTPBasicCredentials();
|
||||
/// Destroys the HTTPBasicCredentials.
|
||||
|
||||
void setUsername(const std::string& username);
|
||||
/// Sets the username.
|
||||
|
||||
const std::string& getUsername() const;
|
||||
/// Returns the username.
|
||||
|
||||
void setPassword(const std::string& password);
|
||||
/// Sets the password.
|
||||
|
||||
const std::string& getPassword() const;
|
||||
/// Returns the password.
|
||||
|
||||
void authenticate(HTTPRequest& request) const;
|
||||
/// Adds authentication information to the given HTTPRequest.
|
||||
|
||||
void proxyAuthenticate(HTTPRequest& request) const;
|
||||
/// Adds proxy authentication information to the given HTTPRequest.
|
||||
|
||||
static const std::string SCHEME;
|
||||
|
||||
protected:
|
||||
void parseAuthInfo(const std::string& authInfo);
|
||||
/// Extracts username and password from Basic authentication info
|
||||
/// by base64-decoding authInfo and splitting the resulting
|
||||
/// string at the ':' delimiter.
|
||||
|
||||
private:
|
||||
HTTPBasicCredentials(const HTTPBasicCredentials&);
|
||||
HTTPBasicCredentials& operator = (const HTTPBasicCredentials&);
|
||||
|
||||
std::string _username;
|
||||
std::string _password;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPBasicCredentials::getUsername() const
|
||||
{
|
||||
return _username;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPBasicCredentials::getPassword() const
|
||||
{
|
||||
return _password;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPBasicCredentials_INCLUDED
|
||||
58
Net/include/Poco/Net/HTTPBasicStreamBuf.h
Normal file
58
Net/include/Poco/Net/HTTPBasicStreamBuf.h
Normal file
@@ -0,0 +1,58 @@
|
||||
//
|
||||
// HTTPBasicStreamBuf.h
|
||||
//
|
||||
// $Id: //poco/Main/template/class.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPBasicStreamBuf
|
||||
//
|
||||
// Definition of the HTTPBasicStreamBuf class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPBasicStreamBuf_INCLUDED
|
||||
#define Net_HTTPBasicStreamBuf_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/BufferedStreamBuf.h"
|
||||
#include "Poco/Net/HTTPBufferAllocator.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
typedef Poco::BasicBufferedStreamBuf<char, std::char_traits<char>, HTTPBufferAllocator> HTTPBasicStreamBuf;
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPBasicStreamBuf_INCLUDED
|
||||
72
Net/include/Poco/Net/HTTPBufferAllocator.h
Normal file
72
Net/include/Poco/Net/HTTPBufferAllocator.h
Normal file
@@ -0,0 +1,72 @@
|
||||
//
|
||||
// HTTPBufferAllocator.h
|
||||
//
|
||||
// $Id: //poco/Main/template/class.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPBufferAllocator
|
||||
//
|
||||
// Definition of the HTTPBufferAllocator class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPBufferAllocator_INCLUDED
|
||||
#define Net_HTTPBufferAllocator_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/MemoryPool.h"
|
||||
#include <ios>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPBufferAllocator
|
||||
/// A BufferAllocator for HTTP streams.
|
||||
{
|
||||
public:
|
||||
static char* allocate(std::streamsize size);
|
||||
static void deallocate(char* ptr, std::streamsize size);
|
||||
|
||||
enum
|
||||
{
|
||||
BUFFER_SIZE = 4096
|
||||
};
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPBufferAllocator_INCLUDED
|
||||
127
Net/include/Poco/Net/HTTPChunkedStream.h
Normal file
127
Net/include/Poco/Net/HTTPChunkedStream.h
Normal file
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// HTTPChunkedStream.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPChunkedStream.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPChunkedStream
|
||||
//
|
||||
// Definition of the HTTPChunkedStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPChunkedStream_INCLUDED
|
||||
#define Net_HTTPChunkedStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPBasicStreamBuf.h"
|
||||
#include "Poco/MemoryPool.h"
|
||||
#include <cstddef>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPSession;
|
||||
|
||||
|
||||
class Net_API HTTPChunkedStreamBuf: public HTTPBasicStreamBuf
|
||||
/// This is the streambuf class used for reading and writing
|
||||
/// HTTP message bodies in chunked transfer coding.
|
||||
{
|
||||
public:
|
||||
typedef HTTPBasicStreamBuf::openmode openmode;
|
||||
|
||||
HTTPChunkedStreamBuf(HTTPSession& session, openmode mode);
|
||||
~HTTPChunkedStreamBuf();
|
||||
void close();
|
||||
|
||||
protected:
|
||||
int readFromDevice(char* buffer, std::streamsize length);
|
||||
int writeToDevice(const char* buffer, std::streamsize length);
|
||||
|
||||
private:
|
||||
HTTPSession& _session;
|
||||
openmode _mode;
|
||||
std::streamsize _chunk;
|
||||
std::string _chunkBuffer;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPChunkedIOS: public virtual std::ios
|
||||
/// The base class for HTTPInputStream.
|
||||
{
|
||||
public:
|
||||
HTTPChunkedIOS(HTTPSession& session, HTTPChunkedStreamBuf::openmode mode);
|
||||
~HTTPChunkedIOS();
|
||||
HTTPChunkedStreamBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
HTTPChunkedStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPChunkedInputStream: public HTTPChunkedIOS, public std::istream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPChunkedInputStream(HTTPSession& session);
|
||||
~HTTPChunkedInputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPChunkedOutputStream: public HTTPChunkedIOS, public std::ostream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPChunkedOutputStream(HTTPSession& session);
|
||||
~HTTPChunkedOutputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPChunkedStream_INCLUDED
|
||||
383
Net/include/Poco/Net/HTTPClientSession.h
Normal file
383
Net/include/Poco/Net/HTTPClientSession.h
Normal file
@@ -0,0 +1,383 @@
|
||||
//
|
||||
// HTTPClientSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPClientSession.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPClient
|
||||
// Module: HTTPClientSession
|
||||
//
|
||||
// Definition of the HTTPClientSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPClientSession_INCLUDED
|
||||
#define Net_HTTPClientSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPSession.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
class HTTPResponse;
|
||||
|
||||
|
||||
class Net_API HTTPClientSession: public HTTPSession
|
||||
/// This class implements the client-side of
|
||||
/// a HTTP session.
|
||||
///
|
||||
/// To send a HTTP request to a HTTP server, first
|
||||
/// instantiate a HTTPClientSession object and
|
||||
/// specify the server's host name and port number.
|
||||
///
|
||||
/// Then create a HTTPRequest object, fill it accordingly,
|
||||
/// and pass it as argument to the sendRequst() method.
|
||||
///
|
||||
/// sendRequest() will return an output stream that can
|
||||
/// be used to send the request body, if there is any.
|
||||
///
|
||||
/// After you are done sending the request body, create
|
||||
/// a HTTPResponse object and pass it to receiveResponse().
|
||||
///
|
||||
/// This will return an input stream that can be used to
|
||||
/// read the response body.
|
||||
///
|
||||
/// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more
|
||||
/// information about the HTTP protocol.
|
||||
///
|
||||
/// Proxies and proxy authorization (only HTTP Basic Authorization)
|
||||
/// is supported. Use setProxy() and setProxyCredentials() to
|
||||
/// set up a session through a proxy.
|
||||
{
|
||||
public:
|
||||
HTTPClientSession();
|
||||
/// Creates an unconnected HTTPClientSession.
|
||||
|
||||
explicit HTTPClientSession(const StreamSocket& socket);
|
||||
/// Creates a HTTPClientSession using the given socket.
|
||||
/// The socket must not be connected. The session
|
||||
/// takes ownership of the socket.
|
||||
|
||||
explicit HTTPClientSession(const SocketAddress& address);
|
||||
/// Creates a HTTPClientSession using the given address.
|
||||
|
||||
HTTPClientSession(const std::string& host, Poco::UInt16 port = HTTPSession::HTTP_PORT);
|
||||
/// Creates a HTTPClientSession using the given host and port.
|
||||
|
||||
virtual ~HTTPClientSession();
|
||||
/// Destroys the HTTPClientSession and closes
|
||||
/// the underlying socket.
|
||||
|
||||
void setHost(const std::string& host);
|
||||
/// Sets the host name of the target HTTP server.
|
||||
///
|
||||
/// The host must not be changed once there is an
|
||||
/// open connection to the server.
|
||||
|
||||
const std::string& getHost() const;
|
||||
/// Returns the host name of the target HTTP server.
|
||||
|
||||
void setPort(Poco::UInt16 port);
|
||||
/// Sets the port number of the target HTTP server.
|
||||
///
|
||||
/// The port number must not be changed once there is an
|
||||
/// open connection to the server.
|
||||
|
||||
Poco::UInt16 getPort() const;
|
||||
/// Returns the port number of the target HTTP server.
|
||||
|
||||
void setProxy(const std::string& host, Poco::UInt16 port = HTTPSession::HTTP_PORT);
|
||||
/// Sets the proxy host name and port number.
|
||||
|
||||
void setProxyHost(const std::string& host);
|
||||
/// Sets the host name of the proxy server.
|
||||
|
||||
void setProxyPort(Poco::UInt16 port);
|
||||
/// Sets the port number of the proxy server.
|
||||
|
||||
const std::string& getProxyHost() const;
|
||||
/// Returns the proxy host name.
|
||||
|
||||
Poco::UInt16 getProxyPort() const;
|
||||
/// Returns the proxy port number.
|
||||
|
||||
void setProxyCredentials(const std::string& username, const std::string& password);
|
||||
/// Sets the username and password for proxy authentication.
|
||||
/// Only Basic authentication is supported.
|
||||
|
||||
void setProxyUsername(const std::string& username);
|
||||
/// Sets the username for proxy authentication.
|
||||
/// Only Basic authentication is supported.
|
||||
|
||||
const std::string& getProxyUsername() const;
|
||||
/// Returns the username for proxy authentication.
|
||||
|
||||
void setProxyPassword(const std::string& password);
|
||||
/// Sets the password for proxy authentication.
|
||||
/// Only Basic authentication is supported.
|
||||
|
||||
const std::string& getProxyPassword() const;
|
||||
/// Returns the password for proxy authentication.
|
||||
|
||||
void setKeepAliveTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the connection timeout for HTTP connections.
|
||||
|
||||
const Poco::Timespan& getKeepAliveTimeout() const;
|
||||
/// Returns the connection timeout for HTTP connections.
|
||||
|
||||
virtual std::ostream& sendRequest(HTTPRequest& request);
|
||||
/// Sends the header for the given HTTP request to
|
||||
/// the server.
|
||||
///
|
||||
/// The HTTPClientSession will set the request's
|
||||
/// Host and Keep-Alive headers accordingly.
|
||||
///
|
||||
/// The returned output stream can be used to write
|
||||
/// the request body. The stream is valid until
|
||||
/// receiveResponse() is called or the session
|
||||
/// is destroyed.
|
||||
///
|
||||
/// In case a network or server failure happens
|
||||
/// while writing the request body to the returned stream,
|
||||
/// the stream state will change to bad or fail. In this
|
||||
/// case, reset() should be called if the session will
|
||||
/// be reused and persistent connections are enabled
|
||||
/// to ensure a new connection will be set up
|
||||
/// for the next request.
|
||||
|
||||
virtual std::istream& receiveResponse(HTTPResponse& response);
|
||||
/// Receives the header for the response to the previous
|
||||
/// HTTP request.
|
||||
///
|
||||
/// The returned input stream can be used to read
|
||||
/// the response body. The stream is valid until
|
||||
/// sendRequest() is called or the session is
|
||||
/// destroyed.
|
||||
///
|
||||
/// It must be ensured that the response stream
|
||||
/// is fully consumed before sending a new request
|
||||
/// and persistent connections are enabled. Otherwise,
|
||||
/// the unread part of the response body may be treated as
|
||||
/// part of the next request's response header, resulting
|
||||
/// in a Poco::Net::MessageException being thrown.
|
||||
///
|
||||
/// In case a network or server failure happens
|
||||
/// while reading the response body from the returned stream,
|
||||
/// the stream state will change to bad or fail. In this
|
||||
/// case, reset() should be called if the session will
|
||||
/// be reused and persistent connections are enabled
|
||||
/// to ensure a new connection will be set up
|
||||
/// for the next request.
|
||||
|
||||
void reset();
|
||||
/// Resets the session and closes the socket.
|
||||
///
|
||||
/// The next request will initiate a new connection,
|
||||
/// even if persistent connections are enabled.
|
||||
///
|
||||
/// This should be called whenever something went
|
||||
/// wrong when sending a request (e.g., sendRequest()
|
||||
/// or receiveResponse() throws an exception, or
|
||||
/// the request or response stream changes into
|
||||
/// fail or bad state, but not eof state).
|
||||
|
||||
virtual bool secure() const;
|
||||
/// Return true iff the session uses SSL or TLS,
|
||||
/// or false otherwise.
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
DEFAULT_KEEP_ALIVE_TIMEOUT = 8
|
||||
};
|
||||
|
||||
void reconnect();
|
||||
/// Connects the underlying socket to the HTTP server.
|
||||
|
||||
int write(const char* buffer, std::streamsize length);
|
||||
/// Tries to re-connect if keep-alive is on.
|
||||
|
||||
virtual std::string proxyRequestPrefix() const;
|
||||
/// Returns the prefix prepended to the URI for proxy requests
|
||||
/// (e.g., "http://myhost.com").
|
||||
|
||||
void deleteResponseStream();
|
||||
/// Deletes the response stream and sets it to 0.
|
||||
|
||||
void deleteRequestStream();
|
||||
/// Deletes the request stream and sets it to 0.
|
||||
|
||||
void setResponseStream(std::istream* pRespStream);
|
||||
/// Sets the response stream iff _pResponseStream is 0.
|
||||
|
||||
void setRequestStream(std::ostream* pRequestStream);
|
||||
/// Sets the request stream iff _pRequestStream is 0.
|
||||
|
||||
std::istream* getResponseStream() const;
|
||||
/// Returns the currently set response stream. Can return 0.
|
||||
|
||||
std::ostream* getRequestStream() const;
|
||||
/// Returns the currently set request stream. Can return 0.
|
||||
|
||||
void setReconnect(bool recon);
|
||||
/// Sets _reconnect.
|
||||
|
||||
void setExpectResponseBody(bool expect);
|
||||
/// Sets _expectResponseBody.
|
||||
|
||||
bool getExpectResponseBody() const;
|
||||
/// Returns _expectResponseBody.
|
||||
|
||||
virtual bool mustReconnect() const;
|
||||
/// Checks if we can reuse a persistent connection.
|
||||
|
||||
virtual void proxyAuthenticate(HTTPRequest& request);
|
||||
/// Sets the proxy credentials (Proxy-Authorization header), if
|
||||
/// proxy username and password have been set.
|
||||
|
||||
void proxyAuthenticateImpl(HTTPRequest& request);
|
||||
/// Sets the proxy credentials (Proxy-Authorization header), if
|
||||
/// proxy username and password have been set.
|
||||
|
||||
StreamSocket proxyConnect();
|
||||
/// Sends a CONNECT request to the proxy server and returns
|
||||
/// a StreamSocket for the resulting connection.
|
||||
|
||||
void proxyTunnel();
|
||||
/// Calls proxyConnect() and attaches the resulting StreamSocket
|
||||
/// to the HTTPClientSession.
|
||||
|
||||
private:
|
||||
std::string _host;
|
||||
Poco::UInt16 _port;
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
std::string _proxyPassword;
|
||||
Poco::Timespan _keepAliveTimeout;
|
||||
Poco::Timestamp _lastRequest;
|
||||
bool _reconnect;
|
||||
bool _mustReconnect;
|
||||
bool _expectResponseBody;
|
||||
std::ostream* _pRequestStream;
|
||||
std::istream* _pResponseStream;
|
||||
|
||||
HTTPClientSession(const HTTPClientSession&);
|
||||
HTTPClientSession& operator = (const HTTPClientSession&);
|
||||
|
||||
friend class WebSocket;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPClientSession::getHost() const
|
||||
{
|
||||
return _host;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt16 HTTPClientSession::getPort() const
|
||||
{
|
||||
return _port;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPClientSession::getProxyHost() const
|
||||
{
|
||||
return _proxyHost;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt16 HTTPClientSession::getProxyPort() const
|
||||
{
|
||||
return _proxyPort;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPClientSession::getProxyUsername() const
|
||||
{
|
||||
return _proxyUsername;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPClientSession::getProxyPassword() const
|
||||
{
|
||||
return _proxyPassword;
|
||||
}
|
||||
|
||||
|
||||
inline std::istream* HTTPClientSession::getResponseStream() const
|
||||
{
|
||||
return _pResponseStream;
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream* HTTPClientSession::getRequestStream() const
|
||||
{
|
||||
return _pRequestStream;
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPClientSession::setReconnect(bool recon)
|
||||
{
|
||||
_reconnect = recon;
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPClientSession::setExpectResponseBody(bool expect)
|
||||
{
|
||||
_expectResponseBody = expect;
|
||||
}
|
||||
|
||||
|
||||
inline bool HTTPClientSession::getExpectResponseBody() const
|
||||
{
|
||||
return _expectResponseBody;
|
||||
}
|
||||
|
||||
|
||||
inline const Poco::Timespan& HTTPClientSession::getKeepAliveTimeout() const
|
||||
{
|
||||
return _keepAliveTimeout;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPClientSession_INCLUDED
|
||||
279
Net/include/Poco/Net/HTTPCookie.h
Normal file
279
Net/include/Poco/Net/HTTPCookie.h
Normal file
@@ -0,0 +1,279 @@
|
||||
//
|
||||
// HTTPCookie.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPCookie.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPCookie
|
||||
//
|
||||
// Definition of the HTTPCookie class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPCookie_INCLUDED
|
||||
#define Net_HTTPCookie_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class NameValueCollection;
|
||||
|
||||
|
||||
class Net_API HTTPCookie
|
||||
/// This class represents a HTTP Cookie.
|
||||
///
|
||||
/// A cookie is a small amount of information sent by a Web
|
||||
/// server to a Web browser, saved by the browser, and later sent back
|
||||
/// to the server. A cookie's value can uniquely identify a client, so
|
||||
/// cookies are commonly used for session management.
|
||||
///
|
||||
/// A cookie has a name, a single value, and optional attributes such
|
||||
/// as a comment, path and domain qualifiers, a maximum age, and a
|
||||
/// version number.
|
||||
///
|
||||
/// This class supports both the Version 0 (by Netscape) and Version 1
|
||||
/// (by RFC 2109) cookie specifications. By default, cookies are created
|
||||
/// using Version 0 to ensure the best interoperability.
|
||||
{
|
||||
public:
|
||||
HTTPCookie();
|
||||
/// Creates an empty HTTPCookie.
|
||||
|
||||
explicit HTTPCookie(const std::string& name);
|
||||
/// Creates a cookie with the given name.
|
||||
/// The cookie never expires.
|
||||
|
||||
explicit HTTPCookie(const NameValueCollection& nvc);
|
||||
/// Creates a cookie from the given NameValueCollection.
|
||||
|
||||
HTTPCookie(const std::string& name, const std::string& value);
|
||||
/// Creates a cookie with the given name and value.
|
||||
/// The cookie never expires.
|
||||
///
|
||||
/// Note: If value contains whitespace or non-alphanumeric
|
||||
/// characters, the value should be escaped by calling escape()
|
||||
/// before passing it to the constructor.
|
||||
|
||||
HTTPCookie(const HTTPCookie& cookie);
|
||||
/// Creates the HTTPCookie by copying another one.
|
||||
|
||||
~HTTPCookie();
|
||||
/// Destroys the HTTPCookie.
|
||||
|
||||
HTTPCookie& operator = (const HTTPCookie& cookie);
|
||||
/// Assigns a cookie.
|
||||
|
||||
void setVersion(int version);
|
||||
/// Sets the version of the cookie.
|
||||
///
|
||||
/// Version must be either 0 (denoting a Netscape cookie)
|
||||
/// or 1 (denoting a RFC 2109 cookie).
|
||||
|
||||
int getVersion() const;
|
||||
/// Returns the version of the cookie, which is
|
||||
/// either 0 or 1.
|
||||
|
||||
void setName(const std::string& name);
|
||||
/// Sets the name of the cookie.
|
||||
|
||||
const std::string& getName() const;
|
||||
/// Returns the name of the cookie.
|
||||
|
||||
void setValue(const std::string& value);
|
||||
/// Sets the value of the cookie.
|
||||
///
|
||||
/// According to the cookie specification, the
|
||||
/// size of the value should not exceed 4 Kbytes.
|
||||
///
|
||||
/// Note: If value contains whitespace or non-alphanumeric
|
||||
/// characters, the value should be escaped by calling escape()
|
||||
/// prior to passing it to setName().
|
||||
|
||||
const std::string& getValue() const;
|
||||
/// Returns the value of the cookie.
|
||||
|
||||
void setComment(const std::string& comment);
|
||||
/// Sets the comment for the cookie.
|
||||
///
|
||||
/// Comments are only supported for version 1 cookies.
|
||||
|
||||
const std::string& getComment() const;
|
||||
/// Returns the comment for the cookie.
|
||||
|
||||
void setDomain(const std::string& domain);
|
||||
/// Sets the domain for the cookie.
|
||||
|
||||
const std::string& getDomain() const;
|
||||
/// Returns the domain for the cookie.
|
||||
|
||||
void setPath(const std::string& path);
|
||||
/// Sets the path for the cookie.
|
||||
|
||||
const std::string& getPath() const;
|
||||
/// Returns the path for the cookie.
|
||||
|
||||
void setSecure(bool secure);
|
||||
/// Sets the value of the secure flag for
|
||||
/// the cookie.
|
||||
|
||||
bool getSecure() const;
|
||||
/// Returns the value of the secure flag
|
||||
/// for the cookie.
|
||||
|
||||
void setMaxAge(int maxAge);
|
||||
/// Sets the maximum age in seconds for
|
||||
/// the cookie.
|
||||
///
|
||||
/// A value of -1 causes the cookie to
|
||||
/// never expire on the client.
|
||||
///
|
||||
/// A value of 0 deletes the cookie on
|
||||
/// the client.
|
||||
|
||||
int getMaxAge() const;
|
||||
/// Returns the maximum age in seconds for
|
||||
/// the cookie.
|
||||
|
||||
void setHttpOnly(bool flag = true);
|
||||
/// Sets the HttpOnly flag for the cookie.
|
||||
|
||||
bool getHttpOnly() const;
|
||||
/// Returns true iff the cookie's HttpOnly flag is set.
|
||||
|
||||
std::string toString() const;
|
||||
/// Returns a string representation of the cookie,
|
||||
/// suitable for use in a Set-Cookie header.
|
||||
|
||||
static std::string escape(const std::string& str);
|
||||
/// Escapes the given string by replacing all
|
||||
/// non-alphanumeric characters with escape
|
||||
/// sequences in the form %xx, where xx is the
|
||||
/// hexadecimal character code.
|
||||
///
|
||||
/// The following characters will be replaced
|
||||
/// with escape sequences:
|
||||
/// - percent sign %
|
||||
/// - less-than and greater-than < and >
|
||||
/// - curly brackets { and }
|
||||
/// - square brackets [ and ]
|
||||
/// - parenthesis ( and )
|
||||
/// - solidus /
|
||||
/// - vertical line |
|
||||
/// - reverse solidus (backslash /)
|
||||
/// - quotation mark "
|
||||
/// - apostrophe '
|
||||
/// - circumflex accent ^
|
||||
/// - grave accent `
|
||||
/// - comma and semicolon , and ;
|
||||
/// - whitespace and control characters
|
||||
|
||||
static std::string unescape(const std::string& str);
|
||||
/// Unescapes the given string by replacing all
|
||||
/// escape sequences in the form %xx with the
|
||||
/// respective characters.
|
||||
|
||||
private:
|
||||
int _version;
|
||||
std::string _name;
|
||||
std::string _value;
|
||||
std::string _comment;
|
||||
std::string _domain;
|
||||
std::string _path;
|
||||
bool _secure;
|
||||
int _maxAge;
|
||||
bool _httpOnly;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline int HTTPCookie::getVersion() const
|
||||
{
|
||||
return _version;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCookie::getName() const
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCookie::getValue() const
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCookie::getComment() const
|
||||
{
|
||||
return _comment;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCookie::getDomain() const
|
||||
{
|
||||
return _domain;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCookie::getPath() const
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
||||
|
||||
inline bool HTTPCookie::getSecure() const
|
||||
{
|
||||
return _secure;
|
||||
}
|
||||
|
||||
|
||||
inline int HTTPCookie::getMaxAge() const
|
||||
{
|
||||
return _maxAge;
|
||||
}
|
||||
|
||||
|
||||
inline bool HTTPCookie::getHttpOnly() const
|
||||
{
|
||||
return _httpOnly;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPCookie_INCLUDED
|
||||
213
Net/include/Poco/Net/HTTPCredentials.h
Normal file
213
Net/include/Poco/Net/HTTPCredentials.h
Normal file
@@ -0,0 +1,213 @@
|
||||
//
|
||||
// HTTPCredentials.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPCredentials.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPCredentials
|
||||
//
|
||||
// Definition of the HTTPCredentials class.
|
||||
//
|
||||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru).
|
||||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPCredentials_INCLUDED
|
||||
#define Net_HTTPCredentials_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/HTTPDigestCredentials.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
|
||||
|
||||
class URI;
|
||||
|
||||
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
class HTTPResponse;
|
||||
|
||||
|
||||
class Net_API HTTPCredentials
|
||||
/// This is a utility class for working with HTTP
|
||||
/// authentication (basic or digest) in HTTPRequest objects.
|
||||
///
|
||||
/// Usage is as follows:
|
||||
/// First, create a HTTPCredentials object containing
|
||||
/// the username and password.
|
||||
/// Poco::Net::HTTPCredentials creds("user", "s3cr3t");
|
||||
///
|
||||
/// Second, send the HTTP request with Poco::Net::HTTPClientSession.
|
||||
/// Poco::Net::HTTPClientSession session("pocoproject.org");
|
||||
/// Poco::Net::HTTPRequest request(HTTPRequest::HTTP_GET, "/index.html", HTTPMessage::HTTP_1_1);
|
||||
/// session.sendRequest(request);
|
||||
/// Poco::Net::HTTPResponse;
|
||||
/// std::istream& istr = session.receiveResponse(response);
|
||||
///
|
||||
/// If the server responds with a 401 status, authenticate the
|
||||
/// request and resend it:
|
||||
/// if (response.getStatus() == Poco::Net::HTTPResponse::HTTP_UNAUTHORIZED)
|
||||
/// {
|
||||
/// creds.authenticate(request, response);
|
||||
/// session.sendRequest(request);
|
||||
/// ...
|
||||
/// }
|
||||
///
|
||||
/// To perform multiple authenticated requests, call updateAuthInfo()
|
||||
/// instead of authenticate() on subsequent requests.
|
||||
/// creds.updateAuthInfo(request);
|
||||
/// session.sendRequest(request);
|
||||
/// ...
|
||||
///
|
||||
/// Note: Do not forget to read the entire response stream from the 401 response
|
||||
/// before sending the authenticated request, otherwise there may be
|
||||
/// problems if a persistent connection is used.
|
||||
{
|
||||
public:
|
||||
HTTPCredentials();
|
||||
/// Creates an empty HTTPCredentials object.
|
||||
|
||||
HTTPCredentials(const std::string& username, const std::string& password);
|
||||
/// Creates an HTTPCredentials object with the given username and password.
|
||||
|
||||
~HTTPCredentials();
|
||||
/// Destroys the HTTPCredentials.
|
||||
|
||||
void fromUserInfo(const std::string& userInfo);
|
||||
/// Parses username:password string and sets username and password of
|
||||
/// the credentials object.
|
||||
/// Throws SyntaxException on invalid user information.
|
||||
|
||||
void fromURI(const URI& uri);
|
||||
/// Extracts username and password from the given URI and sets username
|
||||
/// and password of the credentials object.
|
||||
/// Does nothing if URI has no user info part.
|
||||
|
||||
void setUsername(const std::string& username);
|
||||
/// Sets the username.
|
||||
|
||||
const std::string& getUsername() const;
|
||||
/// Returns the username.
|
||||
|
||||
void setPassword(const std::string& password);
|
||||
/// Sets the password.
|
||||
|
||||
const std::string& getPassword() const;
|
||||
/// Returns the password.
|
||||
|
||||
void authenticate(HTTPRequest& request, const HTTPResponse& response);
|
||||
/// Inspects WWW-Authenticate header of the response, initializes
|
||||
/// the internal state (in case of digest authentication) and
|
||||
/// adds required information to the given HTTPRequest.
|
||||
///
|
||||
/// Does nothing if there is no WWW-Authenticate header in the
|
||||
/// HTTPResponse.
|
||||
|
||||
void updateAuthInfo(HTTPRequest& request);
|
||||
/// Updates internal state (in case of digest authentication) and
|
||||
/// replaces authentication information in the request accordingly.
|
||||
|
||||
void proxyAuthenticate(HTTPRequest& request, const HTTPResponse& response);
|
||||
/// Inspects Proxy-Authenticate header of the response, initializes
|
||||
/// the internal state (in case of digest authentication) and
|
||||
/// adds required information to the given HTTPRequest.
|
||||
///
|
||||
/// Does nothing if there is no Proxy-Authenticate header in the
|
||||
/// HTTPResponse.
|
||||
|
||||
void updateProxyAuthInfo(HTTPRequest& request);
|
||||
/// Updates internal state (in case of digest authentication) and
|
||||
/// replaces proxy authentication information in the request accordingly.
|
||||
|
||||
static bool isBasicCredentials(const std::string& header);
|
||||
/// Returns true if authentication header is for Basic authentication.
|
||||
|
||||
static bool isDigestCredentials(const std::string& header);
|
||||
/// Returns true if authentication header is for Digest authentication.
|
||||
|
||||
static bool hasBasicCredentials(const HTTPRequest& request);
|
||||
/// Returns true if Authorization with Basic credentials header is present in the request.
|
||||
|
||||
static bool hasDigestCredentials(const HTTPRequest& request);
|
||||
/// Returns true if Authorization with Digest credentials header is present in the request.
|
||||
|
||||
static bool hasProxyBasicCredentials(const HTTPRequest& request);
|
||||
/// Returns true if Authorization with Basic credentials header is present in the request.
|
||||
|
||||
static bool hasProxyDigestCredentials(const HTTPRequest& request);
|
||||
/// Returns true if Authorization with Digest credentials header is present in the request.
|
||||
|
||||
static void extractCredentials(const std::string& userInfo, std::string& username, std::string& password);
|
||||
/// Extracts username and password from user:password information string.
|
||||
|
||||
static void extractCredentials(const Poco::URI& uri, std::string& username, std::string& password);
|
||||
/// Extracts username and password from the given URI (e.g.: "http://user:pass@sample.com/secret").
|
||||
|
||||
private:
|
||||
HTTPCredentials(const HTTPCredentials&);
|
||||
HTTPCredentials& operator = (const HTTPCredentials&);
|
||||
|
||||
HTTPDigestCredentials _digest;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void HTTPCredentials::setUsername(const std::string& username)
|
||||
{
|
||||
_digest.setUsername(username);
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCredentials::getUsername() const
|
||||
{
|
||||
return _digest.getUsername();
|
||||
}
|
||||
|
||||
|
||||
inline void HTTPCredentials::setPassword(const std::string& password)
|
||||
{
|
||||
_digest.setPassword(password);
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPCredentials::getPassword() const
|
||||
{
|
||||
return _digest.getPassword();
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPCredentials_INCLUDED
|
||||
192
Net/include/Poco/Net/HTTPDigestCredentials.h
Normal file
192
Net/include/Poco/Net/HTTPDigestCredentials.h
Normal file
@@ -0,0 +1,192 @@
|
||||
//
|
||||
// HTTPDigestCredentials.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPDigestCredentials.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPDigestCredentials
|
||||
//
|
||||
// Definition of the HTTPDigestCredentials class.
|
||||
//
|
||||
// Copyright (c) 2011, Anton V. Yabchinskiy (arn at bestmx dot ru).
|
||||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPDigestCredentials_INCLUDED
|
||||
#define Net_HTTPDigestCredentials_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/HTTPAuthenticationParams.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPRequest;
|
||||
class HTTPResponse;
|
||||
|
||||
|
||||
class Net_API HTTPDigestCredentials
|
||||
/// This is a utility class for working with
|
||||
/// HTTP Digest Authentication in HTTPRequest
|
||||
/// objects.
|
||||
///
|
||||
/// Note: currently, no qop or qop=auth is
|
||||
/// supported only.
|
||||
{
|
||||
public:
|
||||
HTTPDigestCredentials();
|
||||
/// Creates an empty HTTPDigestCredentials object.
|
||||
|
||||
HTTPDigestCredentials(const std::string& username, const std::string& password);
|
||||
/// Creates a HTTPDigestCredentials object with the given username and password.
|
||||
|
||||
~HTTPDigestCredentials();
|
||||
/// Destroys the HTTPDigestCredentials.
|
||||
|
||||
void setUsername(const std::string& username);
|
||||
/// Sets the username.
|
||||
|
||||
const std::string& getUsername() const;
|
||||
/// Returns the username.
|
||||
|
||||
void setPassword(const std::string& password);
|
||||
/// Sets the password.
|
||||
|
||||
const std::string& getPassword() const;
|
||||
/// Returns the password.
|
||||
|
||||
void authenticate(HTTPRequest& request, const HTTPResponse& response);
|
||||
/// Parses WWW-Authenticate header of the HTTPResponse, initializes
|
||||
/// internal state, and adds authentication information to the given HTTPRequest.
|
||||
|
||||
void authenticate(HTTPRequest& request, const HTTPAuthenticationParams& responseAuthParams);
|
||||
/// Initializes internal state according to information from the
|
||||
/// HTTPAuthenticationParams of the response, and adds authentication
|
||||
/// information to the given HTTPRequest.
|
||||
///
|
||||
/// Throws InvalidArgumentException if HTTPAuthenticationParams is
|
||||
/// invalid or some required parameter is missing.
|
||||
/// Throws NotImplementedException in case of unsupported digest
|
||||
/// algorithm or quality of protection method.
|
||||
|
||||
void updateAuthInfo(HTTPRequest& request);
|
||||
/// Updates internal state and adds authentication information to
|
||||
/// the given HTTPRequest.
|
||||
|
||||
void proxyAuthenticate(HTTPRequest& request, const HTTPResponse& response);
|
||||
/// Parses Proxy-Authenticate header of the HTTPResponse, initializes
|
||||
/// internal state, and adds proxy authentication information to the given HTTPRequest.
|
||||
|
||||
void proxyAuthenticate(HTTPRequest& request, const HTTPAuthenticationParams& responseAuthParams);
|
||||
/// Initializes internal state according to information from the
|
||||
/// HTTPAuthenticationParams of the response, and adds proxy authentication
|
||||
/// information to the given HTTPRequest.
|
||||
///
|
||||
/// Throws InvalidArgumentException if HTTPAuthenticationParams is
|
||||
/// invalid or some required parameter is missing.
|
||||
/// Throws NotImplementedException in case of unsupported digest
|
||||
/// algorithm or quality of protection method.
|
||||
|
||||
void updateProxyAuthInfo(HTTPRequest& request);
|
||||
/// Updates internal state and adds proxy authentication information to
|
||||
/// the given HTTPRequest.
|
||||
|
||||
bool verifyAuthInfo(const HTTPRequest& request) const;
|
||||
/// Verifies the digest authentication information in the given HTTPRequest
|
||||
/// by recomputing the response and comparing it with what's in the request.
|
||||
///
|
||||
/// Note: This method creates a HTTPAuthenticationParams object from the request
|
||||
/// and calls verifyAuthParams() with request and params.
|
||||
|
||||
bool verifyAuthParams(const HTTPRequest& request, const HTTPAuthenticationParams& params) const;
|
||||
/// Verifies the digest authentication information in the given HTTPRequest
|
||||
/// and HTTPAuthenticationParams by recomputing the response and comparing
|
||||
/// it with what's in the request.
|
||||
|
||||
static std::string createNonce();
|
||||
/// Creates a random nonce string.
|
||||
|
||||
static const std::string SCHEME;
|
||||
|
||||
private:
|
||||
HTTPDigestCredentials(const HTTPDigestCredentials&);
|
||||
HTTPDigestCredentials& operator = (const HTTPDigestCredentials&);
|
||||
|
||||
void createAuthParams(const HTTPRequest& request, const HTTPAuthenticationParams& responseAuthParams);
|
||||
void updateAuthParams(const HTTPRequest& request);
|
||||
int updateNonceCounter(const std::string& nonce);
|
||||
|
||||
static const std::string DEFAULT_ALGORITHM;
|
||||
static const std::string DEFAULT_QOP;
|
||||
static const std::string NONCE_PARAM;
|
||||
static const std::string REALM_PARAM;
|
||||
static const std::string QOP_PARAM;
|
||||
static const std::string ALGORITHM_PARAM;
|
||||
static const std::string USERNAME_PARAM;
|
||||
static const std::string OPAQUE_PARAM;
|
||||
static const std::string URI_PARAM;
|
||||
static const std::string RESPONSE_PARAM;
|
||||
static const std::string AUTH_PARAM;
|
||||
static const std::string CNONCE_PARAM;
|
||||
static const std::string NC_PARAM;
|
||||
|
||||
typedef std::map<std::string, int> NonceCounterMap;
|
||||
|
||||
std::string _username;
|
||||
std::string _password;
|
||||
HTTPAuthenticationParams _requestAuthParams;
|
||||
NonceCounterMap _nc;
|
||||
|
||||
static int _nonceCounter;
|
||||
static Poco::FastMutex _nonceMutex;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPDigestCredentials::getUsername() const
|
||||
{
|
||||
return _username;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPDigestCredentials::getPassword() const
|
||||
{
|
||||
return _password;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPDigestCredentials_INCLUDED
|
||||
126
Net/include/Poco/Net/HTTPFixedLengthStream.h
Normal file
126
Net/include/Poco/Net/HTTPFixedLengthStream.h
Normal file
@@ -0,0 +1,126 @@
|
||||
//
|
||||
// HTTPFixedLengthStream.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPFixedLengthStream.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPFixedLengthStream
|
||||
//
|
||||
// Definition of the HTTPFixedLengthStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPFixedLengthStream_INCLUDED
|
||||
#define Net_HTTPFixedLengthStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPBasicStreamBuf.h"
|
||||
#include <cstddef>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPSession;
|
||||
|
||||
|
||||
class Net_API HTTPFixedLengthStreamBuf: public HTTPBasicStreamBuf
|
||||
/// This is the streambuf class used for reading and writing fixed-size
|
||||
/// HTTP message bodies.
|
||||
///
|
||||
/// At most a given number of bytes are read or written.
|
||||
{
|
||||
public:
|
||||
typedef HTTPBasicStreamBuf::openmode openmode;
|
||||
|
||||
HTTPFixedLengthStreamBuf(HTTPSession& session, std::streamsize length, openmode mode);
|
||||
~HTTPFixedLengthStreamBuf();
|
||||
|
||||
protected:
|
||||
int readFromDevice(char* buffer, std::streamsize length);
|
||||
int writeToDevice(const char* buffer, std::streamsize length);
|
||||
|
||||
private:
|
||||
HTTPSession& _session;
|
||||
std::streamsize _length;
|
||||
std::streamsize _count;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPFixedLengthIOS: public virtual std::ios
|
||||
/// The base class for HTTPFixedLengthInputStream.
|
||||
{
|
||||
public:
|
||||
HTTPFixedLengthIOS(HTTPSession& session, std::streamsize length, HTTPFixedLengthStreamBuf::openmode mode);
|
||||
~HTTPFixedLengthIOS();
|
||||
HTTPFixedLengthStreamBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
HTTPFixedLengthStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPFixedLengthInputStream: public HTTPFixedLengthIOS, public std::istream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPFixedLengthInputStream(HTTPSession& session, std::streamsize length);
|
||||
~HTTPFixedLengthInputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPFixedLengthOutputStream: public HTTPFixedLengthIOS, public std::ostream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPFixedLengthOutputStream(HTTPSession& session, std::streamsize length);
|
||||
~HTTPFixedLengthOutputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPFixedLengthStream_INCLUDED
|
||||
124
Net/include/Poco/Net/HTTPHeaderStream.h
Normal file
124
Net/include/Poco/Net/HTTPHeaderStream.h
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// HTTPHeaderStream.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPHeaderStream.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPHeaderStream
|
||||
//
|
||||
// Definition of the HTTPHeaderStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPHeaderStream_INCLUDED
|
||||
#define Net_HTTPHeaderStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPBasicStreamBuf.h"
|
||||
#include "Poco/MemoryPool.h"
|
||||
#include <cstddef>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPSession;
|
||||
|
||||
|
||||
class Net_API HTTPHeaderStreamBuf: public HTTPBasicStreamBuf
|
||||
/// This is the streambuf class used for reading from a HTTP header
|
||||
/// in a HTTPSession.
|
||||
{
|
||||
public:
|
||||
typedef HTTPBasicStreamBuf::openmode openmode;
|
||||
|
||||
HTTPHeaderStreamBuf(HTTPSession& session, openmode mode);
|
||||
~HTTPHeaderStreamBuf();
|
||||
|
||||
protected:
|
||||
int readFromDevice(char* buffer, std::streamsize length);
|
||||
int writeToDevice(const char* buffer, std::streamsize length);
|
||||
|
||||
private:
|
||||
HTTPSession& _session;
|
||||
bool _end;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPHeaderIOS: public virtual std::ios
|
||||
/// The base class for HTTPHeaderInputStream.
|
||||
{
|
||||
public:
|
||||
HTTPHeaderIOS(HTTPSession& session, HTTPHeaderStreamBuf::openmode mode);
|
||||
~HTTPHeaderIOS();
|
||||
HTTPHeaderStreamBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
HTTPHeaderStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPHeaderInputStream: public HTTPHeaderIOS, public std::istream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPHeaderInputStream(HTTPSession& session);
|
||||
~HTTPHeaderInputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPHeaderOutputStream: public HTTPHeaderIOS, public std::ostream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPHeaderOutputStream(HTTPSession& session);
|
||||
~HTTPHeaderOutputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPHeaderStream_INCLUDED
|
||||
110
Net/include/Poco/Net/HTTPIOStream.h
Normal file
110
Net/include/Poco/Net/HTTPIOStream.h
Normal file
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// HTTPIOStream.h
|
||||
//
|
||||
// $Id: //poco/Main/template/class.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPIOStream
|
||||
//
|
||||
// Definition of the HTTPIOStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPIOStream_INCLUDED
|
||||
#define Net_HTTPIOStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPResponse.h"
|
||||
#include "Poco/UnbufferedStreamBuf.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPClientSession;
|
||||
|
||||
|
||||
class Net_API HTTPResponseStreamBuf: public Poco::UnbufferedStreamBuf
|
||||
{
|
||||
public:
|
||||
HTTPResponseStreamBuf(std::istream& istr);
|
||||
|
||||
~HTTPResponseStreamBuf();
|
||||
|
||||
private:
|
||||
int readFromDevice();
|
||||
|
||||
std::istream& _istr;
|
||||
};
|
||||
|
||||
|
||||
inline int HTTPResponseStreamBuf::readFromDevice()
|
||||
{
|
||||
return _istr.get();
|
||||
}
|
||||
|
||||
|
||||
class Net_API HTTPResponseIOS: public virtual std::ios
|
||||
{
|
||||
public:
|
||||
HTTPResponseIOS(std::istream& istr);
|
||||
|
||||
~HTTPResponseIOS();
|
||||
|
||||
HTTPResponseStreamBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
HTTPResponseStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
inline HTTPResponseStreamBuf* HTTPResponseIOS::rdbuf()
|
||||
{
|
||||
return &_buf;
|
||||
}
|
||||
|
||||
|
||||
class Net_API HTTPResponseStream: public HTTPResponseIOS, public std::istream
|
||||
{
|
||||
public:
|
||||
HTTPResponseStream(std::istream& istr, HTTPClientSession* pSession);
|
||||
|
||||
~HTTPResponseStream();
|
||||
|
||||
private:
|
||||
HTTPClientSession* _pSession;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPIOStream_INCLUDED
|
||||
198
Net/include/Poco/Net/HTTPMessage.h
Normal file
198
Net/include/Poco/Net/HTTPMessage.h
Normal file
@@ -0,0 +1,198 @@
|
||||
//
|
||||
// HTTPMessage.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPMessage.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPMessage
|
||||
//
|
||||
// Definition of the HTTPMessage class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPMessage_INCLUDED
|
||||
#define Net_HTTPMessage_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/MessageHeader.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MediaType;
|
||||
|
||||
|
||||
class Net_API HTTPMessage: public MessageHeader
|
||||
/// The base class for HTTPRequest and HTTPResponse.
|
||||
///
|
||||
/// Defines the common properties of all HTTP messages.
|
||||
/// These are version, content length, content type
|
||||
/// and transfer encoding.
|
||||
{
|
||||
public:
|
||||
void setVersion(const std::string& version);
|
||||
/// Sets the HTTP version for this message.
|
||||
|
||||
const std::string& getVersion() const;
|
||||
/// Returns the HTTP version for this message.
|
||||
|
||||
void setContentLength(std::streamsize length);
|
||||
/// Sets the Content-Length header.
|
||||
///
|
||||
/// If length is UNKNOWN_CONTENT_LENGTH, removes
|
||||
/// the Content-Length header.
|
||||
|
||||
std::streamsize getContentLength() const;
|
||||
/// Returns the content length for this message,
|
||||
/// which may be UNKNOWN_CONTENT_LENGTH if
|
||||
/// no Content-Length header is present.
|
||||
|
||||
#if defined(POCO_HAVE_INT64)
|
||||
void setContentLength64(Poco::Int64 length);
|
||||
/// Sets the Content-Length header.
|
||||
///
|
||||
/// If length is UNKNOWN_CONTENT_LENGTH, removes
|
||||
/// the Content-Length header.
|
||||
///
|
||||
/// In contrast to setContentLength(), this method takes
|
||||
/// a 64-bit integer as content length.
|
||||
|
||||
Poco::Int64 getContentLength64() const;
|
||||
/// Returns the content length for this message,
|
||||
/// which may be UNKNOWN_CONTENT_LENGTH if
|
||||
/// no Content-Length header is present.
|
||||
///
|
||||
/// In contrast to getContentLength(), this method
|
||||
/// always returns a 64-bit integer for content length.
|
||||
#endif // defined(POCO_HAVE_INT64)
|
||||
|
||||
void setTransferEncoding(const std::string& transferEncoding);
|
||||
/// Sets the transfer encoding for this message.
|
||||
///
|
||||
/// The value should be either IDENTITY_TRANSFER_CODING
|
||||
/// or CHUNKED_TRANSFER_CODING.
|
||||
|
||||
const std::string& getTransferEncoding() const;
|
||||
/// Returns the transfer encoding used for this
|
||||
/// message.
|
||||
///
|
||||
/// Normally, this is the value of the Transfer-Encoding
|
||||
/// header field. If no such field is present,
|
||||
/// returns IDENTITY_TRANSFER_CODING.
|
||||
|
||||
void setChunkedTransferEncoding(bool flag);
|
||||
/// If flag is true, sets the Transfer-Encoding header to
|
||||
/// chunked. Otherwise, removes the Transfer-Encoding
|
||||
/// header.
|
||||
|
||||
bool getChunkedTransferEncoding() const;
|
||||
/// Returns true if the Transfer-Encoding header is set
|
||||
/// and its value is chunked.
|
||||
|
||||
void setContentType(const std::string& mediaType);
|
||||
/// Sets the content type for this message.
|
||||
///
|
||||
/// Specify NO_CONTENT_TYPE to remove the
|
||||
/// Content-Type header.
|
||||
|
||||
void setContentType(const MediaType& mediaType);
|
||||
/// Sets the content type for this message.
|
||||
|
||||
const std::string& getContentType() const;
|
||||
/// Returns the content type for this message.
|
||||
///
|
||||
/// If no Content-Type header is present,
|
||||
/// returns UNKNOWN_CONTENT_TYPE.
|
||||
|
||||
void setKeepAlive(bool keepAlive);
|
||||
/// Sets the value of the Connection header field.
|
||||
///
|
||||
/// The value is set to "Keep-Alive" if keepAlive is
|
||||
/// true, or to "Close" otherwise.
|
||||
|
||||
bool getKeepAlive() const;
|
||||
/// Returns true if
|
||||
/// * the message has a Connection header field and its value is "Keep-Alive"
|
||||
/// * the message is a HTTP/1.1 message and not Connection header is set
|
||||
/// Returns false otherwise.
|
||||
|
||||
static const std::string HTTP_1_0;
|
||||
static const std::string HTTP_1_1;
|
||||
|
||||
static const std::string IDENTITY_TRANSFER_ENCODING;
|
||||
static const std::string CHUNKED_TRANSFER_ENCODING;
|
||||
|
||||
static const int UNKNOWN_CONTENT_LENGTH;
|
||||
static const std::string UNKNOWN_CONTENT_TYPE;
|
||||
|
||||
static const std::string CONTENT_LENGTH;
|
||||
static const std::string CONTENT_TYPE;
|
||||
static const std::string TRANSFER_ENCODING;
|
||||
static const std::string CONNECTION;
|
||||
|
||||
static const std::string CONNECTION_KEEP_ALIVE;
|
||||
static const std::string CONNECTION_CLOSE;
|
||||
|
||||
static const std::string EMPTY;
|
||||
|
||||
protected:
|
||||
HTTPMessage();
|
||||
/// Creates the HTTPMessage with version HTTP/1.0.
|
||||
|
||||
HTTPMessage(const std::string& version);
|
||||
/// Creates the HTTPMessage and sets
|
||||
/// the version.
|
||||
|
||||
virtual ~HTTPMessage();
|
||||
/// Destroys the HTTPMessage.
|
||||
|
||||
private:
|
||||
HTTPMessage(const HTTPMessage&);
|
||||
HTTPMessage& operator = (const HTTPMessage&);
|
||||
|
||||
std::string _version;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPMessage::getVersion() const
|
||||
{
|
||||
return _version;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPMessage_INCLUDED
|
||||
211
Net/include/Poco/Net/HTTPRequest.h
Normal file
211
Net/include/Poco/Net/HTTPRequest.h
Normal file
@@ -0,0 +1,211 @@
|
||||
//
|
||||
// HTTPRequest.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPRequest.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPRequest
|
||||
//
|
||||
// Definition of the HTTPRequest class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPRequest_INCLUDED
|
||||
#define Net_HTTPRequest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPMessage.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPRequest: public HTTPMessage
|
||||
/// This class encapsulates an HTTP request
|
||||
/// message.
|
||||
///
|
||||
/// In addition to the properties common to
|
||||
/// all HTTP messages, a HTTP request has
|
||||
/// a method (e.g. GET, HEAD, POST, etc.) and
|
||||
/// a request URI.
|
||||
{
|
||||
public:
|
||||
HTTPRequest();
|
||||
/// Creates a GET / HTTP/1.0 HTTP request.
|
||||
|
||||
HTTPRequest(const std::string& version);
|
||||
/// Creates a GET / HTTP/1.x request with
|
||||
/// the given version (HTTP/1.0 or HTTP/1.1).
|
||||
|
||||
HTTPRequest(const std::string& method, const std::string& uri);
|
||||
/// Creates a HTTP/1.0 request with the given method and URI.
|
||||
|
||||
HTTPRequest(const std::string& method, const std::string& uri, const std::string& version);
|
||||
/// Creates a HTTP request with the given method, URI and version.
|
||||
|
||||
virtual ~HTTPRequest();
|
||||
/// Destroys the HTTPRequest.
|
||||
|
||||
void setMethod(const std::string& method);
|
||||
/// Sets the method.
|
||||
|
||||
const std::string& getMethod() const;
|
||||
/// Returns the method.
|
||||
|
||||
void setURI(const std::string& uri);
|
||||
/// Sets the request URI.
|
||||
|
||||
const std::string& getURI() const;
|
||||
/// Returns the request URI.
|
||||
|
||||
void setHost(const std::string& host);
|
||||
/// Sets the value of the Host header field.
|
||||
|
||||
void setHost(const std::string& host, Poco::UInt16 port);
|
||||
/// Sets the value of the Host header field.
|
||||
///
|
||||
/// If the given port number is a non-standard
|
||||
/// port number (other than 80 or 443), it is
|
||||
/// included in the Host header field.
|
||||
|
||||
const std::string& getHost() const;
|
||||
/// Returns the value of the Host header field.
|
||||
///
|
||||
/// Throws a NotFoundException if the request
|
||||
/// does not have a Host header field.
|
||||
|
||||
void setCookies(const NameValueCollection& cookies);
|
||||
/// Adds a Cookie header with the names and
|
||||
/// values from cookies.
|
||||
|
||||
void getCookies(NameValueCollection& cookies) const;
|
||||
/// Fills cookies with the cookies extracted
|
||||
/// from the Cookie headers in the request.
|
||||
|
||||
bool hasCredentials() const;
|
||||
/// Returns true iff the request contains authentication
|
||||
/// information in the form of an Authorization header.
|
||||
|
||||
void getCredentials(std::string& scheme, std::string& authInfo) const;
|
||||
/// Returns the authentication scheme and additional authentication
|
||||
/// information contained in this request.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if no authentication information
|
||||
/// is contained in the request.
|
||||
|
||||
void setCredentials(const std::string& scheme, const std::string& authInfo);
|
||||
/// Sets the authentication scheme and information for
|
||||
/// this request.
|
||||
|
||||
bool hasProxyCredentials() const;
|
||||
/// Returns true iff the request contains proxy authentication
|
||||
/// information in the form of an Proxy-Authorization header.
|
||||
|
||||
void getProxyCredentials(std::string& scheme, std::string& authInfo) const;
|
||||
/// Returns the proxy authentication scheme and additional proxy authentication
|
||||
/// information contained in this request.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if no proxy authentication information
|
||||
/// is contained in the request.
|
||||
|
||||
void setProxyCredentials(const std::string& scheme, const std::string& authInfo);
|
||||
/// Sets the proxy authentication scheme and information for
|
||||
/// this request.
|
||||
|
||||
void write(std::ostream& ostr) const;
|
||||
/// Writes the HTTP request to the given
|
||||
/// output stream.
|
||||
|
||||
void read(std::istream& istr);
|
||||
/// Reads the HTTP request from the
|
||||
/// given input stream.
|
||||
|
||||
static const std::string HTTP_GET;
|
||||
static const std::string HTTP_HEAD;
|
||||
static const std::string HTTP_PUT;
|
||||
static const std::string HTTP_POST;
|
||||
static const std::string HTTP_OPTIONS;
|
||||
static const std::string HTTP_DELETE;
|
||||
static const std::string HTTP_TRACE;
|
||||
static const std::string HTTP_CONNECT;
|
||||
|
||||
static const std::string HOST;
|
||||
static const std::string COOKIE;
|
||||
static const std::string AUTHORIZATION;
|
||||
static const std::string PROXY_AUTHORIZATION;
|
||||
|
||||
protected:
|
||||
void getCredentials(const std::string& header, std::string& scheme, std::string& authInfo) const;
|
||||
/// Returns the authentication scheme and additional authentication
|
||||
/// information contained in the given header of request.
|
||||
///
|
||||
/// Throws a NotAuthenticatedException if no authentication information
|
||||
/// is contained in the request.
|
||||
|
||||
void setCredentials(const std::string& header, const std::string& scheme, const std::string& authInfo);
|
||||
/// Writes the authentication scheme and information for
|
||||
/// this request to the given header.
|
||||
|
||||
private:
|
||||
enum Limits
|
||||
{
|
||||
MAX_METHOD_LENGTH = 32,
|
||||
MAX_URI_LENGTH = 4096,
|
||||
MAX_VERSION_LENGTH = 8
|
||||
};
|
||||
|
||||
std::string _method;
|
||||
std::string _uri;
|
||||
|
||||
HTTPRequest(const HTTPRequest&);
|
||||
HTTPRequest& operator = (const HTTPRequest&);
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPRequest::getMethod() const
|
||||
{
|
||||
return _method;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPRequest::getURI() const
|
||||
{
|
||||
return _uri;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPRequest_INCLUDED
|
||||
89
Net/include/Poco/Net/HTTPRequestHandler.h
Normal file
89
Net/include/Poco/Net/HTTPRequestHandler.h
Normal file
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// HTTPRequestHandler.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPRequestHandler.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPRequestHandler
|
||||
//
|
||||
// Definition of the HTTPRequestHandler class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPRequestHandler_INCLUDED
|
||||
#define Net_HTTPRequestHandler_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerRequest;
|
||||
class HTTPServerResponse;
|
||||
|
||||
|
||||
class Net_API HTTPRequestHandler
|
||||
/// The abstract base class for HTTPRequestHandlers
|
||||
/// created by HTTPServer.
|
||||
///
|
||||
/// Derived classes must override the handleRequest() method.
|
||||
/// Furthermore, a HTTPRequestHandlerFactory must be provided.
|
||||
///
|
||||
/// The handleRequest() method must perform the complete handling
|
||||
/// of the HTTP request connection. As soon as the handleRequest()
|
||||
/// method returns, the request handler object is destroyed.
|
||||
///
|
||||
/// A new HTTPRequestHandler object will be created for
|
||||
/// each new HTTP request that is received by the HTTPServer.
|
||||
{
|
||||
public:
|
||||
HTTPRequestHandler();
|
||||
/// Creates the HTTPRequestHandler.
|
||||
|
||||
virtual ~HTTPRequestHandler();
|
||||
/// Destroys the HTTPRequestHandler.
|
||||
|
||||
virtual void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response) = 0;
|
||||
/// Must be overridden by subclasses.
|
||||
///
|
||||
/// Handles the given request.
|
||||
|
||||
private:
|
||||
HTTPRequestHandler(const HTTPRequestHandler&);
|
||||
HTTPRequestHandler& operator = (const HTTPRequestHandler&);
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPRequestHandler_INCLUDED
|
||||
84
Net/include/Poco/Net/HTTPRequestHandlerFactory.h
Normal file
84
Net/include/Poco/Net/HTTPRequestHandlerFactory.h
Normal file
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// HTTPRequestHandlerFactory.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPRequestHandlerFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPRequestHandlerFactory
|
||||
//
|
||||
// Definition of the HTTPRequestHandlerFactory class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPRequestHandlerFactory_INCLUDED
|
||||
#define Net_HTTPRequestHandlerFactory_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerRequest;
|
||||
class HTTPServerResponse;
|
||||
class HTTPRequestHandler;
|
||||
|
||||
|
||||
class Net_API HTTPRequestHandlerFactory
|
||||
/// A factory for HTTPRequestHandler objects.
|
||||
/// Subclasses must override the createRequestHandler()
|
||||
/// method.
|
||||
{
|
||||
public:
|
||||
typedef Poco::SharedPtr<HTTPRequestHandlerFactory> Ptr;
|
||||
|
||||
HTTPRequestHandlerFactory();
|
||||
/// Creates the HTTPRequestHandlerFactory.
|
||||
|
||||
virtual ~HTTPRequestHandlerFactory();
|
||||
/// Destroys the HTTPRequestHandlerFactory.
|
||||
|
||||
virtual HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request) = 0;
|
||||
/// Must be overridden by sublasses.
|
||||
///
|
||||
/// Creates a new request handler for the given HTTP request.
|
||||
|
||||
private:
|
||||
HTTPRequestHandlerFactory(const HTTPRequestHandlerFactory&);
|
||||
HTTPRequestHandlerFactory& operator = (const HTTPRequestHandlerFactory&);
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPRequestHandlerFactory_INCLUDED
|
||||
271
Net/include/Poco/Net/HTTPResponse.h
Normal file
271
Net/include/Poco/Net/HTTPResponse.h
Normal file
@@ -0,0 +1,271 @@
|
||||
//
|
||||
// HTTPResponse.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPResponse.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPResponse
|
||||
//
|
||||
// Definition of the HTTPResponse class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPResponse_INCLUDED
|
||||
#define Net_HTTPResponse_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPMessage.h"
|
||||
#include "Poco/Net/HTTPCookie.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPCookie;
|
||||
|
||||
|
||||
class Net_API HTTPResponse: public HTTPMessage
|
||||
/// This class encapsulates an HTTP response
|
||||
/// message.
|
||||
///
|
||||
/// In addition to the properties common to
|
||||
/// all HTTP messages, a HTTP response has
|
||||
/// status code and a reason phrase.
|
||||
{
|
||||
public:
|
||||
enum HTTPStatus
|
||||
{
|
||||
HTTP_CONTINUE = 100,
|
||||
HTTP_SWITCHING_PROTOCOLS = 101,
|
||||
HTTP_OK = 200,
|
||||
HTTP_CREATED = 201,
|
||||
HTTP_ACCEPTED = 202,
|
||||
HTTP_NONAUTHORITATIVE = 203,
|
||||
HTTP_NO_CONTENT = 204,
|
||||
HTTP_RESET_CONTENT = 205,
|
||||
HTTP_PARTIAL_CONTENT = 206,
|
||||
HTTP_MULTIPLE_CHOICES = 300,
|
||||
HTTP_MOVED_PERMANENTLY = 301,
|
||||
HTTP_FOUND = 302,
|
||||
HTTP_SEE_OTHER = 303,
|
||||
HTTP_NOT_MODIFIED = 304,
|
||||
HTTP_USEPROXY = 305,
|
||||
// UNUSED: 306
|
||||
HTTP_TEMPORARY_REDIRECT = 307,
|
||||
HTTP_BAD_REQUEST = 400,
|
||||
HTTP_UNAUTHORIZED = 401,
|
||||
HTTP_PAYMENT_REQUIRED = 402,
|
||||
HTTP_FORBIDDEN = 403,
|
||||
HTTP_NOT_FOUND = 404,
|
||||
HTTP_METHOD_NOT_ALLOWED = 405,
|
||||
HTTP_NOT_ACCEPTABLE = 406,
|
||||
HTTP_PROXY_AUTHENTICATION_REQUIRED = 407,
|
||||
HTTP_REQUEST_TIMEOUT = 408,
|
||||
HTTP_CONFLICT = 409,
|
||||
HTTP_GONE = 410,
|
||||
HTTP_LENGTH_REQUIRED = 411,
|
||||
HTTP_PRECONDITION_FAILED = 412,
|
||||
HTTP_REQUESTENTITYTOOLARGE = 413,
|
||||
HTTP_REQUESTURITOOLONG = 414,
|
||||
HTTP_UNSUPPORTEDMEDIATYPE = 415,
|
||||
HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416,
|
||||
HTTP_EXPECTATION_FAILED = 417,
|
||||
HTTP_INTERNAL_SERVER_ERROR = 500,
|
||||
HTTP_NOT_IMPLEMENTED = 501,
|
||||
HTTP_BAD_GATEWAY = 502,
|
||||
HTTP_SERVICE_UNAVAILABLE = 503,
|
||||
HTTP_GATEWAY_TIMEOUT = 504,
|
||||
HTTP_VERSION_NOT_SUPPORTED = 505
|
||||
};
|
||||
|
||||
HTTPResponse();
|
||||
/// Creates the HTTPResponse with OK status.
|
||||
|
||||
HTTPResponse(HTTPStatus status, const std::string& reason);
|
||||
/// Creates the HTTPResponse with the given status
|
||||
/// and reason phrase.
|
||||
|
||||
HTTPResponse(const std::string& version, HTTPStatus status, const std::string& reason);
|
||||
/// Creates the HTTPResponse with the given version, status
|
||||
/// and reason phrase.
|
||||
|
||||
HTTPResponse(HTTPStatus status);
|
||||
/// Creates the HTTPResponse with the given status
|
||||
/// an an appropriate reason phrase.
|
||||
|
||||
HTTPResponse(const std::string& version, HTTPStatus status);
|
||||
/// Creates the HTTPResponse with the given version, status
|
||||
/// an an appropriate reason phrase.
|
||||
|
||||
virtual ~HTTPResponse();
|
||||
/// Destroys the HTTPResponse.
|
||||
|
||||
void setStatus(HTTPStatus status);
|
||||
/// Sets the HTTP status code.
|
||||
///
|
||||
/// Does not change the reason phrase.
|
||||
|
||||
HTTPStatus getStatus() const;
|
||||
/// Returns the HTTP status code.
|
||||
|
||||
void setStatus(const std::string& status);
|
||||
/// Sets the HTTP status code.
|
||||
///
|
||||
/// The string must contain a valid
|
||||
/// HTTP numerical status code.
|
||||
|
||||
void setReason(const std::string& reason);
|
||||
/// Sets the HTTP reason phrase.
|
||||
|
||||
const std::string& getReason() const;
|
||||
/// Returns the HTTP reason phrase.
|
||||
|
||||
void setStatusAndReason(HTTPStatus status, const std::string& reason);
|
||||
/// Sets the HTTP status code and reason phrase.
|
||||
|
||||
void setStatusAndReason(HTTPStatus status);
|
||||
/// Sets the HTTP status code and reason phrase.
|
||||
///
|
||||
/// The reason phrase is set according to the status code.
|
||||
|
||||
void setDate(const Poco::Timestamp& dateTime);
|
||||
/// Sets the Date header to the given date/time value.
|
||||
|
||||
Poco::Timestamp getDate() const;
|
||||
/// Returns the value of the Date header.
|
||||
|
||||
void addCookie(const HTTPCookie& cookie);
|
||||
/// Adds the cookie to the response by
|
||||
/// adding a Set-Cookie header.
|
||||
|
||||
void getCookies(std::vector<HTTPCookie>& cookies) const;
|
||||
/// Returns a vector with all the cookies
|
||||
/// set in the response header.
|
||||
///
|
||||
/// May throw an exception in case of a malformed
|
||||
/// Set-Cookie header.
|
||||
|
||||
void write(std::ostream& ostr) const;
|
||||
/// Writes the HTTP response to the given
|
||||
/// output stream.
|
||||
|
||||
void read(std::istream& istr);
|
||||
/// Reads the HTTP response from the
|
||||
/// given input stream.
|
||||
///
|
||||
/// 100 Continue responses are ignored.
|
||||
|
||||
static const std::string& getReasonForStatus(HTTPStatus status);
|
||||
/// Returns an appropriate reason phrase
|
||||
/// for the given status code.
|
||||
|
||||
static const std::string HTTP_REASON_CONTINUE;
|
||||
static const std::string HTTP_REASON_SWITCHING_PROTOCOLS;
|
||||
static const std::string HTTP_REASON_OK;
|
||||
static const std::string HTTP_REASON_CREATED;
|
||||
static const std::string HTTP_REASON_ACCEPTED;
|
||||
static const std::string HTTP_REASON_NONAUTHORITATIVE;
|
||||
static const std::string HTTP_REASON_NO_CONTENT;
|
||||
static const std::string HTTP_REASON_RESET_CONTENT;
|
||||
static const std::string HTTP_REASON_PARTIAL_CONTENT;
|
||||
static const std::string HTTP_REASON_MULTIPLE_CHOICES;
|
||||
static const std::string HTTP_REASON_MOVED_PERMANENTLY;
|
||||
static const std::string HTTP_REASON_FOUND;
|
||||
static const std::string HTTP_REASON_SEE_OTHER;
|
||||
static const std::string HTTP_REASON_NOT_MODIFIED;
|
||||
static const std::string HTTP_REASON_USEPROXY;
|
||||
static const std::string HTTP_REASON_TEMPORARY_REDIRECT;
|
||||
static const std::string HTTP_REASON_BAD_REQUEST;
|
||||
static const std::string HTTP_REASON_UNAUTHORIZED;
|
||||
static const std::string HTTP_REASON_PAYMENT_REQUIRED;
|
||||
static const std::string HTTP_REASON_FORBIDDEN;
|
||||
static const std::string HTTP_REASON_NOT_FOUND;
|
||||
static const std::string HTTP_REASON_METHOD_NOT_ALLOWED;
|
||||
static const std::string HTTP_REASON_NOT_ACCEPTABLE;
|
||||
static const std::string HTTP_REASON_PROXY_AUTHENTICATION_REQUIRED;
|
||||
static const std::string HTTP_REASON_REQUEST_TIMEOUT;
|
||||
static const std::string HTTP_REASON_CONFLICT;
|
||||
static const std::string HTTP_REASON_GONE;
|
||||
static const std::string HTTP_REASON_LENGTH_REQUIRED;
|
||||
static const std::string HTTP_REASON_PRECONDITION_FAILED;
|
||||
static const std::string HTTP_REASON_REQUESTENTITYTOOLARGE;
|
||||
static const std::string HTTP_REASON_REQUESTURITOOLONG;
|
||||
static const std::string HTTP_REASON_UNSUPPORTEDMEDIATYPE;
|
||||
static const std::string HTTP_REASON_REQUESTED_RANGE_NOT_SATISFIABLE;
|
||||
static const std::string HTTP_REASON_EXPECTATION_FAILED;
|
||||
static const std::string HTTP_REASON_INTERNAL_SERVER_ERROR;
|
||||
static const std::string HTTP_REASON_NOT_IMPLEMENTED;
|
||||
static const std::string HTTP_REASON_BAD_GATEWAY;
|
||||
static const std::string HTTP_REASON_SERVICE_UNAVAILABLE;
|
||||
static const std::string HTTP_REASON_GATEWAY_TIMEOUT;
|
||||
static const std::string HTTP_REASON_VERSION_NOT_SUPPORTED;
|
||||
static const std::string HTTP_REASON_UNKNOWN;
|
||||
|
||||
static const std::string DATE;
|
||||
static const std::string SET_COOKIE;
|
||||
|
||||
private:
|
||||
enum Limits
|
||||
{
|
||||
MAX_VERSION_LENGTH = 8,
|
||||
MAX_STATUS_LENGTH = 3,
|
||||
MAX_REASON_LENGTH = 512
|
||||
};
|
||||
|
||||
HTTPStatus _status;
|
||||
std::string _reason;
|
||||
|
||||
HTTPResponse(const HTTPResponse&);
|
||||
HTTPResponse& operator = (const HTTPResponse&);
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline HTTPResponse::HTTPStatus HTTPResponse::getStatus() const
|
||||
{
|
||||
return _status;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPResponse::getReason() const
|
||||
{
|
||||
return _reason;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPResponse_INCLUDED
|
||||
94
Net/include/Poco/Net/HTTPServer.h
Normal file
94
Net/include/Poco/Net/HTTPServer.h
Normal file
@@ -0,0 +1,94 @@
|
||||
//
|
||||
// HTTPServer.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServer.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServer
|
||||
//
|
||||
// Definition of the HTTPServer class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServer_INCLUDED
|
||||
#define Net_HTTPServer_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/TCPServer.h"
|
||||
#include "Poco/Net/HTTPRequestHandlerFactory.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPServer: public TCPServer
|
||||
/// A subclass of TCPServer that implements a
|
||||
/// full-featured multithreaded HTTP server.
|
||||
///
|
||||
/// A HTTPRequestHandlerFactory must be supplied.
|
||||
/// The ServerSocket must be bound and in listening state.
|
||||
///
|
||||
/// To configure various aspects of the server, a HTTPServerParams
|
||||
/// object can be passed to the constructor.
|
||||
///
|
||||
/// The server supports:
|
||||
/// - HTTP/1.0 and HTTP/1.1
|
||||
/// - automatic handling of persistent connections.
|
||||
/// - automatic decoding/encoding of request/response message bodies
|
||||
/// using chunked transfer encoding.
|
||||
///
|
||||
/// Please see the TCPServer class for information about
|
||||
/// connection and thread handling.
|
||||
///
|
||||
/// See RFC 2616 <http://www.faqs.org/rfcs/rfc2616.html> for more
|
||||
/// information about the HTTP protocol.
|
||||
{
|
||||
public:
|
||||
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams);
|
||||
/// Creates the HTTPServer, using the given ServerSocket.
|
||||
///
|
||||
/// New threads are taken from the default thread pool.
|
||||
|
||||
HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams);
|
||||
/// Creates the HTTPServer, using the given ServerSocket.
|
||||
///
|
||||
/// New threads are taken from the given thread pool.
|
||||
|
||||
~HTTPServer();
|
||||
/// Destroys the HTTPServer and its HTTPRequestHandlerFactory.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServer_INCLUDED
|
||||
83
Net/include/Poco/Net/HTTPServerConnection.h
Normal file
83
Net/include/Poco/Net/HTTPServerConnection.h
Normal file
@@ -0,0 +1,83 @@
|
||||
//
|
||||
// HTTPServerConnection.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerConnection.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerConnection
|
||||
//
|
||||
// Definition of the HTTPServerConnection class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerConnection_INCLUDED
|
||||
#define Net_HTTPServerConnection_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/TCPServerConnection.h"
|
||||
#include "Poco/Net/HTTPResponse.h"
|
||||
#include "Poco/Net/HTTPRequestHandlerFactory.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerSession;
|
||||
|
||||
|
||||
class Net_API HTTPServerConnection: public TCPServerConnection
|
||||
/// This subclass of TCPServerConnection handles HTTP
|
||||
/// connections.
|
||||
{
|
||||
public:
|
||||
HTTPServerConnection(const StreamSocket& socket, HTTPServerParams::Ptr pParams, HTTPRequestHandlerFactory::Ptr pFactory);
|
||||
/// Creates the HTTPServerConnection.
|
||||
|
||||
virtual ~HTTPServerConnection();
|
||||
/// Destroys the HTTPServerConnection.
|
||||
|
||||
void run();
|
||||
/// Handles all HTTP requests coming in.
|
||||
|
||||
protected:
|
||||
void sendErrorResponse(HTTPServerSession& session, HTTPResponse::HTTPStatus status);
|
||||
|
||||
private:
|
||||
HTTPServerParams::Ptr _pParams;
|
||||
HTTPRequestHandlerFactory::Ptr _pFactory;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerConnection_INCLUDED
|
||||
77
Net/include/Poco/Net/HTTPServerConnectionFactory.h
Normal file
77
Net/include/Poco/Net/HTTPServerConnectionFactory.h
Normal file
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// HTTPServerConnectionFactory.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerConnectionFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerConnectionFactory
|
||||
//
|
||||
// Definition of the HTTPServerConnectionFactory class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerConnectionFactory_INCLUDED
|
||||
#define Net_HTTPServerConnectionFactory_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/TCPServerConnectionFactory.h"
|
||||
#include "Poco/Net/HTTPRequestHandlerFactory.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPServerConnectionFactory: public TCPServerConnectionFactory
|
||||
/// This implementation of a TCPServerConnectionFactory
|
||||
/// is used by HTTPServer to create HTTPServerConnection objects.
|
||||
{
|
||||
public:
|
||||
HTTPServerConnectionFactory(HTTPServerParams::Ptr pParams, HTTPRequestHandlerFactory::Ptr pFactory);
|
||||
/// Creates the HTTPServerConnectionFactory.
|
||||
|
||||
~HTTPServerConnectionFactory();
|
||||
/// Destroys the HTTPServerConnectionFactory.
|
||||
|
||||
TCPServerConnection* createConnection(const StreamSocket& socket);
|
||||
/// Creates an instance of HTTPServerConnection
|
||||
/// using the given StreamSocket.
|
||||
|
||||
private:
|
||||
HTTPServerParams::Ptr _pParams;
|
||||
HTTPRequestHandlerFactory::Ptr _pFactory;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerConnectionFactory_INCLUDED
|
||||
176
Net/include/Poco/Net/HTTPServerParams.h
Normal file
176
Net/include/Poco/Net/HTTPServerParams.h
Normal file
@@ -0,0 +1,176 @@
|
||||
//
|
||||
// HTTPServerParams.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerParams.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerParams
|
||||
//
|
||||
// Definition of the HTTPServerParams class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerParams_INCLUDED
|
||||
#define Net_HTTPServerParams_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/TCPServerParams.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPServerParams: public TCPServerParams
|
||||
/// This class is used to specify parameters to both the
|
||||
/// HTTPServer, as well as to HTTPRequestHandler objects.
|
||||
///
|
||||
/// Subclasses may add new parameters to the class.
|
||||
{
|
||||
public:
|
||||
typedef Poco::AutoPtr<HTTPServerParams> Ptr;
|
||||
|
||||
HTTPServerParams();
|
||||
/// Creates the HTTPServerParams.
|
||||
///
|
||||
/// Sets the following default values:
|
||||
/// - timeout: 60 seconds
|
||||
/// - keepAlive: true
|
||||
/// - maxKeepAliveRequests: 0
|
||||
/// - keepAliveTimeout: 10 seconds
|
||||
|
||||
void setServerName(const std::string& serverName);
|
||||
/// Sets the name and port (name:port) that the server uses to identify itself.
|
||||
///
|
||||
/// If this is not set to valid DNS name for your host, server-generated
|
||||
/// redirections will not work.
|
||||
|
||||
const std::string& getServerName() const;
|
||||
/// Returns the name and port (name:port) that the server uses to identify itself.
|
||||
|
||||
void setSoftwareVersion(const std::string& softwareVersion);
|
||||
/// Sets the server software name and version that the server uses to identify
|
||||
/// itself. If this is set to a non-empty string, the server will
|
||||
/// automatically include a Server header field with the value given
|
||||
/// here in every response it sends.
|
||||
///
|
||||
/// The format of the softwareVersion string should be name/version
|
||||
/// (e.g. MyHTTPServer/1.0).
|
||||
|
||||
const std::string& getSoftwareVersion() const;
|
||||
/// Returns the server software name and version that the server uses to
|
||||
/// identify itself.
|
||||
|
||||
void setTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the connection timeout for HTTP connections.
|
||||
|
||||
const Poco::Timespan& getTimeout() const;
|
||||
/// Returns the connection timeout for HTTP connections.
|
||||
|
||||
void setKeepAlive(bool keepAlive);
|
||||
/// Enables (keepAlive == true) or disables (keepAlive == false)
|
||||
/// persistent connections.
|
||||
|
||||
bool getKeepAlive() const;
|
||||
/// Returns true iff persistent connections are enabled.
|
||||
|
||||
void setKeepAliveTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the connection timeout for HTTP connections.
|
||||
|
||||
const Poco::Timespan& getKeepAliveTimeout() const;
|
||||
/// Returns the connection timeout for HTTP connections.
|
||||
|
||||
void setMaxKeepAliveRequests(int maxKeepAliveRequests);
|
||||
/// Specifies the maximun number of requests allowed
|
||||
/// during a persistent connection. 0 means unlimited
|
||||
/// connections.
|
||||
|
||||
int getMaxKeepAliveRequests() const;
|
||||
/// Returns the maximum number of requests allowed
|
||||
/// during a persistent connection, or 0 if
|
||||
/// unlimited connections are allowed.
|
||||
|
||||
protected:
|
||||
virtual ~HTTPServerParams();
|
||||
/// Destroys the HTTPServerParams.
|
||||
|
||||
private:
|
||||
std::string _serverName;
|
||||
std::string _softwareVersion;
|
||||
Poco::Timespan _timeout;
|
||||
bool _keepAlive;
|
||||
int _maxKeepAliveRequests;
|
||||
Poco::Timespan _keepAliveTimeout;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPServerParams::getServerName() const
|
||||
{
|
||||
return _serverName;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPServerParams::getSoftwareVersion() const
|
||||
{
|
||||
return _softwareVersion;
|
||||
}
|
||||
|
||||
|
||||
inline const Poco::Timespan& HTTPServerParams::getTimeout() const
|
||||
{
|
||||
return _timeout;
|
||||
}
|
||||
|
||||
|
||||
inline bool HTTPServerParams::getKeepAlive() const
|
||||
{
|
||||
return _keepAlive;
|
||||
}
|
||||
|
||||
|
||||
inline int HTTPServerParams::getMaxKeepAliveRequests() const
|
||||
{
|
||||
return _maxKeepAliveRequests;
|
||||
}
|
||||
|
||||
|
||||
inline const Poco::Timespan& HTTPServerParams::getKeepAliveTimeout() const
|
||||
{
|
||||
return _keepAliveTimeout;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerParams_INCLUDED
|
||||
100
Net/include/Poco/Net/HTTPServerRequest.h
Normal file
100
Net/include/Poco/Net/HTTPServerRequest.h
Normal file
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// HTTPServerRequest.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerRequest.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerRequest
|
||||
//
|
||||
// Definition of the HTTPServerRequest class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerRequest_INCLUDED
|
||||
#define Net_HTTPServerRequest_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPRequest.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerSession;
|
||||
class HTTPServerResponse;
|
||||
class HTTPServerParams;
|
||||
|
||||
|
||||
class Net_API HTTPServerRequest: public HTTPRequest
|
||||
/// This abstract subclass of HTTPRequest is used for
|
||||
/// representing server-side HTTP requests.
|
||||
///
|
||||
/// A HTTPServerRequest is passed to the
|
||||
/// handleRequest() method of HTTPRequestHandler.
|
||||
{
|
||||
public:
|
||||
HTTPServerRequest();
|
||||
/// Creates the HTTPServerRequest
|
||||
|
||||
~HTTPServerRequest();
|
||||
/// Destroys the HTTPServerRequest.
|
||||
|
||||
virtual std::istream& stream() = 0;
|
||||
/// Returns the input stream for reading
|
||||
/// the request body.
|
||||
///
|
||||
/// The stream must be valid until the HTTPServerRequest
|
||||
/// object is destroyed.
|
||||
|
||||
virtual bool expectContinue() const = 0;
|
||||
/// Returns true if the client expects a
|
||||
/// 100 Continue response.
|
||||
|
||||
virtual const SocketAddress& clientAddress() const = 0;
|
||||
/// Returns the client's address.
|
||||
|
||||
virtual const SocketAddress& serverAddress() const = 0;
|
||||
/// Returns the server's address.
|
||||
|
||||
virtual const HTTPServerParams& serverParams() const = 0;
|
||||
/// Returns a reference to the server parameters.
|
||||
|
||||
virtual HTTPServerResponse& response() const = 0;
|
||||
/// Returns a reference to the associated response.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerRequest_INCLUDED
|
||||
155
Net/include/Poco/Net/HTTPServerRequestImpl.h
Normal file
155
Net/include/Poco/Net/HTTPServerRequestImpl.h
Normal file
@@ -0,0 +1,155 @@
|
||||
//
|
||||
// HTTPServerRequestImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerRequestImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerRequestImpl
|
||||
//
|
||||
// Definition of the HTTPServerRequestImpl class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerRequestImpl_INCLUDED
|
||||
#define Net_HTTPServerRequestImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPServerRequest.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/AutoPtr.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerSession;
|
||||
class HTTPServerParams;
|
||||
class StreamSocket;
|
||||
|
||||
|
||||
class Net_API HTTPServerRequestImpl: public HTTPServerRequest
|
||||
/// This subclass of HTTPServerRequest is used for
|
||||
/// representing server-side HTTP requests.
|
||||
///
|
||||
/// A HTTPServerRequest is passed to the
|
||||
/// handleRequest() method of HTTPRequestHandler.
|
||||
{
|
||||
public:
|
||||
HTTPServerRequestImpl(HTTPServerResponse& response, HTTPServerSession& session, HTTPServerParams* pParams);
|
||||
/// Creates the HTTPServerRequestImpl, using the
|
||||
/// given HTTPServerSession.
|
||||
|
||||
~HTTPServerRequestImpl();
|
||||
/// Destroys the HTTPServerRequestImpl.
|
||||
|
||||
std::istream& stream();
|
||||
/// Returns the input stream for reading
|
||||
/// the request body.
|
||||
///
|
||||
/// The stream is valid until the HTTPServerRequestImpl
|
||||
/// object is destroyed.
|
||||
|
||||
bool expectContinue() const;
|
||||
/// Returns true if the client expects a
|
||||
/// 100 Continue response.
|
||||
|
||||
const SocketAddress& clientAddress() const;
|
||||
/// Returns the client's address.
|
||||
|
||||
const SocketAddress& serverAddress() const;
|
||||
/// Returns the server's address.
|
||||
|
||||
const HTTPServerParams& serverParams() const;
|
||||
/// Returns a reference to the server parameters.
|
||||
|
||||
HTTPServerResponse& response() const;
|
||||
/// Returns a reference to the associated response.
|
||||
|
||||
StreamSocket& socket();
|
||||
/// Returns a reference to the underlying socket.
|
||||
|
||||
StreamSocket detachSocket();
|
||||
/// Returns the underlying socket after detaching
|
||||
/// it from the server session.
|
||||
|
||||
protected:
|
||||
static const std::string EXPECT;
|
||||
|
||||
private:
|
||||
HTTPServerResponse& _response;
|
||||
HTTPServerSession& _session;
|
||||
std::istream* _pStream;
|
||||
Poco::AutoPtr<HTTPServerParams> _pParams;
|
||||
SocketAddress _clientAddress;
|
||||
SocketAddress _serverAddress;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline std::istream& HTTPServerRequestImpl::stream()
|
||||
{
|
||||
poco_check_ptr (_pStream);
|
||||
|
||||
return *_pStream;
|
||||
}
|
||||
|
||||
|
||||
inline const SocketAddress& HTTPServerRequestImpl::clientAddress() const
|
||||
{
|
||||
return _clientAddress;
|
||||
}
|
||||
|
||||
|
||||
inline const SocketAddress& HTTPServerRequestImpl::serverAddress() const
|
||||
{
|
||||
return _serverAddress;
|
||||
}
|
||||
|
||||
|
||||
inline const HTTPServerParams& HTTPServerRequestImpl::serverParams() const
|
||||
{
|
||||
return *_pParams;
|
||||
}
|
||||
|
||||
|
||||
inline HTTPServerResponse& HTTPServerRequestImpl::response() const
|
||||
{
|
||||
return _response;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerRequestImpl_INCLUDED
|
||||
138
Net/include/Poco/Net/HTTPServerResponse.h
Normal file
138
Net/include/Poco/Net/HTTPServerResponse.h
Normal file
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// HTTPServerResponse.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerResponse.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerResponse
|
||||
//
|
||||
// Definition of the HTTPServerResponse class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerResponse_INCLUDED
|
||||
#define Net_HTTPServerResponse_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPResponse.h"
|
||||
#include <cstddef>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerSession;
|
||||
class HTTPCookie;
|
||||
|
||||
|
||||
class Net_API HTTPServerResponse: public HTTPResponse
|
||||
/// This subclass of HTTPResponse is used for
|
||||
/// representing server-side HTTP responses.
|
||||
///
|
||||
/// A HTTPServerResponse is passed to the
|
||||
/// handleRequest() method of HTTPRequestHandler.
|
||||
///
|
||||
/// handleRequest() must set a status code
|
||||
/// and optional reason phrase, set headers
|
||||
/// as necessary, and provide a message body.
|
||||
{
|
||||
public:
|
||||
HTTPServerResponse();
|
||||
/// Creates the HTTPServerResponse.
|
||||
|
||||
~HTTPServerResponse();
|
||||
/// Destroys the HTTPServerResponse.
|
||||
|
||||
virtual void sendContinue() = 0;
|
||||
/// Sends a 100 Continue response to the
|
||||
/// client.
|
||||
|
||||
virtual std::ostream& send() = 0;
|
||||
/// Sends the response header to the client and
|
||||
/// returns an output stream for sending the
|
||||
/// response body.
|
||||
///
|
||||
/// The returned stream is valid until the response
|
||||
/// object is destroyed.
|
||||
///
|
||||
/// Must not be called after sendFile(), sendBuffer()
|
||||
/// or redirect() has been called.
|
||||
|
||||
virtual void sendFile(const std::string& path, const std::string& mediaType) = 0;
|
||||
/// Sends the response header to the client, followed
|
||||
/// by the content of the given file.
|
||||
///
|
||||
/// Must not be called after send(), sendBuffer()
|
||||
/// or redirect() has been called.
|
||||
///
|
||||
/// Throws a FileNotFoundException if the file
|
||||
/// cannot be found, or an OpenFileException if
|
||||
/// the file cannot be opened.
|
||||
|
||||
virtual void sendBuffer(const void* pBuffer, std::size_t length) = 0;
|
||||
/// Sends the response header to the client, followed
|
||||
/// by the contents of the given buffer.
|
||||
///
|
||||
/// The Content-Length header of the response is set
|
||||
/// to length and chunked transfer encoding is disabled.
|
||||
///
|
||||
/// If both the HTTP message header and body (from the
|
||||
/// given buffer) fit into one single network packet, the
|
||||
/// complete response can be sent in one network packet.
|
||||
///
|
||||
/// Must not be called after send(), sendFile()
|
||||
/// or redirect() has been called.
|
||||
|
||||
virtual void redirect(const std::string& uri, HTTPStatus status = HTTP_FOUND) = 0;
|
||||
/// Sets the status code, which must be one of
|
||||
/// HTTP_MOVED_PERMANENTLY (301), HTTP_FOUND (302),
|
||||
/// or HTTP_SEE_OTHER (303),
|
||||
/// and sets the "Location" header field
|
||||
/// to the given URI, which according to
|
||||
/// the HTTP specification, must be absolute.
|
||||
///
|
||||
/// Must not be called after send() has been called.
|
||||
|
||||
virtual void requireAuthentication(const std::string& realm) = 0;
|
||||
/// Sets the status code to 401 (Unauthorized)
|
||||
/// and sets the "WWW-Authenticate" header field
|
||||
/// according to the given realm.
|
||||
|
||||
virtual bool sent() const = 0;
|
||||
/// Returns true if the response (header) has been sent.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerResponse_INCLUDED
|
||||
149
Net/include/Poco/Net/HTTPServerResponseImpl.h
Normal file
149
Net/include/Poco/Net/HTTPServerResponseImpl.h
Normal file
@@ -0,0 +1,149 @@
|
||||
//
|
||||
// HTTPServerResponseImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerResponseImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerResponseImpl
|
||||
//
|
||||
// Definition of the HTTPServerResponseImpl class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerResponseImpl_INCLUDED
|
||||
#define Net_HTTPServerResponseImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPServerResponse.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPServerSession;
|
||||
class HTTPCookie;
|
||||
|
||||
|
||||
class Net_API HTTPServerResponseImpl: public HTTPServerResponse
|
||||
/// This subclass of HTTPServerResponse is used for
|
||||
/// representing server-side HTTP responses.
|
||||
///
|
||||
/// A HTTPServerResponse is passed to the
|
||||
/// handleRequest() method of HTTPRequestHandler.
|
||||
///
|
||||
/// handleRequest() must set a status code
|
||||
/// and optional reason phrase, set headers
|
||||
/// as necessary, and provide a message body.
|
||||
{
|
||||
public:
|
||||
HTTPServerResponseImpl(HTTPServerSession& session);
|
||||
/// Creates the HTTPServerResponseImpl.
|
||||
|
||||
~HTTPServerResponseImpl();
|
||||
/// Destroys the HTTPServerResponseImpl.
|
||||
|
||||
void sendContinue();
|
||||
/// Sends a 100 Continue response to the
|
||||
/// client.
|
||||
|
||||
std::ostream& send();
|
||||
/// Sends the response header to the client and
|
||||
/// returns an output stream for sending the
|
||||
/// response body.
|
||||
///
|
||||
/// The returned stream is valid until the response
|
||||
/// object is destroyed.
|
||||
///
|
||||
/// Must not be called after sendFile(), sendBuffer()
|
||||
/// or redirect() has been called.
|
||||
|
||||
void sendFile(const std::string& path, const std::string& mediaType);
|
||||
/// Sends the response header to the client, followed
|
||||
/// by the content of the given file.
|
||||
///
|
||||
/// Must not be called after send(), sendBuffer()
|
||||
/// or redirect() has been called.
|
||||
///
|
||||
/// Throws a FileNotFoundException if the file
|
||||
/// cannot be found, or an OpenFileException if
|
||||
/// the file cannot be opened.
|
||||
|
||||
void sendBuffer(const void* pBuffer, std::size_t length);
|
||||
/// Sends the response header to the client, followed
|
||||
/// by the contents of the given buffer.
|
||||
///
|
||||
/// The Content-Length header of the response is set
|
||||
/// to length and chunked transfer encoding is disabled.
|
||||
///
|
||||
/// If both the HTTP message header and body (from the
|
||||
/// given buffer) fit into one single network packet, the
|
||||
/// complete response can be sent in one network packet.
|
||||
///
|
||||
/// Must not be called after send(), sendFile()
|
||||
/// or redirect() has been called.
|
||||
|
||||
void redirect(const std::string& uri, HTTPStatus status = HTTP_FOUND);
|
||||
/// Sets the status code, which must be one of
|
||||
/// HTTP_MOVED_PERMANENTLY (301), HTTP_FOUND (302),
|
||||
/// or HTTP_SEE_OTHER (303),
|
||||
/// and sets the "Location" header field
|
||||
/// to the given URI, which according to
|
||||
/// the HTTP specification, must be absolute.
|
||||
///
|
||||
/// Must not be called after send() has been called.
|
||||
|
||||
void requireAuthentication(const std::string& realm);
|
||||
/// Sets the status code to 401 (Unauthorized)
|
||||
/// and sets the "WWW-Authenticate" header field
|
||||
/// according to the given realm.
|
||||
|
||||
bool sent() const;
|
||||
/// Returns true if the response (header) has been sent.
|
||||
|
||||
private:
|
||||
HTTPServerSession& _session;
|
||||
std::ostream* _pStream;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool HTTPServerResponseImpl::sent() const
|
||||
{
|
||||
return _pStream != 0;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerResponseImpl_INCLUDED
|
||||
98
Net/include/Poco/Net/HTTPServerSession.h
Normal file
98
Net/include/Poco/Net/HTTPServerSession.h
Normal file
@@ -0,0 +1,98 @@
|
||||
//
|
||||
// HTTPServerSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPServerSession.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPServer
|
||||
// Module: HTTPServerSession
|
||||
//
|
||||
// Definition of the HTTPServerSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPServerSession_INCLUDED
|
||||
#define Net_HTTPServerSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPSession.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Net/HTTPServerSession.h"
|
||||
#include "Poco/Net/HTTPServerParams.h"
|
||||
#include "Poco/Timespan.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPServerSession: public HTTPSession
|
||||
/// This class handles the server side of a
|
||||
/// HTTP session. It is used internally by
|
||||
/// HTTPServer.
|
||||
{
|
||||
public:
|
||||
HTTPServerSession(const StreamSocket& socket, HTTPServerParams::Ptr pParams);
|
||||
/// Creates the HTTPServerSession.
|
||||
|
||||
virtual ~HTTPServerSession();
|
||||
/// Destroys the HTTPServerSession.
|
||||
|
||||
bool hasMoreRequests();
|
||||
/// Returns true if there are requests available.
|
||||
|
||||
bool canKeepAlive() const;
|
||||
/// Returns true if the session can be kept alive.
|
||||
|
||||
SocketAddress clientAddress();
|
||||
/// Returns the client's address.
|
||||
|
||||
SocketAddress serverAddress();
|
||||
/// Returns the server's address.
|
||||
|
||||
private:
|
||||
bool _firstRequest;
|
||||
Poco::Timespan _keepAliveTimeout;
|
||||
int _maxKeepAliveRequests;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool HTTPServerSession::canKeepAlive() const
|
||||
{
|
||||
return _maxKeepAliveRequests != 0;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPServerSession_INCLUDED
|
||||
255
Net/include/Poco/Net/HTTPSession.h
Normal file
255
Net/include/Poco/Net/HTTPSession.h
Normal file
@@ -0,0 +1,255 @@
|
||||
//
|
||||
// HTTPSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPSession.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPSession
|
||||
//
|
||||
// Definition of the HTTPSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPSession_INCLUDED
|
||||
#define Net_HTTPSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include "Poco/Any.h"
|
||||
#include <ios>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPSession
|
||||
/// HTTPSession implements basic HTTP session management
|
||||
/// for both HTTP clients and HTTP servers.
|
||||
///
|
||||
/// HTTPSession implements buffering for HTTP connections, as well
|
||||
/// as specific support for the various HTTP stream classes.
|
||||
///
|
||||
/// This class can not be instantiated. HTTPClientSession or
|
||||
/// HTTPServerSession must be used instead.
|
||||
{
|
||||
public:
|
||||
void setKeepAlive(bool keepAlive);
|
||||
/// Sets the keep-alive flag for this session.
|
||||
///
|
||||
/// If the keep-alive flag is enabled, persistent
|
||||
/// HTTP/1.1 connections are supported.
|
||||
|
||||
bool getKeepAlive() const;
|
||||
/// Returns the value of the keep-alive flag for
|
||||
/// this session.
|
||||
|
||||
void setTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the timeout for the HTTP session.
|
||||
|
||||
Poco::Timespan getTimeout() const;
|
||||
/// Returns the timeout for the HTTP session.
|
||||
|
||||
bool connected() const;
|
||||
/// Returns true if the underlying socket is connected.
|
||||
|
||||
virtual void abort();
|
||||
/// Aborts a session in progress by shutting down
|
||||
/// and closing the underlying socket.
|
||||
|
||||
const Poco::Exception* networkException() const;
|
||||
/// If sending or receiving data over the underlying
|
||||
/// socket connection resulted in an exception, a
|
||||
/// pointer to this exception is returned.
|
||||
///
|
||||
/// Otherwise, NULL is returned.
|
||||
|
||||
void attachSessionData(const Poco::Any& data);
|
||||
/// Allows to attach an application-specific data
|
||||
/// item to the session.
|
||||
///
|
||||
/// On the server side, this can be used to manage
|
||||
/// data that must be maintained over the entire
|
||||
/// lifetime of a persistent connection (that is,
|
||||
/// multiple requests sent over the same connection).
|
||||
|
||||
const Poco::Any& sessionData() const;
|
||||
/// Returns the data attached with attachSessionData(),
|
||||
/// or an empty Poco::Any if no user data has been
|
||||
/// attached.
|
||||
|
||||
enum
|
||||
{
|
||||
HTTP_PORT = 80
|
||||
};
|
||||
|
||||
StreamSocket detachSocket();
|
||||
/// Detaches the socket from the session.
|
||||
///
|
||||
/// The socket is returned, and a new, uninitialized socket is
|
||||
/// attached to the session.
|
||||
|
||||
StreamSocket& socket();
|
||||
/// Returns a reference to the underlying socket.
|
||||
|
||||
protected:
|
||||
HTTPSession();
|
||||
/// Creates a HTTP session using an
|
||||
/// unconnected stream socket.
|
||||
|
||||
HTTPSession(const StreamSocket& socket);
|
||||
/// Creates a HTTP session using the
|
||||
/// given socket. The session takes ownership
|
||||
/// of the socket and closes it when it's no
|
||||
/// longer used.
|
||||
|
||||
HTTPSession(const StreamSocket& socket, bool keepAlive);
|
||||
/// Creates a HTTP session using the
|
||||
/// given socket. The session takes ownership
|
||||
/// of the socket and closes it when it's no
|
||||
/// longer used.
|
||||
|
||||
virtual ~HTTPSession();
|
||||
/// Destroys the HTTPSession and closes the
|
||||
/// underlying socket.
|
||||
|
||||
int get();
|
||||
/// Returns the next byte in the buffer.
|
||||
/// Reads more data from the socket if there are
|
||||
/// no bytes left in the buffer.
|
||||
|
||||
int peek();
|
||||
/// Peeks at the next character in the buffer.
|
||||
/// Reads more data from the socket if there are
|
||||
/// no bytes left in the buffer.
|
||||
|
||||
virtual int read(char* buffer, std::streamsize length);
|
||||
/// Reads up to length bytes.
|
||||
///
|
||||
/// If there is data in the buffer, this data
|
||||
/// is returned. Otherwise, data is read from
|
||||
/// the socket to avoid unnecessary buffering.
|
||||
|
||||
virtual int write(const char* buffer, std::streamsize length);
|
||||
/// Writes data to the socket.
|
||||
|
||||
int receive(char* buffer, int length);
|
||||
/// Reads up to length bytes.
|
||||
|
||||
int buffered() const;
|
||||
/// Returns the number of bytes in the buffer.
|
||||
|
||||
void refill();
|
||||
/// Refills the internal buffer.
|
||||
|
||||
virtual void connect(const SocketAddress& address);
|
||||
/// Connects the underlying socket to the given address
|
||||
/// and sets the socket's receive timeout.
|
||||
|
||||
void attachSocket(const StreamSocket& socket);
|
||||
/// Attaches a socket to the session, replacing the
|
||||
/// previously attached socket.
|
||||
|
||||
void close();
|
||||
/// Closes the underlying socket.
|
||||
|
||||
void setException(const Poco::Exception& exc);
|
||||
/// Stores a clone of the exception.
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
HTTP_DEFAULT_TIMEOUT = 60000000
|
||||
};
|
||||
|
||||
HTTPSession(const HTTPSession&);
|
||||
HTTPSession& operator = (const HTTPSession&);
|
||||
|
||||
StreamSocket _socket;
|
||||
char* _pBuffer;
|
||||
char* _pCurrent;
|
||||
char* _pEnd;
|
||||
bool _keepAlive;
|
||||
Poco::Timespan _timeout;
|
||||
Poco::Exception* _pException;
|
||||
Poco::Any _data;
|
||||
|
||||
friend class HTTPStreamBuf;
|
||||
friend class HTTPHeaderStreamBuf;
|
||||
friend class HTTPFixedLengthStreamBuf;
|
||||
friend class HTTPChunkedStreamBuf;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool HTTPSession::getKeepAlive() const
|
||||
{
|
||||
return _keepAlive;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan HTTPSession::getTimeout() const
|
||||
{
|
||||
return _timeout;
|
||||
}
|
||||
|
||||
|
||||
inline StreamSocket& HTTPSession::socket()
|
||||
{
|
||||
return _socket;
|
||||
}
|
||||
|
||||
|
||||
inline const Poco::Exception* HTTPSession::networkException() const
|
||||
{
|
||||
return _pException;
|
||||
}
|
||||
|
||||
|
||||
inline int HTTPSession::buffered() const
|
||||
{
|
||||
return static_cast<int>(_pEnd - _pCurrent);
|
||||
}
|
||||
|
||||
|
||||
inline const Poco::Any& HTTPSession::sessionData() const
|
||||
{
|
||||
return _data;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPSession_INCLUDED
|
||||
177
Net/include/Poco/Net/HTTPSessionFactory.h
Normal file
177
Net/include/Poco/Net/HTTPSessionFactory.h
Normal file
@@ -0,0 +1,177 @@
|
||||
//
|
||||
// HTTPSessionFactory.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPSessionFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPClient
|
||||
// Module: HTTPSessionFactory
|
||||
//
|
||||
// Definition of the HTTPSessionFactory class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPSessionFactoryMgr_INCLUDED
|
||||
#define Net_HTTPSessionFactoryMgr_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/URI.h"
|
||||
#include "Poco/SingletonHolder.h"
|
||||
#include "Poco/SharedPtr.h"
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPSessionInstantiator;
|
||||
class HTTPClientSession;
|
||||
|
||||
|
||||
class Net_API HTTPSessionFactory
|
||||
/// A factory for HTTPClientSession objects.
|
||||
///
|
||||
/// Given a URI, this class creates a HTTPClientSession
|
||||
/// (for http) or a HTTPSClientSession (for https) for
|
||||
/// accessing the URI.
|
||||
///
|
||||
/// The actual work of creating the session is done by
|
||||
/// HTTPSessionInstantiator objects that must be registered
|
||||
/// with a HTTPSessionFactory.
|
||||
{
|
||||
public:
|
||||
HTTPSessionFactory();
|
||||
/// Creates the HTTPSessionFactory.
|
||||
|
||||
HTTPSessionFactory(const std::string& proxyHost, Poco::UInt16 proxyPort);
|
||||
/// Creates the HTTPSessionFactory and sets the proxy host and port.
|
||||
|
||||
~HTTPSessionFactory();
|
||||
/// Destroys the HTTPSessionFactory.
|
||||
|
||||
void registerProtocol(const std::string& protocol, HTTPSessionInstantiator* pSessionInstantiator);
|
||||
/// Registers the session instantiator for the given protocol.
|
||||
/// The factory takes ownership of the SessionInstantiator.
|
||||
///
|
||||
/// A protocol can be registered more than once. However, only the instantiator
|
||||
/// that has been registered first is used. Also, for each call to
|
||||
/// registerProtocol(), a corresponding call to unregisterProtocol() must
|
||||
/// be made.
|
||||
|
||||
void unregisterProtocol(const std::string& protocol);
|
||||
/// Removes the registration of a protocol.
|
||||
///
|
||||
/// Throws a NotFoundException if no instantiator has been registered
|
||||
/// for the given protocol.
|
||||
|
||||
bool supportsProtocol(const std::string& protocol);
|
||||
/// Returns true if a session instantiator for the given protocol has been registered.
|
||||
|
||||
HTTPClientSession* createClientSession(const Poco::URI& uri);
|
||||
/// Creates a client session for the given uri scheme. Throws exception if no factory is registered for the given scheme
|
||||
|
||||
const std::string& proxyHost() const;
|
||||
/// Returns the proxy host, if one has been set, or an empty string otherwise.
|
||||
|
||||
Poco::UInt16 proxyPort() const;
|
||||
/// Returns the proxy port number, if one has been set, or zero otherwise.
|
||||
|
||||
void setProxy(const std::string& proxyHost, Poco::UInt16 proxyPort);
|
||||
/// Sets the proxy host and port number.
|
||||
|
||||
void setProxyCredentials(const std::string& username, const std::string& password);
|
||||
/// Sets the username and password for proxy authorization (Basic auth only).
|
||||
|
||||
const std::string& proxyUsername() const;
|
||||
/// Returns the username for proxy authorization.
|
||||
|
||||
const std::string& proxyPassword() const;
|
||||
/// Returns the password for proxy authorization.
|
||||
|
||||
static HTTPSessionFactory& defaultFactory();
|
||||
/// Returns the default HTTPSessionFactory.
|
||||
|
||||
private:
|
||||
struct InstantiatorInfo
|
||||
{
|
||||
HTTPSessionInstantiator* pIn;
|
||||
int cnt;
|
||||
InstantiatorInfo(HTTPSessionInstantiator* pInst);
|
||||
// no destructor!!! this is by purpose, don't add one!
|
||||
};
|
||||
|
||||
|
||||
HTTPSessionFactory(const HTTPSessionFactory&);
|
||||
HTTPSessionFactory& operator = (const HTTPSessionFactory&);
|
||||
|
||||
typedef std::map<std::string, InstantiatorInfo> Instantiators;
|
||||
|
||||
Instantiators _instantiators;
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
std::string _proxyPassword;
|
||||
|
||||
mutable Poco::FastMutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPSessionFactory::proxyHost() const
|
||||
{
|
||||
return _proxyHost;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt16 HTTPSessionFactory::proxyPort() const
|
||||
{
|
||||
return _proxyPort;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionFactory::proxyUsername() const
|
||||
{
|
||||
return _proxyUsername;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionFactory::proxyPassword() const
|
||||
{
|
||||
return _proxyPassword;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPSessionFactoryMgr_INCLUDED
|
||||
139
Net/include/Poco/Net/HTTPSessionInstantiator.h
Normal file
139
Net/include/Poco/Net/HTTPSessionInstantiator.h
Normal file
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// HTTPSessionInstantiator.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPSessionInstantiator.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPClient
|
||||
// Module: HTTPSessionInstantiator
|
||||
//
|
||||
// Definition of the HTTPSessionInstantiator class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPSessionInstantiator_INCLUDED
|
||||
#define Net_HTTPSessionInstantiator_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPSession.h"
|
||||
#include "Poco/URI.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPClientSession;
|
||||
|
||||
|
||||
class Net_API HTTPSessionInstantiator
|
||||
/// A factory for HTTPClientSession objects.
|
||||
///
|
||||
/// Creates a HTTP session for a given URI.
|
||||
/// A HTTPSessionInstantiator is not used directly.
|
||||
/// Instances are registered with a HTTPSessionFactory,
|
||||
/// and used through it.
|
||||
{
|
||||
public:
|
||||
HTTPSessionInstantiator();
|
||||
/// Creates the HTTPSessionInstantiator.
|
||||
|
||||
virtual ~HTTPSessionInstantiator();
|
||||
/// Destroys the HTTPSessionInstantiator.
|
||||
|
||||
virtual HTTPClientSession* createClientSession(const Poco::URI& uri);
|
||||
/// Creates a HTTPClientSession for the given URI.
|
||||
|
||||
static void registerInstantiator();
|
||||
/// Registers the instantiator with the global HTTPSessionFactory.
|
||||
|
||||
static void unregisterInstantiator();
|
||||
/// Unregisters the factory with the global HTTPSessionFactory.
|
||||
|
||||
protected:
|
||||
void setProxy(const std::string& host, Poco::UInt16 port);
|
||||
/// Sets the proxy host and port.
|
||||
/// Called by HTTPSessionFactory.
|
||||
|
||||
const std::string& proxyHost() const;
|
||||
/// Returns the proxy post.
|
||||
|
||||
Poco::UInt16 proxyPort() const;
|
||||
/// Returns the proxy port.
|
||||
|
||||
void setProxyCredentials(const std::string& username, const std::string& password);
|
||||
/// Sets the username and password for proxy authorization (Basic auth only).
|
||||
|
||||
const std::string& proxyUsername() const;
|
||||
/// Returns the username for proxy authorization.
|
||||
|
||||
const std::string& proxyPassword() const;
|
||||
/// Returns the password for proxy authorization.
|
||||
|
||||
private:
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
std::string _proxyPassword;
|
||||
|
||||
friend class HTTPSessionFactory;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HTTPSessionInstantiator::proxyHost() const
|
||||
{
|
||||
return _proxyHost;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt16 HTTPSessionInstantiator::proxyPort() const
|
||||
{
|
||||
return _proxyPort;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionInstantiator::proxyUsername() const
|
||||
{
|
||||
return _proxyUsername;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& HTTPSessionInstantiator::proxyPassword() const
|
||||
{
|
||||
return _proxyPassword;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPSessionInstantiator_INCLUDED
|
||||
125
Net/include/Poco/Net/HTTPStream.h
Normal file
125
Net/include/Poco/Net/HTTPStream.h
Normal file
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// HTTPStream.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPStream.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPStream
|
||||
//
|
||||
// Definition of the HTTPStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPStream_INCLUDED
|
||||
#define Net_HTTPStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPBasicStreamBuf.h"
|
||||
#include "Poco/MemoryPool.h"
|
||||
#include <cstddef>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class HTTPSession;
|
||||
|
||||
|
||||
class Net_API HTTPStreamBuf: public HTTPBasicStreamBuf
|
||||
/// This is the streambuf class used for reading and writing
|
||||
/// HTTP message bodies.
|
||||
{
|
||||
public:
|
||||
typedef HTTPBasicStreamBuf::openmode openmode;
|
||||
|
||||
HTTPStreamBuf(HTTPSession& session, openmode mode);
|
||||
~HTTPStreamBuf();
|
||||
void close();
|
||||
|
||||
protected:
|
||||
int readFromDevice(char* buffer, std::streamsize length);
|
||||
int writeToDevice(const char* buffer, std::streamsize length);
|
||||
|
||||
private:
|
||||
HTTPSession& _session;
|
||||
openmode _mode;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPIOS: public virtual std::ios
|
||||
/// The base class for HTTPInputStream.
|
||||
{
|
||||
public:
|
||||
HTTPIOS(HTTPSession& session, HTTPStreamBuf::openmode mode);
|
||||
~HTTPIOS();
|
||||
HTTPStreamBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
HTTPStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPInputStream: public HTTPIOS, public std::istream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPInputStream(HTTPSession& session);
|
||||
~HTTPInputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
class Net_API HTTPOutputStream: public HTTPIOS, public std::ostream
|
||||
/// This class is for internal use by HTTPSession only.
|
||||
{
|
||||
public:
|
||||
HTTPOutputStream(HTTPSession& session);
|
||||
~HTTPOutputStream();
|
||||
|
||||
void* operator new(std::size_t size);
|
||||
void operator delete(void* ptr);
|
||||
|
||||
private:
|
||||
static Poco::MemoryPool _pool;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPStream_INCLUDED
|
||||
114
Net/include/Poco/Net/HTTPStreamFactory.h
Normal file
114
Net/include/Poco/Net/HTTPStreamFactory.h
Normal file
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// HTTPStreamFactory.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HTTPStreamFactory.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
// Module: HTTPStreamFactory
|
||||
//
|
||||
// Definition of the HTTPStreamFactory class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HTTPStreamFactory_INCLUDED
|
||||
#define Net_HTTPStreamFactory_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/HTTPSession.h"
|
||||
#include "Poco/URIStreamFactory.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HTTPStreamFactory: public Poco::URIStreamFactory
|
||||
/// An implementation of the URIStreamFactory interface
|
||||
/// that handles Hyper-Text Transfer Protocol (http) URIs.
|
||||
{
|
||||
public:
|
||||
HTTPStreamFactory();
|
||||
/// Creates the HTTPStreamFactory.
|
||||
|
||||
HTTPStreamFactory(const std::string& proxyHost, Poco::UInt16 proxyPort = HTTPSession::HTTP_PORT);
|
||||
/// Creates the HTTPStreamFactory.
|
||||
///
|
||||
/// HTTP connections will use the given proxy.
|
||||
|
||||
HTTPStreamFactory(const std::string& proxyHost, Poco::UInt16 proxyPort, const std::string& proxyUsername, const std::string& proxyPassword);
|
||||
/// Creates the HTTPStreamFactory.
|
||||
///
|
||||
/// HTTP connections will use the given proxy and
|
||||
/// will be authorized against the proxy using Basic authentication
|
||||
/// with the given proxyUsername and proxyPassword.
|
||||
|
||||
virtual ~HTTPStreamFactory();
|
||||
/// Destroys the HTTPStreamFactory.
|
||||
|
||||
virtual std::istream* open(const Poco::URI& uri);
|
||||
/// Creates and opens a HTTP stream for the given URI.
|
||||
/// The URI must be a http://... URI.
|
||||
///
|
||||
/// Throws a NetException if anything goes wrong.
|
||||
///
|
||||
/// Redirect responses are handled and the redirect
|
||||
/// location is automatically resolved, as long
|
||||
/// as the redirect location is still accessible
|
||||
/// via the HTTP protocol. If a redirection to
|
||||
/// a non http://... URI is received, a
|
||||
/// UnsupportedRedirectException exception is thrown.
|
||||
/// The offending URI can then be obtained via the message()
|
||||
/// method of UnsupportedRedirectException.
|
||||
|
||||
static void registerFactory();
|
||||
/// Registers the HTTPStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
static void unregisterFactory();
|
||||
/// Unregisters the HTTPStreamFactory with the
|
||||
/// default URIStreamOpener instance.
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
MAX_REDIRECTS = 10
|
||||
};
|
||||
|
||||
std::string _proxyHost;
|
||||
Poco::UInt16 _proxyPort;
|
||||
std::string _proxyUsername;
|
||||
std::string _proxyPassword;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HTTPStreamFactory_INCLUDED
|
||||
137
Net/include/Poco/Net/HostEntry.h
Normal file
137
Net/include/Poco/Net/HostEntry.h
Normal file
@@ -0,0 +1,137 @@
|
||||
//
|
||||
// HostEntry.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/HostEntry.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: HostEntry
|
||||
//
|
||||
// Definition of the HostEntry class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_HostEntry_INCLUDED
|
||||
#define Net_HostEntry_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
#include "Poco/Net/IPAddress.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API HostEntry
|
||||
/// This class stores information about a host
|
||||
/// such as host name, alias names and a list
|
||||
/// of IP addresses.
|
||||
{
|
||||
public:
|
||||
typedef std::vector<std::string> AliasList;
|
||||
typedef std::vector<IPAddress> AddressList;
|
||||
|
||||
HostEntry();
|
||||
/// Creates an empty HostEntry.
|
||||
|
||||
HostEntry(struct hostent* entry);
|
||||
/// Creates the HostEntry from the data in a hostent structure.
|
||||
|
||||
#if defined(POCO_HAVE_IPv6) || defined(POCO_HAVE_ADDRINFO)
|
||||
HostEntry(struct addrinfo* info);
|
||||
/// Creates the HostEntry from the data in an addrinfo structure.
|
||||
#endif
|
||||
|
||||
#if defined(POCO_VXWORKS)
|
||||
HostEntry(const std::string& name, const IPAddress& addr);
|
||||
#endif
|
||||
|
||||
HostEntry(const HostEntry& entry);
|
||||
/// Creates the HostEntry by copying another one.
|
||||
|
||||
HostEntry& operator = (const HostEntry& entry);
|
||||
/// Assigns another HostEntry.
|
||||
|
||||
void swap(HostEntry& hostEntry);
|
||||
/// Swaps the HostEntry with another one.
|
||||
|
||||
~HostEntry();
|
||||
/// Destroys the HostEntry.
|
||||
|
||||
const std::string& name() const;
|
||||
/// Returns the canonical host name.
|
||||
|
||||
const AliasList& aliases() const;
|
||||
/// Returns a vector containing alias names for
|
||||
/// the host name.
|
||||
|
||||
const AddressList& addresses() const;
|
||||
/// Returns a vector containing the IPAddresses
|
||||
/// for the host.
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
AliasList _aliases;
|
||||
AddressList _addresses;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& HostEntry::name() const
|
||||
{
|
||||
return _name;
|
||||
}
|
||||
|
||||
|
||||
inline const HostEntry::AliasList& HostEntry::aliases() const
|
||||
{
|
||||
return _aliases;
|
||||
}
|
||||
|
||||
|
||||
inline const HostEntry::AddressList& HostEntry::addresses() const
|
||||
{
|
||||
return _addresses;
|
||||
}
|
||||
|
||||
|
||||
inline void swap(HostEntry& h1, HostEntry& h2)
|
||||
{
|
||||
h1.swap(h2);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_HostEntry_INCLUDED
|
||||
107
Net/include/Poco/Net/ICMPClient.h
Normal file
107
Net/include/Poco/Net/ICMPClient.h
Normal file
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// ICMPClient.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPClient.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPClient
|
||||
//
|
||||
// Definition of the ICMPClient class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPClient_INCLUDED
|
||||
#define Net_ICMPClient_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/ICMPSocket.h"
|
||||
#include "Poco/Net/ICMPEventArgs.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/BasicEvent.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPClient
|
||||
/// This class provides ICMP Ping functionality.
|
||||
///
|
||||
/// The events are available when class is instantiated
|
||||
/// and non-static member functions are called.
|
||||
///
|
||||
/// A "lightweight" alternative is direct (without instantiation)
|
||||
/// use of static member functions.
|
||||
{
|
||||
public:
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingBegin;
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingReply;
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingError;
|
||||
mutable Poco::BasicEvent<ICMPEventArgs> pingEnd;
|
||||
|
||||
explicit ICMPClient(IPAddress::Family family);
|
||||
/// Creates an ICMP client.
|
||||
|
||||
~ICMPClient();
|
||||
/// Destroys the ICMP client.
|
||||
|
||||
int ping(SocketAddress& address, int repeat = 1) const;
|
||||
/// Pings the specified address [repeat] times.
|
||||
/// Notifications are posted for events.
|
||||
///
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
int ping(const std::string& address, int repeat = 1) const;
|
||||
/// Calls ICMPClient::ping(SocketAddress&, int) and
|
||||
/// returns the result.
|
||||
///
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
static int ping(SocketAddress& address, IPAddress::Family family, int repeat = 1);
|
||||
/// Pings the specified address [repeat] times.
|
||||
/// Notifications are not posted for events.
|
||||
///
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
static int pingIPv4(const std::string& address, int repeat = 1);
|
||||
/// Calls ICMPClient::ping(SocketAddress&, int) and
|
||||
/// returns the result.
|
||||
///
|
||||
/// Returns the number of valid replies.
|
||||
|
||||
private:
|
||||
mutable IPAddress::Family _family;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPClient_INCLUDED
|
||||
185
Net/include/Poco/Net/ICMPEventArgs.h
Normal file
185
Net/include/Poco/Net/ICMPEventArgs.h
Normal file
@@ -0,0 +1,185 @@
|
||||
//
|
||||
// ICMPEventArgs.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPEventArgs.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPEventArgs
|
||||
//
|
||||
// Definition of ICMPEventArgs.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPEventArgs_INCLUDED
|
||||
#define Net_ICMPEventArgs_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPEventArgs
|
||||
/// The purpose of the ICMPEventArgs class is to be used as template parameter
|
||||
/// to instantiate event members in ICMPClient class.
|
||||
/// When clients register for an event notification, the reference to the class is
|
||||
/// passed to the handler function to provide information about the event.
|
||||
{
|
||||
public:
|
||||
ICMPEventArgs(const SocketAddress& address, int repetitions, int dataSize, int ttl);
|
||||
/// Creates ICMPEventArgs.
|
||||
|
||||
virtual ~ICMPEventArgs();
|
||||
/// Destroys ICMPEventArgs.
|
||||
|
||||
std::string hostName() const;
|
||||
/// Tries to resolve the target IP address into host name.
|
||||
/// If unsuccessful, all exceptions are silently ignored and
|
||||
/// the IP address is returned.
|
||||
|
||||
std::string hostAddress() const;
|
||||
/// Returns the target IP address.
|
||||
|
||||
int repetitions() const;
|
||||
/// Returns the number of repetitions for the ping operation.
|
||||
|
||||
int dataSize() const;
|
||||
/// Returns the packet data size in bytes.
|
||||
|
||||
int ttl() const;
|
||||
/// Returns time to live.
|
||||
|
||||
int sent() const;
|
||||
/// Returns the number of packets sent.
|
||||
|
||||
int received() const;
|
||||
/// Returns the number of packets received.
|
||||
|
||||
int replyTime(int index = -1) const;
|
||||
/// Returns the reply time for the request specified with index.
|
||||
/// If index == -1 (default), returns the most recent reply time.
|
||||
|
||||
const std::string& error(int index = -1) const;
|
||||
/// Returns the error string for the request specified with index.
|
||||
/// If index == -1 (default), returns the most recent error string.
|
||||
|
||||
int minRTT() const;
|
||||
/// Returns the minimum round trip time for a sequence of requests.
|
||||
|
||||
int maxRTT() const;
|
||||
/// Returns the maximum round trip time for a sequence of requests.
|
||||
|
||||
int avgRTT() const;
|
||||
/// Returns the average round trip time for a sequence of requests.
|
||||
|
||||
float percent() const;
|
||||
/// Returns the success percentage for a sequence of requests.
|
||||
|
||||
private:
|
||||
ICMPEventArgs();
|
||||
|
||||
void setRepetitions(int repetitions);
|
||||
void setDataSize(int dataSize);
|
||||
void setTTL(int ttl);
|
||||
void setReplyTime(int index, int time);
|
||||
void setError(int index, const std::string& text);
|
||||
ICMPEventArgs& operator ++ ();
|
||||
ICMPEventArgs operator ++ (int);
|
||||
|
||||
SocketAddress _address;
|
||||
int _sent;
|
||||
int _dataSize;
|
||||
int _ttl;
|
||||
std::vector<int> _rtt;
|
||||
std::vector<std::string> _errors;
|
||||
|
||||
friend class ICMPClient;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline int ICMPEventArgs::repetitions() const
|
||||
{
|
||||
return (int) _rtt.size();
|
||||
}
|
||||
|
||||
|
||||
inline void ICMPEventArgs::setDataSize(int dataSize)
|
||||
{
|
||||
_dataSize = dataSize;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPEventArgs::dataSize() const
|
||||
{
|
||||
return _dataSize;
|
||||
}
|
||||
|
||||
|
||||
inline void ICMPEventArgs::setTTL(int ttl)
|
||||
{
|
||||
_ttl = ttl;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPEventArgs::ttl() const
|
||||
{
|
||||
return _ttl;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPEventArgs::sent() const
|
||||
{
|
||||
return _sent;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPEventArgs::minRTT() const
|
||||
{
|
||||
return *std::min_element(_rtt.begin(), _rtt.end());
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPEventArgs::maxRTT() const
|
||||
{
|
||||
return *std::max_element(_rtt.begin(), _rtt.end());
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif
|
||||
111
Net/include/Poco/Net/ICMPPacket.h
Normal file
111
Net/include/Poco/Net/ICMPPacket.h
Normal file
@@ -0,0 +1,111 @@
|
||||
//
|
||||
// ICMPPacket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPPacket.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPPacket
|
||||
//
|
||||
// Definition of the ICMPPacket class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPPacket_INCLUDED
|
||||
#define Net_ICMPPacket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
#include "Poco/Net/ICMPPacketImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPPacket
|
||||
/// This class is the ICMP packet abstraction.
|
||||
{
|
||||
public:
|
||||
ICMPPacket(IPAddress::Family family, int dataSize = 48);
|
||||
/// Creates an ICMPPacket of specified family.
|
||||
|
||||
~ICMPPacket();
|
||||
/// Destroys the ICMPPacket.
|
||||
|
||||
const Poco::UInt8* packet();
|
||||
/// Returns raw ICMP packet. ICMP header and data are included in the returned packet.
|
||||
|
||||
int packetSize() const;
|
||||
/// Returns the total length of packet (header + data);
|
||||
|
||||
Poco::UInt16 sequence() const;
|
||||
/// Returns the most recent sequence number generated.
|
||||
|
||||
void setDataSize(int dataSize);
|
||||
/// Sets data size.
|
||||
|
||||
int getDataSize() const;
|
||||
/// Returns data size.
|
||||
|
||||
int maxPacketSize() const;
|
||||
/// Returns the total length of packet (header + data);
|
||||
|
||||
struct timeval time(Poco::UInt8* buffer = 0, int length = 0) const;
|
||||
/// Returns current epoch time if either buffer or length are equal to zero.
|
||||
/// Otherwise, it extracts the time value from the supplied buffer and
|
||||
/// returns the extracted value.
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
|
||||
bool validReplyID(Poco::UInt8* buffer, int length) const;
|
||||
/// Returns true if the extracted id is recognized
|
||||
/// (equals the process id).
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
|
||||
std::string errorDescription(Poco::UInt8* buffer, int length);
|
||||
/// Returns error description string.
|
||||
/// If supplied buffer contains an ICMP echo reply packet, an
|
||||
/// empty string is returned indicating the absence of error.
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
|
||||
std::string typeDescription(int typeId);
|
||||
/// Returns the description of the packet type.
|
||||
|
||||
private:
|
||||
ICMPPacketImpl* _pImpl;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPPacket_INCLUDED
|
||||
163
Net/include/Poco/Net/ICMPPacketImpl.h
Normal file
163
Net/include/Poco/Net/ICMPPacketImpl.h
Normal file
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// ICMPPacketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPPacketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPPacketImpl
|
||||
//
|
||||
// Definition of the ICMPPacketImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPPacketImpl_INCLUDED
|
||||
#define Net_ICMPPacketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPPacketImpl
|
||||
/// This is the abstract class for ICMP packet implementations.
|
||||
{
|
||||
public:
|
||||
ICMPPacketImpl(int dataSize = 48);
|
||||
/// Constructor. Creates an ICMPPacketImpl.
|
||||
|
||||
virtual ~ICMPPacketImpl();
|
||||
/// Destructor.
|
||||
|
||||
const Poco::UInt8* packet(bool init = true);
|
||||
/// Returns raw ICMP packet.
|
||||
/// ICMP header and data are included in the packet.
|
||||
/// If init is true, initPacket() is called.
|
||||
|
||||
virtual int packetSize() const = 0;
|
||||
/// Returns the total size of packet (ICMP header + data) in number of octets.
|
||||
/// Must be overriden.
|
||||
|
||||
virtual int maxPacketSize() const;
|
||||
/// Returns the maximum permitted size of packet in number of octets.
|
||||
|
||||
Poco::UInt16 sequence() const;
|
||||
/// Returns the most recent sequence number generated.
|
||||
|
||||
void setDataSize(int dataSize);
|
||||
/// Sets data size.
|
||||
|
||||
int getDataSize() const;
|
||||
/// Returns data size.
|
||||
|
||||
virtual struct timeval time(Poco::UInt8* buffer = 0, int length = 0) const = 0;
|
||||
/// Returns current epoch time if either argument is equal to zero.
|
||||
/// Otherwise, it extracts the time value from the supplied buffer.
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
/// Must be overriden.
|
||||
|
||||
virtual bool validReplyID(unsigned char* buffer, int length) const = 0;
|
||||
/// Returns true if the extracted id is recognized
|
||||
/// (i.e. equals the process id).
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
/// Must be overriden.
|
||||
|
||||
virtual std::string errorDescription(Poco::UInt8* buffer, int length) = 0;
|
||||
/// Returns error description string.
|
||||
/// If supplied buffer contains an ICMP echo reply packet, an
|
||||
/// empty string is returned indicating the absence of error.
|
||||
///
|
||||
/// Supplied buffer includes IP header, ICMP header and data.
|
||||
/// Must be overriden.
|
||||
|
||||
virtual std::string typeDescription(int typeId) = 0;
|
||||
/// Returns the description of the packet type.
|
||||
/// Must be overriden.
|
||||
|
||||
static const Poco::UInt16 MAX_PACKET_SIZE;
|
||||
static const Poco::UInt16 MAX_SEQ_VALUE;
|
||||
|
||||
protected:
|
||||
Poco::UInt16 nextSequence();
|
||||
/// Increments sequence number and returns the new value.
|
||||
|
||||
void resetSequence();
|
||||
/// Resets the sequence to zero.
|
||||
|
||||
virtual void initPacket() = 0;
|
||||
/// (Re)assembles the packet.
|
||||
/// Must be overriden.
|
||||
|
||||
Poco::UInt16 checksum(Poco::UInt16 *addr, Poco::Int32 len);
|
||||
/// Calculates the checksum for supplied buffer.
|
||||
|
||||
private:
|
||||
Poco::UInt16 _seq;
|
||||
Poco::UInt8* _pPacket;
|
||||
int _dataSize;
|
||||
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline Poco::UInt16 ICMPPacketImpl::sequence() const
|
||||
{
|
||||
return _seq;
|
||||
}
|
||||
|
||||
|
||||
inline Poco::UInt16 ICMPPacketImpl::nextSequence()
|
||||
{
|
||||
return ++_seq;
|
||||
}
|
||||
|
||||
|
||||
inline void ICMPPacketImpl::resetSequence()
|
||||
{
|
||||
_seq = 0;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPPacketImpl::maxPacketSize() const
|
||||
{
|
||||
return MAX_PACKET_SIZE;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPPacketImpl_INCLUDED
|
||||
139
Net/include/Poco/Net/ICMPSocket.h
Normal file
139
Net/include/Poco/Net/ICMPSocket.h
Normal file
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// ICMPSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPSocket.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPSocket
|
||||
//
|
||||
// Definition of the ICMPSocket class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPSocket_INCLUDED
|
||||
#define Net_ICMPSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPSocket: public Socket
|
||||
/// This class provides an interface to an
|
||||
/// ICMP client socket.
|
||||
{
|
||||
public:
|
||||
ICMPSocket(IPAddress::Family family, int dataSize = 48, int ttl = 128, int timeout = 500000);
|
||||
/// Creates an unconnected ICMP socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
ICMPSocket(const Socket& socket);
|
||||
/// Creates the ICMPSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a DatagramSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
~ICMPSocket();
|
||||
/// Destroys the ICMPSocket.
|
||||
|
||||
ICMPSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
int sendTo(const SocketAddress& address, int flags = 0);
|
||||
/// Sends an ICMP request through
|
||||
/// the socket to the given address.
|
||||
///
|
||||
/// Returns the number of bytes sent.
|
||||
|
||||
int receiveFrom(SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket.
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the time elapsed since the originating
|
||||
/// request was sent.
|
||||
|
||||
int dataSize() const;
|
||||
/// Returns the data size in bytes.
|
||||
|
||||
int ttl() const;
|
||||
/// Returns the Time-To-Live value.
|
||||
|
||||
int timeout() const;
|
||||
/// Returns the socket timeout value.
|
||||
|
||||
protected:
|
||||
ICMPSocket(SocketImpl* pImpl);
|
||||
/// Creates the Socket and attaches the given SocketImpl.
|
||||
/// The socket takes owership of the SocketImpl.
|
||||
///
|
||||
/// The SocketImpl must be a ICMPSocketImpl, otherwise
|
||||
/// an InvalidArgumentException will be thrown.
|
||||
|
||||
private:
|
||||
int _dataSize;
|
||||
int _ttl;
|
||||
int _timeout;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline int ICMPSocket::dataSize() const
|
||||
{
|
||||
return _dataSize;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPSocket::ttl() const
|
||||
{
|
||||
return _ttl;
|
||||
}
|
||||
|
||||
|
||||
inline int ICMPSocket::timeout() const
|
||||
{
|
||||
return _timeout;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPSocket_INCLUDED
|
||||
85
Net/include/Poco/Net/ICMPSocketImpl.h
Normal file
85
Net/include/Poco/Net/ICMPSocketImpl.h
Normal file
@@ -0,0 +1,85 @@
|
||||
//
|
||||
// ICMPSocketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPSocketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPSocketImpl
|
||||
//
|
||||
// Definition of the ICMPSocketImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPSocketImpl_INCLUDED
|
||||
#define Net_ICMPSocketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/RawSocketImpl.h"
|
||||
#include "Poco/Net/ICMPPacket.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPSocketImpl: public RawSocketImpl
|
||||
/// This class implements an ICMP socket.
|
||||
{
|
||||
public:
|
||||
ICMPSocketImpl(IPAddress::Family family, int dataSize, int ttl, int timeout);
|
||||
/// Creates an unconnected ICMP socket.
|
||||
///
|
||||
/// The socket will be created for the given address family.
|
||||
|
||||
int sendTo(const void*, int, const SocketAddress& address, int flags = 0);
|
||||
/// Sends an ICMP request through the socket to the given address.
|
||||
///
|
||||
/// Returns the number of bytes sent.
|
||||
|
||||
int receiveFrom(void*, int, SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket.
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the time elapsed since the originating request was sent.
|
||||
|
||||
protected:
|
||||
~ICMPSocketImpl();
|
||||
|
||||
private:
|
||||
ICMPPacket _icmpPacket;
|
||||
int _timeout;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPSocketImpl_INCLUDED
|
||||
186
Net/include/Poco/Net/ICMPv4PacketImpl.h
Normal file
186
Net/include/Poco/Net/ICMPv4PacketImpl.h
Normal file
@@ -0,0 +1,186 @@
|
||||
//
|
||||
// ICMPv4PacketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ICMPv4PacketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: ICMP
|
||||
// Module: ICMPv4PacketImpl
|
||||
//
|
||||
// Definition of the ICMPv4PacketImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ICMPv4PacketImpl_INCLUDED
|
||||
#define Net_ICMPv4PacketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
#include "Poco/Net/ICMPPacketImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ICMPv4PacketImpl : public ICMPPacketImpl
|
||||
/// This class implements the ICMPv4 packet.
|
||||
/// Parts are based on original ICMP code by
|
||||
/// Mike Muuss
|
||||
/// U. S. Army Ballistic Research Laboratory
|
||||
/// December, 1983
|
||||
{
|
||||
public:
|
||||
// ICMPv4 header
|
||||
struct Header
|
||||
{
|
||||
Poco::UInt8 type; // ICMP packet type
|
||||
Poco::UInt8 code; // Type sub code
|
||||
Poco::UInt16 checksum;
|
||||
Poco::UInt16 id;
|
||||
Poco::UInt16 seq;
|
||||
};
|
||||
|
||||
enum MessageType
|
||||
{
|
||||
ECHO_REPLY,
|
||||
ICMP_1,
|
||||
ICMP_2,
|
||||
DESTINATION_UNREACHABLE,
|
||||
SOURCE_QUENCH,
|
||||
REDIRECT,
|
||||
ICMP_6,
|
||||
ICMP_7,
|
||||
ECHO_REQUEST,
|
||||
ICMP_9,
|
||||
ICMP_10,
|
||||
TIME_EXCEEDED,
|
||||
PARAMETER_PROBLEM,
|
||||
TIMESTAMP_REQUEST,
|
||||
TIMESTAMP_REPLY,
|
||||
INFORMATION_REQUEST,
|
||||
INFORMATION_REPLY,
|
||||
MESSAGE_TYPE_UNKNOWN, // non-standard default, must remain last but one
|
||||
MESSAGE_TYPE_LENGTH // length indicator, must remain last
|
||||
};
|
||||
|
||||
enum DestinationUnreachableCode
|
||||
{
|
||||
NET_UNREACHABLE,
|
||||
HOST_UNREACHABLE,
|
||||
PROTOCOL_UNREACHABLE,
|
||||
PORT_UNREACHABLE,
|
||||
FRAGMENTATION_NEEDED_AND_DF_SET,
|
||||
SOURCE_ROUTE_FAILED,
|
||||
DESTINATION_UNREACHABLE_UNKNOWN, // non-standard default, must remain last but one
|
||||
DESTINATION_UNREACHABLE_LENGTH // length indicator, must remain last
|
||||
};
|
||||
|
||||
enum RedirectMessageCode
|
||||
{
|
||||
REDIRECT_NETWORK,
|
||||
REDIRECT_HOST,
|
||||
REDIRECT_SERVICE_NETWORK,
|
||||
REDIRECT_SERVICE_HOST,
|
||||
REDIRECT_MESSAGE_UNKNOWN, // non-standard default, must remain last but one
|
||||
REDIRECT_MESSAGE_LENGTH // length indicator, must remain last
|
||||
};
|
||||
|
||||
enum TimeExceededCode
|
||||
{
|
||||
TIME_TO_LIVE,
|
||||
FRAGMENT_REASSEMBLY,
|
||||
TIME_EXCEEDED_UNKNOWN, // non-standard default, must remain last but one
|
||||
TIME_EXCEEDED_LENGTH // length indicator, must remain last
|
||||
};
|
||||
|
||||
enum ParameterProblemCode
|
||||
{
|
||||
POINTER_INDICATES_THE_ERROR,
|
||||
PARAMETER_PROBLEM_UNKNOWN, // non-standard default, must remain last but one
|
||||
PARAMETER_PROBLEM_LENGTH // length indicator, must remain last
|
||||
};
|
||||
|
||||
ICMPv4PacketImpl(int dataSize = 48);
|
||||
/// Constructor. Creates an ICMPv4PacketImpl.
|
||||
|
||||
~ICMPv4PacketImpl();
|
||||
/// Destructor.
|
||||
|
||||
int packetSize() const;
|
||||
/// Returns the total length of packet (header + data);
|
||||
|
||||
struct timeval time(Poco::UInt8* buffer = 0, int length = 0) const;
|
||||
/// Returns current epoch time if either buffer or length are equal to zero.
|
||||
/// Otherwise, it extracts the time value from the supplied buffer.
|
||||
///
|
||||
/// Buffer includes IP header, ICMP header and data.
|
||||
|
||||
bool validReplyID(Poco::UInt8* buffer, int length) const;
|
||||
/// Returns true if the extracted id is recognized
|
||||
/// (i.e. equals the process id).
|
||||
///
|
||||
/// Buffer includes IP header, ICMP header and data.
|
||||
|
||||
virtual std::string errorDescription(Poco::UInt8* buffer, int length);
|
||||
/// Returns error description string.
|
||||
/// If supplied buffer contains ICMPv4 echo reply packet, an
|
||||
/// empty string is returned indicating the absence of error.
|
||||
///
|
||||
/// Buffer includes IP header, ICMP header and data.
|
||||
|
||||
virtual std::string typeDescription(int typeId);
|
||||
/// Returns the description of the packet type.
|
||||
|
||||
static const Poco::UInt16 MAX_PACKET_SIZE;
|
||||
static const std::string MESSAGE_TYPE[MESSAGE_TYPE_LENGTH];
|
||||
static const Poco::UInt8 DESTINATION_UNREACHABLE_TYPE; // 3
|
||||
static const Poco::UInt8 SOURCE_QUENCH_TYPE; // 4
|
||||
static const Poco::UInt8 REDIRECT_MESSAGE_TYPE; // 5
|
||||
static const Poco::UInt8 TIME_EXCEEDED_TYPE; // 11
|
||||
static const Poco::UInt8 PARAMETER_PROBLEM_TYPE; // 12
|
||||
|
||||
private:
|
||||
void initPacket();
|
||||
Header* header(Poco::UInt8* buffer, int length) const;
|
||||
Poco::UInt8* data(Poco::UInt8* buffer, int length) const;
|
||||
|
||||
static const std::string DESTINATION_UNREACHABLE_CODE[DESTINATION_UNREACHABLE_LENGTH];
|
||||
static const std::string REDIRECT_MESSAGE_CODE[REDIRECT_MESSAGE_LENGTH];
|
||||
static const std::string TIME_EXCEEDED_CODE[TIME_EXCEEDED_LENGTH];
|
||||
static const std::string PARAMETER_PROBLEM_CODE[PARAMETER_PROBLEM_LENGTH];
|
||||
|
||||
Poco::UInt16 _seq;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ICMPv4PacketImpl_INCLUDED
|
||||
380
Net/include/Poco/Net/IPAddress.h
Normal file
380
Net/include/Poco/Net/IPAddress.h
Normal file
@@ -0,0 +1,380 @@
|
||||
//
|
||||
// IPAddress.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/IPAddress.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: IPAddress
|
||||
//
|
||||
// Definition of the IPAddress class.
|
||||
//
|
||||
// Copyright (c) 2005-2011, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_IPAddress_INCLUDED
|
||||
#define Net_IPAddress_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class IPAddressImpl;
|
||||
|
||||
|
||||
class Net_API IPAddress
|
||||
/// This class represents an internet (IP) host
|
||||
/// address. The address can belong either to the
|
||||
/// IPv4 or the IPv6 address family.
|
||||
///
|
||||
/// Relational operators (==, !=, <, <=, >, >=) are
|
||||
/// supported. However, you must not interpret any
|
||||
/// special meaning into the result of these
|
||||
/// operations, other than that the results are
|
||||
/// consistent.
|
||||
///
|
||||
/// Especially, an IPv4 address is never equal to
|
||||
/// an IPv6 address, even if the IPv6 address is
|
||||
/// IPv4 compatible and the addresses are the same.
|
||||
///
|
||||
/// IPv6 addresses are supported only if the target platform
|
||||
/// supports IPv6.
|
||||
{
|
||||
public:
|
||||
enum Family
|
||||
/// Possible address families for IP addresses.
|
||||
{
|
||||
IPv4,
|
||||
IPv6
|
||||
};
|
||||
|
||||
IPAddress();
|
||||
/// Creates a wildcard (zero) IPv4 IPAddress.
|
||||
|
||||
IPAddress(const IPAddress& addr);
|
||||
/// Creates an IPAddress by copying another one.
|
||||
|
||||
explicit IPAddress(Family family);
|
||||
/// Creates a wildcard (zero) IPAddress for the
|
||||
/// given address family.
|
||||
|
||||
explicit IPAddress(const std::string& addr);
|
||||
/// Creates an IPAddress from the string containing
|
||||
/// an IP address in presentation format (dotted decimal
|
||||
/// for IPv4, hex string for IPv6).
|
||||
///
|
||||
/// Depending on the format of addr, either an IPv4 or
|
||||
/// an IPv6 address is created.
|
||||
///
|
||||
/// See toString() for details on the supported formats.
|
||||
///
|
||||
/// Throws an InvalidAddressException if the address cannot be parsed.
|
||||
|
||||
IPAddress(const std::string& addr, Family family);
|
||||
/// Creates an IPAddress from the string containing
|
||||
/// an IP address in presentation format (dotted decimal
|
||||
/// for IPv4, hex string for IPv6).
|
||||
|
||||
IPAddress(const void* addr, poco_socklen_t length);
|
||||
/// Creates an IPAddress from a native internet address.
|
||||
/// A pointer to a in_addr or a in6_addr structure may be
|
||||
/// passed.
|
||||
|
||||
IPAddress(const void* addr, poco_socklen_t length, Poco::UInt32 scope);
|
||||
/// Creates an IPAddress from a native internet address.
|
||||
/// A pointer to a in_addr or a in6_addr structure may be
|
||||
/// passed. Additionally, for an IPv6 address, a scope ID
|
||||
/// may be specified. The scope ID will be ignored if an IPv4
|
||||
/// address is specified.
|
||||
|
||||
~IPAddress();
|
||||
/// Destroys the IPAddress.
|
||||
|
||||
IPAddress& operator = (const IPAddress& addr);
|
||||
/// Assigns an IPAddress.
|
||||
|
||||
void swap(IPAddress& address);
|
||||
/// Swaps the IPAddress with another one.
|
||||
|
||||
Family family() const;
|
||||
/// Returns the address family (IPv4 or IPv6) of the address.
|
||||
|
||||
Poco::UInt32 scope() const;
|
||||
/// Returns the IPv6 scope identifier of the address. Returns 0 if
|
||||
/// the address is an IPv4 address, or the address is an
|
||||
/// IPv6 address but does not have a scope identifier.
|
||||
|
||||
std::string toString() const;
|
||||
/// Returns a string containing a representation of the address
|
||||
/// in presentation format.
|
||||
///
|
||||
/// For IPv4 addresses the result will be in dotted-decimal
|
||||
/// (d.d.d.d) notation.
|
||||
///
|
||||
/// Textual representation of IPv6 address is one of the following forms:
|
||||
///
|
||||
/// The preferred form is x:x:x:x:x:x:x:x, where the 'x's are the hexadecimal
|
||||
/// values of the eight 16-bit pieces of the address. This is the full form.
|
||||
/// Example: 1080:0:0:0:8:600:200A:425C
|
||||
///
|
||||
/// It is not necessary to write the leading zeros in an individual field.
|
||||
/// However, there must be at least one numeral in every field, except as described below.
|
||||
///
|
||||
/// It is common for IPv6 addresses to contain long strings of zero bits.
|
||||
/// In order to make writing addresses containing zero bits easier, a special syntax is
|
||||
/// available to compress the zeros. The use of "::" indicates multiple groups of 16-bits of zeros.
|
||||
/// The "::" can only appear once in an address. The "::" can also be used to compress the leading
|
||||
/// and/or trailing zeros in an address. Example: 1080::8:600:200A:425C
|
||||
///
|
||||
/// For dealing with IPv4 compatible addresses in a mixed environment,
|
||||
/// a special syntax is available: x:x:x:x:x:x:d.d.d.d, where the 'x's are the
|
||||
/// hexadecimal values of the six high-order 16-bit pieces of the address,
|
||||
/// and the 'd's are the decimal values of the four low-order 8-bit pieces of the
|
||||
/// standard IPv4 representation address. Example: ::FFFF:192.168.1.120
|
||||
///
|
||||
/// If an IPv6 address contains a non-zero scope identifier, it is added
|
||||
/// to the string, delimited by a percent character. On Windows platforms,
|
||||
/// the numeric value (which specifies an interface index) is directly
|
||||
/// appended. On Unix platforms, the name of the interface corresponding
|
||||
/// to the index (interpretation of the scope identifier) is added.
|
||||
|
||||
bool isWildcard() const;
|
||||
/// Returns true iff the address is a wildcard (all zero)
|
||||
/// address.
|
||||
|
||||
bool isBroadcast() const;
|
||||
/// Returns true iff the address is a broadcast address.
|
||||
///
|
||||
/// Only IPv4 addresses can be broadcast addresses. In a broadcast
|
||||
/// address, all bits are one.
|
||||
///
|
||||
/// For a IPv6 address, returns always false.
|
||||
|
||||
bool isLoopback() const;
|
||||
/// Returns true iff the address is a loopback address.
|
||||
///
|
||||
/// For IPv4, the loopback address is 127.0.0.1.
|
||||
///
|
||||
/// For IPv6, the loopback address is ::1.
|
||||
|
||||
bool isMulticast() const;
|
||||
/// Returns true iff the address is a multicast address.
|
||||
///
|
||||
/// IPv4 multicast addresses are in the
|
||||
/// 224.0.0.0 to 239.255.255.255 range
|
||||
/// (the first four bits have the value 1110).
|
||||
///
|
||||
/// IPv6 multicast addresses are in the
|
||||
/// FFxx:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isUnicast() const;
|
||||
/// Returns true iff the address is a unicast address.
|
||||
///
|
||||
/// An address is unicast if it is neither a wildcard,
|
||||
/// broadcast or multicast address.
|
||||
|
||||
bool isLinkLocal() const;
|
||||
/// Returns true iff the address is a link local unicast address.
|
||||
///
|
||||
/// IPv4 link local addresses are in the 169.254.0.0/16 range,
|
||||
/// according to RFC 3927.
|
||||
///
|
||||
/// IPv6 link local addresses have 1111 1110 10 as the first
|
||||
/// 10 bits, followed by 54 zeros.
|
||||
|
||||
bool isSiteLocal() const;
|
||||
/// Returns true iff the address is a site local unicast address.
|
||||
///
|
||||
/// IPv4 site local addresses are in on of the 10.0.0.0/24,
|
||||
/// 192.168.0.0/16 or 172.16.0.0 to 172.31.255.255 ranges.
|
||||
///
|
||||
/// IPv6 site local addresses have 1111 1110 11 as the first
|
||||
/// 10 bits, followed by 38 zeros.
|
||||
|
||||
bool isIPv4Compatible() const;
|
||||
/// Returns true iff the address is IPv4 compatible.
|
||||
///
|
||||
/// For IPv4 addresses, this is always true.
|
||||
///
|
||||
/// For IPv6, the address must be in the ::x:x range (the
|
||||
/// first 96 bits are zero).
|
||||
|
||||
bool isIPv4Mapped() const;
|
||||
/// Returns true iff the address is an IPv4 mapped IPv6 address.
|
||||
///
|
||||
/// For IPv4 addresses, this is always true.
|
||||
///
|
||||
/// For IPv6, the address must be in the ::FFFF:x:x range.
|
||||
|
||||
bool isWellKnownMC() const;
|
||||
/// Returns true iff the address is a well-known multicast address.
|
||||
///
|
||||
/// For IPv4, well-known multicast addresses are in the
|
||||
/// 224.0.0.0/8 range.
|
||||
///
|
||||
/// For IPv6, well-known multicast addresses are in the
|
||||
/// FF0x:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isNodeLocalMC() const;
|
||||
/// Returns true iff the address is a node-local multicast address.
|
||||
///
|
||||
/// IPv4 does not support node-local addresses, thus the result is
|
||||
/// always false for an IPv4 address.
|
||||
///
|
||||
/// For IPv6, node-local multicast addresses are in the
|
||||
/// FFx1:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isLinkLocalMC() const;
|
||||
/// Returns true iff the address is a link-local multicast address.
|
||||
///
|
||||
/// For IPv4, link-local multicast addresses are in the
|
||||
/// 224.0.0.0/24 range. Note that this overlaps with the range for well-known
|
||||
/// multicast addresses.
|
||||
///
|
||||
/// For IPv6, link-local multicast addresses are in the
|
||||
/// FFx2:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isSiteLocalMC() const;
|
||||
/// Returns true iff the address is a site-local multicast address.
|
||||
///
|
||||
/// For IPv4, site local multicast addresses are in the
|
||||
/// 239.255.0.0/16 range.
|
||||
///
|
||||
/// For IPv6, site-local multicast addresses are in the
|
||||
/// FFx5:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isOrgLocalMC() const;
|
||||
/// Returns true iff the address is a organization-local multicast address.
|
||||
///
|
||||
/// For IPv4, organization-local multicast addresses are in the
|
||||
/// 239.192.0.0/16 range.
|
||||
///
|
||||
/// For IPv6, organization-local multicast addresses are in the
|
||||
/// FFx8:x:x:x:x:x:x:x range.
|
||||
|
||||
bool isGlobalMC() const;
|
||||
/// Returns true iff the address is a global multicast address.
|
||||
///
|
||||
/// For IPv4, global multicast addresses are in the
|
||||
/// 224.0.1.0 to 238.255.255.255 range.
|
||||
///
|
||||
/// For IPv6, global multicast addresses are in the
|
||||
/// FFxF:x:x:x:x:x:x:x range.
|
||||
|
||||
bool operator == (const IPAddress& addr) const;
|
||||
bool operator != (const IPAddress& addr) const;
|
||||
bool operator < (const IPAddress& addr) const;
|
||||
bool operator <= (const IPAddress& addr) const;
|
||||
bool operator > (const IPAddress& addr) const;
|
||||
bool operator >= (const IPAddress& addr) const;
|
||||
|
||||
poco_socklen_t length() const;
|
||||
/// Returns the length in bytes of the internal socket address structure.
|
||||
|
||||
const void* addr() const;
|
||||
/// Returns the internal address structure.
|
||||
|
||||
int af() const;
|
||||
/// Returns the address family (AF_INET or AF_INET6) of the address.
|
||||
|
||||
void mask(const IPAddress& mask);
|
||||
/// Masks the IP address using the given netmask, which is usually
|
||||
/// a IPv4 subnet mask. Only supported for IPv4 addresses.
|
||||
///
|
||||
/// The new address is (address & mask).
|
||||
|
||||
void mask(const IPAddress& mask, const IPAddress& set);
|
||||
/// Masks the IP address using the given netmask, which is usually
|
||||
/// a IPv4 subnet mask. Only supported for IPv4 addresses.
|
||||
///
|
||||
/// The new address is (address & mask) | (set & ~mask).
|
||||
|
||||
static IPAddress parse(const std::string& addr);
|
||||
/// Creates an IPAddress from the string containing
|
||||
/// an IP address in presentation format (dotted decimal
|
||||
/// for IPv4, hex string for IPv6).
|
||||
///
|
||||
/// Depending on the format of addr, either an IPv4 or
|
||||
/// an IPv6 address is created.
|
||||
///
|
||||
/// See toString() for details on the supported formats.
|
||||
///
|
||||
/// Throws an InvalidAddressException if the address cannot be parsed.
|
||||
|
||||
static bool tryParse(const std::string& addr, IPAddress& result);
|
||||
/// Tries to interpret the given address string as an
|
||||
/// IP address in presentation format (dotted decimal
|
||||
/// for IPv4, hex string for IPv6).
|
||||
///
|
||||
/// Returns true and stores the IPAddress in result if the
|
||||
/// string contains a valid address.
|
||||
///
|
||||
/// Returns false and leaves result unchanged otherwise.
|
||||
|
||||
static IPAddress wildcard(Family family = IPv4);
|
||||
/// Returns a wildcard IPv4 or IPv6 address (0.0.0.0).
|
||||
|
||||
static IPAddress broadcast();
|
||||
/// Returns a broadcast IPv4 address (255.255.255.255).
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_ADDRESS_LENGTH =
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
sizeof(struct in6_addr)
|
||||
#else
|
||||
sizeof(struct in_addr)
|
||||
#endif
|
||||
/// Maximum length in bytes of a socket address.
|
||||
};
|
||||
|
||||
protected:
|
||||
void init(IPAddressImpl* pImpl);
|
||||
|
||||
private:
|
||||
IPAddressImpl* _pImpl;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void swap(IPAddress& addr1, IPAddress& addr2)
|
||||
{
|
||||
addr1.swap(addr2);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_IPAddress_INCLUDED
|
||||
293
Net/include/Poco/Net/MailMessage.h
Normal file
293
Net/include/Poco/Net/MailMessage.h
Normal file
@@ -0,0 +1,293 @@
|
||||
//
|
||||
// MailMessage.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MailMessage.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Mail
|
||||
// Module: MailMessage
|
||||
//
|
||||
// Definition of the MailMessage class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MailMessage_INCLUDED
|
||||
#define Net_MailMessage_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/MessageHeader.h"
|
||||
#include "Poco/Net/MailRecipient.h"
|
||||
#include "Poco/Timestamp.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MediaType;
|
||||
class PartSource;
|
||||
class PartHandler;
|
||||
class MultipartWriter;
|
||||
|
||||
|
||||
class Net_API MailMessage: public MessageHeader
|
||||
/// This class represents an e-mail message for
|
||||
/// use with the SMTPClientSession and POPClientSession
|
||||
/// classes.
|
||||
///
|
||||
/// MailMessage supports both old-style plain text messages,
|
||||
/// as well as MIME multipart mail messages with attachments.
|
||||
///
|
||||
/// For multi-part messages, the following content transfer
|
||||
/// encodings are supported: 7bit, 8bit, quoted-printable
|
||||
/// and base64.
|
||||
{
|
||||
public:
|
||||
typedef std::vector<MailRecipient> Recipients;
|
||||
|
||||
enum ContentDisposition
|
||||
{
|
||||
CONTENT_INLINE,
|
||||
CONTENT_ATTACHMENT
|
||||
};
|
||||
|
||||
enum ContentTransferEncoding
|
||||
{
|
||||
ENCODING_7BIT,
|
||||
ENCODING_8BIT,
|
||||
ENCODING_QUOTED_PRINTABLE,
|
||||
ENCODING_BASE64
|
||||
};
|
||||
|
||||
MailMessage();
|
||||
/// Creates an empty MailMessage.
|
||||
|
||||
virtual ~MailMessage();
|
||||
/// Destroys the MailMessage.
|
||||
|
||||
void addRecipient(const MailRecipient& recipient);
|
||||
/// Adds a recipient for the message.
|
||||
|
||||
const Recipients& recipients() const;
|
||||
/// Returns the recipients of the message.
|
||||
|
||||
void setSubject(const std::string& subject);
|
||||
/// Sets the subject of the message.
|
||||
///
|
||||
/// The subject must not contain any non-ASCII
|
||||
/// characters. To include non-ASCII characters
|
||||
/// in the subject, use RFC 2047 word encoding
|
||||
/// (see encodeWord()).
|
||||
|
||||
const std::string& getSubject() const;
|
||||
/// Returns the subject of the message.
|
||||
|
||||
void setSender(const std::string& sender);
|
||||
/// Sets the sender of the message (which
|
||||
/// ends up in the From header field).
|
||||
///
|
||||
/// The sender must either be a valid email
|
||||
/// address, or a real name followed by
|
||||
/// an email address enclosed in < and >.
|
||||
///
|
||||
/// The sender must not contain any non-ASCII
|
||||
/// characters. To include non-ASCII characters
|
||||
/// in the sender, use RFC 2047 word encoding
|
||||
/// (see encodeWord()).
|
||||
|
||||
const std::string& getSender() const;
|
||||
/// Returns the sender of the message (taken
|
||||
/// from the From header field).
|
||||
|
||||
void setContent(const std::string& content, ContentTransferEncoding encoding = ENCODING_QUOTED_PRINTABLE);
|
||||
/// Sets the content of the mail message.
|
||||
///
|
||||
/// If the content transfer encoding is ENCODING_7BIT or
|
||||
/// ENCODING_8BIT, the content string must be formatted
|
||||
/// according to the rules of an internet email message.
|
||||
///
|
||||
/// The message will be sent as a single-part
|
||||
/// message.
|
||||
|
||||
const std::string& getContent() const;
|
||||
/// Returns the content of the mail message.
|
||||
///
|
||||
/// A content will only be returned for single-part
|
||||
/// messages. The content of multi-part mail messages
|
||||
/// will be reported through the registered PartHandler.
|
||||
|
||||
void setContentType(const std::string& mediaType);
|
||||
/// Sets the content type for the message.
|
||||
|
||||
void setContentType(const MediaType& mediaType);
|
||||
/// Sets the content type for the message.
|
||||
|
||||
const std::string& getContentType() const;
|
||||
/// Returns the content type for the message.
|
||||
|
||||
void setDate(const Poco::Timestamp& dateTime);
|
||||
/// Sets the Date header to the given date/time value.
|
||||
|
||||
Poco::Timestamp getDate() const;
|
||||
/// Returns the value of the Date header.
|
||||
|
||||
bool isMultipart() const;
|
||||
/// Returns true iff the message is a multipart message.
|
||||
|
||||
void addPart(const std::string& name, PartSource* pSource, ContentDisposition disposition, ContentTransferEncoding encoding);
|
||||
/// Adds a part/attachment to the mail message.
|
||||
///
|
||||
/// The MailMessage takes ownership of the PartSource and deletes it
|
||||
/// when it is no longer needed.
|
||||
///
|
||||
/// The MailMessage will be converted to a multipart message
|
||||
/// if it is not already one.
|
||||
///
|
||||
/// The part name, and the filename specified in the part source
|
||||
/// must not contain any non-ASCII characters.
|
||||
/// To include non-ASCII characters in the part name or filename,
|
||||
/// use RFC 2047 word encoding (see encodeWord()).
|
||||
|
||||
void addContent(PartSource* pSource, ContentTransferEncoding encoding = ENCODING_QUOTED_PRINTABLE);
|
||||
/// Adds a part to the mail message by calling
|
||||
/// addPart("", pSource, CONTENT_INLINE, encoding);
|
||||
///
|
||||
/// The part name, and the filename specified in the part source
|
||||
/// must not contain any non-ASCII characters.
|
||||
/// To include non-ASCII characters in the part name or filename,
|
||||
/// use RFC 2047 word encoding (see encodeWord()).
|
||||
|
||||
void addAttachment(const std::string& name, PartSource* pSource, ContentTransferEncoding encoding = ENCODING_BASE64);
|
||||
/// Adds an attachment to the mail message by calling
|
||||
/// addPart(name, pSource, CONTENT_ATTACHMENT, encoding);
|
||||
///
|
||||
/// The part name, and the filename specified in the part source
|
||||
/// must not contain any non-ASCII characters.
|
||||
/// To include non-ASCII characters in the part name or filename,
|
||||
/// use RFC 2047 word encoding (see encodeWord()).
|
||||
|
||||
void read(std::istream& istr, PartHandler& handler);
|
||||
/// Reads the MailMessage from the given input stream.
|
||||
///
|
||||
/// If the message has multiple parts, the parts
|
||||
/// are reported to the PartHandler. If the message
|
||||
/// is not a multi-part message, the content is stored
|
||||
/// in a string available by calling getContent().
|
||||
|
||||
void read(std::istream& istr);
|
||||
/// Reads the MailMessage from the given input stream.
|
||||
///
|
||||
/// The raw message (including all MIME parts) is stored
|
||||
/// in a string and available by calling getContent().
|
||||
|
||||
void write(std::ostream& ostr) const;
|
||||
/// Writes the mail message to the given output stream.
|
||||
|
||||
static std::string encodeWord(const std::string& text, const std::string& charset = "UTF-8");
|
||||
/// If the given string contains non-ASCII characters,
|
||||
/// encodes the given string using RFC 2047 "Q" word encoding.
|
||||
///
|
||||
/// The given text must already be encoded in the character set
|
||||
/// given in charset (default is UTF-8).
|
||||
///
|
||||
/// Returns the encoded string, or the original string if it
|
||||
/// consists only of ASCII characters.
|
||||
|
||||
protected:
|
||||
struct Part
|
||||
{
|
||||
std::string name;
|
||||
PartSource* pSource;
|
||||
ContentDisposition disposition;
|
||||
ContentTransferEncoding encoding;
|
||||
};
|
||||
typedef std::vector<Part> PartVec;
|
||||
|
||||
void makeMultipart();
|
||||
void writeHeader(const MessageHeader& header, std::ostream& ostr) const;
|
||||
void writeMultipart(MessageHeader& header, std::ostream& ostr) const;
|
||||
void writePart(MultipartWriter& writer, const Part& part) const;
|
||||
void writeEncoded(std::istream& istr, std::ostream& ostr, ContentTransferEncoding encoding) const;
|
||||
void setRecipientHeaders(MessageHeader& headers) const;
|
||||
void readHeader(std::istream& istr);
|
||||
void readMultipart(std::istream& istr, PartHandler& handler);
|
||||
void readPart(std::istream& istr, const MessageHeader& header, PartHandler& handler);
|
||||
void handlePart(std::istream& istr, const MessageHeader& header, PartHandler& handler);
|
||||
static const std::string& contentTransferEncodingToString(ContentTransferEncoding encoding);
|
||||
static int lineLength(const std::string& str);
|
||||
static void appendRecipient(const MailRecipient& recipient, std::string& str);
|
||||
|
||||
static const std::string HEADER_SUBJECT;
|
||||
static const std::string HEADER_FROM;
|
||||
static const std::string HEADER_TO;
|
||||
static const std::string HEADER_CC;
|
||||
static const std::string HEADER_BCC;
|
||||
static const std::string HEADER_DATE;
|
||||
static const std::string HEADER_CONTENT_TYPE;
|
||||
static const std::string HEADER_CONTENT_TRANSFER_ENCODING;
|
||||
static const std::string HEADER_CONTENT_DISPOSITION;
|
||||
static const std::string HEADER_MIME_VERSION;
|
||||
static const std::string EMPTY_HEADER;
|
||||
static const std::string TEXT_PLAIN;
|
||||
static const std::string CTE_7BIT;
|
||||
static const std::string CTE_8BIT;
|
||||
static const std::string CTE_QUOTED_PRINTABLE;
|
||||
static const std::string CTE_BASE64;
|
||||
|
||||
private:
|
||||
MailMessage(const MailMessage&);
|
||||
MailMessage& operator = (const MailMessage&);
|
||||
|
||||
Recipients _recipients;
|
||||
PartVec _parts;
|
||||
std::string _content;
|
||||
ContentTransferEncoding _encoding;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const MailMessage::Recipients& MailMessage::recipients() const
|
||||
{
|
||||
return _recipients;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& MailMessage::getContent() const
|
||||
{
|
||||
return _content;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MailMessage_INCLUDED
|
||||
142
Net/include/Poco/Net/MailRecipient.h
Normal file
142
Net/include/Poco/Net/MailRecipient.h
Normal file
@@ -0,0 +1,142 @@
|
||||
//
|
||||
// MailRecipient.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MailRecipient.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Mail
|
||||
// Module: MailRecipient
|
||||
//
|
||||
// Definition of the MailRecipient class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MailRecipient_INCLUDED
|
||||
#define Net_MailRecipient_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API MailRecipient
|
||||
/// The recipient of an e-mail message.
|
||||
///
|
||||
/// A recipient has a type (primary recipient,
|
||||
/// carbon-copy recipient, blind-carbon-copy
|
||||
/// recipient), an e-mail address and an optional
|
||||
/// real name.
|
||||
{
|
||||
public:
|
||||
enum RecipientType
|
||||
{
|
||||
PRIMARY_RECIPIENT,
|
||||
CC_RECIPIENT,
|
||||
BCC_RECIPIENT
|
||||
};
|
||||
|
||||
MailRecipient();
|
||||
/// Creates an empty MailRecipient.
|
||||
|
||||
MailRecipient(const MailRecipient& recipient);
|
||||
/// Creates a MailRecipient by copying another one.
|
||||
|
||||
MailRecipient(RecipientType type, const std::string& address);
|
||||
/// Creates a MailRecipient of the given type.
|
||||
|
||||
MailRecipient(RecipientType type, const std::string& address, const std::string& realName);
|
||||
/// Creates a MailRecipient of the given type.
|
||||
|
||||
~MailRecipient();
|
||||
/// Destroys the MailRecipient.
|
||||
|
||||
MailRecipient& operator = (const MailRecipient& recipient);
|
||||
/// Assigns another recipient.
|
||||
|
||||
void swap(MailRecipient& recipient);
|
||||
/// Exchanges the content of two recipients.
|
||||
|
||||
RecipientType getType() const;
|
||||
/// Returns the type of the recipient.
|
||||
|
||||
void setType(RecipientType type);
|
||||
/// Sets the type of the recipient.
|
||||
|
||||
const std::string& getAddress() const;
|
||||
/// Returns the address of the recipient.
|
||||
|
||||
void setAddress(const std::string& address);
|
||||
/// Sets the address of the recipient.
|
||||
|
||||
const std::string& getRealName() const;
|
||||
/// Returns the real name of the recipient.
|
||||
|
||||
void setRealName(const std::string& realName);
|
||||
/// Sets the real name of the recipient.
|
||||
|
||||
private:
|
||||
std::string _address;
|
||||
std::string _realName;
|
||||
RecipientType _type;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline MailRecipient::RecipientType MailRecipient::getType() const
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& MailRecipient::getAddress() const
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& MailRecipient::getRealName() const
|
||||
{
|
||||
return _realName;
|
||||
}
|
||||
|
||||
|
||||
inline void swap(MailRecipient& r1, MailRecipient& r2)
|
||||
{
|
||||
r1.swap(r2);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MailRecipient_INCLUDED
|
||||
168
Net/include/Poco/Net/MailStream.h
Normal file
168
Net/include/Poco/Net/MailStream.h
Normal file
@@ -0,0 +1,168 @@
|
||||
//
|
||||
// MailStream.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MailStream.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Mail
|
||||
// Module: MailStream
|
||||
//
|
||||
// Definition of the MailStream class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MailStream_INCLUDED
|
||||
#define Net_MailStream_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/UnbufferedStreamBuf.h"
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API MailStreamBuf: public Poco::UnbufferedStreamBuf
|
||||
/// The sole purpose of this stream buffer is to replace
|
||||
/// a "\r\n.\r\n" character sequence with a "\r\n..\r\n" sequence for
|
||||
/// output streams and vice-versa for input streams.
|
||||
///
|
||||
/// This is used when sending mail messages to SMTP servers, or
|
||||
/// receiving mail messages from POP servers.
|
||||
///
|
||||
/// See RFC 2181 (Simple Mail Transfer Protocol) and RFC 1939
|
||||
/// (Post Office Protocol - Version 3) for more information.
|
||||
{
|
||||
public:
|
||||
MailStreamBuf(std::istream& istr);
|
||||
/// Creates the MailStreamBuf and connects it
|
||||
/// to the given input stream.
|
||||
|
||||
MailStreamBuf(std::ostream& ostr);
|
||||
/// Creates the MailStreamBuf and connects it
|
||||
/// to the given output stream.
|
||||
|
||||
~MailStreamBuf();
|
||||
/// Destroys the MailStreamBuf.
|
||||
|
||||
void close();
|
||||
/// Writes the terminating period, followed by
|
||||
/// CR-LF.
|
||||
|
||||
protected:
|
||||
int readFromDevice();
|
||||
int writeToDevice(char c);
|
||||
int readOne();
|
||||
|
||||
private:
|
||||
enum State
|
||||
{
|
||||
ST_DATA,
|
||||
ST_CR,
|
||||
ST_CR_LF,
|
||||
ST_CR_LF_DOT,
|
||||
ST_CR_LF_DOT_DOT,
|
||||
ST_CR_LF_DOT_CR,
|
||||
ST_CR_LF_DOT_CR_LF
|
||||
};
|
||||
|
||||
std::istream* _pIstr;
|
||||
std::ostream* _pOstr;
|
||||
std::string _buffer;
|
||||
State _state;
|
||||
};
|
||||
|
||||
|
||||
class Net_API MailIOS: public virtual std::ios
|
||||
/// The base class for MailInputStream and MailOutputStream.
|
||||
///
|
||||
/// This class provides common methods and is also needed to ensure
|
||||
/// the correct initialization order of the stream buffer and base classes.
|
||||
{
|
||||
public:
|
||||
MailIOS(std::istream& istr);
|
||||
/// Creates the MailIOS and connects it
|
||||
/// to the given input stream.
|
||||
|
||||
MailIOS(std::ostream& ostr);
|
||||
/// Creates the MailIOS and connects it
|
||||
/// to the given output stream.
|
||||
|
||||
~MailIOS();
|
||||
/// Destroys the stream.
|
||||
|
||||
void close();
|
||||
/// Writes the terminating period, followed by
|
||||
/// CR-LF.
|
||||
|
||||
MailStreamBuf* rdbuf();
|
||||
/// Returns a pointer to the underlying streambuf.
|
||||
|
||||
protected:
|
||||
MailStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API MailInputStream: public MailIOS, public std::istream
|
||||
/// This class is used for reading E-Mail messages from a
|
||||
/// POP3 server. All occurences of "\r\n..\r\n" are replaced with
|
||||
/// "\r\n.\r\n". The first occurence of "\r\n.\r\n" denotes the end
|
||||
/// of the stream.
|
||||
{
|
||||
public:
|
||||
MailInputStream(std::istream& istr);
|
||||
/// Creates the MailInputStream and connects it
|
||||
/// to the given input stream.
|
||||
|
||||
~MailInputStream();
|
||||
/// Destroys the MailInputStream.
|
||||
};
|
||||
|
||||
|
||||
class Net_API MailOutputStream: public MailIOS, public std::ostream
|
||||
/// This class is used for writing E-Mail messages to a
|
||||
/// SMTP server. All occurences of "\r\n.\r\n" are replaced with
|
||||
/// "\r\n..\r\n".
|
||||
{
|
||||
public:
|
||||
MailOutputStream(std::ostream& ostr);
|
||||
/// Creates the MailOutputStream and connects it
|
||||
/// to the given input stream.
|
||||
|
||||
~MailOutputStream();
|
||||
/// Destroys the MailOutputStream.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MailStream_INCLUDED
|
||||
191
Net/include/Poco/Net/MediaType.h
Normal file
191
Net/include/Poco/Net/MediaType.h
Normal file
@@ -0,0 +1,191 @@
|
||||
//
|
||||
// MediaType.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MediaType.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: MediaType
|
||||
//
|
||||
// Definition of the MediaType class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MediaType_INCLUDED
|
||||
#define Net_MediaType_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/NameValueCollection.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API MediaType
|
||||
/// This class represents a MIME media type, consisting of
|
||||
/// a top-level type, a subtype and an optional set of
|
||||
/// parameters.
|
||||
///
|
||||
/// The implementation conforms with RFC 2045 and RFC 2046.
|
||||
{
|
||||
public:
|
||||
MediaType(const std::string& mediaType);
|
||||
/// Creates the MediaType from the given string, which
|
||||
/// must have the format <type>/<subtype>{;<parameter>=<value>}.
|
||||
|
||||
MediaType(const std::string& type, const std::string& subType);
|
||||
/// Creates the MediaType, using the given type and subtype.
|
||||
|
||||
MediaType(const MediaType& mediaType);
|
||||
/// Creates a MediaType from another one.
|
||||
|
||||
~MediaType();
|
||||
/// Destroys the MediaType.
|
||||
|
||||
MediaType& operator = (const MediaType& mediaType);
|
||||
/// Assigns another media type.
|
||||
|
||||
MediaType& operator = (const std::string& mediaType);
|
||||
/// Assigns another media type.
|
||||
|
||||
void swap(MediaType& mediaType);
|
||||
/// Swaps the MediaType with another one.
|
||||
|
||||
void setType(const std::string& type);
|
||||
/// Sets the top-level type.
|
||||
|
||||
const std::string& getType() const;
|
||||
/// Returns the top-level type.
|
||||
|
||||
void setSubType(const std::string& subType);
|
||||
/// Sets the sub type.
|
||||
|
||||
const std::string& getSubType() const;
|
||||
/// Returns the sub type.
|
||||
|
||||
void setParameter(const std::string& name, const std::string& value);
|
||||
/// Sets the parameter with the given name.
|
||||
|
||||
const std::string& getParameter(const std::string& name) const;
|
||||
/// Returns the parameter with the given name.
|
||||
///
|
||||
/// Throws a NotFoundException if the parameter does not exist.
|
||||
|
||||
bool hasParameter(const std::string& name) const;
|
||||
/// Returns true iff a parameter with the given name exists.
|
||||
|
||||
void removeParameter(const std::string& name);
|
||||
/// Removes the parameter with the given name.
|
||||
|
||||
const NameValueCollection& parameters() const;
|
||||
/// Returns the parameters.
|
||||
|
||||
std::string toString() const;
|
||||
/// Returns the string representation of the media type
|
||||
/// which is <type>/<subtype>{;<parameter>=<value>}
|
||||
|
||||
bool matches(const MediaType& mediaType) const;
|
||||
/// Returns true iff the type and subtype match
|
||||
/// the type and subtype of the given media type.
|
||||
/// Matching is case insensitive.
|
||||
|
||||
bool matches(const std::string& type, const std::string& subType) const;
|
||||
/// Returns true iff the type and subtype match
|
||||
/// the given type and subtype.
|
||||
/// Matching is case insensitive.
|
||||
|
||||
bool matches(const std::string& type) const;
|
||||
/// Returns true iff the type matches the given type.
|
||||
/// Matching is case insensitive.
|
||||
|
||||
bool matchesRange(const MediaType& mediaType) const;
|
||||
/// Returns true if the type and subtype match
|
||||
/// the type and subtype of the given media type.
|
||||
/// If the MIME type is a range of types it matches
|
||||
/// any media type withing the range (e.g. "image/*" matches
|
||||
/// any image media type, "*/*" matches anything).
|
||||
/// Matching is case insensitive.
|
||||
|
||||
bool matchesRange(const std::string& type, const std::string& subType) const;
|
||||
/// Returns true if the type and subtype match
|
||||
/// the given type and subtype.
|
||||
/// If the MIME type is a range of types it matches
|
||||
/// any media type withing the range (e.g. "image/*" matches
|
||||
/// any image media type, "*/*" matches anything).
|
||||
/// Matching is case insensitive.
|
||||
|
||||
bool matchesRange(const std::string& type) const;
|
||||
/// Returns true if the type matches the given type or
|
||||
/// the type is a range of types denoted by "*".
|
||||
/// Matching is case insensitive.
|
||||
|
||||
protected:
|
||||
void parse(const std::string& mediaType);
|
||||
|
||||
private:
|
||||
MediaType();
|
||||
|
||||
std::string _type;
|
||||
std::string _subType;
|
||||
NameValueCollection _parameters;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& MediaType::getType() const
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
|
||||
inline const std::string& MediaType::getSubType() const
|
||||
{
|
||||
return _subType;
|
||||
}
|
||||
|
||||
|
||||
inline const NameValueCollection& MediaType::parameters() const
|
||||
{
|
||||
return _parameters;
|
||||
}
|
||||
|
||||
|
||||
inline void swap(MediaType& m1, MediaType& m2)
|
||||
{
|
||||
m1.swap(m2);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MediaType_INCLUDED
|
||||
181
Net/include/Poco/Net/MessageHeader.h
Normal file
181
Net/include/Poco/Net/MessageHeader.h
Normal file
@@ -0,0 +1,181 @@
|
||||
//
|
||||
// MessageHeader.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MessageHeader.h#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: MessageHeader
|
||||
//
|
||||
// Definition of the MessageHeader class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MessageHeader_INCLUDED
|
||||
#define Net_MessageHeader_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/NameValueCollection.h"
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API MessageHeader: public NameValueCollection
|
||||
/// A collection of name-value pairs that are used in
|
||||
/// various internet protocols like HTTP and SMTP.
|
||||
///
|
||||
/// The name is case-insensitive.
|
||||
///
|
||||
/// There can be more than one name-value pair with the
|
||||
/// same name.
|
||||
///
|
||||
/// MessageHeader supports writing and reading the
|
||||
/// header data in RFC 2822 format.
|
||||
///
|
||||
/// The maximum number of fields can be restricted
|
||||
/// by calling setFieldLimit(). This is useful to
|
||||
/// defend against certain kinds of denial-of-service
|
||||
/// attacks. The limit is only enforced when parsing
|
||||
/// header fields from a stream, not when programmatically
|
||||
/// adding them. The default limit is 100.
|
||||
{
|
||||
public:
|
||||
MessageHeader();
|
||||
/// Creates the MessageHeader.
|
||||
|
||||
MessageHeader(const MessageHeader& messageHeader);
|
||||
/// Creates the MessageHeader by copying
|
||||
/// another one.
|
||||
|
||||
virtual ~MessageHeader();
|
||||
/// Destroys the MessageHeader.
|
||||
|
||||
MessageHeader& operator = (const MessageHeader& messageHeader);
|
||||
/// Assigns the content of another MessageHeader.
|
||||
|
||||
virtual void write(std::ostream& ostr) const;
|
||||
/// Writes the message header to the given output stream.
|
||||
///
|
||||
/// The format is one name-value pair per line, with
|
||||
/// name and value separated by a colon and lines
|
||||
/// delimited by a carriage return and a linefeed
|
||||
/// character. See RFC 2822 for details.
|
||||
|
||||
virtual void read(std::istream& istr);
|
||||
/// Reads the message header from the given input stream.
|
||||
///
|
||||
/// See write() for the expected format.
|
||||
/// Also supported is folding of field content, according
|
||||
/// to section 2.2.3 of RFC 2822.
|
||||
///
|
||||
/// Reading stops at the first empty line (a line only
|
||||
/// containing \r\n or \n), as well as at the end of
|
||||
/// the stream.
|
||||
///
|
||||
/// Some basic sanity checking of the input stream is
|
||||
/// performed.
|
||||
///
|
||||
/// Throws a MessageException if the input stream is
|
||||
/// malformed.
|
||||
|
||||
int getFieldLimit() const;
|
||||
/// Returns the maximum number of header fields
|
||||
/// allowed.
|
||||
///
|
||||
/// See setFieldLimit() for more information.
|
||||
|
||||
void setFieldLimit(int limit);
|
||||
/// Sets the maximum number of header fields
|
||||
/// allowed. This limit is used to defend certain
|
||||
/// kinds of denial-of-service attacks.
|
||||
/// Specify 0 for unlimited (not recommended).
|
||||
///
|
||||
/// The default limit is 100.
|
||||
|
||||
static void splitElements(const std::string& s, std::vector<std::string>& elements, bool ignoreEmpty = true);
|
||||
/// Splits the given string into separate elements. Elements are expected
|
||||
/// to be separated by commas.
|
||||
///
|
||||
/// For example, the string
|
||||
/// text/plain; q=0.5, text/html, text/x-dvi; q=0.8
|
||||
/// is split into the elements
|
||||
/// text/plain; q=0.5
|
||||
/// text/html
|
||||
/// text/x-dvi; q=0.8
|
||||
///
|
||||
/// Commas enclosed in double quotes do not split elements.
|
||||
///
|
||||
/// If ignoreEmpty is true, empty elements are not returned.
|
||||
|
||||
static void splitParameters(const std::string& s, std::string& value, NameValueCollection& parameters);
|
||||
/// Splits the given string into a value and a collection of parameters.
|
||||
/// Parameters are expected to be separated by semicolons.
|
||||
///
|
||||
/// Enclosing quotes of parameter values are removed.
|
||||
///
|
||||
/// For example, the string
|
||||
/// multipart/mixed; boundary="MIME_boundary_01234567"
|
||||
/// is split into the value
|
||||
/// multipart/mixed
|
||||
/// and the parameter
|
||||
/// boundary -> MIME_boundary_01234567
|
||||
|
||||
static void splitParameters(const std::string::const_iterator& begin, const std::string::const_iterator& end, NameValueCollection& parameters);
|
||||
/// Splits the given string into a collection of parameters.
|
||||
/// Parameters are expected to be separated by semicolons.
|
||||
///
|
||||
/// Enclosing quotes of parameter values are removed.
|
||||
|
||||
static void quote(const std::string& value, std::string& result, bool allowSpace = false);
|
||||
/// Checks if the value must be quoted. If so, the value is
|
||||
/// appended to result, enclosed in double-quotes.
|
||||
/// Otherwise, the value is appended to result as-is.
|
||||
|
||||
private:
|
||||
enum Limits
|
||||
/// Limits for basic sanity checks when reading a header
|
||||
{
|
||||
MAX_NAME_LENGTH = 256,
|
||||
MAX_VALUE_LENGTH = 4096,
|
||||
DFL_FIELD_LIMIT = 100
|
||||
};
|
||||
|
||||
int _fieldLimit;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MessageHeader_INCLUDED
|
||||
138
Net/include/Poco/Net/MulticastSocket.h
Normal file
138
Net/include/Poco/Net/MulticastSocket.h
Normal file
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// MulticastSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MulticastSocket.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: MulticastSocket
|
||||
//
|
||||
// Definition of the MulticastSocket class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MulticastSocket_INCLUDED
|
||||
#define Net_MulticastSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/DatagramSocket.h"
|
||||
#include "Poco/Net/NetworkInterface.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API MulticastSocket: public DatagramSocket
|
||||
/// A MulticastSocket is a special DatagramSocket
|
||||
/// that can be used to send packets to and receive
|
||||
/// packets from multicast groups.
|
||||
{
|
||||
public:
|
||||
MulticastSocket();
|
||||
/// Creates the MulticastSocket.
|
||||
|
||||
explicit MulticastSocket(IPAddress::Family family);
|
||||
/// Creates an unconnected datagram socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
MulticastSocket(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Creates a datagram socket and binds it
|
||||
/// to the given address.
|
||||
///
|
||||
/// Depending on the address family, the socket
|
||||
/// will be either an IPv4 or an IPv6 socket.
|
||||
|
||||
MulticastSocket(const Socket& socket);
|
||||
/// Creates the DatagramSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a DatagramSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
~MulticastSocket();
|
||||
/// Destroys the DatagramSocket.
|
||||
|
||||
MulticastSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
void setInterface(const NetworkInterface& interfc);
|
||||
/// Sets the interface used for sending multicast packets.
|
||||
///
|
||||
/// To select the default interface, specify an empty
|
||||
/// interface.
|
||||
///
|
||||
/// This is done by setting the IP_MULTICAST_IF/IPV6_MULTICAST_IF
|
||||
/// socket option.
|
||||
|
||||
NetworkInterface getInterface() const;
|
||||
/// Returns the interface used for sending multicast packets.
|
||||
|
||||
void setLoopback(bool flag);
|
||||
/// Enable or disable loopback for multicast packets.
|
||||
///
|
||||
/// Sets the value of the IP_MULTICAST_LOOP/IPV6_MULTICAST_LOOP
|
||||
/// socket option.
|
||||
|
||||
bool getLoopback() const;
|
||||
/// Returns true iff loopback for multicast packets is enabled,
|
||||
/// false otherwise.
|
||||
|
||||
void setTimeToLive(unsigned value);
|
||||
/// Specifies the TTL/hop limit for outgoing packets.
|
||||
///
|
||||
/// Sets the value of the IP_MULTICAST_TTL/IPV6_MULTICAST_HOPS
|
||||
/// socket option.
|
||||
|
||||
unsigned getTimeToLive() const;
|
||||
/// Returns the TTL/hop limit for outgoing packets.
|
||||
|
||||
void joinGroup(const IPAddress& groupAddress);
|
||||
/// Joins the specified multicast group at the default interface.
|
||||
|
||||
void joinGroup(const IPAddress& groupAddress, const NetworkInterface& interfc);
|
||||
/// Joins the specified multicast group at the given interface.
|
||||
|
||||
void leaveGroup(const IPAddress& groupAddress);
|
||||
/// Leaves the specified multicast group at the default interface.
|
||||
|
||||
void leaveGroup(const IPAddress& groupAddress, const NetworkInterface& interfc);
|
||||
/// Leaves the specified multicast group at the given interface.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MulticastSocket_INCLUDED
|
||||
182
Net/include/Poco/Net/MultipartReader.h
Normal file
182
Net/include/Poco/Net/MultipartReader.h
Normal file
@@ -0,0 +1,182 @@
|
||||
//
|
||||
// MultipartReader.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MultipartReader.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: MultipartReader
|
||||
//
|
||||
// Definition of the MultipartReader class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MultipartReader_INCLUDED
|
||||
#define Net_MultipartReader_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/BufferedStreamBuf.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MessageHeader;
|
||||
|
||||
|
||||
class Net_API MultipartStreamBuf: public Poco::BufferedStreamBuf
|
||||
/// This is the streambuf class used for reading from a multipart message stream.
|
||||
{
|
||||
public:
|
||||
MultipartStreamBuf(std::istream& istr, const std::string& boundary);
|
||||
~MultipartStreamBuf();
|
||||
bool lastPart() const;
|
||||
|
||||
protected:
|
||||
int readFromDevice(char* buffer, std::streamsize length);
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
STREAM_BUFFER_SIZE = 1024
|
||||
};
|
||||
|
||||
std::istream& _istr;
|
||||
std::string _boundary;
|
||||
bool _lastPart;
|
||||
};
|
||||
|
||||
|
||||
class Net_API MultipartIOS: public virtual std::ios
|
||||
/// The base class for MultipartInputStream.
|
||||
{
|
||||
public:
|
||||
MultipartIOS(std::istream& istr, const std::string& boundary);
|
||||
~MultipartIOS();
|
||||
MultipartStreamBuf* rdbuf();
|
||||
bool lastPart() const;
|
||||
|
||||
protected:
|
||||
MultipartStreamBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API MultipartInputStream: public MultipartIOS, public std::istream
|
||||
/// This class is for internal use by MultipartReader only.
|
||||
{
|
||||
public:
|
||||
MultipartInputStream(std::istream& istr, const std::string& boundary);
|
||||
~MultipartInputStream();
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Net_API MultipartReader
|
||||
/// This class is used to split a MIME multipart
|
||||
/// message into its single parts.
|
||||
///
|
||||
/// The format of multipart messages is described
|
||||
/// in section 5.1 of RFC 2046.
|
||||
///
|
||||
/// To split a multipart message into its parts,
|
||||
/// do the following:
|
||||
/// - Create a MultipartReader object, passing it
|
||||
/// an input stream and optionally a boundary string.
|
||||
/// - while hasNextPart() returns true, call nextPart()
|
||||
/// and read the part from stream().
|
||||
///
|
||||
/// Always ensure that you read all data from the part
|
||||
/// stream, otherwise the MultipartReader will fail to
|
||||
/// find the next part.
|
||||
{
|
||||
public:
|
||||
explicit MultipartReader(std::istream& istr);
|
||||
/// Creates the MultipartReader and attaches it to the
|
||||
/// given input stream.
|
||||
///
|
||||
/// The boundary string is determined from the input
|
||||
/// stream. The message must not contain a preamble
|
||||
/// preceding the first encapsulation boundary.
|
||||
|
||||
MultipartReader(std::istream& istr, const std::string& boundary);
|
||||
/// Creates the MultipartReader and attaches it to the
|
||||
/// given input stream. The given boundary string is
|
||||
/// used to find message boundaries.
|
||||
|
||||
~MultipartReader();
|
||||
/// Destroys the MultipartReader.
|
||||
|
||||
void nextPart(MessageHeader& messageHeader);
|
||||
/// Moves to the next part in the message and stores the
|
||||
/// part's header fields in messageHeader.
|
||||
///
|
||||
/// Throws an MultipartException if there are no more parts
|
||||
/// available, or if no boundary line can be found in
|
||||
/// the input stream.
|
||||
|
||||
bool hasNextPart();
|
||||
/// Returns true iff more parts are available.
|
||||
///
|
||||
/// Before the first call to nextPart(), returns
|
||||
/// always true.
|
||||
|
||||
std::istream& stream() const;
|
||||
/// Returns a reference to the reader's stream that
|
||||
/// can be used to read the current part.
|
||||
///
|
||||
/// The returned reference will be valid until
|
||||
/// nextPart() is called or the MultipartReader
|
||||
/// object is destroyed.
|
||||
|
||||
const std::string& boundary() const;
|
||||
/// Returns the multipart boundary used by this reader.
|
||||
|
||||
protected:
|
||||
void findFirstBoundary();
|
||||
void guessBoundary();
|
||||
void parseHeader(MessageHeader& messageHeader);
|
||||
bool readLine(std::string& line, std::string::size_type n);
|
||||
|
||||
private:
|
||||
MultipartReader();
|
||||
MultipartReader(const MultipartReader&);
|
||||
MultipartReader& operator = (const MultipartReader&);
|
||||
|
||||
std::istream& _istr;
|
||||
std::string _boundary;
|
||||
MultipartInputStream* _pMPI;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MultipartReader_INCLUDED
|
||||
131
Net/include/Poco/Net/MultipartWriter.h
Normal file
131
Net/include/Poco/Net/MultipartWriter.h
Normal file
@@ -0,0 +1,131 @@
|
||||
//
|
||||
// MultipartWriter.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/MultipartWriter.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: MultipartWriter
|
||||
//
|
||||
// Definition of the MultipartWriter class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_MultipartWriter_INCLUDED
|
||||
#define Net_MultipartWriter_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MessageHeader;
|
||||
|
||||
|
||||
class Net_API MultipartWriter
|
||||
/// This class is used to write MIME multipart
|
||||
/// messages to an output stream.
|
||||
///
|
||||
/// The format of multipart messages is described
|
||||
/// in section 5.1 of RFC 2046.
|
||||
///
|
||||
/// To create a multipart message, first create
|
||||
/// a MultipartWriter object.
|
||||
/// Then, for each part, call nextPart() and
|
||||
/// write the content to the output stream.
|
||||
/// Repeat for all parts.
|
||||
/// After the last part has been written,
|
||||
/// call close() to finish the multipart message.
|
||||
{
|
||||
public:
|
||||
explicit MultipartWriter(std::ostream& ostr);
|
||||
/// Creates the MultipartWriter, using the
|
||||
/// given output stream.
|
||||
///
|
||||
/// Creates a random boundary string.
|
||||
|
||||
MultipartWriter(std::ostream& ostr, const std::string& boundary);
|
||||
/// Creates the MultipartWriter, using the
|
||||
/// given output stream and boundary string.
|
||||
|
||||
~MultipartWriter();
|
||||
/// Destroys the MultipartWriter.
|
||||
|
||||
void nextPart(const MessageHeader& header);
|
||||
/// Opens a new message part and writes
|
||||
/// the message boundary string, followed
|
||||
/// by the message header to the stream.
|
||||
|
||||
void close();
|
||||
/// Closes the multipart message and writes
|
||||
/// the terminating boundary string.
|
||||
///
|
||||
/// Does not close the underlying stream.
|
||||
|
||||
std::ostream& stream();
|
||||
/// Returns the writer's stream.
|
||||
|
||||
const std::string& boundary() const;
|
||||
/// Returns the multipart boundary used by this writer.
|
||||
|
||||
static std::string createBoundary();
|
||||
/// Creates a random boundary string.
|
||||
///
|
||||
/// The string always has the form
|
||||
/// MIME_boundary_XXXXXXXXXXXX, where
|
||||
/// XXXXXXXXXXXX is a random hexadecimal
|
||||
/// number.
|
||||
|
||||
private:
|
||||
MultipartWriter();
|
||||
MultipartWriter(const MultipartWriter&);
|
||||
MultipartWriter& operator = (const MultipartWriter&);
|
||||
|
||||
std::ostream& _ostr;
|
||||
std::string _boundary;
|
||||
bool _firstPart;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline std::ostream& MultipartWriter::stream()
|
||||
{
|
||||
return _ostr;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_MultipartWriter_INCLUDED
|
||||
155
Net/include/Poco/Net/NameValueCollection.h
Normal file
155
Net/include/Poco/Net/NameValueCollection.h
Normal file
@@ -0,0 +1,155 @@
|
||||
//
|
||||
// NameValueCollection.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/NameValueCollection.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: NameValueCollection
|
||||
//
|
||||
// Definition of the NameValueCollection class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_NameValueCollection_INCLUDED
|
||||
#define Net_NameValueCollection_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/String.h"
|
||||
#include <map>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API NameValueCollection
|
||||
/// A collection of name-value pairs that are used in
|
||||
/// various internet protocols like HTTP and SMTP.
|
||||
///
|
||||
/// The name is case-insensitive.
|
||||
///
|
||||
/// There can be more than one name-value pair with the
|
||||
/// same name.
|
||||
{
|
||||
public:
|
||||
struct ILT
|
||||
{
|
||||
bool operator() (const std::string& s1, const std::string& s2) const
|
||||
{
|
||||
return Poco::icompare(s1, s2) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::multimap<std::string, std::string, ILT> HeaderMap;
|
||||
typedef HeaderMap::iterator Iterator;
|
||||
typedef HeaderMap::const_iterator ConstIterator;
|
||||
|
||||
NameValueCollection();
|
||||
/// Creates an empty NameValueCollection.
|
||||
|
||||
NameValueCollection(const NameValueCollection& nvc);
|
||||
/// Creates a NameValueCollection by copying another one.
|
||||
|
||||
virtual ~NameValueCollection();
|
||||
/// Destroys the NameValueCollection.
|
||||
|
||||
NameValueCollection& operator = (const NameValueCollection& nvc);
|
||||
/// Assigns the name-value pairs of another NameValueCollection to this one.
|
||||
|
||||
void swap(NameValueCollection& nvc);
|
||||
/// Swaps the NameValueCollection with another one.
|
||||
|
||||
const std::string& operator [] (const std::string& name) const;
|
||||
/// Returns the value of the (first) name-value pair with the given name.
|
||||
///
|
||||
/// Throws a NotFoundException if the name-value pair does not exist.
|
||||
|
||||
void set(const std::string& name, const std::string& value);
|
||||
/// Sets the value of the (first) name-value pair with the given name.
|
||||
|
||||
void add(const std::string& name, const std::string& value);
|
||||
/// Adds a new name-value pair with the given name and value.
|
||||
|
||||
const std::string& get(const std::string& name) const;
|
||||
/// Returns the value of the first name-value pair with the given name.
|
||||
///
|
||||
/// Throws a NotFoundException if the name-value pair does not exist.
|
||||
|
||||
const std::string& get(const std::string& name, const std::string& defaultValue) const;
|
||||
/// Returns the value of the first name-value pair with the given name.
|
||||
/// If no value with the given name has been found, the defaultValue is returned.
|
||||
|
||||
bool has(const std::string& name) const;
|
||||
/// Returns true if there is at least one name-value pair
|
||||
/// with the given name.
|
||||
|
||||
ConstIterator find(const std::string& name) const;
|
||||
/// Returns an iterator pointing to the first name-value pair
|
||||
/// with the given name.
|
||||
|
||||
ConstIterator begin() const;
|
||||
/// Returns an iterator pointing to the begin of
|
||||
/// the name-value pair collection.
|
||||
|
||||
ConstIterator end() const;
|
||||
/// Returns an iterator pointing to the end of
|
||||
/// the name-value pair collection.
|
||||
|
||||
bool empty() const;
|
||||
/// Returns true iff the header does not have any content.
|
||||
|
||||
int size() const;
|
||||
/// Returns the number of name-value pairs in the
|
||||
/// collection.
|
||||
|
||||
void erase(const std::string& name);
|
||||
/// Removes all name-value pairs with the given name.
|
||||
|
||||
void clear();
|
||||
/// Removes all name-value pairs and their values.
|
||||
|
||||
private:
|
||||
HeaderMap _map;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void swap(NameValueCollection& nvc1, NameValueCollection& nvc2)
|
||||
{
|
||||
nvc1.swap(nvc2);
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_NameValueCollection_INCLUDED
|
||||
99
Net/include/Poco/Net/Net.h
Normal file
99
Net/include/Poco/Net/Net.h
Normal file
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// Net.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/Net.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: Net
|
||||
//
|
||||
// Basic definitions for the Poco Net library.
|
||||
// This file must be the first file included by every other Net
|
||||
// header file.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_Net_INCLUDED
|
||||
#define Net_Net_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Foundation.h"
|
||||
|
||||
|
||||
//
|
||||
// The following block is the standard way of creating macros which make exporting
|
||||
// from a DLL simpler. All files within this DLL are compiled with the Net_EXPORTS
|
||||
// symbol defined on the command line. this symbol should not be defined on any project
|
||||
// that uses this DLL. This way any other project whose source files include this file see
|
||||
// Net_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
//
|
||||
#if defined(_WIN32) && defined(POCO_DLL)
|
||||
#if defined(Net_EXPORTS)
|
||||
#define Net_API __declspec(dllexport)
|
||||
#else
|
||||
#define Net_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(Net_API)
|
||||
#define Net_API
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Automatically link Net library.
|
||||
//
|
||||
#if defined(_MSC_VER)
|
||||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(Net_EXPORTS)
|
||||
#pragma comment(lib, "PocoNet" POCO_LIB_SUFFIX)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
void Net_API initializeNetwork();
|
||||
/// Initialize the network subsystem.
|
||||
/// Calls WSAStartup() on Windows, does nothing
|
||||
/// on other platforms.
|
||||
|
||||
|
||||
void Net_API uninitializeNetwork();
|
||||
/// Uninitialize the network subsystem.
|
||||
/// Calls WSACleanup() on Windows, does nothing
|
||||
/// on other platforms.
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_Net_INCLUDED
|
||||
79
Net/include/Poco/Net/NetException.h
Normal file
79
Net/include/Poco/Net/NetException.h
Normal file
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// NetException.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/NetException.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: NetException
|
||||
//
|
||||
// Definition of the NetException class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_NetException_INCLUDED
|
||||
#define Net_NetException_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Exception.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
POCO_DECLARE_EXCEPTION(Net_API, NetException, Poco::IOException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, InvalidAddressException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, InvalidSocketException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, ServiceNotFoundException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, ConnectionAbortedException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, ConnectionResetException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, ConnectionRefusedException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, DNSException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, HostNotFoundException, DNSException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, NoAddressFoundException, DNSException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, InterfaceNotFoundException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, NoMessageException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, MessageException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, MultipartException, MessageException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, HTTPException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, NotAuthenticatedException, HTTPException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, UnsupportedRedirectException, HTTPException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, FTPException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, SMTPException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, POP3Exception, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, ICMPException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, HTMLFormException, NetException)
|
||||
POCO_DECLARE_EXCEPTION(Net_API, WebSocketException, NetException)
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_NetException_INCLUDED
|
||||
197
Net/include/Poco/Net/NetworkInterface.h
Normal file
197
Net/include/Poco/Net/NetworkInterface.h
Normal file
@@ -0,0 +1,197 @@
|
||||
//
|
||||
// NetworkInterface.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/NetworkInterface.h#4 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: NetworkInterface
|
||||
//
|
||||
// Definition of the NetworkInterface class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_NetworkInterface_INCLUDED
|
||||
#define Net_NetworkInterface_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/IPAddress.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class NetworkInterfaceImpl;
|
||||
|
||||
|
||||
class Net_API NetworkInterface
|
||||
/// This class represents a network interface.
|
||||
///
|
||||
/// NetworkInterface is used with MulticastSocket to specify
|
||||
/// multicast interfaces for sending and receiving multicast
|
||||
/// messages.
|
||||
///
|
||||
/// The class also provides static member functions for
|
||||
/// enumerating or searching network interfaces.
|
||||
{
|
||||
public:
|
||||
typedef std::vector<NetworkInterface> NetworkInterfaceList;
|
||||
|
||||
enum IPVersion
|
||||
{
|
||||
IPv4_ONLY, /// Return interfaces with IPv4 address only
|
||||
IPv6_ONLY, /// Return interfaces with IPv6 address only
|
||||
IPv4_OR_IPv6 /// Return interfaces with IPv4 or IPv6 address
|
||||
};
|
||||
|
||||
NetworkInterface();
|
||||
/// Creates a NetworkInterface representing the
|
||||
/// default interface.
|
||||
///
|
||||
/// The name is empty, the IP address is the wildcard
|
||||
/// address and the index is zero.
|
||||
|
||||
NetworkInterface(const NetworkInterface& interfc);
|
||||
/// Creates the NetworkInterface by copying another one.
|
||||
|
||||
~NetworkInterface();
|
||||
/// Destroys the NetworkInterface.
|
||||
|
||||
NetworkInterface& operator = (const NetworkInterface& interfc);
|
||||
/// Assigns another NetworkInterface.
|
||||
|
||||
void swap(NetworkInterface& other);
|
||||
/// Swaps the NetworkInterface with another one.
|
||||
|
||||
int index() const;
|
||||
/// Returns the interface index.
|
||||
///
|
||||
/// Only supported if IPv6 is available.
|
||||
/// Returns -1 if IPv6 is not available.
|
||||
|
||||
const std::string& name() const;
|
||||
/// Returns the interface name.
|
||||
|
||||
const std::string& displayName() const;
|
||||
/// Returns the interface display name.
|
||||
///
|
||||
/// On Windows platforms, this is currently the network adapter
|
||||
/// name. This may change to the "friendly name" of the network
|
||||
/// connection in a future version, however.
|
||||
///
|
||||
/// On other platforms this is the same as name().
|
||||
|
||||
const IPAddress& address() const;
|
||||
/// Returns the IP address bound to the interface.
|
||||
|
||||
const IPAddress& subnetMask() const;
|
||||
/// Returns the IPv4 subnet mask for this network interface.
|
||||
|
||||
const IPAddress& broadcastAddress() const;
|
||||
/// Returns the IPv4 broadcast address for this network interface.
|
||||
|
||||
bool supportsIPv4() const;
|
||||
/// Returns true if the interface supports IPv4.
|
||||
|
||||
bool supportsIPv6() const;
|
||||
/// Returns true if the interface supports IPv6.
|
||||
|
||||
static NetworkInterface forName(const std::string& name, bool requireIPv6 = false);
|
||||
/// Returns the NetworkInterface for the given name.
|
||||
///
|
||||
/// If requireIPv6 is false, an IPv4 interface is returned.
|
||||
/// Otherwise, an IPv6 interface is returned.
|
||||
///
|
||||
/// Throws an InterfaceNotFoundException if an interface
|
||||
/// with the give name does not exist.
|
||||
|
||||
static NetworkInterface forName(const std::string& name, IPVersion ipVersion);
|
||||
/// Returns the NetworkInterface for the given name.
|
||||
///
|
||||
/// The ipVersion argument can be used to specify whether
|
||||
/// an IPv4 (IPv4_ONLY) or IPv6 (IPv6_ONLY) interface is required,
|
||||
/// or whether the caller does not care (IPv4_OR_IPv6).
|
||||
|
||||
static NetworkInterface forAddress(const IPAddress& address);
|
||||
/// Returns the NetworkInterface for the given IP address.
|
||||
///
|
||||
/// Throws an InterfaceNotFoundException if an interface
|
||||
/// with the give address does not exist.
|
||||
|
||||
static NetworkInterface forIndex(int index);
|
||||
/// Returns the NetworkInterface for the given interface index.
|
||||
/// If an index of 0 is specified, a NetworkInterface instance
|
||||
/// representing the default interface (empty name and
|
||||
/// wildcard address) is returned.
|
||||
///
|
||||
/// Throws an InterfaceNotFoundException if an interface
|
||||
/// with the given index does not exist (or IPv6 is not
|
||||
/// available).
|
||||
|
||||
static NetworkInterfaceList list();
|
||||
/// Returns a list with all network interfaces
|
||||
/// on the system.
|
||||
///
|
||||
/// If there are multiple addresses bound to one interface,
|
||||
/// multiple NetworkInterface instances are created for
|
||||
/// the same interface.
|
||||
|
||||
protected:
|
||||
NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, int index = -1);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
NetworkInterface(const std::string& name, const std::string& displayName, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, int index = -1);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
NetworkInterface(const std::string& name, const IPAddress& address, int index = -1);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
NetworkInterface(const std::string& name, const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress, int index = -1);
|
||||
/// Creates the NetworkInterface.
|
||||
|
||||
IPAddress interfaceNameToAddress(const std::string& interfaceName) const;
|
||||
/// Determines the IPAddress bound to the interface with the given name.
|
||||
|
||||
int interfaceNameToIndex(const std::string& interfaceName) const;
|
||||
/// Determines the interface index of the interface with the given name.
|
||||
|
||||
private:
|
||||
NetworkInterfaceImpl* _pImpl;
|
||||
|
||||
static Poco::FastMutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_NetworkInterface_INCLUDED
|
||||
69
Net/include/Poco/Net/NullPartHandler.h
Normal file
69
Net/include/Poco/Net/NullPartHandler.h
Normal file
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// NullPartHandler.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/NullPartHandler.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: NullPartHandler
|
||||
//
|
||||
// Definition of the NullPartHandler class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_NullPartHandler_INCLUDED
|
||||
#define Net_NullPartHandler_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/PartHandler.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API NullPartHandler: public PartHandler
|
||||
/// A very special PartHandler that simply discards all data.
|
||||
{
|
||||
public:
|
||||
NullPartHandler();
|
||||
/// Creates the NullPartHandler.
|
||||
|
||||
~NullPartHandler();
|
||||
/// Destroys the NullPartHandler.
|
||||
|
||||
void handlePart(const MessageHeader& header, std::istream& stream);
|
||||
/// Reads and discards all data from the stream.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_NullPartHandler_INCLUDED
|
||||
207
Net/include/Poco/Net/POP3ClientSession.h
Normal file
207
Net/include/Poco/Net/POP3ClientSession.h
Normal file
@@ -0,0 +1,207 @@
|
||||
//
|
||||
// POP3ClientSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/POP3ClientSession.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Mail
|
||||
// Module: POP3ClientSession
|
||||
//
|
||||
// Definition of the POP3ClientSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_POP3ClientSession_INCLUDED
|
||||
#define Net_POP3ClientSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/DialogSocket.h"
|
||||
#include "Poco/Timespan.h"
|
||||
#include <ostream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MessageHeader;
|
||||
class MailMessage;
|
||||
class PartHandler;
|
||||
|
||||
|
||||
class Net_API POP3ClientSession
|
||||
/// This class implements an Post Office Protocol
|
||||
/// Version 3 (POP3, RFC 1939)
|
||||
/// client for receiving e-mail messages.
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
POP3_PORT = 110
|
||||
};
|
||||
|
||||
struct MessageInfo
|
||||
/// Information returned by listMessages().
|
||||
{
|
||||
int id;
|
||||
int size;
|
||||
};
|
||||
|
||||
typedef std::vector<MessageInfo> MessageInfoVec;
|
||||
|
||||
explicit POP3ClientSession(const StreamSocket& socket);
|
||||
/// Creates the POP3ClientSession using
|
||||
/// the given socket, which must be connected
|
||||
/// to a POP3 server.
|
||||
|
||||
POP3ClientSession(const std::string& host, Poco::UInt16 port = POP3_PORT);
|
||||
/// Creates the POP3ClientSession using a socket connected
|
||||
/// to the given host and port.
|
||||
|
||||
virtual ~POP3ClientSession();
|
||||
/// Destroys the SMTPClientSession.
|
||||
|
||||
void setTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the timeout for socket read operations.
|
||||
|
||||
Poco::Timespan getTimeout() const;
|
||||
/// Returns the timeout for socket read operations.
|
||||
|
||||
void login(const std::string& username, const std::string& password);
|
||||
/// Logs in to the POP3 server by sending a USER command
|
||||
/// followed by a PASS command.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void close();
|
||||
/// Sends a QUIT command and closes the connection to the server.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
int messageCount();
|
||||
/// Sends a STAT command to determine the number of messages
|
||||
/// available on the server and returns that number.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void listMessages(MessageInfoVec& messages);
|
||||
/// Fills the given vector with the ids and sizes of all
|
||||
/// messages available on the server.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void retrieveMessage(int id, MailMessage& message);
|
||||
/// Retrieves the message with the given id from the server and
|
||||
/// stores the raw message content in the message's
|
||||
/// content string, available with message.getContent().
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void retrieveMessage(int id, MailMessage& message, PartHandler& handler);
|
||||
/// Retrieves the message with the given id from the server and
|
||||
/// stores it in message.
|
||||
///
|
||||
/// If the message has multiple parts, the parts
|
||||
/// are reported to the PartHandler. If the message
|
||||
/// is not a multi-part message, the content is stored
|
||||
/// in a string available by calling message.getContent().
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void retrieveMessage(int id, std::ostream& ostr);
|
||||
/// Retrieves the raw message with the given id from the
|
||||
/// server and copies it to the given output stream.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void retrieveHeader(int id, MessageHeader& header);
|
||||
/// Retrieves the message header of the message with the
|
||||
/// given id and stores it in header.
|
||||
///
|
||||
/// For this to work, the server must support the TOP command.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void deleteMessage(int id);
|
||||
/// Marks the message with the given ID for deletion. The message
|
||||
/// will be deleted when the connection to the server is
|
||||
/// closed by calling close().
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
bool sendCommand(const std::string& command, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
///
|
||||
/// Returns true if the response is positive, false otherwise.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
bool sendCommand(const std::string& command, const std::string& arg, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
///
|
||||
/// Returns true if the response is positive, false otherwise.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
bool sendCommand(const std::string& command, const std::string& arg1, const std::string& arg2, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
///
|
||||
/// Returns true if the response is positive, false otherwise.
|
||||
///
|
||||
/// Throws a POP3Exception in case of a POP3-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
protected:
|
||||
static bool isPositive(const std::string& response);
|
||||
|
||||
private:
|
||||
DialogSocket _socket;
|
||||
bool _isOpen;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_POP3ClientSession_INCLUDED
|
||||
90
Net/include/Poco/Net/PartHandler.h
Normal file
90
Net/include/Poco/Net/PartHandler.h
Normal file
@@ -0,0 +1,90 @@
|
||||
//
|
||||
// PartHandler.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/PartHandler.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: PartHandler
|
||||
//
|
||||
// Definition of the PartHandler class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_PartHandler_INCLUDED
|
||||
#define Net_PartHandler_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MessageHeader;
|
||||
|
||||
|
||||
class Net_API PartHandler
|
||||
/// The base class for all part or attachment handlers.
|
||||
///
|
||||
/// Part handlers are used for handling email parts and
|
||||
/// attachments in MIME multipart messages, as well as file
|
||||
/// uploads via HTML forms.
|
||||
///
|
||||
/// Subclasses must override handlePart().
|
||||
{
|
||||
public:
|
||||
virtual void handlePart(const MessageHeader& header, std::istream& stream) = 0;
|
||||
/// Called for every part encountered during the processing
|
||||
/// of an email message or an uploaded HTML form.
|
||||
///
|
||||
/// Information about the part can be extracted from
|
||||
/// the given message header. What information can be obtained
|
||||
/// from header depends on the kind of part.
|
||||
///
|
||||
/// The content of the part can be read from stream.
|
||||
|
||||
protected:
|
||||
PartHandler();
|
||||
/// Creates the PartHandler.
|
||||
|
||||
virtual ~PartHandler();
|
||||
/// Destroys the PartHandler.
|
||||
|
||||
private:
|
||||
PartHandler(const PartHandler&);
|
||||
PartHandler& operator = (const PartHandler&);
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_PartHandler_INCLUDED
|
||||
125
Net/include/Poco/Net/PartSource.h
Normal file
125
Net/include/Poco/Net/PartSource.h
Normal file
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// PartSource.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/PartSource.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: PartSource
|
||||
//
|
||||
// Definition of the PartSource class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_PartSource_INCLUDED
|
||||
#define Net_PartSource_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/MessageHeader.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API PartSource
|
||||
/// This abstract class is used for adding parts or attachments
|
||||
/// to mail messages, as well as for uploading files as part of a HTML form.
|
||||
{
|
||||
public:
|
||||
virtual std::istream& stream() = 0;
|
||||
/// Returns an input stream for reading the
|
||||
/// part data.
|
||||
///
|
||||
/// Subclasses must override this method.
|
||||
|
||||
virtual const std::string& filename();
|
||||
/// Returns the filename for the part or attachment.
|
||||
///
|
||||
/// May be overridded by subclasses. The default
|
||||
/// implementation returns an empty string.
|
||||
|
||||
const std::string& mediaType() const;
|
||||
/// Returns the MIME media type for this part or attachment.
|
||||
|
||||
MessageHeader& headers();
|
||||
/// Returns a MessageHeader containing additional header
|
||||
/// fields for the part.
|
||||
|
||||
const MessageHeader& headers() const;
|
||||
/// Returns a MessageHeader containing additional header
|
||||
/// fields for the part.
|
||||
|
||||
virtual ~PartSource();
|
||||
/// Destroys the PartSource.
|
||||
|
||||
protected:
|
||||
PartSource();
|
||||
/// Creates the PartSource, using
|
||||
/// the application/octet-stream MIME type.
|
||||
|
||||
PartSource(const std::string& mediaType);
|
||||
/// Creates the PartSource, using the
|
||||
/// given MIME type.
|
||||
|
||||
private:
|
||||
PartSource(const PartSource&);
|
||||
PartSource& operator = (const PartSource&);
|
||||
|
||||
std::string _mediaType;
|
||||
MessageHeader _headers;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline const std::string& PartSource::mediaType() const
|
||||
{
|
||||
return _mediaType;
|
||||
}
|
||||
|
||||
|
||||
inline MessageHeader& PartSource::headers()
|
||||
{
|
||||
return _headers;
|
||||
}
|
||||
|
||||
|
||||
inline const MessageHeader& PartSource::headers() const
|
||||
{
|
||||
return _headers;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_PartSource_INCLUDED
|
||||
108
Net/include/Poco/Net/QuotedPrintableDecoder.h
Normal file
108
Net/include/Poco/Net/QuotedPrintableDecoder.h
Normal file
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// QuotedPrintableDecoder.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/QuotedPrintableDecoder.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: QuotedPrintableDecoder
|
||||
//
|
||||
// Definition of the QuotedPrintableDecoder class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_QuotedPrintableDecoder_INCLUDED
|
||||
#define Net_QuotedPrintableDecoder_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/UnbufferedStreamBuf.h"
|
||||
#include <istream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API QuotedPrintableDecoderBuf: public Poco::UnbufferedStreamBuf
|
||||
/// This streambuf decodes all quoted-printable (see RFC 2045)
|
||||
/// encoded data read from the istream connected to it.
|
||||
///
|
||||
/// Note: For performance reasons, the characters
|
||||
/// are read directly from the given istream's
|
||||
/// underlying streambuf, so the state
|
||||
/// of the istream will not reflect that of
|
||||
/// its streambuf.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableDecoderBuf(std::istream& istr);
|
||||
~QuotedPrintableDecoderBuf();
|
||||
|
||||
private:
|
||||
int readFromDevice();
|
||||
|
||||
std::streambuf& _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API QuotedPrintableDecoderIOS: public virtual std::ios
|
||||
/// The base class for QuotedPrintableDecoder.
|
||||
///
|
||||
/// This class is needed to ensure the correct initialization
|
||||
/// order of the stream buffer and base classes.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableDecoderIOS(std::istream& istr);
|
||||
~QuotedPrintableDecoderIOS();
|
||||
QuotedPrintableDecoderBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
QuotedPrintableDecoderBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API QuotedPrintableDecoder: public QuotedPrintableDecoderIOS, public std::istream
|
||||
/// This istream decodes all quoted-printable (see RFC 2045)
|
||||
/// encoded data read from the istream connected to it.
|
||||
///
|
||||
/// Note: For performance reasons, the characters
|
||||
/// are read directly from the given istream's
|
||||
/// underlying streambuf, so the state
|
||||
/// of the istream will not reflect that of
|
||||
/// its streambuf.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableDecoder(std::istream& istr);
|
||||
~QuotedPrintableDecoder();
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_QuotedPrintableDecoder_INCLUDED
|
||||
107
Net/include/Poco/Net/QuotedPrintableEncoder.h
Normal file
107
Net/include/Poco/Net/QuotedPrintableEncoder.h
Normal file
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// QuotedPrintableEncoder.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/QuotedPrintableEncoder.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Messages
|
||||
// Module: QuotedPrintableEncoder
|
||||
//
|
||||
// Definition of the QuotedPrintableEncoder class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_QuotedPrintableEncoder_INCLUDED
|
||||
#define Net_QuotedPrintableEncoder_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/UnbufferedStreamBuf.h"
|
||||
#include <ostream>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API QuotedPrintableEncoderBuf: public Poco::UnbufferedStreamBuf
|
||||
/// This streambuf encodes all data written
|
||||
/// to it in quoted-printable encoding (see RFC 2045)
|
||||
/// and forwards it to a connected ostream.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableEncoderBuf(std::ostream& ostr);
|
||||
~QuotedPrintableEncoderBuf();
|
||||
int close();
|
||||
|
||||
private:
|
||||
int writeToDevice(char c);
|
||||
void writeEncoded(char c);
|
||||
void writeRaw(char c);
|
||||
|
||||
int _pending;
|
||||
int _lineLength;
|
||||
std::ostream& _ostr;
|
||||
};
|
||||
|
||||
|
||||
class Net_API QuotedPrintableEncoderIOS: public virtual std::ios
|
||||
/// The base class for QuotedPrintableEncoder.
|
||||
///
|
||||
/// This class is needed to ensure the correct initialization
|
||||
/// order of the stream buffer and base classes.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableEncoderIOS(std::ostream& ostr);
|
||||
~QuotedPrintableEncoderIOS();
|
||||
int close();
|
||||
QuotedPrintableEncoderBuf* rdbuf();
|
||||
|
||||
protected:
|
||||
QuotedPrintableEncoderBuf _buf;
|
||||
};
|
||||
|
||||
|
||||
class Net_API QuotedPrintableEncoder: public QuotedPrintableEncoderIOS, public std::ostream
|
||||
/// This ostream encodes all data
|
||||
/// written to it in quoted-printable encoding
|
||||
/// (see RFC 2045) and forwards it to a connected ostream.
|
||||
/// Always call close() when done
|
||||
/// writing data, to ensure proper
|
||||
/// completion of the encoding operation.
|
||||
{
|
||||
public:
|
||||
QuotedPrintableEncoder(std::ostream& ostr);
|
||||
~QuotedPrintableEncoder();
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_QuotedPrintableEncoder_INCLUDED
|
||||
169
Net/include/Poco/Net/RawSocket.h
Normal file
169
Net/include/Poco/Net/RawSocket.h
Normal file
@@ -0,0 +1,169 @@
|
||||
//
|
||||
// RawSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/RawSocket.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: RawSocket
|
||||
//
|
||||
// Definition of the RawSocket class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_RawSocket_INCLUDED
|
||||
#define Net_RawSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API RawSocket: public Socket
|
||||
/// This class provides an interface to a
|
||||
/// raw IP socket.
|
||||
{
|
||||
public:
|
||||
RawSocket();
|
||||
/// Creates an unconnected IPv4 raw socket.
|
||||
|
||||
RawSocket(IPAddress::Family family, int proto = IPPROTO_RAW);
|
||||
/// Creates an unconnected raw socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
RawSocket(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Creates a raw socket and binds it
|
||||
/// to the given address.
|
||||
///
|
||||
/// Depending on the address family, the socket
|
||||
/// will be either an IPv4 or an IPv6 socket.
|
||||
|
||||
RawSocket(const Socket& socket);
|
||||
/// Creates the RawSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a RawSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
~RawSocket();
|
||||
/// Destroys the RawSocket.
|
||||
|
||||
RawSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
void connect(const SocketAddress& address);
|
||||
/// Restricts incoming and outgoing
|
||||
/// packets to the specified address.
|
||||
///
|
||||
/// Cannot be used together with bind().
|
||||
|
||||
void bind(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Bind a local address to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
///
|
||||
/// Cannot be used together with connect().
|
||||
|
||||
int sendBytes(const void* buffer, int length, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
/// the socket.
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
|
||||
int receiveBytes(void* buffer, int length, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
|
||||
int sendTo(const void* buffer, int length, const SocketAddress& address, int flags = 0);
|
||||
/// Sends the contents of the given buffer through
|
||||
/// the socket to the given address.
|
||||
///
|
||||
/// Returns the number of bytes sent, which may be
|
||||
/// less than the number of bytes specified.
|
||||
|
||||
int receiveFrom(void* buffer, int length, SocketAddress& address, int flags = 0);
|
||||
/// Receives data from the socket and stores it
|
||||
/// in buffer. Up to length bytes are received.
|
||||
/// Stores the address of the sender in address.
|
||||
///
|
||||
/// Returns the number of bytes received.
|
||||
|
||||
void setBroadcast(bool flag);
|
||||
/// Sets the value of the SO_BROADCAST socket option.
|
||||
///
|
||||
/// Setting this flag allows sending datagrams to
|
||||
/// the broadcast address.
|
||||
|
||||
bool getBroadcast() const;
|
||||
/// Returns the value of the SO_BROADCAST socket option.
|
||||
|
||||
protected:
|
||||
RawSocket(SocketImpl* pImpl);
|
||||
/// Creates the Socket and attaches the given SocketImpl.
|
||||
/// The socket takes owership of the SocketImpl.
|
||||
///
|
||||
/// The SocketImpl must be a StreamSocketImpl, otherwise
|
||||
/// an InvalidArgumentException will be thrown.
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void RawSocket::setBroadcast(bool flag)
|
||||
{
|
||||
impl()->setBroadcast(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool RawSocket::getBroadcast() const
|
||||
{
|
||||
return impl()->getBroadcast();
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_RawSocket_INCLUDED
|
||||
78
Net/include/Poco/Net/RawSocketImpl.h
Normal file
78
Net/include/Poco/Net/RawSocketImpl.h
Normal file
@@ -0,0 +1,78 @@
|
||||
//
|
||||
// RawSocketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/RawSocketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: RawSocketImpl
|
||||
//
|
||||
// Definition of the RawSocketImpl class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_RawSocketImpl_INCLUDED
|
||||
#define Net_RawSocketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API RawSocketImpl: public SocketImpl
|
||||
/// This class implements a raw socket.
|
||||
{
|
||||
public:
|
||||
RawSocketImpl();
|
||||
/// Creates an unconnected IPv4 raw socket with IPPROTO_RAW.
|
||||
|
||||
RawSocketImpl(IPAddress::Family family, int proto = IPPROTO_RAW);
|
||||
/// Creates an unconnected raw socket.
|
||||
///
|
||||
/// The socket will be created for the
|
||||
/// given address family.
|
||||
|
||||
RawSocketImpl(poco_socket_t sockfd);
|
||||
/// Creates a RawSocketImpl using the given native socket.
|
||||
|
||||
protected:
|
||||
void init(int af);
|
||||
void init2(int af, int proto);
|
||||
|
||||
~RawSocketImpl();
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_RawSocketImpl_INCLUDED
|
||||
172
Net/include/Poco/Net/RemoteSyslogChannel.h
Normal file
172
Net/include/Poco/Net/RemoteSyslogChannel.h
Normal file
@@ -0,0 +1,172 @@
|
||||
//
|
||||
// RemoteSyslogChannel.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/RemoteSyslogChannel.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Logging
|
||||
// Module: RemoteSyslogChannel
|
||||
//
|
||||
// Definition of the RemoteSyslogChannel class.
|
||||
//
|
||||
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_RemoteSyslogChannel_INCLUDED
|
||||
#define Net_RemoteSyslogChannel_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Channel.h"
|
||||
#include "Poco/Mutex.h"
|
||||
#include "Poco/Net/DatagramSocket.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API RemoteSyslogChannel: public Poco::Channel
|
||||
/// This Channel implements remote syslog logging over UDP according
|
||||
/// to RFC 5424 "The Syslog Protocol"
|
||||
/// and RFC 5426 "Transmission of syslog messages over UDP".
|
||||
///
|
||||
/// In addition, RemoteSyslogListener also supports the "old" BSD syslog
|
||||
/// protocol, as described in RFC 3164.
|
||||
{
|
||||
public:
|
||||
static const std::string BSD_TIMEFORMAT;
|
||||
static const std::string SYSLOG_TIMEFORMAT;
|
||||
|
||||
enum Severity
|
||||
{
|
||||
SYSLOG_EMERGENCY = 0, /// Emergency: system is unusable
|
||||
SYSLOG_ALERT = 1, /// Alert: action must be taken immediately
|
||||
SYSLOG_CRITICAL = 2, /// Critical: critical conditions
|
||||
SYSLOG_ERROR = 3, /// Error: error conditions
|
||||
SYSLOG_WARNING = 4, /// Warning: warning conditions
|
||||
SYSLOG_NOTICE = 5, /// Notice: normal but significant condition
|
||||
SYSLOG_INFORMATIONAL = 6, /// Informational: informational messages
|
||||
SYSLOG_DEBUG = 7 /// Debug: debug-level messages
|
||||
};
|
||||
|
||||
enum Facility
|
||||
{
|
||||
SYSLOG_KERN = ( 0<<3), /// kernel messages
|
||||
SYSLOG_USER = ( 1<<3), /// random user-level messages
|
||||
SYSLOG_MAIL = ( 2<<3), /// mail system
|
||||
SYSLOG_DAEMON = ( 3<<3), /// system daemons
|
||||
SYSLOG_AUTH = ( 4<<3), /// security/authorization messages
|
||||
SYSLOG_SYSLOG = ( 5<<3), /// messages generated internally by syslogd
|
||||
SYSLOG_LPR = ( 6<<3), /// line printer subsystem
|
||||
SYSLOG_NEWS = ( 7<<3), /// network news subsystem
|
||||
SYSLOG_UUCP = ( 8<<3), /// UUCP subsystem
|
||||
SYSLOG_CRON = ( 9<<3), /// clock daemon
|
||||
SYSLOG_AUTHPRIV = (10<<3), /// security/authorization messages (private)
|
||||
SYSLOG_FTP = (11<<3), /// ftp daemon
|
||||
SYSLOG_NTP = (12<<3), /// ntp subsystem
|
||||
SYSLOG_LOGAUDIT = (13<<3), /// log audit
|
||||
SYSLOG_LOGALERT = (14<<3), /// log alert
|
||||
SYSLOG_CLOCK = (15<<3), /// clock deamon
|
||||
SYSLOG_LOCAL0 = (16<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL1 = (17<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL2 = (18<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL3 = (19<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL4 = (20<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL5 = (21<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL6 = (22<<3), /// reserved for local use
|
||||
SYSLOG_LOCAL7 = (23<<3) /// reserved for local use
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SYSLOG_PORT = 514
|
||||
};
|
||||
|
||||
RemoteSyslogChannel();
|
||||
/// Creates a RemoteSyslogChannel.
|
||||
|
||||
RemoteSyslogChannel(const std::string& address, const std::string& name, int facility = SYSLOG_USER, bool bsdFormat = false);
|
||||
/// Creates a RemoteSyslogChannel with the given target address, name, and facility.
|
||||
/// If bsdFormat is true, messages are formatted according to RFC 3164.
|
||||
|
||||
void open();
|
||||
/// Opens the RemoteSyslogChannel.
|
||||
|
||||
void close();
|
||||
/// Closes the RemoteSyslogChannel.
|
||||
|
||||
void log(const Message& msg);
|
||||
/// Sends the message's text to the syslog service.
|
||||
|
||||
void setProperty(const std::string& name, const std::string& value);
|
||||
/// Sets the property with the given value.
|
||||
///
|
||||
/// The following properties are supported:
|
||||
/// * name: The name used to identify the source of log messages.
|
||||
/// * facility: The facility added to each log message. See the Facility enumeration for a list of supported values.
|
||||
/// The LOG_ prefix can be omitted and values are case insensitive (e.g. a facility value "mail" is recognized as SYSLOG_MAIL)
|
||||
/// * format: "bsd"/"rfc3164" (RFC 3164 format) or "new"/"rfc5424" (default)
|
||||
/// * loghost: The target IP address or host name where log messages are sent. Optionally, a port number (separated
|
||||
/// by a colon) can also be specified.
|
||||
/// * host: (optional) Host name included in syslog messages. If not specified, the host's real domain name or
|
||||
/// IP address will be used.
|
||||
|
||||
std::string getProperty(const std::string& name) const;
|
||||
/// Returns the value of the property with the given name.
|
||||
|
||||
static void registerChannel();
|
||||
/// Registers the channel with the global LoggingFactory.
|
||||
|
||||
static const std::string PROP_NAME;
|
||||
static const std::string PROP_FACILITY;
|
||||
static const std::string PROP_FORMAT;
|
||||
static const std::string PROP_LOGHOST;
|
||||
static const std::string PROP_HOST;
|
||||
|
||||
protected:
|
||||
~RemoteSyslogChannel();
|
||||
static int getPrio(const Message& msg);
|
||||
|
||||
private:
|
||||
std::string _logHost;
|
||||
std::string _name;
|
||||
std::string _host;
|
||||
int _facility;
|
||||
bool _bsdFormat;
|
||||
DatagramSocket _socket;
|
||||
SocketAddress _socketAddress;
|
||||
bool _open;
|
||||
mutable Poco::FastMutex _mutex;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_RemoteSyslogChannel_INCLUDED
|
||||
138
Net/include/Poco/Net/RemoteSyslogListener.h
Normal file
138
Net/include/Poco/Net/RemoteSyslogListener.h
Normal file
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// RemoteSyslogListener.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/RemoteSyslogListener.h#5 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Logging
|
||||
// Module: RemoteSyslogListener
|
||||
//
|
||||
// Definition of the RemoteSyslogListener class.
|
||||
//
|
||||
// Copyright (c) 2007-2011, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_RemoteSyslogListener_INCLUDED
|
||||
#define Net_RemoteSyslogListener_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/ThreadPool.h"
|
||||
#include "Poco/SplitterChannel.h"
|
||||
#include "Poco/NotificationQueue.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class RemoteUDPListener;
|
||||
class SyslogParser;
|
||||
|
||||
|
||||
class Net_API RemoteSyslogListener: public Poco::SplitterChannel
|
||||
/// RemoteSyslogListener implents listening for syslog messages
|
||||
/// sent over UDP, according to RFC 5424 "The Syslog Protocol"
|
||||
/// and RFC 5426 "Transmission of syslog messages over UDP".
|
||||
///
|
||||
/// In addition, RemoteSyslogListener also supports the "old" BSD syslog
|
||||
/// protocol, as described in RFC 3164.
|
||||
///
|
||||
/// The RemoteSyslogListener is a subclass of Poco::SplitterChannel.
|
||||
/// Every received log message is sent to the channels registered
|
||||
/// with addChannel() or the "channel" property.
|
||||
///
|
||||
/// Poco::Message objects created by RemoteSyslogListener will have
|
||||
/// the following named parameters:
|
||||
/// - addr: IP address of the host/interface sending the message.
|
||||
/// - host: host name; only for "new" syslog messages.
|
||||
/// - app: application name; only for "new" syslog messages.
|
||||
{
|
||||
public:
|
||||
RemoteSyslogListener();
|
||||
/// Creates the RemoteSyslogListener.
|
||||
|
||||
RemoteSyslogListener(Poco::UInt16 port);
|
||||
/// Creates the RemoteSyslogListener, listening on the given port number.
|
||||
|
||||
RemoteSyslogListener(Poco::UInt16 port, int threads);
|
||||
/// Creates the RemoteSyslogListener, listening on the given port number
|
||||
/// and using the number of threads for message processing.
|
||||
|
||||
void setProperty(const std::string& name, const std::string& value);
|
||||
/// Sets the property with the given value.
|
||||
///
|
||||
/// The following properties are supported:
|
||||
/// * port: The UDP port number where to listen for UDP packets
|
||||
/// containing syslog messages. If 0 is specified, does not
|
||||
/// listen for UDP messages.
|
||||
/// * threads: The number of parser threads processing
|
||||
/// received syslog messages. Defaults to 1. A maximum
|
||||
/// of 16 threads is supported.
|
||||
|
||||
std::string getProperty(const std::string& name) const;
|
||||
/// Returns the value of the property with the given name.
|
||||
|
||||
void open();
|
||||
/// Starts the listener.
|
||||
|
||||
void close();
|
||||
/// Stops the listener.
|
||||
|
||||
void processMessage(const std::string& messageText);
|
||||
/// Parses a single line of text containing a syslog message
|
||||
/// and sends it down the filter chain.
|
||||
|
||||
void enqueueMessage(const std::string& messageText, const Poco::Net::SocketAddress& senderAddress);
|
||||
/// Enqueues a single line of text containing a syslog message
|
||||
/// for asynchronous processing by a parser thread.
|
||||
|
||||
static void registerChannel();
|
||||
/// Registers the channel with the global LoggingFactory.
|
||||
|
||||
static const std::string PROP_PORT;
|
||||
static const std::string PROP_THREADS;
|
||||
|
||||
protected:
|
||||
~RemoteSyslogListener();
|
||||
/// Destroys the RemoteSyslogListener.
|
||||
|
||||
private:
|
||||
RemoteUDPListener* _pListener;
|
||||
SyslogParser* _pParser;
|
||||
Poco::ThreadPool _threadPool;
|
||||
Poco::NotificationQueue _queue;
|
||||
Poco::UInt16 _port;
|
||||
int _threads;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_RemoteSyslogListener_INCLUDED
|
||||
220
Net/include/Poco/Net/SMTPClientSession.h
Normal file
220
Net/include/Poco/Net/SMTPClientSession.h
Normal file
@@ -0,0 +1,220 @@
|
||||
//
|
||||
// SMTPClientSession.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/SMTPClientSession.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Mail
|
||||
// Module: SMTPClientSession
|
||||
//
|
||||
// Definition of the SMTPClientSession class.
|
||||
//
|
||||
// Copyright (c) 2005-2008, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_SMTPClientSession_INCLUDED
|
||||
#define Net_SMTPClientSession_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/DialogSocket.h"
|
||||
#include "Poco/DigestEngine.h"
|
||||
#include "Poco/Timespan.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class MailMessage;
|
||||
|
||||
|
||||
class Net_API SMTPClientSession
|
||||
/// This class implements an Simple Mail
|
||||
/// Transfer Procotol (SMTP, RFC 2821)
|
||||
/// client for sending e-mail messages.
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
SMTP_PORT = 25
|
||||
};
|
||||
|
||||
enum LoginMethod
|
||||
{
|
||||
AUTH_NONE,
|
||||
AUTH_CRAM_MD5,
|
||||
AUTH_CRAM_SHA1,
|
||||
AUTH_LOGIN,
|
||||
AUTH_PLAIN
|
||||
};
|
||||
|
||||
explicit SMTPClientSession(const StreamSocket& socket);
|
||||
/// Creates the SMTPClientSession using
|
||||
/// the given socket, which must be connected
|
||||
/// to a SMTP server.
|
||||
|
||||
SMTPClientSession(const std::string& host, Poco::UInt16 port = SMTP_PORT);
|
||||
/// Creates the SMTPClientSession using a socket connected
|
||||
/// to the given host and port.
|
||||
|
||||
virtual ~SMTPClientSession();
|
||||
/// Destroys the SMTPClientSession.
|
||||
|
||||
void setTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the timeout for socket read operations.
|
||||
|
||||
Poco::Timespan getTimeout() const;
|
||||
/// Returns the timeout for socket read operations.
|
||||
|
||||
void login(const std::string& hostname);
|
||||
/// Greets the SMTP server by sending a EHLO command
|
||||
/// with the given hostname as argument.
|
||||
///
|
||||
/// If the server does not understand the EHLO command,
|
||||
/// a HELO command is sent instead.
|
||||
///
|
||||
/// Throws a SMTPException in case of a SMTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void login();
|
||||
/// Calls login(hostname) with the current host name.
|
||||
|
||||
void login(const std::string& hostname, LoginMethod loginMethod, const std::string& username, const std::string& password);
|
||||
/// Logs in to the SMTP server using the given authentication method and the given
|
||||
/// credentials.
|
||||
|
||||
void login(LoginMethod loginMethod, const std::string& username, const std::string& password);
|
||||
/// Logs in to the SMTP server using the given authentication method and the given
|
||||
/// credentials.
|
||||
|
||||
void open();
|
||||
/// Reads the initial response from the SMTP server.
|
||||
///
|
||||
/// Usually called implicitly through login(), but can
|
||||
/// also be called explicitly to implement different forms
|
||||
/// of SMTP authentication.
|
||||
///
|
||||
/// Does nothing if called more than once.
|
||||
|
||||
void close();
|
||||
/// Sends a QUIT command and closes the connection to the server.
|
||||
///
|
||||
/// Throws a SMTPException in case of a SMTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
void sendMessage(const MailMessage& message);
|
||||
/// Sends the given mail message by sending a MAIL FROM command,
|
||||
/// a RCPT TO command for every recipient, and a DATA command with
|
||||
/// the message headers and content.
|
||||
///
|
||||
/// Throws a SMTPException in case of a SMTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
int sendCommand(const std::string& command, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
///
|
||||
/// Throws a SMTPException in case of a SMTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
int sendCommand(const std::string& command, const std::string& arg, std::string& response);
|
||||
/// Sends the given command verbatim to the server
|
||||
/// and waits for a response.
|
||||
///
|
||||
/// Throws a SMTPException in case of a SMTP-specific error, or a
|
||||
/// NetException in case of a general network communication failure.
|
||||
|
||||
protected:
|
||||
enum StatusClass
|
||||
{
|
||||
SMTP_POSITIVE_COMPLETION = 2,
|
||||
SMTP_POSITIVE_INTERMEDIATE = 3,
|
||||
SMTP_TRANSIENT_NEGATIVE = 4,
|
||||
SMTP_PERMANENT_NEGATIVE = 5
|
||||
};
|
||||
enum
|
||||
{
|
||||
DEFAULT_TIMEOUT = 30000000 // 30 seconds default timeout for socket operations
|
||||
};
|
||||
|
||||
static bool isPositiveCompletion(int status);
|
||||
static bool isPositiveIntermediate(int status);
|
||||
static bool isTransientNegative(int status);
|
||||
static bool isPermanentNegative(int status);
|
||||
|
||||
void login(const std::string& hostname, std::string& response);
|
||||
void loginUsingCRAMMD5(const std::string& username, const std::string& password);
|
||||
void loginUsingCRAMSHA1(const std::string& username, const std::string& password);
|
||||
void loginUsingCRAM(const std::string& username, const std::string& method, Poco::DigestEngine& hmac);
|
||||
void loginUsingLogin(const std::string& username, const std::string& password);
|
||||
void loginUsingPlain(const std::string& username, const std::string& password);
|
||||
DialogSocket& socket();
|
||||
|
||||
private:
|
||||
DialogSocket _socket;
|
||||
bool _isOpen;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool SMTPClientSession::isPositiveCompletion(int status)
|
||||
{
|
||||
return status/100 == SMTP_POSITIVE_COMPLETION;
|
||||
}
|
||||
|
||||
|
||||
inline bool SMTPClientSession::isPositiveIntermediate(int status)
|
||||
{
|
||||
return status/100 == SMTP_POSITIVE_INTERMEDIATE;
|
||||
}
|
||||
|
||||
|
||||
inline bool SMTPClientSession::isTransientNegative(int status)
|
||||
{
|
||||
return status/100 == SMTP_TRANSIENT_NEGATIVE;
|
||||
}
|
||||
|
||||
|
||||
inline bool SMTPClientSession::isPermanentNegative(int status)
|
||||
{
|
||||
return status/100 == SMTP_PERMANENT_NEGATIVE;
|
||||
}
|
||||
|
||||
|
||||
inline DialogSocket& SMTPClientSession::socket()
|
||||
{
|
||||
return _socket;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_SMTPClientSession_INCLUDED
|
||||
189
Net/include/Poco/Net/ServerSocket.h
Normal file
189
Net/include/Poco/Net/ServerSocket.h
Normal file
@@ -0,0 +1,189 @@
|
||||
//
|
||||
// ServerSocket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ServerSocket.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: ServerSocket
|
||||
//
|
||||
// Definition of the ServerSocket class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ServerSocket_INCLUDED
|
||||
#define Net_ServerSocket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/Socket.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ServerSocket: public Socket
|
||||
/// This class provides an interface to a
|
||||
/// TCP server socket.
|
||||
{
|
||||
public:
|
||||
ServerSocket();
|
||||
/// Creates a server socket.
|
||||
///
|
||||
/// The server socket must be bound to
|
||||
/// and address and put into listening state.
|
||||
|
||||
ServerSocket(const Socket& socket);
|
||||
/// Creates the ServerSocket with the SocketImpl
|
||||
/// from another socket. The SocketImpl must be
|
||||
/// a ServerSocketImpl, otherwise an InvalidArgumentException
|
||||
/// will be thrown.
|
||||
|
||||
ServerSocket(const SocketAddress& address, int backlog = 64);
|
||||
/// Creates a server socket, binds it
|
||||
/// to the given address and puts it in listening
|
||||
/// state.
|
||||
///
|
||||
/// After successful construction, the server socket
|
||||
/// is ready to accept connections.
|
||||
|
||||
ServerSocket(Poco::UInt16 port, int backlog = 64);
|
||||
/// Creates a server socket, binds it
|
||||
/// to the given port and puts it in listening
|
||||
/// state.
|
||||
///
|
||||
/// After successful construction, the server socket
|
||||
/// is ready to accept connections.
|
||||
|
||||
virtual ~ServerSocket();
|
||||
/// Destroys the StreamSocket.
|
||||
|
||||
ServerSocket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
virtual void bind(const SocketAddress& address, bool reuseAddress = false);
|
||||
/// Bind a local address to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket. TCP clients should not bind a socket to a
|
||||
/// specific address.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
|
||||
virtual void bind(Poco::UInt16 port, bool reuseAddress = false);
|
||||
/// Bind a local port to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
|
||||
virtual void bind6(const SocketAddress& address, bool reuseAddress = false, bool ipV6Only = false);
|
||||
/// Bind a local IPv6 address to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket. TCP clients should not bind a socket to a
|
||||
/// specific address.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
///
|
||||
/// The given address must be an IPv6 address. The
|
||||
/// IPPROTO_IPV6/IPV6_V6ONLY option is set on the socket
|
||||
/// according to the ipV6Only parameter.
|
||||
///
|
||||
/// If the library has not been built with IPv6 support,
|
||||
/// a Poco::NotImplementedException will be thrown.
|
||||
|
||||
virtual void bind6(Poco::UInt16 port, bool reuseAddress = false, bool ipV6Only = false);
|
||||
/// Bind a local IPv6 port to the socket.
|
||||
///
|
||||
/// This is usually only done when establishing a server
|
||||
/// socket.
|
||||
///
|
||||
/// If reuseAddress is true, sets the SO_REUSEADDR
|
||||
/// socket option.
|
||||
///
|
||||
/// The given address must be an IPv6 address. The
|
||||
/// IPPROTO_IPV6/IPV6_V6ONLY option is set on the socket
|
||||
/// according to the ipV6Only parameter.
|
||||
///
|
||||
/// If the library has not been built with IPv6 support,
|
||||
/// a Poco::NotImplementedException will be thrown.
|
||||
|
||||
virtual void listen(int backlog = 64);
|
||||
/// Puts the socket into listening state.
|
||||
///
|
||||
/// The socket becomes a passive socket that
|
||||
/// can accept incoming connection requests.
|
||||
///
|
||||
/// The backlog argument specifies the maximum
|
||||
/// number of connections that can be queued
|
||||
/// for this socket.
|
||||
|
||||
virtual StreamSocket acceptConnection(SocketAddress& clientAddr);
|
||||
/// Get the next completed connection from the
|
||||
/// socket's completed connection queue.
|
||||
///
|
||||
/// If the queue is empty, waits until a connection
|
||||
/// request completes.
|
||||
///
|
||||
/// Returns a new TCP socket for the connection
|
||||
/// with the client.
|
||||
///
|
||||
/// The client socket's address is returned in clientAddr.
|
||||
|
||||
virtual StreamSocket acceptConnection();
|
||||
/// Get the next completed connection from the
|
||||
/// socket's completed connection queue.
|
||||
///
|
||||
/// If the queue is empty, waits until a connection
|
||||
/// request completes.
|
||||
///
|
||||
/// Returns a new TCP socket for the connection
|
||||
/// with the client.
|
||||
|
||||
protected:
|
||||
ServerSocket(SocketImpl* pImpl, bool);
|
||||
/// The bool argument is to resolve an ambiguity with
|
||||
/// another constructor (Microsoft Visual C++ 2005)
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ServerSocket_INCLUDED
|
||||
67
Net/include/Poco/Net/ServerSocketImpl.h
Normal file
67
Net/include/Poco/Net/ServerSocketImpl.h
Normal file
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// ServerSocketImpl.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/ServerSocketImpl.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: ServerSocketImpl
|
||||
//
|
||||
// Definition of the ServerSocketImpl class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_ServerSocketImpl_INCLUDED
|
||||
#define Net_ServerSocketImpl_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketImpl.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API ServerSocketImpl: public SocketImpl
|
||||
/// This class implements a TCP server socket.
|
||||
{
|
||||
public:
|
||||
ServerSocketImpl();
|
||||
/// Creates the ServerSocketImpl.
|
||||
|
||||
protected:
|
||||
virtual ~ServerSocketImpl();
|
||||
/// Destroys the ServerSocketImpl.
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_ServerSocketImpl_INCLUDED
|
||||
610
Net/include/Poco/Net/Socket.h
Normal file
610
Net/include/Poco/Net/Socket.h
Normal file
@@ -0,0 +1,610 @@
|
||||
//
|
||||
// Socket.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/Socket.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Sockets
|
||||
// Module: Socket
|
||||
//
|
||||
// Definition of the Socket class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_Socket_INCLUDED
|
||||
#define Net_Socket_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketImpl.h"
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class Net_API Socket
|
||||
/// Socket is the common base class for
|
||||
/// StreamSocket, ServerSocket, DatagramSocket and other
|
||||
/// socket classes.
|
||||
///
|
||||
/// It provides operations common to all socket types.
|
||||
{
|
||||
public:
|
||||
enum SelectMode
|
||||
/// The mode argument to poll() and select().
|
||||
{
|
||||
SELECT_READ = 1,
|
||||
SELECT_WRITE = 2,
|
||||
SELECT_ERROR = 4
|
||||
};
|
||||
|
||||
typedef std::vector<Socket> SocketList;
|
||||
|
||||
Socket();
|
||||
/// Creates an uninitialized socket.
|
||||
|
||||
Socket(const Socket& socket);
|
||||
/// Copy constructor.
|
||||
///
|
||||
/// Attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
Socket& operator = (const Socket& socket);
|
||||
/// Assignment operator.
|
||||
///
|
||||
/// Releases the socket's SocketImpl and
|
||||
/// attaches the SocketImpl from the other socket and
|
||||
/// increments the reference count of the SocketImpl.
|
||||
|
||||
virtual ~Socket();
|
||||
/// Destroys the Socket and releases the
|
||||
/// SocketImpl.
|
||||
|
||||
bool operator == (const Socket& socket) const;
|
||||
/// Returns true if both sockets share the same
|
||||
/// SocketImpl, false otherwise.
|
||||
|
||||
bool operator != (const Socket& socket) const;
|
||||
/// Returns false if both sockets share the same
|
||||
/// SocketImpl, true otherwise.
|
||||
|
||||
bool operator < (const Socket& socket) const;
|
||||
/// Compares the SocketImpl pointers.
|
||||
|
||||
bool operator <= (const Socket& socket) const;
|
||||
/// Compares the SocketImpl pointers.
|
||||
|
||||
bool operator > (const Socket& socket) const;
|
||||
/// Compares the SocketImpl pointers.
|
||||
|
||||
bool operator >= (const Socket& socket) const;
|
||||
/// Compares the SocketImpl pointers.
|
||||
|
||||
void close();
|
||||
/// Closes the socket.
|
||||
|
||||
static int select(SocketList& readList, SocketList& writeList, SocketList& exceptList, const Poco::Timespan& timeout);
|
||||
/// Determines the status of one or more sockets,
|
||||
/// using a call to select().
|
||||
///
|
||||
/// ReadList contains the list of sockets which should be
|
||||
/// checked for readability.
|
||||
///
|
||||
/// WriteList contains the list of sockets which should be
|
||||
/// checked for writeability.
|
||||
///
|
||||
/// ExceptList contains a list of sockets which should be
|
||||
/// checked for a pending error.
|
||||
///
|
||||
/// Returns the number of sockets ready.
|
||||
///
|
||||
/// After return,
|
||||
/// * readList contains those sockets ready for reading,
|
||||
/// * writeList contains those sockets ready for writing,
|
||||
/// * exceptList contains those sockets with a pending error.
|
||||
///
|
||||
/// If the total number of sockets passed in readList, writeList and
|
||||
/// exceptList is zero, select() will return immediately and the
|
||||
/// return value will be 0.
|
||||
///
|
||||
/// If one of the sockets passed to select() is closed while
|
||||
/// select() runs, select will return immediately. However,
|
||||
/// the closed socket will not be included in any list.
|
||||
/// In this case, the return value may be greater than the sum
|
||||
/// of all sockets in all list.
|
||||
|
||||
bool poll(const Poco::Timespan& timeout, int mode) const;
|
||||
/// Determines the status of the socket, using a
|
||||
/// call to select().
|
||||
///
|
||||
/// The mode argument is constructed by combining the values
|
||||
/// of the SelectMode enumeration.
|
||||
///
|
||||
/// Returns true if the next operation corresponding to
|
||||
/// mode will not block, false otherwise.
|
||||
|
||||
int available() const;
|
||||
/// Returns the number of bytes available that can be read
|
||||
/// without causing the socket to block.
|
||||
|
||||
void setSendBufferSize(int size);
|
||||
/// Sets the size of the send buffer.
|
||||
|
||||
int getSendBufferSize() const;
|
||||
/// Returns the size of the send buffer.
|
||||
///
|
||||
/// The returned value may be different than the
|
||||
/// value previously set with setSendBufferSize(),
|
||||
/// as the system is free to adjust the value.
|
||||
|
||||
void setReceiveBufferSize(int size);
|
||||
/// Sets the size of the receive buffer.
|
||||
|
||||
int getReceiveBufferSize() const;
|
||||
/// Returns the size of the receive buffer.
|
||||
///
|
||||
/// The returned value may be different than the
|
||||
/// value previously set with setReceiveBufferSize(),
|
||||
/// as the system is free to adjust the value.
|
||||
|
||||
void setSendTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the send timeout for the socket.
|
||||
|
||||
Poco::Timespan getSendTimeout() const;
|
||||
/// Returns the send timeout for the socket.
|
||||
///
|
||||
/// The returned timeout may be different than the
|
||||
/// timeout previously set with setSendTimeout(),
|
||||
/// as the system is free to adjust the value.
|
||||
|
||||
void setReceiveTimeout(const Poco::Timespan& timeout);
|
||||
/// Sets the send timeout for the socket.
|
||||
///
|
||||
/// On systems that do not support SO_RCVTIMEO, a
|
||||
/// workaround using poll() is provided.
|
||||
|
||||
Poco::Timespan getReceiveTimeout() const;
|
||||
/// Returns the receive timeout for the socket.
|
||||
///
|
||||
/// The returned timeout may be different than the
|
||||
/// timeout previously set with getReceiveTimeout(),
|
||||
/// as the system is free to adjust the value.
|
||||
|
||||
void setOption(int level, int option, int value);
|
||||
/// Sets the socket option specified by level and option
|
||||
/// to the given integer value.
|
||||
|
||||
void setOption(int level, int option, unsigned value);
|
||||
/// Sets the socket option specified by level and option
|
||||
/// to the given integer value.
|
||||
|
||||
void setOption(int level, int option, unsigned char value);
|
||||
/// Sets the socket option specified by level and option
|
||||
/// to the given integer value.
|
||||
|
||||
void setOption(int level, int option, const Poco::Timespan& value);
|
||||
/// Sets the socket option specified by level and option
|
||||
/// to the given time value.
|
||||
|
||||
void setOption(int level, int option, const IPAddress& value);
|
||||
/// Sets the socket option specified by level and option
|
||||
/// to the given time value.
|
||||
|
||||
void getOption(int level, int option, int& value) const;
|
||||
/// Returns the value of the socket option
|
||||
/// specified by level and option.
|
||||
|
||||
void getOption(int level, int option, unsigned& value) const;
|
||||
/// Returns the value of the socket option
|
||||
/// specified by level and option.
|
||||
|
||||
void getOption(int level, int option, unsigned char& value) const;
|
||||
/// Returns the value of the socket option
|
||||
/// specified by level and option.
|
||||
|
||||
void getOption(int level, int option, Poco::Timespan& value) const;
|
||||
/// Returns the value of the socket option
|
||||
/// specified by level and option.
|
||||
|
||||
void getOption(int level, int option, IPAddress& value) const;
|
||||
/// Returns the value of the socket option
|
||||
/// specified by level and option.
|
||||
|
||||
void setLinger(bool on, int seconds);
|
||||
/// Sets the value of the SO_LINGER socket option.
|
||||
|
||||
void getLinger(bool& on, int& seconds) const;
|
||||
/// Returns the value of the SO_LINGER socket option.
|
||||
|
||||
void setNoDelay(bool flag);
|
||||
/// Sets the value of the TCP_NODELAY socket option.
|
||||
|
||||
bool getNoDelay() const;
|
||||
/// Returns the value of the TCP_NODELAY socket option.
|
||||
|
||||
void setKeepAlive(bool flag);
|
||||
/// Sets the value of the SO_KEEPALIVE socket option.
|
||||
|
||||
bool getKeepAlive() const;
|
||||
/// Returns the value of the SO_KEEPALIVE socket option.
|
||||
|
||||
void setReuseAddress(bool flag);
|
||||
/// Sets the value of the SO_REUSEADDR socket option.
|
||||
|
||||
bool getReuseAddress() const;
|
||||
/// Returns the value of the SO_REUSEADDR socket option.
|
||||
|
||||
void setReusePort(bool flag);
|
||||
/// Sets the value of the SO_REUSEPORT socket option.
|
||||
/// Does nothing if the socket implementation does not
|
||||
/// support SO_REUSEPORT.
|
||||
|
||||
bool getReusePort() const;
|
||||
/// Returns the value of the SO_REUSEPORT socket option.
|
||||
///
|
||||
/// Returns false if the socket implementation does not
|
||||
/// support SO_REUSEPORT.
|
||||
|
||||
void setOOBInline(bool flag);
|
||||
/// Sets the value of the SO_OOBINLINE socket option.
|
||||
|
||||
bool getOOBInline() const;
|
||||
/// Returns the value of the SO_OOBINLINE socket option.
|
||||
|
||||
void setBlocking(bool flag);
|
||||
/// Sets the socket in blocking mode if flag is true,
|
||||
/// disables blocking mode if flag is false.
|
||||
|
||||
bool getBlocking() const;
|
||||
/// Returns the blocking mode of the socket.
|
||||
/// This method will only work if the blocking modes of
|
||||
/// the socket are changed via the setBlocking method!
|
||||
|
||||
SocketAddress address() const;
|
||||
/// Returns the IP address and port number of the socket.
|
||||
|
||||
SocketAddress peerAddress() const;
|
||||
/// Returns the IP address and port number of the peer socket.
|
||||
|
||||
SocketImpl* impl() const;
|
||||
/// Returns the SocketImpl for this socket.
|
||||
|
||||
bool secure() const;
|
||||
/// Returns true iff the socket's connection is secure
|
||||
/// (using SSL or TLS).
|
||||
|
||||
static bool supportsIPv4();
|
||||
/// Returns true if the system supports IPv4.
|
||||
|
||||
static bool supportsIPv6();
|
||||
/// Returns true if the system supports IPv6.
|
||||
|
||||
protected:
|
||||
Socket(SocketImpl* pImpl);
|
||||
/// Creates the Socket and attaches the given SocketImpl.
|
||||
/// The socket takes owership of the SocketImpl.
|
||||
|
||||
poco_socket_t sockfd() const;
|
||||
/// Returns the socket descriptor for this socket.
|
||||
|
||||
private:
|
||||
SocketImpl* _pImpl;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline bool Socket::operator == (const Socket& socket) const
|
||||
{
|
||||
return _pImpl == socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::operator != (const Socket& socket) const
|
||||
{
|
||||
return _pImpl != socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::operator < (const Socket& socket) const
|
||||
{
|
||||
return _pImpl < socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::operator <= (const Socket& socket) const
|
||||
{
|
||||
return _pImpl <= socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::operator > (const Socket& socket) const
|
||||
{
|
||||
return _pImpl > socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::operator >= (const Socket& socket) const
|
||||
{
|
||||
return _pImpl >= socket._pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::close()
|
||||
{
|
||||
_pImpl->close();
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::poll(const Poco::Timespan& timeout, int mode) const
|
||||
{
|
||||
return _pImpl->poll(timeout, mode);
|
||||
}
|
||||
|
||||
|
||||
inline int Socket::available() const
|
||||
{
|
||||
return _pImpl->available();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setSendBufferSize(int size)
|
||||
{
|
||||
_pImpl->setSendBufferSize(size);
|
||||
}
|
||||
|
||||
|
||||
inline int Socket::getSendBufferSize() const
|
||||
{
|
||||
return _pImpl->getSendBufferSize();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setReceiveBufferSize(int size)
|
||||
{
|
||||
_pImpl->setReceiveBufferSize(size);
|
||||
}
|
||||
|
||||
|
||||
inline int Socket::getReceiveBufferSize() const
|
||||
{
|
||||
return _pImpl->getReceiveBufferSize();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setSendTimeout(const Poco::Timespan& timeout)
|
||||
{
|
||||
_pImpl->setSendTimeout(timeout);
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan Socket::getSendTimeout() const
|
||||
{
|
||||
return _pImpl->getSendTimeout();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setReceiveTimeout(const Poco::Timespan& timeout)
|
||||
{
|
||||
_pImpl->setReceiveTimeout(timeout);
|
||||
}
|
||||
|
||||
|
||||
inline Poco::Timespan Socket::getReceiveTimeout() const
|
||||
{
|
||||
return _pImpl->getReceiveTimeout();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOption(int level, int option, int value)
|
||||
{
|
||||
_pImpl->setOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOption(int level, int option, unsigned value)
|
||||
{
|
||||
_pImpl->setOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOption(int level, int option, unsigned char value)
|
||||
{
|
||||
_pImpl->setOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOption(int level, int option, const Poco::Timespan& value)
|
||||
{
|
||||
_pImpl->setOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOption(int level, int option, const IPAddress& value)
|
||||
{
|
||||
_pImpl->setOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getOption(int level, int option, int& value) const
|
||||
{
|
||||
_pImpl->getOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getOption(int level, int option, unsigned& value) const
|
||||
{
|
||||
_pImpl->getOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getOption(int level, int option, unsigned char& value) const
|
||||
{
|
||||
_pImpl->getOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getOption(int level, int option, Poco::Timespan& value) const
|
||||
{
|
||||
_pImpl->getOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getOption(int level, int option, IPAddress& value) const
|
||||
{
|
||||
_pImpl->getOption(level, option, value);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setLinger(bool on, int seconds)
|
||||
{
|
||||
_pImpl->setLinger(on, seconds);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::getLinger(bool& on, int& seconds) const
|
||||
{
|
||||
_pImpl->getLinger(on, seconds);
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setNoDelay(bool flag)
|
||||
{
|
||||
_pImpl->setNoDelay(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getNoDelay() const
|
||||
{
|
||||
return _pImpl->getNoDelay();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setKeepAlive(bool flag)
|
||||
{
|
||||
_pImpl->setKeepAlive(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getKeepAlive() const
|
||||
{
|
||||
return _pImpl->getKeepAlive();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setReuseAddress(bool flag)
|
||||
{
|
||||
_pImpl->setReuseAddress(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getReuseAddress() const
|
||||
{
|
||||
return _pImpl->getReuseAddress();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setReusePort(bool flag)
|
||||
{
|
||||
_pImpl->setReusePort(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getReusePort() const
|
||||
{
|
||||
return _pImpl->getReusePort();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setOOBInline(bool flag)
|
||||
{
|
||||
_pImpl->setOOBInline(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getOOBInline() const
|
||||
{
|
||||
return _pImpl->getOOBInline();
|
||||
}
|
||||
|
||||
|
||||
inline void Socket::setBlocking(bool flag)
|
||||
{
|
||||
_pImpl->setBlocking(flag);
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::getBlocking() const
|
||||
{
|
||||
return _pImpl->getBlocking();
|
||||
}
|
||||
|
||||
|
||||
inline SocketImpl* Socket::impl() const
|
||||
{
|
||||
return _pImpl;
|
||||
}
|
||||
|
||||
|
||||
inline poco_socket_t Socket::sockfd() const
|
||||
{
|
||||
return _pImpl->sockfd();
|
||||
}
|
||||
|
||||
|
||||
inline SocketAddress Socket::address() const
|
||||
{
|
||||
return _pImpl->address();
|
||||
}
|
||||
|
||||
|
||||
inline SocketAddress Socket::peerAddress() const
|
||||
{
|
||||
return _pImpl->peerAddress();
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::secure() const
|
||||
{
|
||||
return _pImpl->secure();
|
||||
}
|
||||
|
||||
|
||||
inline bool Socket::supportsIPv4()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_Socket_INCLUDED
|
||||
184
Net/include/Poco/Net/SocketAcceptor.h
Normal file
184
Net/include/Poco/Net/SocketAcceptor.h
Normal file
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// SocketAcceptor.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/SocketAcceptor.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Reactor
|
||||
// Module: SocketAcceptor
|
||||
//
|
||||
// Definition of the SocketAcceptor class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_SocketAcceptor_INCLUDED
|
||||
#define Net_SocketAcceptor_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketNotification.h"
|
||||
#include "Poco/Net/ServerSocket.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Observer.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
template <class ServiceHandler>
|
||||
class SocketAcceptor
|
||||
/// This class implements the Acceptor part of the
|
||||
/// Acceptor-Connector design pattern.
|
||||
///
|
||||
/// The Acceptor-Connector pattern has been described in the book
|
||||
/// "Pattern Languages of Program Design 3", edited by Robert Martin,
|
||||
/// Frank Buschmann and Dirk Riehle (Addison Wesley, 1997).
|
||||
///
|
||||
/// The Acceptor-Connector design pattern decouples connection
|
||||
/// establishment and service initialization in a distributed system
|
||||
/// from the processing performed once a service is initialized.
|
||||
/// This decoupling is achieved with three components: Acceptors,
|
||||
/// Connectors and Service Handlers.
|
||||
/// The SocketAcceptor passively waits for connection requests (usually
|
||||
/// from a remote Connector) and establishes a connection upon
|
||||
/// arrival of a connection requests. Also, a Service Handler is
|
||||
/// initialized to process the data arriving via the connection in
|
||||
/// an application-specific way.
|
||||
///
|
||||
/// The SocketAcceptor sets up a ServerSocket and registers itself
|
||||
/// for a ReadableNotification, denoting an incoming connection request.
|
||||
///
|
||||
/// When the ServerSocket becomes readable the SocketAcceptor accepts
|
||||
/// the connection request and creates a ServiceHandler to
|
||||
/// service the connection.
|
||||
///
|
||||
/// The ServiceHandler class must provide a constructor that
|
||||
/// takes a StreamSocket and a SocketReactor as arguments,
|
||||
/// e.g.:
|
||||
/// MyServiceHandler(const StreamSocket& socket, ServiceReactor& reactor)
|
||||
///
|
||||
/// When the ServiceHandler is done, it must destroy itself.
|
||||
///
|
||||
/// Subclasses can override the createServiceHandler() factory method
|
||||
/// if special steps are necessary to create a ServiceHandler object.
|
||||
{
|
||||
public:
|
||||
explicit SocketAcceptor(ServerSocket& socket):
|
||||
_socket(socket),
|
||||
_pReactor(0)
|
||||
/// Creates an SocketAcceptor, using the given ServerSocket.
|
||||
{
|
||||
}
|
||||
|
||||
SocketAcceptor(ServerSocket& socket, SocketReactor& reactor):
|
||||
_socket(socket),
|
||||
_pReactor(0)
|
||||
/// Creates an SocketAcceptor, using the given ServerSocket.
|
||||
/// The SocketAcceptor registers itself with the given SocketReactor.
|
||||
{
|
||||
registerAcceptor(reactor);
|
||||
}
|
||||
|
||||
virtual ~SocketAcceptor()
|
||||
/// Destroys the SocketAcceptor.
|
||||
{
|
||||
unregisterAcceptor();
|
||||
}
|
||||
|
||||
virtual void registerAcceptor(SocketReactor& reactor)
|
||||
/// Registers the SocketAcceptor with a SocketReactor.
|
||||
///
|
||||
/// A subclass can override this and, for example, also register
|
||||
/// an event handler for a timeout event.
|
||||
///
|
||||
/// The overriding method must call the baseclass implementation first.
|
||||
{
|
||||
_pReactor = &reactor;
|
||||
_pReactor->addEventHandler(_socket, Poco::Observer<SocketAcceptor, ReadableNotification>(*this, &SocketAcceptor::onAccept));
|
||||
}
|
||||
|
||||
virtual void unregisterAcceptor()
|
||||
/// Unregisters the SocketAcceptor.
|
||||
///
|
||||
/// A subclass can override this and, for example, also unregister
|
||||
/// its event handler for a timeout event.
|
||||
///
|
||||
/// The overriding method must call the baseclass implementation first.
|
||||
{
|
||||
if (_pReactor)
|
||||
{
|
||||
_pReactor->removeEventHandler(_socket, Poco::Observer<SocketAcceptor, ReadableNotification>(*this, &SocketAcceptor::onAccept));
|
||||
}
|
||||
}
|
||||
|
||||
void onAccept(ReadableNotification* pNotification)
|
||||
{
|
||||
pNotification->release();
|
||||
StreamSocket sock = _socket.acceptConnection();
|
||||
createServiceHandler(sock);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ServiceHandler* createServiceHandler(StreamSocket& socket)
|
||||
/// Create and initialize a new ServiceHandler instance.
|
||||
///
|
||||
/// Subclasses can override this method.
|
||||
{
|
||||
return new ServiceHandler(socket, *_pReactor);
|
||||
}
|
||||
|
||||
SocketReactor* reactor()
|
||||
/// Returns a pointer to the SocketReactor where
|
||||
/// this SocketAcceptor is registered.
|
||||
///
|
||||
/// The pointer may be null.
|
||||
{
|
||||
return _pReactor;
|
||||
}
|
||||
|
||||
Socket& socket()
|
||||
/// Returns a reference to the SocketAcceptor's socket.
|
||||
{
|
||||
return _socket;
|
||||
}
|
||||
|
||||
private:
|
||||
SocketAcceptor();
|
||||
SocketAcceptor(const SocketAcceptor&);
|
||||
SocketAcceptor& operator = (const SocketAcceptor&);
|
||||
|
||||
ServerSocket _socket;
|
||||
SocketReactor* _pReactor;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_SocketAcceptor_INCLUDED
|
||||
186
Net/include/Poco/Net/SocketAddress.h
Normal file
186
Net/include/Poco/Net/SocketAddress.h
Normal file
@@ -0,0 +1,186 @@
|
||||
//
|
||||
// SocketAddress.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/SocketAddress.h#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: SocketAddress
|
||||
//
|
||||
// Definition of the SocketAddress class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_SocketAddress_INCLUDED
|
||||
#define Net_SocketAddress_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
#include "Poco/Net/IPAddress.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
class IPAddress;
|
||||
class SocketAddressImpl;
|
||||
|
||||
|
||||
class Net_API SocketAddress
|
||||
/// This class represents an internet (IP) endpoint/socket
|
||||
/// address. The address can belong either to the
|
||||
/// IPv4 or the IPv6 address family and consists of a
|
||||
/// host address and a port number.
|
||||
{
|
||||
public:
|
||||
SocketAddress();
|
||||
/// Creates a wildcard (all zero) IPv4 SocketAddress.
|
||||
|
||||
SocketAddress(const IPAddress& host, Poco::UInt16 port);
|
||||
/// Creates a SocketAddress from an IP address and a port number.
|
||||
|
||||
SocketAddress(const std::string& host, Poco::UInt16 port);
|
||||
/// Creates a SocketAddress from an IP address and a port number.
|
||||
///
|
||||
/// The IP address must either be a domain name, or it must
|
||||
/// be in dotted decimal (IPv4) or hex string (IPv6) format.
|
||||
|
||||
SocketAddress(const std::string& host, const std::string& port);
|
||||
/// Creates a SocketAddress from an IP address and a
|
||||
/// service name or port number.
|
||||
///
|
||||
/// The IP address must either be a domain name, or it must
|
||||
/// be in dotted decimal (IPv4) or hex string (IPv6) format.
|
||||
///
|
||||
/// The given port must either be a decimal port number, or
|
||||
/// a service name.
|
||||
|
||||
explicit SocketAddress(const std::string& hostAndPort);
|
||||
/// Creates a SocketAddress from an IP address or host name and a
|
||||
/// port number/service name. Host name/address and port number must
|
||||
/// be separated by a colon. In case of an IPv6 address,
|
||||
/// the address part must be enclosed in brackets.
|
||||
///
|
||||
/// Examples:
|
||||
/// 192.168.1.10:80
|
||||
/// [::FFFF:192.168.1.120]:2040
|
||||
/// www.appinf.com:8080
|
||||
|
||||
SocketAddress(const SocketAddress& addr);
|
||||
/// Creates a SocketAddress by copying another one.
|
||||
|
||||
SocketAddress(const struct sockaddr* addr, poco_socklen_t length);
|
||||
/// Creates a SocketAddress from a native socket address.
|
||||
|
||||
~SocketAddress();
|
||||
/// Destroys the SocketAddress.
|
||||
|
||||
SocketAddress& operator = (const SocketAddress& addr);
|
||||
/// Assigns another SocketAddress.
|
||||
|
||||
void swap(SocketAddress& addr);
|
||||
/// Swaps the SocketAddress with another one.
|
||||
|
||||
IPAddress host() const;
|
||||
/// Returns the host IP address.
|
||||
|
||||
Poco::UInt16 port() const;
|
||||
/// Returns the port number.
|
||||
|
||||
poco_socklen_t length() const;
|
||||
/// Returns the length of the internal native socket address.
|
||||
|
||||
const struct sockaddr* addr() const;
|
||||
/// Returns a pointer to the internal native socket address.
|
||||
|
||||
int af() const;
|
||||
/// Returns the address family (AF_INET or AF_INET6) of the address.
|
||||
|
||||
std::string toString() const;
|
||||
/// Returns a string representation of the address.
|
||||
|
||||
IPAddress::Family family() const;
|
||||
/// Returns the address family of the host's address.
|
||||
|
||||
bool operator == (const SocketAddress& addr) const;
|
||||
bool operator != (const SocketAddress& addr) const;
|
||||
|
||||
enum
|
||||
{
|
||||
MAX_ADDRESS_LENGTH =
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
sizeof(struct sockaddr_in6)
|
||||
#else
|
||||
sizeof(struct sockaddr_in)
|
||||
#endif
|
||||
/// Maximum length in bytes of a socket address.
|
||||
};
|
||||
|
||||
protected:
|
||||
void init(const IPAddress& host, Poco::UInt16 port);
|
||||
void init(const std::string& host, Poco::UInt16 port);
|
||||
Poco::UInt16 resolveService(const std::string& service);
|
||||
|
||||
private:
|
||||
SocketAddressImpl* _pImpl;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// inlines
|
||||
//
|
||||
inline void swap(SocketAddress& a1, SocketAddress& a2)
|
||||
{
|
||||
a1.swap(a2);
|
||||
}
|
||||
|
||||
|
||||
inline IPAddress::Family SocketAddress::family() const
|
||||
{
|
||||
return host().family();
|
||||
}
|
||||
|
||||
|
||||
inline bool SocketAddress::operator == (const SocketAddress& addr) const
|
||||
{
|
||||
return host() == addr.host() && port() == addr.port();
|
||||
}
|
||||
|
||||
|
||||
inline bool SocketAddress::operator != (const SocketAddress& addr) const
|
||||
{
|
||||
return host() != addr.host() || port() != addr.port();
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_SocketAddress_INCLUDED
|
||||
227
Net/include/Poco/Net/SocketConnector.h
Normal file
227
Net/include/Poco/Net/SocketConnector.h
Normal file
@@ -0,0 +1,227 @@
|
||||
//
|
||||
// SocketConnector.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/SocketConnector.h#1 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: Reactor
|
||||
// Module: SocketConnector
|
||||
//
|
||||
// Definition of the SocketConnector class.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_SocketConnector_INCLUDED
|
||||
#define Net_SocketConnector_INCLUDED
|
||||
|
||||
|
||||
#include "Poco/Net/Net.h"
|
||||
#include "Poco/Net/SocketNotification.h"
|
||||
#include "Poco/Net/SocketAddress.h"
|
||||
#include "Poco/Net/StreamSocket.h"
|
||||
#include "Poco/Observer.h"
|
||||
|
||||
|
||||
namespace Poco {
|
||||
namespace Net {
|
||||
|
||||
|
||||
template <class ServiceHandler>
|
||||
class SocketConnector
|
||||
/// This class implements the Connector part of the
|
||||
/// Acceptor-Connector design pattern.
|
||||
///
|
||||
/// The Acceptor-Connector pattern has been described in the book
|
||||
/// "Pattern Languages of Program Design 3", edited by Robert Martin,
|
||||
/// Frank Buschmann and Dirk Riehle (Addison Wesley, 1997).
|
||||
///
|
||||
/// The Acceptor-Connector design pattern decouples connection
|
||||
/// establishment and service initialization in a distributed system
|
||||
/// from the processing performed once a service is initialized.
|
||||
/// This decoupling is achieved with three components: Acceptors,
|
||||
/// Connectors and Service Handlers.
|
||||
/// The Connector actively establishes a connection with a remote
|
||||
/// server socket (usually managed by an Acceptor) and initializes
|
||||
/// a Service Handler to manage the connection.
|
||||
///
|
||||
/// The SocketConnector sets up a StreamSocket, initiates a non-blocking
|
||||
/// connect operation and registers itself for ReadableNotification, WritableNotification
|
||||
/// and ErrorNotification. ReadableNotification or WritableNotification denote the successful
|
||||
/// establishment of the connection.
|
||||
///
|
||||
/// When the StreamSocket becomes readable or writeable, the SocketConnector
|
||||
/// creates a ServiceHandler to service the connection and unregisters
|
||||
/// itself.
|
||||
///
|
||||
/// In case of an error (ErrorNotification), the SocketConnector unregisters itself
|
||||
/// and calls the onError() method, which can be overridden by subclasses
|
||||
/// to perform custom error handling.
|
||||
///
|
||||
/// The ServiceHandler class must provide a constructor that
|
||||
/// takes a StreamSocket and a SocketReactor as arguments,
|
||||
/// e.g.:
|
||||
/// MyServiceHandler(const StreamSocket& socket, ServiceReactor& reactor)
|
||||
///
|
||||
/// When the ServiceHandler is done, it must destroy itself.
|
||||
///
|
||||
/// Subclasses can override the createServiceHandler() factory method
|
||||
/// if special steps are necessary to create a ServiceHandler object.
|
||||
{
|
||||
public:
|
||||
explicit SocketConnector(SocketAddress& address):
|
||||
_pReactor(0)
|
||||
/// Creates a SocketConnector, using the given Socket.
|
||||
{
|
||||
_socket.connectNB(address);
|
||||
}
|
||||
|
||||
SocketConnector(SocketAddress& address, SocketReactor& reactor):
|
||||
_pReactor(0)
|
||||
/// Creates an acceptor, using the given ServerSocket.
|
||||
/// The SocketConnector registers itself with the given SocketReactor.
|
||||
{
|
||||
_socket.connectNB(address);
|
||||
registerConnector(reactor);
|
||||
}
|
||||
|
||||
virtual ~SocketConnector()
|
||||
/// Destroys the SocketConnector.
|
||||
{
|
||||
unregisterConnector();
|
||||
}
|
||||
|
||||
virtual void registerConnector(SocketReactor& reactor)
|
||||
/// Registers the SocketConnector with a SocketReactor.
|
||||
///
|
||||
/// A subclass can override this and, for example, also register
|
||||
/// an event handler for a timeout event.
|
||||
///
|
||||
/// The overriding method must call the baseclass implementation first.
|
||||
{
|
||||
_pReactor = &reactor;
|
||||
_pReactor->addEventHandler(_socket, Poco::Observer<SocketConnector, ReadableNotification>(*this, &SocketConnector::onReadable));
|
||||
_pReactor->addEventHandler(_socket, Poco::Observer<SocketConnector, WritableNotification>(*this, &SocketConnector::onWritable));
|
||||
_pReactor->addEventHandler(_socket, Poco::Observer<SocketConnector, ErrorNotification>(*this, &SocketConnector::onError));
|
||||
}
|
||||
|
||||
virtual void unregisterConnector()
|
||||
/// Unregisters the SocketConnector.
|
||||
///
|
||||
/// A subclass can override this and, for example, also unregister
|
||||
/// its event handler for a timeout event.
|
||||
///
|
||||
/// The overriding method must call the baseclass implementation first.
|
||||
{
|
||||
if (_pReactor)
|
||||
{
|
||||
_pReactor->removeEventHandler(_socket, Poco::Observer<SocketConnector, ReadableNotification>(*this, &SocketConnector::onReadable));
|
||||
_pReactor->removeEventHandler(_socket, Poco::Observer<SocketConnector, WritableNotification>(*this, &SocketConnector::onWritable));
|
||||
_pReactor->removeEventHandler(_socket, Poco::Observer<SocketConnector, ErrorNotification>(*this, &SocketConnector::onError));
|
||||
}
|
||||
}
|
||||
|
||||
void onReadable(ReadableNotification* pNotification)
|
||||
{
|
||||
pNotification->release();
|
||||
int err = _socket.impl()->socketError();
|
||||
if (err)
|
||||
{
|
||||
onError(err);
|
||||
unregisterConnector();
|
||||
}
|
||||
else
|
||||
{
|
||||
onConnect();
|
||||
}
|
||||
}
|
||||
|
||||
void onWritable(WritableNotification* pNotification)
|
||||
{
|
||||
pNotification->release();
|
||||
onConnect();
|
||||
}
|
||||
|
||||
void onConnect()
|
||||
{
|
||||
_socket.setBlocking(true);
|
||||
createServiceHandler();
|
||||
unregisterConnector();
|
||||
}
|
||||
|
||||
void onError(ErrorNotification* pNotification)
|
||||
{
|
||||
pNotification->release();
|
||||
onError(_socket.impl()->socketError());
|
||||
unregisterConnector();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ServiceHandler* createServiceHandler()
|
||||
/// Create and initialize a new ServiceHandler instance.
|
||||
///
|
||||
/// Subclasses can override this method.
|
||||
{
|
||||
return new ServiceHandler(_socket, *_pReactor);
|
||||
}
|
||||
|
||||
virtual void onError(int errorCode)
|
||||
/// Called when the socket cannot be connected.
|
||||
///
|
||||
/// Subclasses can override this method.
|
||||
{
|
||||
}
|
||||
|
||||
SocketReactor* reactor()
|
||||
/// Returns a pointer to the SocketReactor where
|
||||
/// this SocketConnector is registered.
|
||||
///
|
||||
/// The pointer may be null.
|
||||
{
|
||||
return _pReactor;
|
||||
}
|
||||
|
||||
Socket& socket()
|
||||
/// Returns a reference to the SocketConnector's socket.
|
||||
{
|
||||
return _socket;
|
||||
}
|
||||
|
||||
private:
|
||||
SocketConnector();
|
||||
SocketConnector(const SocketConnector&);
|
||||
SocketConnector& operator = (const SocketConnector&);
|
||||
|
||||
StreamSocket _socket;
|
||||
SocketReactor* _pReactor;
|
||||
};
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
#endif // Net_SocketConnector_INCLUDED
|
||||
274
Net/include/Poco/Net/SocketDefs.h
Normal file
274
Net/include/Poco/Net/SocketDefs.h
Normal file
@@ -0,0 +1,274 @@
|
||||
//
|
||||
// SocketDefs.h
|
||||
//
|
||||
// $Id: //poco/1.4/Net/include/Poco/Net/SocketDefs.h#6 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: NetCore
|
||||
// Module: SocketDefs
|
||||
//
|
||||
// Include platform-specific header files for sockets.
|
||||
//
|
||||
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person or organization
|
||||
// obtaining a copy of the software and accompanying documentation covered by
|
||||
// this license (the "Software") to use, reproduce, display, distribute,
|
||||
// execute, and transmit the Software, and to prepare derivative works of the
|
||||
// Software, and to permit third-parties to whom the Software is furnished to
|
||||
// do so, all subject to the following:
|
||||
//
|
||||
// The copyright notices in the Software and this entire statement, including
|
||||
// the above license grant, this restriction and the following disclaimer,
|
||||
// must be included in all copies of the Software, in whole or in part, and
|
||||
// all derivative works of the Software, unless such copies or derivative
|
||||
// works are solely in the form of machine-executable object code generated by
|
||||
// a source language processor.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#ifndef Net_SocketDefs_INCLUDED
|
||||
#define Net_SocketDefs_INCLUDED
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#include "Poco/UnWindows.h"
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#define POCO_INVALID_SOCKET INVALID_SOCKET
|
||||
#define poco_socket_t SOCKET
|
||||
#define poco_socklen_t int
|
||||
#define poco_ioctl_request_t int
|
||||
#define poco_closesocket(s) closesocket(s)
|
||||
#define POCO_EINTR WSAEINTR
|
||||
#define POCO_EACCES WSAEACCES
|
||||
#define POCO_EFAULT WSAEFAULT
|
||||
#define POCO_EINVAL WSAEINVAL
|
||||
#define POCO_EMFILE WSAEMFILE
|
||||
#define POCO_EAGAIN WSAEWOULDBLOCK
|
||||
#define POCO_EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define POCO_EINPROGRESS WSAEINPROGRESS
|
||||
#define POCO_EALREADY WSAEALREADY
|
||||
#define POCO_ENOTSOCK WSAENOTSOCK
|
||||
#define POCO_EDESTADDRREQ WSAEDESTADDRREQ
|
||||
#define POCO_EMSGSIZE WSAEMSGSIZE
|
||||
#define POCO_EPROTOTYPE WSAEPROTOTYPE
|
||||
#define POCO_ENOPROTOOPT WSAENOPROTOOPT
|
||||
#define POCO_EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||
#define POCO_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||
#define POCO_ENOTSUP WSAEOPNOTSUPP
|
||||
#define POCO_EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||
#define POCO_EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||
#define POCO_EADDRINUSE WSAEADDRINUSE
|
||||
#define POCO_EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||
#define POCO_ENETDOWN WSAENETDOWN
|
||||
#define POCO_ENETUNREACH WSAENETUNREACH
|
||||
#define POCO_ENETRESET WSAENETRESET
|
||||
#define POCO_ECONNABORTED WSAECONNABORTED
|
||||
#define POCO_ECONNRESET WSAECONNRESET
|
||||
#define POCO_ENOBUFS WSAENOBUFS
|
||||
#define POCO_EISCONN WSAEISCONN
|
||||
#define POCO_ENOTCONN WSAENOTCONN
|
||||
#define POCO_ESHUTDOWN WSAESHUTDOWN
|
||||
#define POCO_ETIMEDOUT WSAETIMEDOUT
|
||||
#define POCO_ECONNREFUSED WSAECONNREFUSED
|
||||
#define POCO_EHOSTDOWN WSAEHOSTDOWN
|
||||
#define POCO_EHOSTUNREACH WSAEHOSTUNREACH
|
||||
#define POCO_ESYSNOTREADY WSASYSNOTREADY
|
||||
#define POCO_ENOTINIT WSANOTINITIALISED
|
||||
#define POCO_HOST_NOT_FOUND WSAHOST_NOT_FOUND
|
||||
#define POCO_TRY_AGAIN WSATRY_AGAIN
|
||||
#define POCO_NO_RECOVERY WSANO_RECOVERY
|
||||
#define POCO_NO_DATA WSANO_DATA
|
||||
#elif defined(POCO_VXWORKS)
|
||||
#include <hostLib.h>
|
||||
#include <ifLib.h>
|
||||
#include <inetLib.h>
|
||||
#include <ioLib.h>
|
||||
#include <resolvLib.h>
|
||||
#include <types.h>
|
||||
#include <socket.h>
|
||||
#include <netinet/tcp.h>
|
||||
#define POCO_INVALID_SOCKET -1
|
||||
#define poco_socket_t int
|
||||
#define poco_socklen_t int
|
||||
#define poco_ioctl_request_t int
|
||||
#define poco_closesocket(s) ::close(s)
|
||||
#define POCO_EINTR EINTR
|
||||
#define POCO_EACCES EACCES
|
||||
#define POCO_EFAULT EFAULT
|
||||
#define POCO_EINVAL EINVAL
|
||||
#define POCO_EMFILE EMFILE
|
||||
#define POCO_EAGAIN EAGAIN
|
||||
#define POCO_EWOULDBLOCK EWOULDBLOCK
|
||||
#define POCO_EINPROGRESS EINPROGRESS
|
||||
#define POCO_EALREADY EALREADY
|
||||
#define POCO_ENOTSOCK ENOTSOCK
|
||||
#define POCO_EDESTADDRREQ EDESTADDRREQ
|
||||
#define POCO_EMSGSIZE EMSGSIZE
|
||||
#define POCO_EPROTOTYPE EPROTOTYPE
|
||||
#define POCO_ENOPROTOOPT ENOPROTOOPT
|
||||
#define POCO_EPROTONOSUPPORT EPROTONOSUPPORT
|
||||
#define POCO_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
||||
#define POCO_ENOTSUP ENOTSUP
|
||||
#define POCO_EPFNOSUPPORT EPFNOSUPPORT
|
||||
#define POCO_EAFNOSUPPORT EAFNOSUPPORT
|
||||
#define POCO_EADDRINUSE EADDRINUSE
|
||||
#define POCO_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||
#define POCO_ENETDOWN ENETDOWN
|
||||
#define POCO_ENETUNREACH ENETUNREACH
|
||||
#define POCO_ENETRESET ENETRESET
|
||||
#define POCO_ECONNABORTED ECONNABORTED
|
||||
#define POCO_ECONNRESET ECONNRESET
|
||||
#define POCO_ENOBUFS ENOBUFS
|
||||
#define POCO_EISCONN EISCONN
|
||||
#define POCO_ENOTCONN ENOTCONN
|
||||
#define POCO_ESHUTDOWN ESHUTDOWN
|
||||
#define POCO_ETIMEDOUT ETIMEDOUT
|
||||
#define POCO_ECONNREFUSED ECONNREFUSED
|
||||
#define POCO_EHOSTDOWN EHOSTDOWN
|
||||
#define POCO_EHOSTUNREACH EHOSTUNREACH
|
||||
#define POCO_ESYSNOTREADY -4
|
||||
#define POCO_ENOTINIT -5
|
||||
#define POCO_HOST_NOT_FOUND HOST_NOT_FOUND
|
||||
#define POCO_TRY_AGAIN TRY_AGAIN
|
||||
#define POCO_NO_RECOVERY NO_RECOVERY
|
||||
#define POCO_NO_DATA NO_DATA
|
||||
#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_VMS)
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#if POCO_OS != POCO_OS_HPUX
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#if defined(POCO_OS_FAMILY_VMS)
|
||||
#include <inet.h>
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
#if defined(sun) || defined(__APPLE__)
|
||||
#include <sys/sockio.h>
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
#define POCO_INVALID_SOCKET -1
|
||||
#define poco_socket_t int
|
||||
#define poco_socklen_t socklen_t
|
||||
#if defined(POCO_OS_FAMILY_BSD)
|
||||
#define poco_ioctl_request_t unsigned long
|
||||
#else
|
||||
#define poco_ioctl_request_t int
|
||||
#endif
|
||||
#define poco_closesocket(s) ::close(s)
|
||||
#define POCO_EINTR EINTR
|
||||
#define POCO_EACCES EACCES
|
||||
#define POCO_EFAULT EFAULT
|
||||
#define POCO_EINVAL EINVAL
|
||||
#define POCO_EMFILE EMFILE
|
||||
#define POCO_EAGAIN EAGAIN
|
||||
#define POCO_EWOULDBLOCK EWOULDBLOCK
|
||||
#define POCO_EINPROGRESS EINPROGRESS
|
||||
#define POCO_EALREADY EALREADY
|
||||
#define POCO_ENOTSOCK ENOTSOCK
|
||||
#define POCO_EDESTADDRREQ EDESTADDRREQ
|
||||
#define POCO_EMSGSIZE EMSGSIZE
|
||||
#define POCO_EPROTOTYPE EPROTOTYPE
|
||||
#define POCO_ENOPROTOOPT ENOPROTOOPT
|
||||
#define POCO_EPROTONOSUPPORT EPROTONOSUPPORT
|
||||
#if defined(ESOCKTNOSUPPORT)
|
||||
#define POCO_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
|
||||
#else
|
||||
#define POCO_ESOCKTNOSUPPORT -1
|
||||
#endif
|
||||
#define POCO_ENOTSUP ENOTSUP
|
||||
#define POCO_EPFNOSUPPORT EPFNOSUPPORT
|
||||
#define POCO_EAFNOSUPPORT EAFNOSUPPORT
|
||||
#define POCO_EADDRINUSE EADDRINUSE
|
||||
#define POCO_EADDRNOTAVAIL EADDRNOTAVAIL
|
||||
#define POCO_ENETDOWN ENETDOWN
|
||||
#define POCO_ENETUNREACH ENETUNREACH
|
||||
#define POCO_ENETRESET ENETRESET
|
||||
#define POCO_ECONNABORTED ECONNABORTED
|
||||
#define POCO_ECONNRESET ECONNRESET
|
||||
#define POCO_ENOBUFS ENOBUFS
|
||||
#define POCO_EISCONN EISCONN
|
||||
#define POCO_ENOTCONN ENOTCONN
|
||||
#if defined(ESHUTDOWN)
|
||||
#define POCO_ESHUTDOWN ESHUTDOWN
|
||||
#else
|
||||
#define POCO_ESHUTDOWN -2
|
||||
#endif
|
||||
#define POCO_ETIMEDOUT ETIMEDOUT
|
||||
#define POCO_ECONNREFUSED ECONNREFUSED
|
||||
#if defined(EHOSTDOWN)
|
||||
#define POCO_EHOSTDOWN EHOSTDOWN
|
||||
#else
|
||||
#define POCO_EHOSTDOWN -3
|
||||
#endif
|
||||
#define POCO_EHOSTUNREACH EHOSTUNREACH
|
||||
#define POCO_ESYSNOTREADY -4
|
||||
#define POCO_ENOTINIT -5
|
||||
#define POCO_HOST_NOT_FOUND HOST_NOT_FOUND
|
||||
#define POCO_TRY_AGAIN TRY_AGAIN
|
||||
#define POCO_NO_RECOVERY NO_RECOVERY
|
||||
#define POCO_NO_DATA NO_DATA
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_TRU64) || (POCO_OS == POCO_OS_AIX) || (POCO_OS == POCO_OS_IRIX) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_VXWORKS)
|
||||
#define POCO_HAVE_SALEN 1
|
||||
#endif
|
||||
|
||||
|
||||
#if POCO_OS != POCO_OS_VXWORKS && !defined(POCO_NET_NO_ADDRINFO)
|
||||
#define POCO_HAVE_ADDRINFO 1
|
||||
#endif
|
||||
|
||||
|
||||
#if (POCO_OS == POCO_OS_HPUX) || (POCO_OS == POCO_OS_SOLARIS) || (POCO_OS == POCO_OS_WINDOWS_CE)
|
||||
#define POCO_BROKEN_TIMEOUTS 1
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_ADDRINFO)
|
||||
#if !defined(AI_ADDRCONFIG)
|
||||
#define AI_ADDRCONFIG 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(POCO_HAVE_SALEN)
|
||||
#define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len)
|
||||
#define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct sockaddr_in)
|
||||
#if defined(POCO_HAVE_IPv6)
|
||||
#define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(struct sockaddr_in6)
|
||||
#endif
|
||||
#else
|
||||
#define poco_set_sa_len(pSA, len) (void) 0
|
||||
#define poco_set_sin_len(pSA) (void) 0
|
||||
#define poco_set_sin6_len(pSA) (void) 0
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
#define INADDR_NONE 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
|
||||
#endif // Net_SocketDefs_INCLUDED
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user