Merge pull request #33 from pocoproject/develop

Sync 8.9.2016
This commit is contained in:
Marian Krivoš 2016-09-08 14:50:07 +02:00 committed by GitHub
commit ee6807c542
245 changed files with 5620 additions and 4033 deletions

View File

@ -68,17 +68,17 @@ inline CppUnitException::CppUnitException(const CppUnitException& other): except
}
inline CppUnitException::CppUnitException (const std::string& message, long line, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(rFileName)
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
{
}
inline CppUnitException::CppUnitException (const std::string& message, long line, long data1lineNumber, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(rFileName)
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
{
}
inline CppUnitException::CppUnitException (const std::string& message, long line, long data1lineNumber, long data2lineNumber, const std::string& rFileName): _message(message), _lineNumber(line), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(rFileName)
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, long data2lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(fileName)
{
}

View File

@ -56,10 +56,10 @@ class TestCaller: public TestCase
typedef void (Fixture::*TestMethod)();
public:
TestCaller(const std::string& rName, TestMethod test):
TestCase(rName),
TestCaller(const std::string& name, TestMethod test):
TestCase(name),
_test(test),
_fixture(new Fixture(rName))
_fixture(new Fixture(name))
{
}

View File

@ -173,7 +173,7 @@ protected:
// Constructs a test case
inline TestCase::TestCase(const std::string& rName): _name (rName)
inline TestCase::TestCase(const std::string& name): _name (name)
{
}

View File

@ -52,7 +52,7 @@ protected:
// Constructs a TestFailure with the given test and exception.
inline TestFailure::TestFailure(Test* pFailedTest, CppUnitException* pThrownException): _failedTest(pFailedTest), _thrownException(pThrownException)
inline TestFailure::TestFailure(Test* failedTest, CppUnitException* thrownException): _failedTest(failedTest), _thrownException(thrownException)
{
}

View File

@ -21,21 +21,21 @@ namespace Poco {
namespace Crypto {
CipherKey::CipherKey(const std::string& rName, const std::string& passphrase, const std::string& salt, int iterationCount,
const std::string & rDigest):
_pImpl(new CipherKeyImpl(rName, passphrase, salt, iterationCount, rDigest))
CipherKey::CipherKey(const std::string& name, const std::string& passphrase, const std::string& salt, int iterationCount,
const std::string &digest):
_pImpl(new CipherKeyImpl(name, passphrase, salt, iterationCount, digest))
{
}
CipherKey::CipherKey(const std::string& rName, const ByteVec& key, const ByteVec& iv):
_pImpl(new CipherKeyImpl(rName, key, iv))
CipherKey::CipherKey(const std::string& name, const ByteVec& key, const ByteVec& iv):
_pImpl(new CipherKeyImpl(name, key, iv))
{
}
CipherKey::CipherKey(const std::string& rName):
_pImpl(new CipherKeyImpl(rName))
CipherKey::CipherKey(const std::string& name):
_pImpl(new CipherKeyImpl(name))
{
}

View File

@ -27,28 +27,28 @@ namespace Poco {
namespace Crypto {
CipherKeyImpl::CipherKeyImpl(const std::string& rName,
CipherKeyImpl::CipherKeyImpl(const std::string& name,
const std::string& passphrase,
const std::string& salt,
int iterationCount,
const std::string& rDigest):
const std::string& digest):
_pCipher(0),
_pDigest(0),
_name(rName),
_name(name),
_key(),
_iv()
{
// dummy access to Cipherfactory so that the EVP lib is initilaized
CipherFactory::defaultFactory();
_pCipher = EVP_get_cipherbyname(rName.c_str());
_pCipher = EVP_get_cipherbyname(name.c_str());
if (!_pCipher)
throw Poco::NotFoundException("Cipher " + rName + " was not found");
throw Poco::NotFoundException("Cipher " + name + " was not found");
_pDigest = EVP_get_digestbyname(rDigest.c_str());
_pDigest = EVP_get_digestbyname(digest.c_str());
if (!_pDigest)
throw Poco::NotFoundException("Digest " + rName + " was not found");
throw Poco::NotFoundException("Digest " + name + " was not found");
_key = ByteVec(keySize());
@ -57,35 +57,35 @@ CipherKeyImpl::CipherKeyImpl(const std::string& rName,
}
CipherKeyImpl::CipherKeyImpl(const std::string& rName,
CipherKeyImpl::CipherKeyImpl(const std::string& name,
const ByteVec& key,
const ByteVec& iv):
_pCipher(0),
_name(rName),
_name(name),
_key(key),
_iv(iv)
{
// dummy access to Cipherfactory so that the EVP lib is initilaized
CipherFactory::defaultFactory();
_pCipher = EVP_get_cipherbyname(rName.c_str());
_pCipher = EVP_get_cipherbyname(name.c_str());
if (!_pCipher)
throw Poco::NotFoundException("Cipher " + rName + " was not found");
throw Poco::NotFoundException("Cipher " + name + " was not found");
}
CipherKeyImpl::CipherKeyImpl(const std::string& rName):
CipherKeyImpl::CipherKeyImpl(const std::string& name):
_pCipher(0),
_name(rName),
_name(name),
_key(),
_iv()
{
// dummy access to Cipherfactory so that the EVP lib is initilaized
CipherFactory::defaultFactory();
_pCipher = EVP_get_cipherbyname(rName.c_str());
_pCipher = EVP_get_cipherbyname(name.c_str());
if (!_pCipher)
throw Poco::NotFoundException("Cipher " + rName + " was not found");
throw Poco::NotFoundException("Cipher " + name + " was not found");
_key = ByteVec(keySize());
_iv = ByteVec(ivSize());
generateKey();
@ -165,7 +165,7 @@ void CipherKeyImpl::generateKey(
}
// Now create the key and IV, using the digest set in the constructor.
int cipherKeySize = EVP_BytesToKey(
int keySize = EVP_BytesToKey(
_pCipher,
_pDigest,
(salt.empty() ? 0 : saltBytes),
@ -176,7 +176,7 @@ void CipherKeyImpl::generateKey(
ivBytes);
// Copy the buffers to our member byte vectors.
_key.assign(keyBytes, keyBytes + cipherKeySize);
_key.assign(keyBytes, keyBytes + keySize);
if (ivSize() == 0)
_iv.clear();

View File

@ -87,10 +87,10 @@ RSAKeyImpl::RSAKeyImpl(
RSA* pubKey = PEM_read_bio_RSAPublicKey(bio, &_pRSA, 0, 0);
if (!pubKey)
{
int ret = BIO_reset(bio);
int rc = BIO_reset(bio);
// BIO_reset() normally returns 1 for success and 0 or -1 for failure.
// File BIOs are an exception, they return 0 for success and -1 for failure.
if (ret != 0) throw Poco::FileException("Failed to load public key", publicKeyFile);
if (rc != 0) throw Poco::FileException("Failed to load public key", publicKeyFile);
pubKey = PEM_read_bio_RSA_PUBKEY(bio, &_pRSA, 0, 0);
}
BIO_free(bio);
@ -287,8 +287,8 @@ void RSAKeyImpl::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyS
throw Poco::WriteFileException("Failed to write public key to stream");
}
char* pData;
long keySize = BIO_get_mem_data(bio, &pData);
pPublicKeyStream->write(pData, static_cast<std::streamsize>(keySize));
long size = BIO_get_mem_data(bio, &pData);
pPublicKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
@ -309,8 +309,8 @@ void RSAKeyImpl::save(std::ostream* pPublicKeyStream, std::ostream* pPrivateKeyS
throw Poco::FileException("Failed to write private key to stream");
}
char* pData;
long keySize = BIO_get_mem_data(bio, &pData);
pPrivateKeyStream->write(pData, static_cast<std::streamsize>(keySize));
long size = BIO_get_mem_data(bio, &pData);
pPrivateKeyStream->write(pData, static_cast<std::streamsize>(size));
BIO_free(bio);
}
}

View File

@ -13,5 +13,6 @@ 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.compiler.additionalOptions.x64 = /bigobj
vc.project.compiler.additionalOptions.WinCE = /bigobj
vc.solution.create = true
vc.solution.include = testsuite\\TestSuite

View File

@ -45,7 +45,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
@ -125,7 +125,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
@ -205,7 +205,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
@ -271,7 +271,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
@ -336,7 +336,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool
@ -402,7 +402,7 @@
DisableSpecificWarnings="4800;"
CompileForArchitecture="2"
InterworkCalls="false"
AdditionalOptions=""/>
AdditionalOptions="/bigobj"/>
<Tool
Name="VCManagedResourceCompilerTool"/>
<Tool

View File

@ -136,6 +136,7 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>..\bin\$(Platform)\PocoDatad.dll</OutputFile>
@ -162,6 +163,7 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>..\bin\$(Platform)\PocoData.dll</OutputFile>
@ -189,6 +191,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamtd.lib</OutputFile>
@ -210,6 +213,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamt.lib</OutputFile>
@ -230,6 +234,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamdd.lib</OutputFile>
@ -251,6 +256,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamd.lib</OutputFile>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{afbe04f4-c69d-4aa6-babe-74358ec23a11}</UniqueIdentifier>
<UniqueIdentifier>{f87c8a84-3196-4d2e-9935-7ea88aebaf5e}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{d1251bfb-7216-448b-9c0d-80f2903cede1}</UniqueIdentifier>
<UniqueIdentifier>{c8d109ee-52c7-436d-8884-8a4edb5f361d}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{1f439df2-f931-4c1f-82ae-ea11d441d15f}</UniqueIdentifier>
<UniqueIdentifier>{a15fefe5-7963-4ea6-bf80-10ce7e41ac2a}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{3f8e9d0d-856d-419d-89fb-16904fa29e75}</UniqueIdentifier>
<UniqueIdentifier>{150a698a-1d8a-4b75-b0a1-291ba83d6b0a}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{b57716e0-d030-4913-900e-bd96775f8104}</UniqueIdentifier>
<UniqueIdentifier>{36549b6a-0c38-49ea-ac43-f1b0cc180c09}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{8025d438-78ca-430a-8d22-78167c783e60}</UniqueIdentifier>
<UniqueIdentifier>{f88bffc9-470e-4edb-b840-73ffecc62d9b}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{3308a18c-dd06-4ff2-a3eb-3b6b4c951692}</UniqueIdentifier>
<UniqueIdentifier>{ee5fe068-558a-4390-9e3a-4118ed72bf83}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{542b344c-2aa2-48f8-be67-6fd1a163c65c}</UniqueIdentifier>
<UniqueIdentifier>{b68d1602-cd2a-4c43-b1d5-168adb99a762}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{bcf7a9da-332c-4e6b-81f1-37a0e116d440}</UniqueIdentifier>
<UniqueIdentifier>{96d0e845-3de2-4a06-91c5-ea2c469151f9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -136,6 +136,7 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>..\bin\$(Platform)\PocoDatad.dll</OutputFile>
@ -162,6 +163,7 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<OutputFile>..\bin\$(Platform)\PocoData.dll</OutputFile>
@ -189,6 +191,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamtd.lib</OutputFile>
@ -210,6 +213,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamt.lib</OutputFile>
@ -230,6 +234,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamdd.lib</OutputFile>
@ -251,6 +256,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Lib>
<OutputFile>..\lib\$(Platform)\PocoDatamd.lib</OutputFile>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{354b9974-53b2-41e9-9c2e-3ac1cd8eb8d3}</UniqueIdentifier>
<UniqueIdentifier>{1a050aaf-729b-4e84-89e0-e0bc5f8d4808}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{5d9f9bc9-be52-4e03-ac89-2b65dc319a89}</UniqueIdentifier>
<UniqueIdentifier>{339f38e1-8161-4cb6-a5dc-dad2fce05e9e}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{af5514fc-85fd-4cc6-8ec1-dea22f75254b}</UniqueIdentifier>
<UniqueIdentifier>{cded9a4f-4bf2-492f-9eb2-8082db20d6ae}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{4322305c-46ae-47e4-8f31-dd781863da06}</UniqueIdentifier>
<UniqueIdentifier>{f716c8b5-eeb5-44b6-9ac1-3f237b0a61f2}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{f9f2d600-a830-4875-93b3-95ca11c98c84}</UniqueIdentifier>
<UniqueIdentifier>{963f7f76-883a-43be-a993-27f567ad14e1}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{e62f6698-aec4-4277-b174-a01c7787d74e}</UniqueIdentifier>
<UniqueIdentifier>{8719d7fe-2dae-4494-bdd6-7be980746428}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{45b79b11-4c90-47b9-a699-ea7ae733f83c}</UniqueIdentifier>
<UniqueIdentifier>{65f85cda-73ac-4a9e-bc3e-deb1320701cf}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{6cc994a0-ce43-4776-8e76-bf115b162172}</UniqueIdentifier>
<UniqueIdentifier>{e7012572-1727-4fd7-82d5-534c31eade48}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{5178771d-b672-4247-877d-9c244c4208f5}</UniqueIdentifier>
<UniqueIdentifier>{d5733a91-9ad0-4d82-98cd-0f51d3d18e42}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{be69cd09-bdcb-445d-a786-c3281f3e2b95}</UniqueIdentifier>
<UniqueIdentifier>{195c7544-a2f6-4e47-a142-323671e3bab6}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{f5c6a3bb-d7c4-4b8c-a73b-0665c3fd7d95}</UniqueIdentifier>
<UniqueIdentifier>{2c097f27-ed40-4fd4-904d-7517c34621dd}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{549457d8-8db4-4b04-a0a7-d519a9d02022}</UniqueIdentifier>
<UniqueIdentifier>{98170258-7dde-4fc6-a3a7-c11d6baa524e}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{8ab4fb6b-1a8e-447d-b040-83de61742648}</UniqueIdentifier>
<UniqueIdentifier>{6b3a9a63-90aa-40f8-b329-b7c14345d83f}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{157043c4-81e2-4ddd-8072-34fba98fc592}</UniqueIdentifier>
<UniqueIdentifier>{577ed43d-b38a-4ee4-bef6-4fe55cda516d}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{108ed356-cffa-474c-a869-1fc054ed7055}</UniqueIdentifier>
<UniqueIdentifier>{a82a3627-f508-4efb-8627-2adbbbb72946}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{9548a9ac-16cb-476a-a421-2b1c10c5a81b}</UniqueIdentifier>
<UniqueIdentifier>{616e0636-200d-439d-987a-17c2aba4f3d6}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{7d225c11-32c6-4dd5-aff5-a8a77dfa9a35}</UniqueIdentifier>
<UniqueIdentifier>{79fae8e0-1cc5-4f8b-beaa-8a8a3f734441}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{f353e68d-4b10-4cb2-b16d-74daff8b79aa}</UniqueIdentifier>
<UniqueIdentifier>{1d4b636e-7ff7-4a77-9b55-13d1e819de7c}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{13941e34-926f-4790-884e-388490d4b01d}</UniqueIdentifier>
<UniqueIdentifier>{9fe260ab-7757-413f-abea-17563af61b3c}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{baa01be7-9bc1-41f8-865d-a0b8d9d4754e}</UniqueIdentifier>
<UniqueIdentifier>{c1d6f727-ee9e-42bc-a045-fb61809246ec}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{d2bb2ec8-5b51-47ee-a1c1-9fd5787ae588}</UniqueIdentifier>
<UniqueIdentifier>{a8053e7a-22ba-46e1-8257-f25b20bb4709}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{655c43a6-82ba-4280-b46f-bc2634a70243}</UniqueIdentifier>
<UniqueIdentifier>{ef6203b2-f28a-4a3c-a798-8dc24f79d3b3}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{b9d07856-a3ab-4ba0-a427-c374dfbd1f86}</UniqueIdentifier>
<UniqueIdentifier>{09e7ead5-7613-47b6-8999-61311a5ff64c}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{f1ef23ca-f09d-4446-8e62-fcde07be98fa}</UniqueIdentifier>
<UniqueIdentifier>{8510f047-e146-46cc-aabd-3f6deb91077b}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{b5220b8e-2aca-4343-b230-ee448396856f}</UniqueIdentifier>
<UniqueIdentifier>{c598c05b-aca7-44ab-8d5f-c3d16b0d78c9}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{e008522f-0e91-4fbc-a41e-05cfec564b95}</UniqueIdentifier>
<UniqueIdentifier>{3829c3f7-34fd-4b53-88ea-6635b5ba56ae}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{849d4fbc-dd98-48ce-81f7-a0e5557e5010}</UniqueIdentifier>
<UniqueIdentifier>{bcc6fdf6-084a-4dad-bfe0-c8bad7756f3f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|Win32">
@ -32,7 +32,7 @@
<RootNamespace>Data</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
@ -63,27 +63,27 @@
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<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" />
<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" />
<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" />
<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" />
<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" />
<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" />
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDatad</TargetName>
@ -125,18 +125,17 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<OutputFile>..\bin\PocoDatad.dll</OutputFile>
@ -164,9 +163,9 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
</ClCompile>
<Link>
@ -187,19 +186,18 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<ProgramDataBaseFileName>..\lib\PocoDatamtd.pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib\PocoDatamtd.lib</OutputFile>
@ -220,9 +218,9 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
</ClCompile>
<Lib>
@ -235,19 +233,18 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<ProgramDataBaseFileName>..\lib\PocoDatamdd.pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib\PocoDatamdd.lib</OutputFile>
@ -268,10 +265,10 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<ProgramDataBaseFileName>..\lib\PocoDatamd.pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
</ClCompile>
<Lib>
@ -368,6 +365,6 @@
<ClCompile Include="src\Time.cpp"/>
<ClCompile Include="src\Transaction.cpp"/>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{96284adb-5513-4ea1-bda9-6d1567822723}</UniqueIdentifier>
<UniqueIdentifier>{17de01f2-f14f-48fe-9e73-161e4b57c5a5}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{71da1e92-4917-4c21-9731-27f533096f39}</UniqueIdentifier>
<UniqueIdentifier>{d1f541d9-8e3d-4284-bc74-0960ba0e9c01}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{ddf362d8-b56a-4045-9224-158eaa585af4}</UniqueIdentifier>
<UniqueIdentifier>{4d6d61e1-b19e-4872-8320-b658a6a9144c}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{b503747f-b110-4760-907d-9f0f5fde8e41}</UniqueIdentifier>
<UniqueIdentifier>{a58cf5a7-34ce-49e2-942d-8f56b1402571}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{28633c43-cd5e-4b47-8bc4-0e1d4efc63fd}</UniqueIdentifier>
<UniqueIdentifier>{adf6a79e-6949-45db-ad1c-c0dcb5ef5086}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{40eef1ac-a741-44b8-be26-944ccdcc9591}</UniqueIdentifier>
<UniqueIdentifier>{65ff7f18-a297-484e-94e8-696d66aa87e5}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{7254f23a-e098-4d53-bda4-04d2e9c03ae9}</UniqueIdentifier>
<UniqueIdentifier>{88bac24b-28b7-4f77-a84d-31e742021503}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{f5ad66d8-f2ff-4155-aeaa-0c47ad2649d0}</UniqueIdentifier>
<UniqueIdentifier>{7b5d2081-f7c9-4120-bfcf-2f1334168b9f}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{a5858e96-5d61-432d-bb65-0bb9769b2c3b}</UniqueIdentifier>
<UniqueIdentifier>{dfbbc564-620d-4b82-b0b2-718731ac532d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -85,7 +85,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|Win32'">PocoDatad</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|Win32'">PocoDatamdd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|Win32'">PocoDatamtd</TargetName>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{c9a20005-1ded-42be-a359-190ef39ca747}</UniqueIdentifier>
<UniqueIdentifier>{f9d1e08b-dbe5-4e6f-aa50-2d1d55759e57}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{33c36126-d215-40ef-be12-f2f97f2fe103}</UniqueIdentifier>
<UniqueIdentifier>{4f916936-1861-4e69-988d-aabafd646070}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{431ef26e-9ce2-42fa-81ec-9d9db1329187}</UniqueIdentifier>
<UniqueIdentifier>{3fa3dc58-a602-44bb-9ef6-e325bc5ddb19}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{b8b99283-8810-4e67-8258-8fe6c7ccb546}</UniqueIdentifier>
<UniqueIdentifier>{0ce6a211-601d-4ab5-ae69-35556a1cc335}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{7cb5f78d-d3bc-4ef0-9043-cf65aed74a99}</UniqueIdentifier>
<UniqueIdentifier>{71c8985a-a573-40ea-9faa-050f2c9b4076}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{42ed5eaf-46d7-46ee-9b0d-3a1d91aaad9e}</UniqueIdentifier>
<UniqueIdentifier>{2e2bdcea-c03e-4113-9545-66227073ba9b}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{341a7c31-5f1f-4159-b87a-cb6b4d3b05a7}</UniqueIdentifier>
<UniqueIdentifier>{7163d8d2-820f-409c-b62a-73a7cad2c1a3}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{ffd5686d-ea8c-44e4-97fe-61eb063fb434}</UniqueIdentifier>
<UniqueIdentifier>{56dff3f3-ff8c-4434-b86f-ee6fe5ea1335}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{772470a2-aaa6-4a14-94c5-98a471a4b769}</UniqueIdentifier>
<UniqueIdentifier>{a131b91f-6d66-44ed-9fa2-abf33275d265}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{67cf767e-e296-4d25-a81b-b5aa6f29f7ce}</UniqueIdentifier>
<UniqueIdentifier>{aae7c27e-e0b8-4ed1-8ccd-77bdbfece66d}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{5f440626-1ced-451c-9bdb-fa3e6de7db42}</UniqueIdentifier>
<UniqueIdentifier>{28fa46ec-5c6b-4b2c-81da-d8d39cb480da}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{cda06993-f08e-4a0d-9554-ccf479c58704}</UniqueIdentifier>
<UniqueIdentifier>{815b2129-0e33-4a85-a654-2c47ab400a75}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{add1dd78-0f4d-46d3-ac01-47319cace033}</UniqueIdentifier>
<UniqueIdentifier>{caa238cb-56d8-4fad-977c-5b5e78b09dfa}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{32bc0385-c3cd-4525-993d-d22c4486b13f}</UniqueIdentifier>
<UniqueIdentifier>{dda8fd23-ece8-4483-a0ba-ac3775253941}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{7cc87a93-7176-4b51-a874-0f20463589f7}</UniqueIdentifier>
<UniqueIdentifier>{9050df9b-c059-48bf-9461-7b952218d800}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{e9bf763a-a2c4-4e09-898c-07102909a8df}</UniqueIdentifier>
<UniqueIdentifier>{eed6c9f4-e742-4d9d-91b3-8f60c21ded9c}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{e87ae4ea-35d1-4620-8f2f-3480104d264b}</UniqueIdentifier>
<UniqueIdentifier>{27414f90-5279-496e-8f80-57eab728e10f}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{4841b0ad-623c-4314-9a63-cd5594730000}</UniqueIdentifier>
<UniqueIdentifier>{87340dd6-b394-42df-adff-e0729cebee9f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{351b94c7-ddf8-4fd4-a1f0-f2fc3ef80835}</UniqueIdentifier>
<UniqueIdentifier>{b52ea91d-788d-45c7-9d11-e44e651017d9}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{a796da8d-189c-4fdf-9568-ba65cc01a492}</UniqueIdentifier>
<UniqueIdentifier>{54e95e40-5ced-4ce6-b40a-2f48cc8fb2c1}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{84de6d34-c63b-4832-8aa7-6ba626785fb9}</UniqueIdentifier>
<UniqueIdentifier>{33327b91-0a83-4e0b-bfee-8dc9c187b7b8}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{a447b486-38e9-41fb-8a95-e9c933e7615d}</UniqueIdentifier>
<UniqueIdentifier>{688c8e99-370b-4738-8ea8-7966648e90fe}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{121ec0b1-6e84-498c-b42f-b66f46848b9b}</UniqueIdentifier>
<UniqueIdentifier>{774a400e-5098-4463-89da-baae8e036fc6}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{658a8428-7533-40f3-a3df-3ecac65bb2b8}</UniqueIdentifier>
<UniqueIdentifier>{86736c5a-9aaf-4dbe-be69-7b023c184704}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{5a30c806-beb9-429b-b435-23c284e2bd9e}</UniqueIdentifier>
<UniqueIdentifier>{8a19035a-a0ce-47f7-beb5-7900373c83f6}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{2fd504a3-8dd8-4236-8277-f7370c99a6ab}</UniqueIdentifier>
<UniqueIdentifier>{f0427ef3-c39a-47ba-a655-26a54e83064e}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{ef9093b3-204f-4590-afd8-8e1f360ad64f}</UniqueIdentifier>
<UniqueIdentifier>{b18eaa6e-77a4-4bc0-9c3a-bf95f15f0606}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug_shared|x64">
@ -32,7 +32,7 @@
<RootNamespace>Data</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props"/>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_static_md|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
@ -63,27 +63,27 @@
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<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" />
<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" />
<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" />
<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" />
<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" />
<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" />
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"/>
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoData64d</TargetName>
@ -125,19 +125,18 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;Data_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<OutputFile>..\bin64\PocoData64d.dll</OutputFile>
@ -165,12 +164,11 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<OutputFile>..\bin64\PocoData64.dll</OutputFile>
@ -190,20 +188,19 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<ProgramDataBaseFileName>..\lib64\PocoDatamtd.pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib64\PocoDatamtd.lib</OutputFile>
@ -224,12 +221,11 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib64\PocoDatamt.lib</OutputFile>
@ -241,20 +237,19 @@
<AdditionalIncludeDirectories>.\include;..\Foundation\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MinimalRebuild>false</MinimalRebuild>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>true</BufferSecurityCheck>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<ProgramDataBaseFileName>..\lib64\PocoDatamdd.pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib64\PocoDatamdd.lib</OutputFile>
@ -275,12 +270,11 @@
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
<PrecompiledHeader/>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat />
<DebugInformationFormat/>
<CompileAs>Default</CompileAs>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>..\lib64\PocoDatamd.lib</OutputFile>
@ -376,6 +370,6 @@
<ClCompile Include="src\Time.cpp"/>
<ClCompile Include="src\Transaction.cpp"/>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets"/>
<ImportGroup Label="ExtensionTargets"/>
</Project>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{03057cf0-0a45-4f05-b3f1-49efe69676b6}</UniqueIdentifier>
<UniqueIdentifier>{2adcb9d4-ca0b-45d9-9d6c-321f49efaa7b}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{3ab9e6b0-fe0f-459c-8a11-e5abab3ba5e4}</UniqueIdentifier>
<UniqueIdentifier>{b8485689-0235-47a1-9186-064392e2ce6f}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{f65032c5-960b-4de0-a633-4e866549ede3}</UniqueIdentifier>
<UniqueIdentifier>{5fbd641e-49c7-46e8-a4f3-eb9566f47366}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{4ad5318f-4fd1-40cc-8ab7-b793d43f7235}</UniqueIdentifier>
<UniqueIdentifier>{1fdf18f6-7baf-41f4-b99d-f32da11b2c15}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{958bdce1-8813-4dc8-9b20-f66ac7489960}</UniqueIdentifier>
<UniqueIdentifier>{b9641b25-aa24-4487-b0c0-9499e1bd0b89}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{5439178f-11b9-4417-bbe3-55840d9e4676}</UniqueIdentifier>
<UniqueIdentifier>{ed62bb74-1d19-4ac9-a961-b7170a337c4f}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{e7d1d571-4a86-4db3-8689-5c16fce4db5c}</UniqueIdentifier>
<UniqueIdentifier>{c05b5acd-78b5-48e1-b67c-f0ab159b815a}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{8632f9be-aff4-4f36-8d38-9a0d7ea6aa3f}</UniqueIdentifier>
<UniqueIdentifier>{867791b2-de44-4fce-823e-7f0ed0e35182}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{433c5e7f-11d4-415f-8640-1e2d0b75af57}</UniqueIdentifier>
<UniqueIdentifier>{1a31af19-6f22-4505-bc15-98703e5db8aa}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -85,7 +85,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros"/>
<PropertyGroup>
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
<_ProjectFileVersion>14.0.25420.1</_ProjectFileVersion>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_shared|x64'">PocoData64d</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_md|x64'">PocoDatamdd</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='debug_static_mt|x64'">PocoDatamtd</TargetName>

View File

@ -2,31 +2,31 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="DataCore">
<UniqueIdentifier>{481d77ce-a8a4-4f05-8f77-6f06a8e55645}</UniqueIdentifier>
<UniqueIdentifier>{28f51acf-99fe-4049-b2e6-dc1ba8aa2cd4}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Header Files">
<UniqueIdentifier>{45ade786-0777-42c7-b8be-d4b7c818284b}</UniqueIdentifier>
<UniqueIdentifier>{26710ac5-bf0d-4c12-98ff-ad3f749445e9}</UniqueIdentifier>
</Filter>
<Filter Include="DataCore\Source Files">
<UniqueIdentifier>{6d816a93-6f3d-45b6-996a-e3043ad35887}</UniqueIdentifier>
<UniqueIdentifier>{b0f5810b-abe5-4455-9800-69a886d2a75b}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling">
<UniqueIdentifier>{44fab889-d748-4174-8ed9-d949417225d5}</UniqueIdentifier>
<UniqueIdentifier>{ec8969d0-e356-4554-9d98-857c0817276b}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Header Files">
<UniqueIdentifier>{a8237ad5-fd6b-43f1-9778-69e3742cb54e}</UniqueIdentifier>
<UniqueIdentifier>{e6f737b6-75ae-4133-a6f4-47baad8e0ff1}</UniqueIdentifier>
</Filter>
<Filter Include="SessionPooling\Source Files">
<UniqueIdentifier>{5b6e2fdb-f6b3-4e3f-9478-e6c1c1520786}</UniqueIdentifier>
<UniqueIdentifier>{650c5609-65a3-4276-9aac-a66f52dfb051}</UniqueIdentifier>
</Filter>
<Filter Include="Logging">
<UniqueIdentifier>{2ad0073c-bc68-492b-832b-4c751aff292e}</UniqueIdentifier>
<UniqueIdentifier>{581ed0aa-4507-4247-bf44-1eabc8c4b989}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Header Files">
<UniqueIdentifier>{4317a37c-d531-459c-b9ce-3e237d0c573a}</UniqueIdentifier>
<UniqueIdentifier>{639652eb-b8ae-4e9a-bbdf-012608808d79}</UniqueIdentifier>
</Filter>
<Filter Include="Logging\Source Files">
<UniqueIdentifier>{e8125eb5-7713-403b-8e01-9b2f4890dcbf}</UniqueIdentifier>
<UniqueIdentifier>{b3c5fa32-47a1-4bbe-b639-2746ea8ef8b9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>

View File

@ -35,6 +35,12 @@
#define HAVE_STRUCT_TIMESPEC
#endif
#if (POCO_OS == POCO_OS_CYGWIN)
typedef unsigned short ushort; /* System V compatibility */
typedef unsigned int uint; /* System V compatibility */
typedef unsigned long ulong; /* System V compatibility */
#endif
#include <my_global.h>
#include <mysql.h>

View File

@ -56,6 +56,14 @@ public:
static const int OPERATION_DELETE;
static const int OPERATION_UPDATE;
static void addColumnType(std::string sqliteType, MetaColumn::ColumnDataType pocoType);
/// Adds or replaces the mapping for SQLite column type sqliteType
/// to a Poco type pocoType.
///
/// sqliteType is a case-insensitive desription of the column type with
/// any value pocoType value but MetaColumn::FDT_UNKNOWN.
/// A Poco::Data::NotSupportedException is thrown if pocoType is invalid.
static sqlite3* dbHandle(const Session& session);
/// Returns native DB handle.
@ -190,6 +198,8 @@ private:
Utility(const Utility&);
Utility& operator = (const Utility&);
static void initializeDefaultTypes();
static void* eventHookRegister(sqlite3* pDB, UpdateCallbackType callbackFn, void* pParam);
static void* eventHookRegister(sqlite3* pDB, CommitCallbackType callbackFn, void* pParam);
static void* eventHookRegister(sqlite3* pDB, RollbackCallbackType callbackFn, void* pParam);

View File

@ -62,6 +62,12 @@ Poco::Mutex Utility::_mutex;
Utility::Utility()
{
initializeDefaultTypes();
}
void Utility::initializeDefaultTypes()
{
if (_types.empty())
{
@ -125,6 +131,21 @@ Utility::Utility()
}
void Utility::addColumnType(std::string sqliteType, MetaColumn::ColumnDataType pocoType)
{
// Check for errors in the mapping
if (MetaColumn::FDT_UNKNOWN == pocoType)
throw Poco::Data::NotSupportedException("Cannot map to unknown poco type.");
// Initialize default types
initializeDefaultTypes();
// Add type to internal map
Poco::toUpperInPlace(sqliteType);
_types[sqliteType] = pocoType;
}
std::string Utility::lastError(sqlite3* pDB)
{
return std::string(sqlite3_errmsg(pDB));
@ -147,9 +168,10 @@ MetaColumn::ColumnDataType Utility::getColumnType(sqlite3_stmt* pStmt, std::size
sqliteType = sqliteType.substr(0, sqliteType.find_first_of(" ("));
TypeMap::const_iterator it = _types.find(Poco::trimInPlace(sqliteType));
if (_types.end() == it) throw Poco::NotFoundException();
return it->second;
if (_types.end() == it)
return MetaColumn::FDT_BLOB;
else
return it->second;
}

File diff suppressed because it is too large Load Diff

View File

@ -30,8 +30,8 @@
** the version number) and changes its name to "sqlite3.h" as
** part of the build process.
*/
#ifndef _SQLITE3_H_
#define _SQLITE3_H_
#ifndef SQLITE3_H
#define SQLITE3_H
#include <stdarg.h> /* Needed for the definition of va_list */
/*
@ -54,8 +54,17 @@ extern "C" {
#ifndef SQLITE_CDECL
# define SQLITE_CDECL
#endif
#ifndef SQLITE_APICALL
# define SQLITE_APICALL
#endif
#ifndef SQLITE_STDCALL
# define SQLITE_STDCALL
# define SQLITE_STDCALL SQLITE_APICALL
#endif
#ifndef SQLITE_CALLBACK
# define SQLITE_CALLBACK
#endif
#ifndef SQLITE_SYSAPI
# define SQLITE_SYSAPI
#endif
/*
@ -111,9 +120,9 @@ extern "C" {
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
** [sqlite_version()] and [sqlite_source_id()].
*/
#define SQLITE_VERSION "3.13.0"
#define SQLITE_VERSION_NUMBER 3013000
#define SQLITE_SOURCE_ID "2016-05-18 10:57:30 fc49f556e48970561d7ab6a2f24fdd7d9eb81ff2"
#define SQLITE_VERSION "3.14.1"
#define SQLITE_VERSION_NUMBER 3014001
#define SQLITE_SOURCE_ID "2016-08-11 18:53:32 a12d8059770df4bca59e321c266410344242bf7b"
/*
** CAPI3REF: Run-Time Library Version Numbers
@ -506,6 +515,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_exec(
#define SQLITE_NOTICE_RECOVER_ROLLBACK (SQLITE_NOTICE | (2<<8))
#define SQLITE_WARNING_AUTOINDEX (SQLITE_WARNING | (1<<8))
#define SQLITE_AUTH_USER (SQLITE_AUTH | (1<<8))
#define SQLITE_OK_LOAD_PERMANENTLY (SQLITE_OK | (1<<8))
/*
** CAPI3REF: Flags For File Open Operations
@ -1035,6 +1045,16 @@ struct sqlite3_io_methods {
*/
typedef struct sqlite3_mutex sqlite3_mutex;
/*
** CAPI3REF: Loadable Extension Thunk
**
** A pointer to the opaque sqlite3_api_routines structure is passed as
** the third parameter to entry points of [loadable extensions]. This
** structure must be typedefed in order to work around compiler warnings
** on some platforms.
*/
typedef struct sqlite3_api_routines sqlite3_api_routines;
/*
** CAPI3REF: OS Interface Object
**
@ -1939,7 +1959,7 @@ struct sqlite3_mem_methods {
** C-API [sqlite3_load_extension()] and the SQL function [load_extension()].
** There should be two additional arguments.
** When the first argument to this interface is 1, then only the C-API is
** enabled and the SQL function remains disabled. If the first argment to
** enabled and the SQL function remains disabled. If the first argument to
** this interface is 0, then both the C-API and the SQL function are disabled.
** If the first argument is -1, then no changes are made to state of either the
** C-API or the SQL function.
@ -2232,7 +2252,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_complete16(const void *sql);
** A busy handler must not close the database connection
** or [prepared statement] that invoked the busy handler.
*/
SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
SQLITE_API int SQLITE_STDCALL sqlite3_busy_handler(sqlite3*,int(*)(void*,int),void*);
/*
** CAPI3REF: Set A Busy Timeout
@ -2754,6 +2774,9 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
** CAPI3REF: Tracing And Profiling Functions
** METHOD: sqlite3
**
** These routines are deprecated. Use the [sqlite3_trace_v2()] interface
** instead of the routines described here.
**
** These routines register callback functions that can be used for
** tracing and profiling the execution of SQL statements.
**
@ -2779,10 +2802,104 @@ SQLITE_API int SQLITE_STDCALL sqlite3_set_authorizer(
** sqlite3_profile() function is considered experimental and is
** subject to change in future versions of SQLite.
*/
SQLITE_API void *SQLITE_STDCALL sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
SQLITE_API SQLITE_EXPERIMENTAL void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_trace(sqlite3*,
void(*xTrace)(void*,const char*), void*);
SQLITE_API SQLITE_DEPRECATED void *SQLITE_STDCALL sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
/*
** CAPI3REF: SQL Trace Event Codes
** KEYWORDS: SQLITE_TRACE
**
** These constants identify classes of events that can be monitored
** using the [sqlite3_trace_v2()] tracing logic. The third argument
** to [sqlite3_trace_v2()] is an OR-ed combination of one or more of
** the following constants. ^The first argument to the trace callback
** is one of the following constants.
**
** New tracing constants may be added in future releases.
**
** ^A trace callback has four arguments: xCallback(T,C,P,X).
** ^The T argument is one of the integer type codes above.
** ^The C argument is a copy of the context pointer passed in as the
** fourth argument to [sqlite3_trace_v2()].
** The P and X arguments are pointers whose meanings depend on T.
**
** <dl>
** [[SQLITE_TRACE_STMT]] <dt>SQLITE_TRACE_STMT</dt>
** <dd>^An SQLITE_TRACE_STMT callback is invoked when a prepared statement
** first begins running and possibly at other times during the
** execution of the prepared statement, such as at the start of each
** trigger subprogram. ^The P argument is a pointer to the
** [prepared statement]. ^The X argument is a pointer to a string which
** is the unexpanded SQL text of the prepared statement or an SQL comment
** that indicates the invocation of a trigger. ^The callback can compute
** the same text that would have been returned by the legacy [sqlite3_trace()]
** interface by using the X argument when X begins with "--" and invoking
** [sqlite3_expanded_sql(P)] otherwise.
**
** [[SQLITE_TRACE_PROFILE]] <dt>SQLITE_TRACE_PROFILE</dt>
** <dd>^An SQLITE_TRACE_PROFILE callback provides approximately the same
** information as is provided by the [sqlite3_profile()] callback.
** ^The P argument is a pointer to the [prepared statement] and the
** X argument points to a 64-bit integer which is the estimated of
** the number of nanosecond that the prepared statement took to run.
** ^The SQLITE_TRACE_PROFILE callback is invoked when the statement finishes.
**
** [[SQLITE_TRACE_ROW]] <dt>SQLITE_TRACE_ROW</dt>
** <dd>^An SQLITE_TRACE_ROW callback is invoked whenever a prepared
** statement generates a single row of result.
** ^The P argument is a pointer to the [prepared statement] and the
** X argument is unused.
**
** [[SQLITE_TRACE_CLOSE]] <dt>SQLITE_TRACE_CLOSE</dt>
** <dd>^An SQLITE_TRACE_CLOSE callback is invoked when a database
** connection closes.
** ^The P argument is a pointer to the [database connection] object
** and the X argument is unused.
** </dl>
*/
#define SQLITE_TRACE_STMT 0x01
#define SQLITE_TRACE_PROFILE 0x02
#define SQLITE_TRACE_ROW 0x04
#define SQLITE_TRACE_CLOSE 0x08
/*
** CAPI3REF: SQL Trace Hook
** METHOD: sqlite3
**
** ^The sqlite3_trace_v2(D,M,X,P) interface registers a trace callback
** function X against [database connection] D, using property mask M
** and context pointer P. ^If the X callback is
** NULL or if the M mask is zero, then tracing is disabled. The
** M argument should be the bitwise OR-ed combination of
** zero or more [SQLITE_TRACE] constants.
**
** ^Each call to either sqlite3_trace() or sqlite3_trace_v2() overrides
** (cancels) any prior calls to sqlite3_trace() or sqlite3_trace_v2().
**
** ^The X callback is invoked whenever any of the events identified by
** mask M occur. ^The integer return value from the callback is currently
** ignored, though this may change in future releases. Callback
** implementations should return zero to ensure future compatibility.
**
** ^A trace callback is invoked with four arguments: callback(T,C,P,X).
** ^The T argument is one of the [SQLITE_TRACE]
** constants to indicate why the callback was invoked.
** ^The C argument is a copy of the context pointer.
** The P and X arguments are pointers whose meanings depend on T.
**
** The sqlite3_trace_v2() interface is intended to replace the legacy
** interfaces [sqlite3_trace()] and [sqlite3_profile()], both of which
** are deprecated.
*/
SQLITE_API int SQLITE_STDCALL sqlite3_trace_v2(
sqlite3*,
unsigned uMask,
int(*xCallback)(unsigned,void*,void*,void*),
void *pCtx
);
/*
** CAPI3REF: Query Progress Callbacks
** METHOD: sqlite3
@ -3401,11 +3518,35 @@ SQLITE_API int SQLITE_STDCALL sqlite3_prepare16_v2(
** CAPI3REF: Retrieving Statement SQL
** METHOD: sqlite3_stmt
**
** ^This interface can be used to retrieve a saved copy of the original
** SQL text used to create a [prepared statement] if that statement was
** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
** ^The sqlite3_sql(P) interface returns a pointer to a copy of the UTF-8
** SQL text used to create [prepared statement] P if P was
** created by either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
** ^The sqlite3_expanded_sql(P) interface returns a pointer to a UTF-8
** string containing the SQL text of prepared statement P with
** [bound parameters] expanded.
**
** ^(For example, if a prepared statement is created using the SQL
** text "SELECT $abc,:xyz" and if parameter $abc is bound to integer 2345
** and parameter :xyz is unbound, then sqlite3_sql() will return
** the original string, "SELECT $abc,:xyz" but sqlite3_expanded_sql()
** will return "SELECT 2345,NULL".)^
**
** ^The sqlite3_expanded_sql() interface returns NULL if insufficient memory
** is available to hold the result, or if the result would exceed the
** the maximum string length determined by the [SQLITE_LIMIT_LENGTH].
**
** ^The [SQLITE_TRACE_SIZE_LIMIT] compile-time option limits the size of
** bound parameter expansions. ^The [SQLITE_OMIT_TRACE] compile-time
** option causes sqlite3_expanded_sql() to always return NULL.
**
** ^The string returned by sqlite3_sql(P) is managed by SQLite and is
** automatically freed when the prepared statement is finalized.
** ^The string returned by sqlite3_expanded_sql(P), on the other hand,
** is obtained from [sqlite3_malloc()] and must be free by the application
** by passing it to [sqlite3_free()].
*/
SQLITE_API const char *SQLITE_STDCALL sqlite3_sql(sqlite3_stmt *pStmt);
SQLITE_API char *SQLITE_STDCALL sqlite3_expanded_sql(sqlite3_stmt *pStmt);
/*
** CAPI3REF: Determine If An SQL Statement Writes The Database
@ -4563,12 +4704,13 @@ SQLITE_API sqlite3 *SQLITE_STDCALL sqlite3_context_db_handle(sqlite3_context*);
** SQLite will invoke the destructor function X with parameter P exactly
** once, when the metadata is discarded.
** SQLite is free to discard the metadata at any time, including: <ul>
** <li> when the corresponding function parameter changes, or
** <li> when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
** SQL statement, or
** <li> when sqlite3_set_auxdata() is invoked again on the same parameter, or
** <li> during the original sqlite3_set_auxdata() call when a memory
** allocation error occurs. </ul>)^
** <li> ^(when the corresponding function parameter changes)^, or
** <li> ^(when [sqlite3_reset()] or [sqlite3_finalize()] is called for the
** SQL statement)^, or
** <li> ^(when sqlite3_set_auxdata() is invoked again on the same
** parameter)^, or
** <li> ^(during the original sqlite3_set_auxdata() call when a memory
** allocation error occurs.)^ </ul>
**
** Note the last bullet in particular. The destructor X in
** sqlite3_set_auxdata(C,N,P,X) might be called immediately, before the
@ -5395,7 +5537,7 @@ SQLITE_API SQLITE_DEPRECATED void SQLITE_STDCALL sqlite3_soft_heap_limit(int N);
** column exists. ^The sqlite3_table_column_metadata() interface returns
** SQLITE_ERROR and if the specified column does not exist.
** ^If the column-name parameter to sqlite3_table_column_metadata() is a
** NULL pointer, then this routine simply checks for the existance of the
** NULL pointer, then this routine simply checks for the existence of the
** table and returns SQLITE_OK if the table exists and SQLITE_ERROR if it
** does not.
**
@ -5529,8 +5671,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_load_extension(
**
** ^This interface enables or disables both the C-API
** [sqlite3_load_extension()] and the SQL function [load_extension()].
** Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
** to enable or disable only the C-API.
** ^(Use [sqlite3_db_config](db,[SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION],..)
** to enable or disable only the C-API.)^
**
** <b>Security warning:</b> It is recommended that extension loading
** be disabled using the [SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION] method
@ -5550,7 +5692,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
**
** ^(Even though the function prototype shows that xEntryPoint() takes
** no arguments and returns void, SQLite invokes xEntryPoint() with three
** arguments and expects and integer result as if the signature of the
** arguments and expects an integer result as if the signature of the
** entry point where as follows:
**
** <blockquote><pre>
@ -5576,7 +5718,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_enable_load_extension(sqlite3 *db, int ono
** See also: [sqlite3_reset_auto_extension()]
** and [sqlite3_cancel_auto_extension()]
*/
SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void(*xEntryPoint)(void));
/*
** CAPI3REF: Cancel Automatic Extension Loading
@ -5588,7 +5730,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_auto_extension(void (*xEntryPoint)(void));
** unregistered and it returns 0 if X was not on the list of initialization
** routines.
*/
SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void (*xEntryPoint)(void));
SQLITE_API int SQLITE_STDCALL sqlite3_cancel_auto_extension(void(*xEntryPoint)(void));
/*
** CAPI3REF: Reset Automatic Extension Loading
@ -6764,6 +6906,18 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
** memory used by all pager caches associated with the database connection.)^
** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
**
** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]]
** ^(<dt>SQLITE_DBSTATUS_CACHE_USED_SHARED</dt>
** <dd>This parameter is similar to DBSTATUS_CACHE_USED, except that if a
** pager cache is shared between two or more connections the bytes of heap
** memory used by that pager cache is divided evenly between the attached
** connections.)^ In other words, if none of the pager caches associated
** with the database connection are shared, this request returns the same
** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are
** shared, the value returned by this call will be smaller than that returned
** by DBSTATUS_CACHE_USED. ^The highwater mark associated with
** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0.
**
** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
** <dd>This parameter returns the approximate number of bytes of heap
** memory used to store the schema for all databases associated
@ -6821,7 +6975,8 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_status(sqlite3*, int op, int *pCur, int
#define SQLITE_DBSTATUS_CACHE_MISS 8
#define SQLITE_DBSTATUS_CACHE_WRITE 9
#define SQLITE_DBSTATUS_DEFERRED_FKS 10
#define SQLITE_DBSTATUS_MAX 10 /* Largest defined DBSTATUS */
#define SQLITE_DBSTATUS_CACHE_USED_SHARED 11
#define SQLITE_DBSTATUS_MAX 11 /* Largest defined DBSTATUS */
/*
@ -7977,7 +8132,7 @@ SQLITE_API int SQLITE_STDCALL sqlite3_db_cacheflush(sqlite3*);
** ^The second parameter to the preupdate callback is a pointer to
** the [database connection] that registered the preupdate hook.
** ^The third parameter to the preupdate callback is one of the constants
** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to indentify the
** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the
** kind of update operation that is about to occur.
** ^(The fourth parameter to the preupdate callback is the name of the
** database within the database connection that is being modified. This
@ -8204,7 +8359,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int SQLITE_STDCALL sqlite3_snapshot_cmp(
#ifdef __cplusplus
} /* End of the 'extern "C"' block */
#endif
#endif /* _SQLITE3_H_ */
#endif /* SQLITE3_H */
/******** Begin file sqlite3rtree.h *********/
/*
@ -9924,7 +10079,7 @@ struct Fts5ExtensionApi {
** behaviour. The structure methods are expected to function as follows:
**
** xCreate:
** This function is used to allocate and inititalize a tokenizer instance.
** This function is used to allocate and initialize a tokenizer instance.
** A tokenizer instance is required to actually tokenize text.
**
** The first argument passed to this function is a copy of the (void*)
@ -10184,5 +10339,4 @@ struct fts5_api {
#endif /* _FTS5_H */
/******** End of fts5.h *********/

View File

@ -103,8 +103,8 @@ void RecordSet::reset(const Statement& stmt)
_totalRowCount = UNKNOWN_TOTAL_ROW_COUNT;
RowMap::iterator it = _rowMap.begin();
RowMap::iterator itEnd = _rowMap.end();
for (; it != itEnd; ++it) delete it->second;
RowMap::iterator end = _rowMap.end();
for (; it != end; ++it) delete it->second;
_rowMap.clear();
Statement::operator = (stmt);

View File

@ -59,7 +59,7 @@ public:
}
template <typename T>
Pair(const K& rFirst, const T& rSecond): _data(std::make_pair(rFirst, rSecond))
Pair(const K& first, const T& second): _data(std::make_pair(first, second))
/// Creates pair from two values.
{
}

View File

@ -334,14 +334,14 @@ public:
{
if (_entries[i])
{
UInt32 entrySize = (UInt32)_entries[i]->size();
poco_assert_dbg(entrySize != 0);
if (entrySize > maxEntriesPerHash)
maxEntriesPerHash = entrySize;
UInt32 size = (UInt32)_entries[i]->size();
poco_assert_dbg(size != 0);
if (size > maxEntriesPerHash)
maxEntriesPerHash = size;
if (details)
detailedEntriesPerHash.push_back(entrySize);
detailedEntriesPerHash.push_back(size);
#ifdef _DEBUG
totalSize += entrySize;
totalSize += size;
#endif
}
else

View File

@ -37,8 +37,8 @@ class LRUCache: public AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TM
/// An LRUCache implements Least Recently Used caching. The default size for a cache is 1024 entries.
{
public:
LRUCache(long cacheSize = 1024):
AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TMutex, TEventMutex>(LRUStrategy<TKey, TValue>(cacheSize))
LRUCache(long size = 1024):
AbstractCache<TKey, TValue, LRUStrategy<TKey, TValue>, TMutex, TEventMutex>(LRUStrategy<TKey, TValue>(size))
{
}

View File

@ -109,12 +109,12 @@ public:
/// not found.
{
typename Container::const_iterator it = _list.begin();
typename Container::const_iterator itEnd = _list.end();
for(; it != itEnd; ++it)
typename Container::const_iterator end = _list.end();
for(; it != end; ++it)
{
if (isEqual(it->first, key)) return it;
}
return itEnd;
return end;
}
Iterator find(const KeyType& key)
@ -124,12 +124,12 @@ public:
/// not found.
{
typename Container::iterator it = _list.begin();
typename Container::iterator itEnd = _list.end();
for(; it != itEnd; ++it)
typename Container::iterator end = _list.end();
for(; it != end; ++it)
{
if (isEqual(it->first, key)) return it;
}
return itEnd;
return end;
}
Iterator insert(const ValueType& val)
@ -203,8 +203,8 @@ public:
else
{
ValueType value(key, Mapped());
Iterator itInsert = insert(value);
return itInsert->second;
Iterator it = insert(value);
return it->second;
}
}

View File

@ -132,7 +132,7 @@ class MetaObject: public AbstractMetaObject<B>
/// factory for its class.
{
public:
MetaObject(const char* pName): AbstractMetaObject<B>(pName)
MetaObject(const char* name): AbstractMetaObject<B>(name)
{
}
@ -164,7 +164,7 @@ class MetaSingleton: public AbstractMetaObject<B>
/// the single instance of its class.
{
public:
MetaSingleton(const char* pName): AbstractMetaObject<B>(pName)
MetaSingleton(const char* name): AbstractMetaObject<B>(name)
{
}

View File

@ -74,9 +74,9 @@ public:
{
}
Nullable(const C& rValue):
Nullable(const C& value):
/// Creates a Nullable with the given value.
_value(rValue),
_value(value),
_isNull(false)
{
}
@ -93,10 +93,10 @@ public:
{
}
Nullable& assign(const C& rValue)
Nullable& assign(const C& value)
/// Assigns a value to the Nullable.
{
_value = rValue;
_value = value;
_isNull = false;
return *this;
}
@ -116,10 +116,10 @@ public:
return *this;
}
Nullable& operator = (const C& rValue)
Nullable& operator = (const C& value)
/// Assigns a value to the Nullable.
{
return assign(rValue);
return assign(value);
}
Nullable& operator = (const Nullable& other)
@ -148,10 +148,10 @@ public:
return (_isNull && other._isNull) || (_isNull == other._isNull && _value == other._value);
}
bool operator == (const C& rValue) const
bool operator == (const C& value) const
/// Compares Nullable with value for equality
{
return (!_isNull && _value == rValue);
return (!_isNull && _value == value);
}
bool operator == (const NullType&) const
@ -160,10 +160,10 @@ public:
return _isNull;
}
bool operator != (const C& rValue) const
bool operator != (const C& value) const
/// Compares Nullable with value for non equality
{
return !(*this == rValue);
return !(*this == value);
}
bool operator != (const Nullable<C>& other) const

View File

@ -168,28 +168,28 @@ class ObjectPool
/// - If the object is not valid, it is destroyed immediately.
{
public:
ObjectPool(std::size_t objectCapacity, std::size_t peakObjectCapacity):
ObjectPool(std::size_t capacity, std::size_t peakCapacity):
/// Creates a new ObjectPool with the given capacity
/// and peak capacity.
///
/// The PoolableObjectFactory must have a public default constructor.
_capacity(objectCapacity),
_peakCapacity(peakObjectCapacity),
_capacity(capacity),
_peakCapacity(peakCapacity),
_size(0)
{
poco_assert (objectCapacity <= peakObjectCapacity);
poco_assert (capacity <= peakCapacity);
}
ObjectPool(const F& factory, std::size_t objectCapacity, std::size_t peakObjectCapacity):
ObjectPool(const F& factory, std::size_t capacity, std::size_t peakCapacity):
/// Creates a new ObjectPool with the given PoolableObjectFactory,
/// capacity and peak capacity. The PoolableObjectFactory must have
/// a public copy constructor.
_factory(factory),
_capacity(objectCapacity),
_peakCapacity(peakObjectCapacity),
_capacity(capacity),
_peakCapacity(peakCapacity),
_size(0)
{
poco_assert (objectCapacity <= peakObjectCapacity);
poco_assert (capacity <= peakCapacity);
}
~ObjectPool()

View File

@ -62,9 +62,9 @@ public:
{
}
Optional(const C& rValue):
Optional(const C& value):
/// Creates a Optional with the given value.
_value(rValue),
_value(value),
_isSpecified(true)
{
}
@ -81,10 +81,10 @@ public:
{
}
Optional& assign(const C& rValue)
Optional& assign(const C& value)
/// Assigns a value to the Optional.
{
_value = rValue;
_value = value;
_isSpecified = true;
return *this;
}
@ -97,9 +97,9 @@ public:
return *this;
}
Optional& operator = (const C& rValue)
Optional& operator = (const C& value)
{
return assign(rValue);
return assign(value);
}
Optional& operator = (const Optional& other)

View File

@ -59,7 +59,7 @@ class RecursiveDirectoryIterator
/// * SiblingsFirstRecursiveDirectoryIterator.
///
/// The depth of traversal can be limited by constructor
/// parameter maxTraversalDepth (which sets the infinite depth by default).
/// parameter maxDepth (which sets the infinite depth by default).
{
public:
typedef RecursiveDirectoryIterator<TTravStr> MyType;
@ -75,9 +75,9 @@ public:
{
}
RecursiveDirectoryIterator(const std::string& rPath, UInt16 maxTraversalDepth = D_INFINITE)
RecursiveDirectoryIterator(const std::string& path, UInt16 maxDepth = D_INFINITE)
/// Creates a recursive directory iterator for the given path.
: _pImpl(new ImplType(rPath, maxTraversalDepth)), _path(Path(_pImpl->get())), _file(_path)
: _pImpl(new ImplType(path, maxDepth)), _path(Path(_pImpl->get())), _file(_path)
{
}
@ -87,22 +87,22 @@ public:
{
}
RecursiveDirectoryIterator(const DirectoryIterator& iterator, UInt16 maxTraversalDepth = D_INFINITE):
RecursiveDirectoryIterator(const DirectoryIterator& iterator, UInt16 maxDepth = D_INFINITE):
/// Creates a recursive directory iterator for the path of
/// non-recursive directory iterator.
_pImpl(new ImplType(iterator->path(), maxTraversalDepth)), _path(Path(_pImpl->get())), _file(_path)
_pImpl(new ImplType(iterator->path(), maxDepth)), _path(Path(_pImpl->get())), _file(_path)
{
}
RecursiveDirectoryIterator(const File& file, UInt16 maxTraversalDepth = D_INFINITE):
RecursiveDirectoryIterator(const File& file, UInt16 maxDepth = D_INFINITE):
/// Creates a recursive directory iterator for the given path.
_pImpl(new ImplType(file.path(), maxTraversalDepth)), _path(Path(_pImpl->get())), _file(_path)
_pImpl(new ImplType(file.path(), maxDepth)), _path(Path(_pImpl->get())), _file(_path)
{
}
RecursiveDirectoryIterator(const Path& rPath, UInt16 maxTraversalDepth = D_INFINITE):
RecursiveDirectoryIterator(const Path& path, UInt16 maxDepth = D_INFINITE):
/// Creates a recursive directory iterator for the given path.
_pImpl(new ImplType(rPath.toString(), maxTraversalDepth)), _path(Path(_pImpl->get())), _file(_path)
_pImpl(new ImplType(path.toString(), maxDepth)), _path(Path(_pImpl->get())), _file(_path)
{
}
@ -163,21 +163,21 @@ public:
}
MyType& operator = (const Path& rPath)
MyType& operator = (const Path& path)
{
if (_pImpl)
_pImpl->release();
_pImpl = new ImplType(rPath.toString());
_pImpl = new ImplType(path.toString());
_path = Path(_pImpl->get());
_file = _path;
return *this;
}
MyType& operator = (const std::string& rPath)
MyType& operator = (const std::string& path)
{
if (_pImpl)
_pImpl->release();
_pImpl = new ImplType(rPath);
_pImpl = new ImplType(path);
_path = Path(_pImpl->get());
_file = _path;
return *this;

View File

@ -42,8 +42,8 @@ public:
D_INFINITE = 0 /// Special value for infinite traverse depth.
};
RecursiveDirectoryIteratorImpl(const std::string& path, UInt16 maxTraversalDepth = D_INFINITE)
: _maxDepth(maxTraversalDepth), _traverseStrategy(std::ptr_fun(depthFun), _maxDepth), _isFinished(false), _rc(1)
RecursiveDirectoryIteratorImpl(const std::string& path, UInt16 maxDepth = D_INFINITE)
: _maxDepth(maxDepth), _traverseStrategy(std::ptr_fun(depthFun), _maxDepth), _isFinished(false), _rc(1)
{
_itStack.push(DirectoryIterator(path));
_current = _itStack.top()->path();

View File

@ -58,7 +58,7 @@ public:
typedef std::vector<HashEntry*> HashTableVector;
SimpleHashTable(UInt32 tableCapacity = 251): _entries(tableCapacity, 0), _size(0), _capacity(tableCapacity)
SimpleHashTable(UInt32 capacity = 251): _entries(capacity, 0), _size(0), _capacity(capacity)
/// Creates the SimpleHashTable.
{
}
@ -366,11 +366,11 @@ public:
if (_entries[i])
{
maxEntriesPerHash = 1;
UInt32 entrySize = 1;
UInt32 size = 1;
if (details)
detailedEntriesPerHash.push_back(entrySize);
detailedEntriesPerHash.push_back(size);
#ifdef _DEBUG
totalSize += entrySize;
totalSize += size;
#endif
}
else

View File

@ -59,6 +59,14 @@ public:
return _pS;
}
void reset()
/// Deletes the singleton object.
{
FastMutex::ScopedLock lock(_m);
delete _pS;
_pS = 0;
}
private:
S* _pS;
FastMutex _m;

View File

@ -627,7 +627,7 @@ template <class S>
bool startsWith(const S& str, const S& prefix)
/// Tests whether the string starts with the given prefix.
{
return equal(prefix.begin(), prefix.end(), str.begin());
return str.size() >= prefix.size() && equal(prefix.begin(), prefix.end(), str.begin());
}
@ -635,7 +635,7 @@ template <class S>
bool endsWith(const S& str, const S& suffix)
/// Tests whether the string ends with the given suffix.
{
return equal(suffix.rbegin(), suffix.rend(), str.rbegin());
return str.size() >= suffix.size() && equal(suffix.rbegin(), suffix.rend(), str.rbegin());
}

View File

@ -30,8 +30,8 @@ template <class TKey>
class ValidArgs
{
public:
ValidArgs(const TKey& rKey):
_key(rKey),
ValidArgs(const TKey& key):
_key(key),
_isValid(true)
{
}

View File

@ -204,7 +204,19 @@ std::string PathImpl::expandImpl(const std::string& path)
++it;
if (it != end && *it == '/')
{
result += homeImpl(); ++it;
const char* homeEnv = getenv("HOME");
if (homeEnv)
{
result += homeEnv;
std::string::size_type resultSize = result.size();
if (resultSize > 0 && result[resultSize - 1] != '/')
result.append("/");
}
else
{
result += homeImpl();
}
++it;
}
else result += '~';
}

View File

@ -47,6 +47,7 @@ namespace
return envbuf;
}
#if defined(POCO_OS_FAMILY_VMS)
void setEnvironmentVariables(const Poco::Process::Env& env)
{
for (Poco::Process::Env::const_iterator it = env.begin(); it != env.end(); ++it)
@ -54,6 +55,7 @@ namespace
Poco::Environment::set(it->first, it->second);
}
}
#endif
}

View File

@ -22,7 +22,7 @@
namespace Poco {
Token::Token(bool isIgnore) : _ignored(isIgnore)
Token::Token(bool ignore) : _ignored(ignore)
{
}
@ -94,9 +94,9 @@ char Token::asChar() const
}
void Token::ignore(bool isIgnored)
void Token::ignore(bool ignored)
{
_ignored = isIgnored;
_ignored = ignored;
}
bool Token::ignored() const

View File

@ -89,7 +89,7 @@ void DynamicFactoryTest::testDynamicFactory()
try
{
std::auto_ptr<B> pB(dynamic_cast<B*>(dynFactory.createInstance("B")));
std::auto_ptr<B> b(dynamic_cast<B*>(dynFactory.createInstance("B")));
fail("unregistered - must throw");
}
catch (Poco::NotFoundException&)

View File

@ -60,10 +60,10 @@ FileChannelTest::~FileChannelTest()
void FileChannelTest::testRotateBySize()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "2 K");
pChannel->open();
Message msg("source", "This is a log file entry", Message::PRIO_INFORMATION);
@ -71,28 +71,28 @@ void FileChannelTest::testRotateBySize()
{
pChannel->log(msg);
}
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
f = fileName + ".1";
f = name + ".1";
assert (f.exists());
f = fileName + ".2";
f = name + ".2";
assert (!f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateByAge()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "2 seconds");
pChannel->open();
Message msg("source", "This is a log file entry", Message::PRIO_INFORMATION);
@ -101,26 +101,26 @@ void FileChannelTest::testRotateByAge()
pChannel->log(msg);
Thread::sleep(300);
}
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
f = fileName + ".1";
f = name + ".1";
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeDayUTC()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "utc");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<DateTime>(DAY_HOUR_MIN));
pChannel->open();
@ -132,24 +132,24 @@ void FileChannelTest::testRotateAtTimeDayUTC()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeDayLocal()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "local");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<LocalDateTime>(DAY_HOUR_MIN));
pChannel->open();
@ -161,24 +161,24 @@ void FileChannelTest::testRotateAtTimeDayLocal()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeHourUTC()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "utc");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<DateTime>(HOUR_MIN));
pChannel->open();
@ -190,24 +190,24 @@ void FileChannelTest::testRotateAtTimeHourUTC()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeHourLocal()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "local");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<LocalDateTime>(HOUR_MIN));
pChannel->open();
@ -219,24 +219,24 @@ void FileChannelTest::testRotateAtTimeHourLocal()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeMinUTC()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "utc");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<DateTime>(MIN));
pChannel->open();
@ -248,24 +248,24 @@ void FileChannelTest::testRotateAtTimeMinUTC()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testRotateAtTimeMinLocal()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_TIMES, "local");
pChannel->setProperty(FileChannel::PROP_ROTATION, rotation<LocalDateTime>(MIN));
pChannel->open();
@ -277,24 +277,24 @@ void FileChannelTest::testRotateAtTimeMinLocal()
Thread::sleep(1000);
}
pChannel->log(msg);
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testArchive()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "2 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->open();
@ -303,24 +303,24 @@ void FileChannelTest::testArchive()
{
pChannel->log(msg);
}
File f(fileName + ".0");
File f(name + ".0");
assert (f.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::testCompress()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "1 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->setProperty(FileChannel::PROP_COMPRESS, "true");
@ -331,26 +331,26 @@ void FileChannelTest::testCompress()
pChannel->log(msg);
}
Thread::sleep(3000); // allow time for background compression
File f0(fileName + ".0.gz");
File f0(name + ".0.gz");
assert (f0.exists());
File f1(fileName + ".1.gz");
File f1(name + ".1.gz");
assert (f1.exists());
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::purgeAge(const std::string& pa)
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "1 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->setProperty(FileChannel::PROP_PURGEAGE, pa);
@ -360,11 +360,11 @@ void FileChannelTest::purgeAge(const std::string& pa)
{
pChannel->log(msg);
}
File f0(fileName + ".0");
File f0(name + ".0");
assert(f0.exists());
File f1(fileName + ".1");
File f1(name + ".1");
assert(f1.exists());
File f2(fileName + ".2");
File f2(name + ".2");
assert(f2.exists());
Thread::sleep(5000);
@ -377,20 +377,20 @@ void FileChannelTest::purgeAge(const std::string& pa)
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::noPurgeAge(const std::string& npa)
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "1 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->setProperty(FileChannel::PROP_PURGEAGE, npa);
@ -400,11 +400,11 @@ void FileChannelTest::noPurgeAge(const std::string& npa)
{
pChannel->log(msg);
}
File f0(fileName + ".0");
File f0(name + ".0");
assert(f0.exists());
File f1(fileName + ".1");
File f1(name + ".1");
assert(f1.exists());
File f2(fileName + ".2");
File f2(name + ".2");
assert(f2.exists());
Thread::sleep(5000);
@ -417,10 +417,10 @@ void FileChannelTest::noPurgeAge(const std::string& npa)
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
@ -442,10 +442,10 @@ void FileChannelTest::testPurgeAge()
void FileChannelTest::purgeCount(const std::string& pc)
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "1 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->setProperty(FileChannel::PROP_PURGECOUNT, pc);
@ -456,27 +456,27 @@ void FileChannelTest::purgeCount(const std::string& pc)
pChannel->log(msg);
Thread::sleep(50);
}
File f0(fileName + ".0");
File f0(name + ".0");
assert(f0.exists());
File f1(fileName + ".1");
File f1(name + ".1");
assert(f1.exists());
File f2(fileName + ".2");
File f2(name + ".2");
assert(!f2.exists());
} catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
void FileChannelTest::noPurgeCount(const std::string& npc)
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_ROTATION, "1 K");
pChannel->setProperty(FileChannel::PROP_ARCHIVE, "number");
pChannel->setProperty(FileChannel::PROP_PURGECOUNT, npc);
@ -487,18 +487,18 @@ void FileChannelTest::noPurgeCount(const std::string& npc)
pChannel->log(msg);
Thread::sleep(50);
}
File f0(fileName + ".0");
File f0(name + ".0");
assert(f0.exists());
File f1(fileName + ".1");
File f1(name + ".1");
assert(f1.exists());
File f2(fileName + ".2");
File f2(name + ".2");
assert(f2.exists());
} catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
@ -520,8 +520,8 @@ void FileChannelTest::testPurgeCount()
void FileChannelTest::testWrongPurgeOption()
{
std::string fileName = filename();
AutoPtr<FileChannel> pChannel = new FileChannel(fileName);
std::string name = filename();
AutoPtr<FileChannel> pChannel = new FileChannel(name);
pChannel->setProperty(FileChannel::PROP_PURGEAGE, "5 seconds");
try
@ -542,7 +542,7 @@ void FileChannelTest::testWrongPurgeOption()
assert(pChannel->getProperty(FileChannel::PROP_PURGEAGE) == "5 seconds");
}
remove(fileName);
remove(name);
}
@ -569,11 +569,11 @@ void FileChannelTest::remove(const std::string& baseName)
}
++it;
}
for (std::vector<std::string>::iterator itFiles = files.begin(); itFiles != files.end(); ++itFiles)
for (std::vector<std::string>::iterator it = files.begin(); it != files.end(); ++it)
{
try
{
File f(*itFiles);
File f(*it);
f.remove();
} catch (...)
{
@ -584,10 +584,10 @@ void FileChannelTest::remove(const std::string& baseName)
std::string FileChannelTest::filename() const
{
std::string ret = "log_";
ret.append(DateTimeFormatter::format(Timestamp(), "%Y%m%d%H%M%S"));
ret.append(".log");
return ret;
std::string name = "log_";
name.append(DateTimeFormatter::format(Timestamp(), "%Y%m%d%H%M%S"));
name.append(".log");
return name;
}
@ -595,7 +595,7 @@ template <class DT>
std::string FileChannelTest::rotation(TimeRotation rtype) const
{
DT now;
std::string ret;
std::string rotation;
int day = now.dayOfWeek();
int min = now.minute();
@ -615,20 +615,20 @@ std::string FileChannelTest::rotation(TimeRotation rtype) const
switch (rtype)
{
case DAY_HOUR_MIN: // day,hh:m,
ret = DateTimeFormat::WEEKDAY_NAMES[day];
ret += ',' + NumberFormatter::format0(hour, 2) + ':' + NumberFormatter::format0(min, 2);
rotation = DateTimeFormat::WEEKDAY_NAMES[day];
rotation += ',' + NumberFormatter::format0(hour, 2) + ':' + NumberFormatter::format0(min, 2);
break;
case HOUR_MIN: // hh:mm
ret = NumberFormatter::format0(hour, 2) + ':' + NumberFormatter::format0(min, 2);
rotation = NumberFormatter::format0(hour, 2) + ':' + NumberFormatter::format0(min, 2);
break;
case MIN: // mm
ret = ':' + NumberFormatter::format0(min, 2);
rotation = ':' + NumberFormatter::format0(min, 2);
break;
default:
ret = "";
rotation = "";
break;
}
return ret;
return rotation;
}

View File

@ -50,13 +50,13 @@ void NDCTest::testNDC()
void NDCTest::testNDCScope()
{
Poco::NDCScope item1("item1", __LINE__, __FILE__);
poco_ndc("item1");
assert (NDC::current().depth() == 1);
{
Poco::NDCScope item2("item2", __LINE__, __FILE__);
poco_ndc("item2");
assert (NDC::current().depth() == 2);
{
Poco::NDCScope item3("item3", __LINE__, __FILE__);
poco_ndc("item3");
assert (NDC::current().depth() == 3);
NDC::current().dump(std::cout);
}

View File

@ -32,7 +32,7 @@ namespace
class QTestNotification: public Notification
{
public:
QTestNotification(const std::string& rData): _data(rData)
QTestNotification(const std::string& data): _data(data)
{
}
~QTestNotification()

View File

@ -1451,7 +1451,7 @@ void PathTest::testRobustness()
{
int len = r.next(1024);
std::string s;
for (int j = 0; j < len; ++j) s += r.nextChar();
for (int i = 0; i < len; ++i) s += r.nextChar();
try
{
Path p(s, Path::PATH_WINDOWS);

View File

@ -32,7 +32,7 @@ namespace
class QTestNotification: public Notification
{
public:
QTestNotification(const std::string& rData): _data(rData)
QTestNotification(const std::string& data): _data(data)
{
}
~QTestNotification()

View File

@ -39,18 +39,18 @@ ProcessTest::~ProcessTest()
void ProcessTest::testLaunch()
{
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#elif defined(_WIN32_WCE)
cmd = "\\";
cmd += testName;
cmd += name;
cmd += ".EXE";
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -66,14 +66,14 @@ void ProcessTest::testLaunch()
void ProcessTest::testLaunchRedirectIn()
{
#if !defined(_WIN32_WCE)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -92,14 +92,14 @@ void ProcessTest::testLaunchRedirectIn()
void ProcessTest::testLaunchRedirectOut()
{
#if !defined(_WIN32_WCE)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -120,14 +120,14 @@ void ProcessTest::testLaunchRedirectOut()
void ProcessTest::testLaunchEnv()
{
#if !defined(_WIN32_WCE)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -203,14 +203,14 @@ void ProcessTest::testLaunchArgs()
void ProcessTest::testIsRunning()
{
#if !defined(_WIN32_WCE)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -233,14 +233,14 @@ void ProcessTest::testIsRunning()
void ProcessTest::testIsRunningAllowsForTermination()
{
#if !defined(_WIN32_WCE)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
#if defined(POCO_OS_FAMILY_UNIX)
cmd = "./";
cmd += testName;
cmd += name;
#else
cmd = testName;
cmd = name;
#endif
std::vector<std::string> args;
@ -254,11 +254,11 @@ void ProcessTest::testIsRunningAllowsForTermination()
void ProcessTest::testSignalExitCode()
{
#if defined(POCO_OS_FAMILY_UNIX)
std::string testName("TestApp");
std::string name("TestApp");
std::string cmd;
cmd = "./";
cmd += testName;
cmd += name;
std::vector<std::string> args;
args.push_back("-raise-int");

View File

@ -45,10 +45,10 @@ SimpleFileChannelTest::~SimpleFileChannelTest()
void SimpleFileChannelTest::testRotate()
{
std::string fileName = filename();
std::string name = filename();
try
{
AutoPtr<SimpleFileChannel> pChannel = new SimpleFileChannel(fileName);
AutoPtr<SimpleFileChannel> pChannel = new SimpleFileChannel(name);
pChannel->setProperty(SimpleFileChannel::PROP_ROTATION, "2 K");
pChannel->open();
Message msg("source", "This is a log file entry", Message::PRIO_INFORMATION);
@ -56,18 +56,18 @@ void SimpleFileChannelTest::testRotate()
{
pChannel->log(msg);
}
File f(fileName);
File f(name);
assert (f.exists());
f = fileName + ".0";
f = name + ".0";
assert (f.exists());
assert (f.getSize() >= 2048);
}
catch (...)
{
remove(fileName);
remove(name);
throw;
}
remove(fileName);
remove(name);
}
@ -94,11 +94,11 @@ void SimpleFileChannelTest::remove(const std::string& baseName)
}
++it;
}
for (std::vector<std::string>::iterator itFiles = files.begin(); itFiles != files.end(); ++itFiles)
for (std::vector<std::string>::iterator it = files.begin(); it != files.end(); ++it)
{
try
{
File f(*itFiles);
File f(*it);
f.remove();
}
catch (...)
@ -110,10 +110,10 @@ void SimpleFileChannelTest::remove(const std::string& baseName)
std::string SimpleFileChannelTest::filename() const
{
std::string ret = "log_";
ret.append(DateTimeFormatter::format(Timestamp(), "%Y%m%d%H%M%S"));
ret.append(".log");
return ret;
std::string name = "log_";
name.append(DateTimeFormatter::format(Timestamp(), "%Y%m%d%H%M%S"));
name.append(".log");
return name;
}

View File

@ -82,8 +82,8 @@ void StringTest::testTrimLeft()
std::string s = "abc";
assert (trimLeft(s) == "abc");
}
std::string s2 = " abc ";
assert (trimLeft(s2) == "abc ");
std::string s = " abc ";
assert (trimLeft(s) == "abc ");
{
std::string s = " ab c ";
assert (trimLeft(s) == "ab c ");

View File

@ -209,7 +209,7 @@ namespace
class CustomTaskObserver
{
public:
CustomTaskObserver(const C& rCustom): _custom(rCustom)
CustomTaskObserver(const C& custom): _custom(custom)
{
}

View File

@ -28,7 +28,7 @@ namespace
class QTestNotification: public Notification
{
public:
QTestNotification(const std::string& rData): _data(rData)
QTestNotification(const std::string& data): _data(data)
{
}
~QTestNotification()

View File

@ -2511,13 +2511,13 @@ void VarTest::testEmpty()
try
{
int j = da;
int i = da;
fail ("must fail");
} catch (InvalidAccessException&) { }
try
{
int j = da.extract<int>();
int i = da.extract<int>();
fail ("must fail");
} catch (InvalidAccessException&) { }
}

View File

@ -300,9 +300,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = !_val.isNull() && _val->size() > 0;
value = !_val.isNull() && _val->size() > 0;
}
void convert(float&) const
@ -439,9 +439,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = _val.size() > 0;
value = _val.size() > 0;
}
void convert(float&) const

View File

@ -216,8 +216,8 @@ private:
if (indent > 0) out << std::endl;
typename C::const_iterator it = container.begin();
typename C::const_iterator itEnd = container.end();
for (; it != itEnd;)
typename C::const_iterator end = container.end();
for (; it != end;)
{
for(unsigned int i = 0; i < indent; i++) out << ' ';
@ -303,6 +303,19 @@ inline std::size_t Object::size() const
inline void Object::remove(const std::string& key)
{
_values.erase(key);
if (_preserveInsOrder)
{
KeyPtrList::iterator it = _keys.begin();
KeyPtrList::iterator end = _keys.end();
for (; it != end; ++it)
{
if (key == **it)
{
_keys.erase(it);
break;
}
}
}
}
@ -392,9 +405,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = !_val.isNull() && _val->size() > 0;
value = !_val.isNull() && _val->size() > 0;
}
void convert(float&) const
@ -534,9 +547,9 @@ public:
throw BadCastException();
}
void convert(bool& rValue) const
void convert(bool& value) const
{
rValue = _val.size() > 0;
value = _val.size() > 0;
}
void convert(float&) const

View File

@ -119,9 +119,9 @@ private:
};
inline void PrintHandler::setIndent(unsigned newIndent)
inline void PrintHandler::setIndent(unsigned indent)
{
_indent = newIndent;
_indent = indent;
}

View File

@ -149,10 +149,10 @@ Array::operator const Poco::Dynamic::Array& () const
if (!_pArray)
{
ValueVec::const_iterator it = _values.begin();
ValueVec::const_iterator itEnd = _values.end();
ValueVec::const_iterator end = _values.end();
_pArray = new Poco::Dynamic::Array;
int index = 0;
for (; it != itEnd; ++it, ++index)
for (; it != end; ++it, ++index)
{
if (isObject(it))
{

View File

@ -32,10 +32,19 @@ Object::Object(bool preserveInsertionOrder): _preserveInsOrder(preserveInsertion
Object::Object(const Object& copy) : _values(copy._values),
_keys(copy._keys),
_preserveInsOrder(copy._preserveInsOrder),
_pStruct(0)
{
if (_preserveInsOrder)
{
// need to update pointers in _keys to point to copied _values
for (KeyPtrList::const_iterator it = copy._keys.begin(); it != copy._keys.end(); ++it)
{
ValueMap::const_iterator itv = _values.find(**it);
poco_assert (itv != _values.end());
_keys.push_back(&itv->first);
}
}
}
@ -104,8 +113,8 @@ void Object::stringify(std::ostream& out, unsigned int indent, int step) const
const std::string& Object::getKey(KeyPtrList::const_iterator& iter) const
{
ValueMap::const_iterator it = _values.begin();
ValueMap::const_iterator itEnd = _values.end();
for (; it != itEnd; ++it)
ValueMap::const_iterator end = _values.end();
for (; it != end; ++it)
{
if (it->first == **iter) return it->first;
}
@ -121,8 +130,8 @@ void Object::set(const std::string& key, const Dynamic::Var& value)
if (_preserveInsOrder)
{
KeyPtrList::iterator it = _keys.begin();
KeyPtrList::iterator itEnd = _keys.end();
for (; it != itEnd; ++it)
KeyPtrList::iterator end = _keys.end();
for (; it != end; ++it)
{
if (key == **it) return;
}
@ -164,9 +173,9 @@ Object::operator const Poco::DynamicStruct& () const
if (!_pStruct)
{
ValueMap::const_iterator it = _values.begin();
ValueMap::const_iterator itEnd = _values.end();
ValueMap::const_iterator end = _values.end();
_pStruct = new Poco::DynamicStruct;
for (; it != itEnd; ++it)
for (; it != end; ++it)
{
if (isObject(it))
{

View File

@ -122,20 +122,20 @@ void ParseHandler::key(const std::string& k)
}
void ParseHandler::setValue(const Var& rValue)
void ParseHandler::setValue(const Var& value)
{
Var parent = _stack.top();
if ( parent.type() == typeid(Array::Ptr) )
{
Array::Ptr arr = parent.extract<Array::Ptr>();
arr->add(rValue);
arr->add(value);
}
else if ( parent.type() == typeid(Object::Ptr) )
{
poco_assert_dbg(!_key.empty());
Object::Ptr obj = parent.extract<Object::Ptr>();
obj->set(_key, rValue);
obj->set(_key, value);
_key.clear();
}
}

View File

@ -23,18 +23,18 @@ namespace Poco {
namespace JSON {
PrintHandler::PrintHandler(unsigned newIndent):
PrintHandler::PrintHandler(unsigned indent):
_out(std::cout),
_indent(newIndent),
_indent(indent),
_array(0),
_objStart(true)
{
}
PrintHandler::PrintHandler(std::ostream& out, unsigned newIndent):
PrintHandler::PrintHandler(std::ostream& out, unsigned indent):
_out(out),
_indent(newIndent),
_indent(indent),
_array(0),
_objStart(true)
{
@ -172,10 +172,10 @@ void PrintHandler::value(UInt64 v)
#endif
void PrintHandler::value(const std::string& rValue)
void PrintHandler::value(const std::string& value)
{
arrayValue();
Stringifier::formatString(rValue, _out);
Stringifier::formatString(value, _out);
_objStart = false;
}

View File

@ -35,7 +35,7 @@ using Poco::DynamicStruct;
using Poco::DateTime;
using Poco::DateTimeFormatter;
JSONTest::JSONTest(const std::string& rName): CppUnit::TestCase("JSON")
JSONTest::JSONTest(const std::string& name): CppUnit::TestCase("JSON")
{
}

View File

@ -489,12 +489,12 @@ inline void IPAddress::newIPv6(const void* hostAddr)
}
inline void IPAddress::newIPv6(const void* hostAddr, Poco::UInt32 scopeIdentifier)
inline void IPAddress::newIPv6(const void* hostAddr, Poco::UInt32 scope)
{
#ifdef POCO_HAVE_ALIGNMENT
new (storage()) Poco::Net::Impl::IPv6AddressImpl(hostAddr, scopeIdentifier);
new (storage()) Poco::Net::Impl::IPv6AddressImpl(hostAddr, scope);
#else
_pImpl = new Poco::Net::Impl::IPv6AddressImpl(hostAddr, scopeIdentifier);
_pImpl = new Poco::Net::Impl::IPv6AddressImpl(hostAddr, scope);
#endif
}

View File

@ -74,9 +74,9 @@ inline const NTPPacket &NTPEventArgs::packet()
}
inline void NTPEventArgs::setPacket(NTPPacket &rPacket)
inline void NTPEventArgs::setPacket(NTPPacket &packet)
{
_packet = rPacket;
_packet = packet;
}

View File

@ -57,9 +57,9 @@ class ParallelSocketAcceptor
public:
typedef Poco::Net::ParallelSocketReactor<SR> ParallelReactor;
explicit ParallelSocketAcceptor(ServerSocket& rSocket,
explicit ParallelSocketAcceptor(ServerSocket& socket,
unsigned threads = Poco::Environment::processorCount()):
_socket(rSocket),
_socket(socket),
_pReactor(0),
_threads(threads),
_next(0)
@ -69,11 +69,11 @@ public:
init();
}
ParallelSocketAcceptor(ServerSocket& rSocket,
SocketReactor& rReactor,
ParallelSocketAcceptor(ServerSocket& socket,
SocketReactor& reactor,
unsigned threads = Poco::Environment::processorCount()):
_socket(rSocket),
_pReactor(&rReactor),
_socket(socket),
_pReactor(&reactor),
_threads(threads),
_next(0)
/// Creates a ParallelSocketAcceptor using the given ServerSocket, sets the
@ -104,19 +104,19 @@ public:
}
}
void setReactor(SocketReactor& rReactor)
void setReactor(SocketReactor& reactor)
/// Sets the reactor for this acceptor.
{
_pReactor = &rReactor;
_pReactor = &reactor;
if (!_pReactor->hasEventHandler(_socket,
Poco::Observer<ParallelSocketAcceptor,
ReadableNotification>(*this, &ParallelSocketAcceptor::onAccept)))
{
registerAcceptor(rReactor);
registerAcceptor(reactor);
}
}
virtual void registerAcceptor(SocketReactor& rReactor)
virtual void registerAcceptor(SocketReactor& reactor)
/// Registers the ParallelSocketAcceptor with a SocketReactor.
///
/// A subclass can override this function to e.g.
@ -128,7 +128,7 @@ public:
if (_pReactor)
throw Poco::InvalidAccessException("Acceptor already registered.");
_pReactor = &rReactor;
_pReactor = &reactor;
_pReactor->addEventHandler(_socket,
Poco::Observer<ParallelSocketAcceptor,
ReadableNotification>(*this, &ParallelSocketAcceptor::onAccept));
@ -161,15 +161,15 @@ public:
}
protected:
virtual ServiceHandler* createServiceHandler(StreamSocket& rSocket)
virtual ServiceHandler* createServiceHandler(StreamSocket& socket)
/// Create and initialize a new ServiceHandler instance.
///
/// Subclasses can override this method.
{
std::size_t nextReactor = _next++;
std::size_t next = _next++;
if (_next == _reactors.size()) _next = 0;
_reactors[nextReactor]->wakeUp();
return new ServiceHandler(rSocket, *_reactors[nextReactor]);
_reactors[next]->wakeUp();
return new ServiceHandler(socket, *_reactors[next]);
}
SocketReactor* reactor()

View File

@ -69,16 +69,16 @@ class SocketAcceptor
/// if special steps are necessary to create a ServiceHandler object.
{
public:
explicit SocketAcceptor(ServerSocket& rSocket):
_socket(rSocket),
explicit SocketAcceptor(ServerSocket& socket):
_socket(socket),
_pReactor(0)
/// Creates a SocketAcceptor, using the given ServerSocket.
{
}
SocketAcceptor(ServerSocket& rSocket, SocketReactor& rReactor):
_socket(rSocket),
_pReactor(&rReactor)
SocketAcceptor(ServerSocket& socket, SocketReactor& reactor):
_socket(socket),
_pReactor(&reactor)
/// Creates a SocketAcceptor, using the given ServerSocket.
/// The SocketAcceptor registers itself with the given SocketReactor.
{
@ -103,18 +103,18 @@ public:
}
}
void setReactor(SocketReactor& rReactor)
void setReactor(SocketReactor& reactor)
/// Sets the reactor for this acceptor.
{
_pReactor = &rReactor;
_pReactor = &reactor;
if (!_pReactor->hasEventHandler(_socket, Poco::Observer<SocketAcceptor,
ReadableNotification>(*this, &SocketAcceptor::onAccept)))
{
registerAcceptor(rReactor);
registerAcceptor(reactor);
}
}
virtual void registerAcceptor(SocketReactor& rReactor)
virtual void registerAcceptor(SocketReactor& reactor)
/// Registers the SocketAcceptor with a SocketReactor.
///
/// A subclass can override this function to e.g.
@ -128,7 +128,7 @@ public:
if (_pReactor)
throw Poco::InvalidAccessException("Acceptor already registered.");
_pReactor = &rReactor;
_pReactor = &reactor;
_pReactor->addEventHandler(_socket, Poco::Observer<SocketAcceptor, ReadableNotification>(*this, &SocketAcceptor::onAccept));
}
@ -158,12 +158,12 @@ public:
}
protected:
virtual ServiceHandler* createServiceHandler(StreamSocket& rSocket)
virtual ServiceHandler* createServiceHandler(StreamSocket& socket)
/// Create and initialize a new ServiceHandler instance.
///
/// Subclasses can override this method.
{
return new ServiceHandler(rSocket, *_pReactor);
return new ServiceHandler(socket, *_pReactor);
}
SocketReactor* reactor()

View File

@ -80,13 +80,13 @@ public:
_socket.connectNB(address);
}
SocketConnector(SocketAddress& address, SocketReactor& rReactor):
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(rReactor);
registerConnector(reactor);
}
virtual ~SocketConnector()
@ -102,7 +102,7 @@ public:
}
}
virtual void registerConnector(SocketReactor& rReactor)
virtual void registerConnector(SocketReactor& reactor)
/// Registers the SocketConnector with a SocketReactor.
///
/// A subclass can override this and, for example, also register
@ -110,7 +110,7 @@ public:
///
/// The overriding method must call the baseclass implementation first.
{
_pReactor = &rReactor;
_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));

View File

@ -43,10 +43,10 @@ AbstractHTTPRequestHandler::~AbstractHTTPRequestHandler()
}
void AbstractHTTPRequestHandler::handleRequest(HTTPServerRequest& rRequest, HTTPServerResponse& rResponse)
void AbstractHTTPRequestHandler::handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
{
_pRequest = &rRequest;
_pResponse = &rResponse;
_pRequest = &request;
_pResponse = &response;
if (authenticate())
{
try
@ -55,14 +55,14 @@ void AbstractHTTPRequestHandler::handleRequest(HTTPServerRequest& rRequest, HTTP
}
catch (Poco::Exception& exc)
{
if (!rResponse.sent())
if (!response.sent())
{
sendErrorResponse(HTTPResponse::HTTP_INTERNAL_SERVER_ERROR, exc.displayText());
}
}
catch (std::exception& exc)
{
if (!rResponse.sent())
if (!response.sent())
{
sendErrorResponse(HTTPResponse::HTTP_INTERNAL_SERVER_ERROR, exc.what());
}

View File

@ -36,9 +36,9 @@ DatagramSocket::DatagramSocket(SocketAddress::Family family): Socket(new Datagra
}
DatagramSocket::DatagramSocket(const SocketAddress& rAddress, bool reuseAddress): Socket(new DatagramSocketImpl(rAddress.family()))
DatagramSocket::DatagramSocket(const SocketAddress& address, bool reuseAddress): Socket(new DatagramSocketImpl(address.family()))
{
bind(rAddress, reuseAddress);
bind(address, reuseAddress);
}
@ -71,15 +71,15 @@ DatagramSocket& DatagramSocket::operator = (const Socket& socket)
}
void DatagramSocket::connect(const SocketAddress& rAddress)
void DatagramSocket::connect(const SocketAddress& address)
{
impl()->connect(rAddress);
impl()->connect(address);
}
void DatagramSocket::bind(const SocketAddress& rAddress, bool reuseAddress)
void DatagramSocket::bind(const SocketAddress& address, bool reuseAddress)
{
impl()->bind(rAddress, reuseAddress);
impl()->bind(address, reuseAddress);
}
@ -95,15 +95,15 @@ int DatagramSocket::receiveBytes(void* buffer, int length, int flags)
}
int DatagramSocket::sendTo(const void* buffer, int length, const SocketAddress& rAddress, int flags)
int DatagramSocket::sendTo(const void* buffer, int length, const SocketAddress& address, int flags)
{
return impl()->sendTo(buffer, length, rAddress, flags);
return impl()->sendTo(buffer, length, address, flags);
}
int DatagramSocket::receiveFrom(void* buffer, int length, SocketAddress& rAddress, int flags)
int DatagramSocket::receiveFrom(void* buffer, int length, SocketAddress& address, int flags)
{
return impl()->receiveFrom(buffer, length, rAddress, flags);
return impl()->receiveFrom(buffer, length, address, flags);
}

View File

@ -46,7 +46,7 @@ DatagramSocketImpl::DatagramSocketImpl(SocketAddress::Family family)
}
DatagramSocketImpl::DatagramSocketImpl(poco_socket_t socketfd): SocketImpl(socketfd)
DatagramSocketImpl::DatagramSocketImpl(poco_socket_t sockfd): SocketImpl(sockfd)
{
}

View File

@ -32,8 +32,8 @@ DialogSocket::DialogSocket():
}
DialogSocket::DialogSocket(const SocketAddress& rAddress):
StreamSocket(rAddress),
DialogSocket::DialogSocket(const SocketAddress& address):
StreamSocket(address),
_pBuffer(0),
_pNext(0),
_pEnd(0)

View File

@ -38,8 +38,8 @@ FilePartSource::FilePartSource(const std::string& path):
}
FilePartSource::FilePartSource(const std::string& path, const std::string& rMediaType):
PartSource(rMediaType),
FilePartSource::FilePartSource(const std::string& path, const std::string& mediaType):
PartSource(mediaType),
_path(path),
_istr(path)
{
@ -50,10 +50,10 @@ FilePartSource::FilePartSource(const std::string& path, const std::string& rMedi
}
FilePartSource::FilePartSource(const std::string& path, const std::string& rFilename, const std::string& rMediaType):
PartSource(rMediaType),
FilePartSource::FilePartSource(const std::string& path, const std::string& filename, const std::string& mediaType):
PartSource(mediaType),
_path(path),
_filename(rFilename),
_filename(filename),
_istr(path)
{
Path p(path);

View File

@ -261,7 +261,7 @@ std::streamsize HTMLForm::calculateContentLength()
}
void HTMLForm::write(std::ostream& ostr, const std::string& rBoundary)
void HTMLForm::write(std::ostream& ostr, const std::string& boundary)
{
if (_encoding == ENCODING_URL)
{
@ -269,7 +269,7 @@ void HTMLForm::write(std::ostream& ostr, const std::string& rBoundary)
}
else
{
_boundary = rBoundary;
_boundary = boundary;
writeMultipart(ostr);
}
}
@ -359,12 +359,12 @@ void HTMLForm::readMultipart(std::istream& istr, PartHandler& handler)
{
std::string name = params["name"];
std::string value;
std::istream& rIstr = reader.stream();
int ch = rIstr.get();
std::istream& istr = reader.stream();
int ch = istr.get();
while (ch != eof)
{
value += (char) ch;
ch = rIstr.get();
ch = istr.get();
}
add(name, value);
}

View File

@ -137,15 +137,15 @@ void HTTPAuthenticationParams::fromResponse(const HTTPResponse& response, const
bool found = false;
while (!found && it != response.end() && icompare(it->first, header) == 0)
{
const std::string& rHeader = it->second;
if (icompare(rHeader, 0, 6, "Basic ") == 0)
const std::string& header = it->second;
if (icompare(header, 0, 6, "Basic ") == 0)
{
parse(rHeader.begin() + 6, rHeader.end());
parse(header.begin() + 6, header.end());
found = true;
}
else if (icompare(rHeader, 0, 7, "Digest ") == 0)
else if (icompare(header, 0, 7, "Digest ") == 0)
{
parse(rHeader.begin() + 7, rHeader.end());
parse(header.begin() + 7, header.end());
found = true;
}
++it;

View File

@ -52,8 +52,8 @@ HTTPClientSession::HTTPClientSession():
}
HTTPClientSession::HTTPClientSession(const StreamSocket& rSocket):
HTTPSession(rSocket),
HTTPClientSession::HTTPClientSession(const StreamSocket& socket):
HTTPSession(socket),
_port(HTTPSession::HTTP_PORT),
_proxyConfig(_globalProxyConfig),
_keepAliveTimeout(DEFAULT_KEEP_ALIVE_TIMEOUT, 0),

View File

@ -241,11 +241,11 @@ void HTTPRequest::getCredentials(const std::string& header, std::string& scheme,
{
const std::string& auth = get(header);
std::string::const_iterator it = auth.begin();
std::string::const_iterator itEnd = auth.end();
while (it != itEnd && Poco::Ascii::isSpace(*it)) ++it;
while (it != itEnd && !Poco::Ascii::isSpace(*it)) scheme += *it++;
while (it != itEnd && Poco::Ascii::isSpace(*it)) ++it;
while (it != itEnd) authInfo += *it++;
std::string::const_iterator end = auth.end();
while (it != end && Poco::Ascii::isSpace(*it)) ++it;
while (it != end && !Poco::Ascii::isSpace(*it)) scheme += *it++;
while (it != end && Poco::Ascii::isSpace(*it)) ++it;
while (it != end) authInfo += *it++;
}
else throw NotAuthenticatedException();
}

View File

@ -29,15 +29,15 @@ HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::UInt16 por
}
HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& rSocket, HTTPServerParams::Ptr pParams):
TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), rSocket, pParams),
HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), socket, pParams),
_pFactory(pFactory)
{
}
HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& rSocket, HTTPServerParams::Ptr pParams):
TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), threadPool, rSocket, pParams),
HTTPServer::HTTPServer(HTTPRequestHandlerFactory::Ptr pFactory, Poco::ThreadPool& threadPool, const ServerSocket& socket, HTTPServerParams::Ptr pParams):
TCPServer(new HTTPServerConnectionFactory(pParams, pFactory), threadPool, socket, pParams),
_pFactory(pFactory)
{
}

View File

@ -31,8 +31,8 @@ namespace Poco {
namespace Net {
HTTPServerConnection::HTTPServerConnection(const StreamSocket& rSocket, HTTPServerParams::Ptr pParams, HTTPRequestHandlerFactory::Ptr pFactory):
TCPServerConnection(rSocket),
HTTPServerConnection::HTTPServerConnection(const StreamSocket& socket, HTTPServerParams::Ptr pParams, HTTPRequestHandlerFactory::Ptr pFactory):
TCPServerConnection(socket),
_pParams(pParams),
_pFactory(pFactory),
_stopped(false)

View File

@ -33,13 +33,13 @@ namespace Poco {
namespace Net {
HTTPServerRequestImpl::HTTPServerRequestImpl(HTTPServerResponseImpl& rResponse, HTTPServerSession& session, HTTPServerParams* pParams):
_response(rResponse),
HTTPServerRequestImpl::HTTPServerRequestImpl(HTTPServerResponseImpl& response, HTTPServerSession& session, HTTPServerParams* pParams):
_response(response),
_session(session),
_pStream(0),
_pParams(pParams, true)
{
rResponse.attachRequest(this);
response.attachRequest(this);
HTTPHeaderInputStream hs(session);
read(hs);

View File

@ -21,14 +21,14 @@ namespace Poco {
namespace Net {
HTTPServerSession::HTTPServerSession(const StreamSocket& rSocket, HTTPServerParams::Ptr pParams):
HTTPSession(rSocket, pParams->getKeepAlive()),
HTTPServerSession::HTTPServerSession(const StreamSocket& socket, HTTPServerParams::Ptr pParams):
HTTPSession(socket, pParams->getKeepAlive()),
_firstRequest(true),
_keepAliveTimeout(pParams->getKeepAliveTimeout()),
_maxKeepAliveRequests(pParams->getMaxKeepAliveRequests())
{
setTimeout(pParams->getTimeout());
socket().setReceiveTimeout(pParams->getTimeout());
this->socket().setReceiveTimeout(pParams->getTimeout());
}

View File

@ -38,8 +38,8 @@ HTTPSession::HTTPSession():
}
HTTPSession::HTTPSession(const StreamSocket& rSocket):
_socket(rSocket),
HTTPSession::HTTPSession(const StreamSocket& socket):
_socket(socket),
_pBuffer(0),
_pCurrent(0),
_pEnd(0),
@ -50,8 +50,8 @@ HTTPSession::HTTPSession(const StreamSocket& rSocket):
}
HTTPSession::HTTPSession(const StreamSocket& rSocket, bool keepAlive):
_socket(rSocket),
HTTPSession::HTTPSession(const StreamSocket& socket, bool keepAlive):
_socket(socket),
_pBuffer(0),
_pCurrent(0),
_pEnd(0),
@ -226,9 +226,9 @@ StreamSocket HTTPSession::detachSocket()
}
void HTTPSession::attachSocket(const StreamSocket& rSocket)
void HTTPSession::attachSocket(const StreamSocket& socket)
{
_socket = rSocket;
_socket = socket;
}

View File

@ -35,9 +35,9 @@ HTTPSessionFactory::HTTPSessionFactory():
}
HTTPSessionFactory::HTTPSessionFactory(const std::string& rProxyHost, Poco::UInt16 port):
_proxyHost(rProxyHost),
_proxyPort(port)
HTTPSessionFactory::HTTPSessionFactory(const std::string& proxyHost, Poco::UInt16 proxyPort):
_proxyHost(proxyHost),
_proxyPort(proxyPort)
{
}

View File

@ -32,13 +32,13 @@ namespace Poco {
namespace Net {
ICMPEventArgs::ICMPEventArgs(const SocketAddress& address, int operationRepetitions, int dataSizeInBytes, int operationTtl):
ICMPEventArgs::ICMPEventArgs(const SocketAddress& address, int repetitions, int dataSize, int ttl):
_address(address),
_sent(0),
_dataSize(dataSizeInBytes),
_ttl(operationTtl),
_rtt(operationRepetitions, 0),
_errors(operationRepetitions)
_dataSize(dataSize),
_ttl(ttl),
_rtt(repetitions, 0),
_errors(repetitions)
{
}
@ -76,11 +76,11 @@ std::string ICMPEventArgs::hostAddress() const
}
void ICMPEventArgs::setRepetitions(int operationRepetitions)
void ICMPEventArgs::setRepetitions(int repetitions)
{
_rtt.clear();
_rtt.resize(operationRepetitions, 0);
_errors.assign(operationRepetitions, "");
_rtt.resize(repetitions, 0);
_errors.assign(repetitions, "");
}
@ -101,13 +101,13 @@ ICMPEventArgs ICMPEventArgs::operator ++ (int)
int ICMPEventArgs::received() const
{
int ret = 0;
int received = 0;
for (int i = 0; i < _rtt.size(); ++i)
{
if (_rtt[i]) ++ret;
if (_rtt[i]) ++received;
}
return ret;
return received;
}

View File

@ -26,11 +26,11 @@ namespace Poco {
namespace Net {
ICMPSocket::ICMPSocket(IPAddress::Family family, int dataSizeInBytes, int ttlValue, int socketTimeout):
Socket(new ICMPSocketImpl(family, dataSizeInBytes, ttlValue, socketTimeout)),
_dataSize(dataSizeInBytes),
_ttl(ttlValue),
_timeout(socketTimeout)
ICMPSocket::ICMPSocket(IPAddress::Family family, int dataSize, int ttl, int timeout):
Socket(new ICMPSocketImpl(family, dataSize, ttl, timeout)),
_dataSize(dataSize),
_ttl(ttl),
_timeout(timeout)
{
}
@ -66,15 +66,15 @@ ICMPSocket& ICMPSocket::operator = (const Socket& socket)
}
int ICMPSocket::sendTo(const SocketAddress& rAddress, int flags)
int ICMPSocket::sendTo(const SocketAddress& address, int flags)
{
return impl()->sendTo(0, 0, rAddress, flags);
return impl()->sendTo(0, 0, address, flags);
}
int ICMPSocket::receiveFrom(SocketAddress& rAddress, int flags)
int ICMPSocket::receiveFrom(SocketAddress& address, int flags)
{
return impl()->receiveFrom(0, 0, rAddress, flags);
return impl()->receiveFrom(0, 0, address, flags);
}

View File

@ -45,14 +45,14 @@ ICMPSocketImpl::~ICMPSocketImpl()
}
int ICMPSocketImpl::sendTo(const void*, int, const SocketAddress& rAddress, int flags)
int ICMPSocketImpl::sendTo(const void*, int, const SocketAddress& address, int flags)
{
int n = SocketImpl::sendTo(_icmpPacket.packet(), _icmpPacket.packetSize(), rAddress, flags);
int n = SocketImpl::sendTo(_icmpPacket.packet(), _icmpPacket.packetSize(), address, flags);
return n;
}
int ICMPSocketImpl::receiveFrom(void*, int, SocketAddress& rAddress, int flags)
int ICMPSocketImpl::receiveFrom(void*, int, SocketAddress& address, int flags)
{
int maxPacketSize = _icmpPacket.maxPacketSize();
unsigned char* buffer = new unsigned char[maxPacketSize];
@ -68,7 +68,7 @@ int ICMPSocketImpl::receiveFrom(void*, int, SocketAddress& rAddress, int flags)
// fake ping responses will cause an endless loop.
throw TimeoutException();
}
SocketImpl::receiveFrom(buffer, maxPacketSize, rAddress, flags);
SocketImpl::receiveFrom(buffer, maxPacketSize, address, flags);
}
while (!_icmpPacket.validReplyID(buffer, maxPacketSize));
}

View File

@ -60,39 +60,39 @@ IPAddress::IPAddress()
}
IPAddress::IPAddress(const IPAddress& rAddr)
IPAddress::IPAddress(const IPAddress& addr)
{
if (rAddr.family() == IPv4)
newIPv4(rAddr.addr());
if (addr.family() == IPv4)
newIPv4(addr.addr());
#if defined(POCO_HAVE_IPv6)
else
newIPv6(rAddr.addr(), rAddr.scope());
newIPv6(addr.addr(), addr.scope());
#endif
}
IPAddress::IPAddress(Family addressFamily)
IPAddress::IPAddress(Family family)
{
if (addressFamily == IPv4)
if (family == IPv4)
newIPv4();
#if defined(POCO_HAVE_IPv6)
else if (addressFamily == IPv6)
else if (family == IPv6)
newIPv6();
#endif
else throw Poco::InvalidArgumentException("Invalid or unsupported address family passed to IPAddress()");
}
IPAddress::IPAddress(const std::string& rAddr)
IPAddress::IPAddress(const std::string& addr)
{
IPv4AddressImpl empty4 = IPv4AddressImpl();
if (rAddr.empty() || trim(rAddr) == "0.0.0.0")
if (addr.empty() || trim(addr) == "0.0.0.0")
{
newIPv4(empty4.addr());
return;
}
IPv4AddressImpl addr4(IPv4AddressImpl::parse(rAddr));
IPv4AddressImpl addr4(IPv4AddressImpl::parse(addr));
if (addr4 != empty4)
{
newIPv4(addr4.addr());
@ -101,13 +101,13 @@ IPAddress::IPAddress(const std::string& rAddr)
#if defined(POCO_HAVE_IPv6)
IPv6AddressImpl empty6 = IPv6AddressImpl();
if (rAddr.empty() || trim(rAddr) == "::")
if (addr.empty() || trim(addr) == "::")
{
newIPv6(empty6.addr());
return;
}
IPv6AddressImpl addr6(IPv6AddressImpl::parse(rAddr));
IPv6AddressImpl addr6(IPv6AddressImpl::parse(addr));
if (addr6 != IPv6AddressImpl())
{
newIPv6(addr6.addr(), addr6.scope());
@ -115,22 +115,22 @@ IPAddress::IPAddress(const std::string& rAddr)
}
#endif
throw InvalidAddressException(rAddr);
throw InvalidAddressException(addr);
}
IPAddress::IPAddress(const std::string& rAddr, Family addressFamily)
IPAddress::IPAddress(const std::string& addr, Family family)
{
if (addressFamily == IPv4)
if (family == IPv4)
{
IPv4AddressImpl addr4(IPv4AddressImpl::parse(rAddr));
IPv4AddressImpl addr4(IPv4AddressImpl::parse(addr));
newIPv4(addr4.addr());
return;
}
#if defined(POCO_HAVE_IPv6)
else if (addressFamily == IPv6)
else if (family == IPv6)
{
IPv6AddressImpl addr6(IPv6AddressImpl::parse(rAddr));
IPv6AddressImpl addr6(IPv6AddressImpl::parse(addr));
newIPv6(addr6.addr(), addr6.scope());
return;
}
@ -139,36 +139,36 @@ IPAddress::IPAddress(const std::string& rAddr, Family addressFamily)
}
IPAddress::IPAddress(const void* pAddr, poco_socklen_t addressLength)
IPAddress::IPAddress(const void* addr, poco_socklen_t length)
#ifndef POCO_HAVE_ALIGNMENT
: _pImpl(0)
#endif
{
if (addressLength == sizeof(struct in_addr))
newIPv4(pAddr);
if (length == sizeof(struct in_addr))
newIPv4(addr);
#if defined(POCO_HAVE_IPv6)
else if (addressLength == sizeof(struct in6_addr))
newIPv6(pAddr);
else if (length == sizeof(struct in6_addr))
newIPv6(addr);
#endif
else throw Poco::InvalidArgumentException("Invalid address length passed to IPAddress()");
}
IPAddress::IPAddress(const void* pAddr, poco_socklen_t addressLength, Poco::UInt32 scopeIdentifier)
IPAddress::IPAddress(const void* addr, poco_socklen_t length, Poco::UInt32 scope)
{
if (addressLength == sizeof(struct in_addr))
newIPv4(pAddr);
if (length == sizeof(struct in_addr))
newIPv4(addr);
#if defined(POCO_HAVE_IPv6)
else if (addressLength == sizeof(struct in6_addr))
newIPv6(pAddr, scopeIdentifier);
else if (length == sizeof(struct in6_addr))
newIPv6(addr, scope);
#endif
else throw Poco::InvalidArgumentException("Invalid address length passed to IPAddress()");
}
IPAddress::IPAddress(unsigned prefix, Family addressFamily)
IPAddress::IPAddress(unsigned prefix, Family family)
{
if (addressFamily == IPv4)
if (family == IPv4)
{
if (prefix <= 32)
newIPv4(prefix);
@ -176,7 +176,7 @@ IPAddress::IPAddress(unsigned prefix, Family addressFamily)
throw Poco::InvalidArgumentException("Invalid prefix length passed to IPAddress()");
}
#if defined(POCO_HAVE_IPv6)
else if (addressFamily == IPv6)
else if (family == IPv6)
{
if (prefix <= 128)
newIPv6(prefix);
@ -209,11 +209,11 @@ IPAddress::IPAddress(const SOCKET_ADDRESS& socket_address)
IPAddress::IPAddress(const struct sockaddr& sockaddr)
{
unsigned short addressFamily = sockaddr.sa_family;
if (addressFamily == AF_INET)
unsigned short family = sockaddr.sa_family;
if (family == AF_INET)
newIPv4(&reinterpret_cast<const struct sockaddr_in*>(&sockaddr)->sin_addr);
#if defined(POCO_HAVE_IPv6)
else if (addressFamily == AF_INET6)
else if (family == AF_INET6)
newIPv6(&reinterpret_cast<const struct sockaddr_in6*>(&sockaddr)->sin6_addr,
reinterpret_cast<const struct sockaddr_in6*>(&sockaddr)->sin6_scope_id);
#endif
@ -227,16 +227,16 @@ IPAddress::~IPAddress()
}
IPAddress& IPAddress::operator = (const IPAddress& rAddr)
IPAddress& IPAddress::operator = (const IPAddress& addr)
{
if (&rAddr != this)
if (&addr != this)
{
destruct();
if (rAddr.family() == IPAddress::IPv4)
newIPv4(rAddr.addr());
if (addr.family() == IPAddress::IPv4)
newIPv4(addr.addr());
#if defined(POCO_HAVE_IPv6)
else if (rAddr.family() == IPAddress::IPv6)
newIPv6(rAddr.addr(), rAddr.scope());
else if (addr.family() == IPAddress::IPv6)
newIPv6(addr.addr(), addr.scope());
#endif
else
throw Poco::InvalidArgumentException("Invalid or unsupported address family");
@ -553,16 +553,16 @@ bool IPAddress::tryParse(const std::string& addr, IPAddress& result)
}
void IPAddress::mask(const IPAddress& rMask)
void IPAddress::mask(const IPAddress& mask)
{
IPAddress null;
pImpl()->mask(rMask.pImpl(), null.pImpl());
pImpl()->mask(mask.pImpl(), null.pImpl());
}
void IPAddress::mask(const IPAddress& rMask, const IPAddress& set)
void IPAddress::mask(const IPAddress& mask, const IPAddress& set)
{
pImpl()->mask(rMask.pImpl(), set.pImpl());
pImpl()->mask(mask.pImpl(), set.pImpl());
}

View File

@ -86,31 +86,31 @@ IPv4AddressImpl::IPv4AddressImpl()
}
IPv4AddressImpl::IPv4AddressImpl(const void* pAddr)
IPv4AddressImpl::IPv4AddressImpl(const void* addr)
{
std::memcpy(&_addr, pAddr, sizeof(_addr));
std::memcpy(&_addr, addr, sizeof(_addr));
}
IPv4AddressImpl::IPv4AddressImpl(unsigned prefix)
{
UInt32 address = (prefix == 32) ? 0xffffffff : ~(0xffffffff >> prefix);
_addr.s_addr = ByteOrder::toNetwork(address);
UInt32 addr = (prefix == 32) ? 0xffffffff : ~(0xffffffff >> prefix);
_addr.s_addr = ByteOrder::toNetwork(addr);
}
IPv4AddressImpl::IPv4AddressImpl(const IPv4AddressImpl& rAddr)
IPv4AddressImpl::IPv4AddressImpl(const IPv4AddressImpl& addr)
{
std::memcpy(&_addr, &rAddr._addr, sizeof(_addr));
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
}
IPv4AddressImpl& IPv4AddressImpl::operator = (const IPv4AddressImpl& rAddr)
IPv4AddressImpl& IPv4AddressImpl::operator = (const IPv4AddressImpl& addr)
{
if (this == &rAddr)
if (this == &addr)
return *this;
std::memcpy(&_addr, &rAddr._addr, sizeof(_addr));
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
return *this;
}
@ -199,10 +199,10 @@ bool IPv4AddressImpl::isLinkLocal() const
bool IPv4AddressImpl::isSiteLocal() const
{
UInt32 address = ntohl(_addr.s_addr);
return (address & 0xFF000000) == 0x0A000000 || // 10.0.0.0/24
(address & 0xFFFF0000) == 0xC0A80000 || // 192.68.0.0/16
(address >= 0xAC100000 && address <= 0xAC1FFFFF); // 172.16.0.0 to 172.31.255.255
UInt32 addr = ntohl(_addr.s_addr);
return (addr & 0xFF000000) == 0x0A000000 || // 10.0.0.0/24
(addr & 0xFFFF0000) == 0xC0A80000 || // 192.68.0.0/16
(addr >= 0xAC100000 && addr <= 0xAC1FFFFF); // 172.16.0.0 to 172.31.255.255
}
@ -250,8 +250,8 @@ bool IPv4AddressImpl::isOrgLocalMC() const
bool IPv4AddressImpl::isGlobalMC() const
{
UInt32 address = ntohl(_addr.s_addr);
return address >= 0xE0000100 && address <= 0xEE000000; // 224.0.1.0 to 238.255.255.255
UInt32 addr = ntohl(_addr.s_addr);
return addr >= 0xE0000100 && addr <= 0xEE000000; // 224.0.1.0 to 238.255.255.255
}
@ -299,26 +299,26 @@ IPAddressImpl* IPv4AddressImpl::clone() const
}
IPv4AddressImpl IPv4AddressImpl::operator & (const IPv4AddressImpl& rAddr) const
IPv4AddressImpl IPv4AddressImpl::operator & (const IPv4AddressImpl& addr) const
{
IPv4AddressImpl result(&_addr);
result._addr.s_addr &= rAddr._addr.s_addr;
result._addr.s_addr &= addr._addr.s_addr;
return result;
}
IPv4AddressImpl IPv4AddressImpl::operator | (const IPv4AddressImpl& rAddr) const
IPv4AddressImpl IPv4AddressImpl::operator | (const IPv4AddressImpl& addr) const
{
IPv4AddressImpl result(&_addr);
result._addr.s_addr |= rAddr._addr.s_addr;
result._addr.s_addr |= addr._addr.s_addr;
return result;
}
IPv4AddressImpl IPv4AddressImpl::operator ^ (const IPv4AddressImpl& rAddr) const
IPv4AddressImpl IPv4AddressImpl::operator ^ (const IPv4AddressImpl& addr) const
{
IPv4AddressImpl result(&_addr);
result._addr.s_addr ^= rAddr._addr.s_addr;
result._addr.s_addr ^= addr._addr.s_addr;
return result;
}
@ -331,15 +331,15 @@ IPv4AddressImpl result(&_addr);
}
bool IPv4AddressImpl::operator == (const IPv4AddressImpl& rAddr) const
bool IPv4AddressImpl::operator == (const IPv4AddressImpl& addr) const
{
return 0 == std::memcmp(&rAddr._addr, &_addr, sizeof(_addr));
return 0 == std::memcmp(&addr._addr, &_addr, sizeof(_addr));
}
bool IPv4AddressImpl::operator != (const IPv4AddressImpl& rAddr) const
bool IPv4AddressImpl::operator != (const IPv4AddressImpl& addr) const
{
return !(*this == rAddr);
return !(*this == addr);
}
@ -357,31 +357,31 @@ IPv6AddressImpl::IPv6AddressImpl(): _scope(0)
}
IPv6AddressImpl::IPv6AddressImpl(const void* pAddr): _scope(0)
IPv6AddressImpl::IPv6AddressImpl(const void* addr): _scope(0)
{
std::memcpy(&_addr, pAddr, sizeof(_addr));
std::memcpy(&_addr, addr, sizeof(_addr));
}
IPv6AddressImpl::IPv6AddressImpl(const void* pAddr, Poco::UInt32 scopeIdentifier): _scope(scopeIdentifier)
IPv6AddressImpl::IPv6AddressImpl(const void* addr, Poco::UInt32 scope): _scope(scope)
{
std::memcpy(&_addr, pAddr, sizeof(_addr));
std::memcpy(&_addr, addr, sizeof(_addr));
}
IPv6AddressImpl::IPv6AddressImpl(const IPv6AddressImpl& rAddr): _scope(rAddr._scope)
IPv6AddressImpl::IPv6AddressImpl(const IPv6AddressImpl& addr): _scope(addr._scope)
{
std::memcpy((void*) &_addr, (void*) &rAddr._addr, sizeof(_addr));
std::memcpy((void*) &_addr, (void*) &addr._addr, sizeof(_addr));
}
IPv6AddressImpl& IPv6AddressImpl::operator = (const IPv6AddressImpl& rAddr)
IPv6AddressImpl& IPv6AddressImpl::operator = (const IPv6AddressImpl& addr)
{
if (this == &rAddr)
if (this == &addr)
return *this;
_scope = rAddr._scope;
std::memcpy(&_addr, &rAddr._addr, sizeof(_addr));
_scope = addr._scope;
std::memcpy(&_addr, &addr._addr, sizeof(_addr));
return *this;
}
@ -516,16 +516,16 @@ unsigned IPv6AddressImpl::prefixLength() const
#if defined(POCO_OS_FAMILY_UNIX)
for (int i = 3; i >= 0; --i)
{
unsigned address = ntohl(_addr.s6_addr32[i]);
if ((bits = maskBits(address, 32))) return (bitPos - (32 - bits));
unsigned addr = ntohl(_addr.s6_addr32[i]);
if ((bits = maskBits(addr, 32))) return (bitPos - (32 - bits));
bitPos -= 32;
}
return 0;
#elif defined(POCO_OS_FAMILY_WINDOWS)
for (int i = 7; i >= 0; --i)
{
unsigned short address = ByteOrder::fromNetwork(_addr.s6_addr16[i]);
if ((bits = maskBits(address, 16))) return (bitPos - (16 - bits));
unsigned short addr = ByteOrder::fromNetwork(_addr.s6_addr16[i]);
if ((bits = maskBits(addr, 16))) return (bitPos - (16 - bits));
bitPos -= 16;
}
return 0;
@ -696,77 +696,77 @@ IPAddressImpl* IPv6AddressImpl::clone() const
}
IPv6AddressImpl IPv6AddressImpl::operator & (const IPv6AddressImpl& rAddr) const
IPv6AddressImpl IPv6AddressImpl::operator & (const IPv6AddressImpl& addr) const
{
if (_scope != rAddr._scope)
if (_scope != addr._scope)
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
IPv6AddressImpl result(*this);
#ifdef POCO_OS_FAMILY_WINDOWS
result._addr.s6_addr16[0] &= rAddr._addr.s6_addr16[0];
result._addr.s6_addr16[1] &= rAddr._addr.s6_addr16[1];
result._addr.s6_addr16[2] &= rAddr._addr.s6_addr16[2];
result._addr.s6_addr16[3] &= rAddr._addr.s6_addr16[3];
result._addr.s6_addr16[4] &= rAddr._addr.s6_addr16[4];
result._addr.s6_addr16[5] &= rAddr._addr.s6_addr16[5];
result._addr.s6_addr16[6] &= rAddr._addr.s6_addr16[6];
result._addr.s6_addr16[7] &= rAddr._addr.s6_addr16[7];
result._addr.s6_addr16[0] &= addr._addr.s6_addr16[0];
result._addr.s6_addr16[1] &= addr._addr.s6_addr16[1];
result._addr.s6_addr16[2] &= addr._addr.s6_addr16[2];
result._addr.s6_addr16[3] &= addr._addr.s6_addr16[3];
result._addr.s6_addr16[4] &= addr._addr.s6_addr16[4];
result._addr.s6_addr16[5] &= addr._addr.s6_addr16[5];
result._addr.s6_addr16[6] &= addr._addr.s6_addr16[6];
result._addr.s6_addr16[7] &= addr._addr.s6_addr16[7];
#else
result._addr.s6_addr32[0] &= rAddr._addr.s6_addr32[0];
result._addr.s6_addr32[1] &= rAddr._addr.s6_addr32[1];
result._addr.s6_addr32[2] &= rAddr._addr.s6_addr32[2];
result._addr.s6_addr32[3] &= rAddr._addr.s6_addr32[3];
result._addr.s6_addr32[0] &= addr._addr.s6_addr32[0];
result._addr.s6_addr32[1] &= addr._addr.s6_addr32[1];
result._addr.s6_addr32[2] &= addr._addr.s6_addr32[2];
result._addr.s6_addr32[3] &= addr._addr.s6_addr32[3];
#endif
return result;
}
IPv6AddressImpl IPv6AddressImpl::operator | (const IPv6AddressImpl& rAddr) const
IPv6AddressImpl IPv6AddressImpl::operator | (const IPv6AddressImpl& addr) const
{
if (_scope != rAddr._scope)
if (_scope != addr._scope)
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
IPv6AddressImpl result(*this);
#ifdef POCO_OS_FAMILY_WINDOWS
result._addr.s6_addr16[0] |= rAddr._addr.s6_addr16[0];
result._addr.s6_addr16[1] |= rAddr._addr.s6_addr16[1];
result._addr.s6_addr16[2] |= rAddr._addr.s6_addr16[2];
result._addr.s6_addr16[3] |= rAddr._addr.s6_addr16[3];
result._addr.s6_addr16[4] |= rAddr._addr.s6_addr16[4];
result._addr.s6_addr16[5] |= rAddr._addr.s6_addr16[5];
result._addr.s6_addr16[6] |= rAddr._addr.s6_addr16[6];
result._addr.s6_addr16[7] |= rAddr._addr.s6_addr16[7];
result._addr.s6_addr16[0] |= addr._addr.s6_addr16[0];
result._addr.s6_addr16[1] |= addr._addr.s6_addr16[1];
result._addr.s6_addr16[2] |= addr._addr.s6_addr16[2];
result._addr.s6_addr16[3] |= addr._addr.s6_addr16[3];
result._addr.s6_addr16[4] |= addr._addr.s6_addr16[4];
result._addr.s6_addr16[5] |= addr._addr.s6_addr16[5];
result._addr.s6_addr16[6] |= addr._addr.s6_addr16[6];
result._addr.s6_addr16[7] |= addr._addr.s6_addr16[7];
#else
result._addr.s6_addr32[0] |= rAddr._addr.s6_addr32[0];
result._addr.s6_addr32[1] |= rAddr._addr.s6_addr32[1];
result._addr.s6_addr32[2] |= rAddr._addr.s6_addr32[2];
result._addr.s6_addr32[3] |= rAddr._addr.s6_addr32[3];
result._addr.s6_addr32[0] |= addr._addr.s6_addr32[0];
result._addr.s6_addr32[1] |= addr._addr.s6_addr32[1];
result._addr.s6_addr32[2] |= addr._addr.s6_addr32[2];
result._addr.s6_addr32[3] |= addr._addr.s6_addr32[3];
#endif
return result;
}
IPv6AddressImpl IPv6AddressImpl::operator ^ (const IPv6AddressImpl& rAddr) const
IPv6AddressImpl IPv6AddressImpl::operator ^ (const IPv6AddressImpl& addr) const
{
if (_scope != rAddr._scope)
if (_scope != addr._scope)
throw Poco::InvalidArgumentException("Scope ID of passed IPv6 address does not match with the source one.");
IPv6AddressImpl result(*this);
#ifdef POCO_OS_FAMILY_WINDOWS
result._addr.s6_addr16[0] ^= rAddr._addr.s6_addr16[0];
result._addr.s6_addr16[1] ^= rAddr._addr.s6_addr16[1];
result._addr.s6_addr16[2] ^= rAddr._addr.s6_addr16[2];
result._addr.s6_addr16[3] ^= rAddr._addr.s6_addr16[3];
result._addr.s6_addr16[4] ^= rAddr._addr.s6_addr16[4];
result._addr.s6_addr16[5] ^= rAddr._addr.s6_addr16[5];
result._addr.s6_addr16[6] ^= rAddr._addr.s6_addr16[6];
result._addr.s6_addr16[7] ^= rAddr._addr.s6_addr16[7];
result._addr.s6_addr16[0] ^= addr._addr.s6_addr16[0];
result._addr.s6_addr16[1] ^= addr._addr.s6_addr16[1];
result._addr.s6_addr16[2] ^= addr._addr.s6_addr16[2];
result._addr.s6_addr16[3] ^= addr._addr.s6_addr16[3];
result._addr.s6_addr16[4] ^= addr._addr.s6_addr16[4];
result._addr.s6_addr16[5] ^= addr._addr.s6_addr16[5];
result._addr.s6_addr16[6] ^= addr._addr.s6_addr16[6];
result._addr.s6_addr16[7] ^= addr._addr.s6_addr16[7];
#else
result._addr.s6_addr32[0] ^= rAddr._addr.s6_addr32[0];
result._addr.s6_addr32[1] ^= rAddr._addr.s6_addr32[1];
result._addr.s6_addr32[2] ^= rAddr._addr.s6_addr32[2];
result._addr.s6_addr32[3] ^= rAddr._addr.s6_addr32[3];
result._addr.s6_addr32[0] ^= addr._addr.s6_addr32[0];
result._addr.s6_addr32[1] ^= addr._addr.s6_addr32[1];
result._addr.s6_addr32[2] ^= addr._addr.s6_addr32[2];
result._addr.s6_addr32[3] ^= addr._addr.s6_addr32[3];
#endif
return result;
}
@ -794,15 +794,15 @@ IPv6AddressImpl IPv6AddressImpl::operator ~ () const
}
bool IPv6AddressImpl::operator == (const IPv6AddressImpl& rAddr) const
bool IPv6AddressImpl::operator == (const IPv6AddressImpl& addr) const
{
return _scope == rAddr._scope && 0 == std::memcmp(&rAddr._addr, &_addr, sizeof(_addr));
return _scope == addr._scope && 0 == std::memcmp(&addr._addr, &_addr, sizeof(_addr));
}
bool IPv6AddressImpl::operator != (const IPv6AddressImpl& rAddr) const
bool IPv6AddressImpl::operator != (const IPv6AddressImpl& addr) const
{
return !(*this == rAddr);
return !(*this == addr);
}

View File

@ -214,9 +214,9 @@ void MailMessage::addRecipient(const MailRecipient& recipient)
}
void MailMessage::setRecipients(const Recipients& rRecipients)
void MailMessage::setRecipients(const Recipients& recipients)
{
_recipients.assign(rRecipients.begin(), rRecipients.end());
_recipients.assign(recipients.begin(), recipients.end());
}
@ -326,12 +326,12 @@ void MailMessage::addAttachment(const std::string& name, PartSource* pSource, Co
}
void MailMessage::read(std::istream& istr, PartHandler& rHandler)
void MailMessage::read(std::istream& istr, PartHandler& handler)
{
readHeader(istr);
if (isMultipart())
{
readMultipart(istr, rHandler);
readMultipart(istr, handler);
}
else
{

View File

@ -62,7 +62,7 @@ MulticastSocket::MulticastSocket(SocketAddress::Family family): DatagramSocket(f
}
MulticastSocket::MulticastSocket(const SocketAddress& rAddress, bool reuseAddress): DatagramSocket(rAddress, reuseAddress)
MulticastSocket::MulticastSocket(const SocketAddress& address, bool reuseAddress): DatagramSocket(address, reuseAddress)
{
}

View File

@ -182,9 +182,9 @@ MultipartReader::MultipartReader(std::istream& istr):
}
MultipartReader::MultipartReader(std::istream& istr, const std::string& rBoundary):
MultipartReader::MultipartReader(std::istream& istr, const std::string& boundary):
_istr(istr),
_boundary(rBoundary),
_boundary(boundary),
_pMPI(0)
{
}

View File

@ -36,9 +36,9 @@ MultipartWriter::MultipartWriter(std::ostream& ostr):
}
MultipartWriter::MultipartWriter(std::ostream& ostr, const std::string& rBoundary):
MultipartWriter::MultipartWriter(std::ostream& ostr, const std::string& boundary):
_ostr(ostr),
_boundary(rBoundary),
_boundary(boundary),
_firstPart(true)
{
if (_boundary.empty())

View File

@ -73,9 +73,9 @@ NTPPacket::NTPPacket() :
}
NTPPacket::NTPPacket(Poco::UInt8 *pPacket)
NTPPacket::NTPPacket(Poco::UInt8 *packet)
{
setPacket(pPacket);
setPacket(packet);
}
@ -84,9 +84,9 @@ NTPPacket::~NTPPacket()
}
void NTPPacket::packet(Poco::UInt8 *pPacket) const
void NTPPacket::packet(Poco::UInt8 *packet) const
{
NTPPacketData *p = (NTPPacketData*)pPacket;
NTPPacketData *p = (NTPPacketData*)packet;
p->li = _leapIndicator;
p->vn = _version;
@ -104,9 +104,9 @@ void NTPPacket::packet(Poco::UInt8 *pPacket) const
}
void NTPPacket::setPacket(Poco::UInt8 *pPacket)
void NTPPacket::setPacket(Poco::UInt8 *packet)
{
NTPPacketData *p = (NTPPacketData*)pPacket;
NTPPacketData *p = (NTPPacketData*)packet;
_leapIndicator = p->li;
_version = p->vn;

View File

@ -75,14 +75,14 @@ public:
typedef NetworkInterface::Type Type;
NetworkInterfaceImpl(unsigned index);
NetworkInterfaceImpl(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, const IPAddress& rAddress, unsigned index, NetworkInterface::MACAddress* pMACAddress = 0);
NetworkInterfaceImpl(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, unsigned index = 0, NetworkInterface::MACAddress* pMACAddress = 0);
NetworkInterfaceImpl(const std::string& rName,
const std::string& rDisplayName,
const std::string& rAdapterName,
const IPAddress& rAddress,
NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const std::string& adapterName, const IPAddress& address, unsigned index, NetworkInterface::MACAddress* pMACAddress = 0);
NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const std::string& adapterName, unsigned index = 0, NetworkInterface::MACAddress* pMACAddress = 0);
NetworkInterfaceImpl(const std::string& name,
const std::string& displayName,
const std::string& adapterName,
const IPAddress& address,
const IPAddress& subnetMask,
const IPAddress& rBroadcastAddress,
const IPAddress& broadcastAddress,
unsigned index,
NetworkInterface::MACAddress* pMACAddress = 0);
@ -91,10 +91,10 @@ public:
const std::string& displayName() const;
const std::string& adapterName() const;
const IPAddress& firstAddress(IPAddress::Family family) const;
void addAddress(const AddressTuple& rAddress);
void addAddress(const AddressTuple& address);
const IPAddress& address(unsigned index) const;
const NetworkInterface::AddressList& addressList() const;
bool hasAddress(const IPAddress& rAddress) const;
bool hasAddress(const IPAddress& address) const;
const IPAddress& subnetMask(unsigned index) const;
const IPAddress& broadcastAddress(unsigned index) const;
const IPAddress& destAddress(unsigned index) const;
@ -102,9 +102,9 @@ public:
bool supportsIPv4() const;
bool supportsIPv6() const;
void setName(const std::string& rName);
void setDisplayName(const std::string& rName);
void setAdapterName(const std::string& rName);
void setName(const std::string& name);
void setDisplayName(const std::string& name);
void setAdapterName(const std::string& name);
void addAddress(const IPAddress& addr);
void setMACAddress(const NetworkInterface::MACAddress& addr);
void setMACAddress(const void *addr, std::size_t len);
@ -157,8 +157,8 @@ private:
};
NetworkInterfaceImpl::NetworkInterfaceImpl(unsigned interfaceIndex):
_index(interfaceIndex),
NetworkInterfaceImpl::NetworkInterfaceImpl(unsigned index):
_index(index),
_broadcast(false),
_loopback(false),
_multicast(false),
@ -171,11 +171,11 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(unsigned interfaceIndex):
}
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, const IPAddress& rAddress, unsigned interfaceIndex, NetworkInterface::MACAddress* pMACAddress):
_name(rName),
_displayName(rDisplayName),
_adapterName(rAdapterName),
_index(interfaceIndex),
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const std::string& adapterName, const IPAddress& address, unsigned index, NetworkInterface::MACAddress* pMACAddress):
_name(name),
_displayName(displayName),
_adapterName(adapterName),
_index(index),
_broadcast(false),
_loopback(false),
_multicast(false),
@ -185,17 +185,17 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName, const std::
_mtu(0),
_type(NetworkInterface::NI_TYPE_OTHER)
{
_addressList.push_back(AddressTuple(rAddress, IPAddress(), IPAddress()));
_addressList.push_back(AddressTuple(address, IPAddress(), IPAddress()));
setPhyParams();
if (pMACAddress) setMACAddress(*pMACAddress);
}
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, unsigned interfaceIndex, NetworkInterface::MACAddress* pMACAddress):
_name(rName),
_displayName(rDisplayName),
_adapterName(rAdapterName),
_index(interfaceIndex),
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name, const std::string& displayName, const std::string& adapterName, unsigned index, NetworkInterface::MACAddress* pMACAddress):
_name(name),
_displayName(displayName),
_adapterName(adapterName),
_index(index),
_broadcast(false),
_loopback(false),
_multicast(false),
@ -210,18 +210,18 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName, const std::
}
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName,
const std::string& rDisplayName,
const std::string& rAdapterName,
const IPAddress& rAddress,
const IPAddress& rSubnetMask,
const IPAddress& rBroadcastAddress,
unsigned interfaceIndex,
NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& name,
const std::string& displayName,
const std::string& adapterName,
const IPAddress& address,
const IPAddress& subnetMask,
const IPAddress& broadcastAddress,
unsigned index,
NetworkInterface::MACAddress* pMACAddress):
_name(rName),
_displayName(rDisplayName),
_adapterName(rAdapterName),
_index(interfaceIndex),
_name(name),
_displayName(displayName),
_adapterName(adapterName),
_index(index),
_broadcast(false),
_loopback(false),
_multicast(false),
@ -230,7 +230,7 @@ NetworkInterfaceImpl::NetworkInterfaceImpl(const std::string& rName,
_running(false),
_mtu(0)
{
_addressList.push_back(AddressTuple(rAddress, rSubnetMask, rBroadcastAddress));
_addressList.push_back(AddressTuple(address, subnetMask, broadcastAddress));
setPhyParams();
if (pMACAddress) setMACAddress(*pMACAddress);
}
@ -324,29 +324,29 @@ const IPAddress& NetworkInterfaceImpl::firstAddress(IPAddress::Family family) co
}
inline void NetworkInterfaceImpl::addAddress(const AddressTuple& rAddress)
inline void NetworkInterfaceImpl::addAddress(const AddressTuple& address)
{
_addressList.push_back(rAddress);
_addressList.push_back(address);
}
bool NetworkInterfaceImpl::hasAddress(const IPAddress& rAddress) const
bool NetworkInterfaceImpl::hasAddress(const IPAddress& address) const
{
NetworkInterface::ConstAddressIterator it = _addressList.begin();
NetworkInterface::ConstAddressIterator end = _addressList.end();
for (; it != end; ++it)
{
if (it->get<NetworkInterface::IP_ADDRESS>() == rAddress)
if (it->get<NetworkInterface::IP_ADDRESS>() == address)
return true;
}
return false;
}
inline const IPAddress& NetworkInterfaceImpl::address(unsigned interfaceIndex) const
inline const IPAddress& NetworkInterfaceImpl::address(unsigned index) const
{
if (interfaceIndex < _addressList.size()) return _addressList[interfaceIndex].get<NetworkInterface::IP_ADDRESS>();
else throw NotFoundException(Poco::format("No address with index %u.", interfaceIndex));
if (index < _addressList.size()) return _addressList[index].get<NetworkInterface::IP_ADDRESS>();
else throw NotFoundException(Poco::format("No address with index %u.", index));
}
@ -356,32 +356,32 @@ inline const NetworkInterface::AddressList& NetworkInterfaceImpl::addressList()
}
const IPAddress& NetworkInterfaceImpl::subnetMask(unsigned interfaceIndex) const
const IPAddress& NetworkInterfaceImpl::subnetMask(unsigned index) const
{
if (interfaceIndex < _addressList.size())
return _addressList[interfaceIndex].get<NetworkInterface::SUBNET_MASK>();
if (index < _addressList.size())
return _addressList[index].get<NetworkInterface::SUBNET_MASK>();
throw NotFoundException(Poco::format("No subnet mask with index %u.", interfaceIndex));
throw NotFoundException(Poco::format("No subnet mask with index %u.", index));
}
const IPAddress& NetworkInterfaceImpl::broadcastAddress(unsigned interfaceIndex) const
const IPAddress& NetworkInterfaceImpl::broadcastAddress(unsigned index) const
{
if (interfaceIndex < _addressList.size())
return _addressList[interfaceIndex].get<NetworkInterface::BROADCAST_ADDRESS>();
if (index < _addressList.size())
return _addressList[index].get<NetworkInterface::BROADCAST_ADDRESS>();
throw NotFoundException(Poco::format("No subnet mask with index %u.", interfaceIndex));
throw NotFoundException(Poco::format("No subnet mask with index %u.", index));
}
const IPAddress& NetworkInterfaceImpl::destAddress(unsigned interfaceIndex) const
const IPAddress& NetworkInterfaceImpl::destAddress(unsigned index) const
{
if (!pointToPoint())
throw InvalidAccessException("Only PPP addresses have destination address.");
else if (interfaceIndex < _addressList.size())
return _addressList[interfaceIndex].get<NetworkInterface::BROADCAST_ADDRESS>();
else if (index < _addressList.size())
return _addressList[index].get<NetworkInterface::BROADCAST_ADDRESS>();
throw NotFoundException(Poco::format("No address with index %u.", interfaceIndex));
throw NotFoundException(Poco::format("No address with index %u.", index));
}
@ -491,45 +491,45 @@ void NetworkInterfaceImpl::setFlags(short flags)
#endif
inline void NetworkInterfaceImpl::setUp(bool isUp)
inline void NetworkInterfaceImpl::setUp(bool up)
{
_up = isUp;
_up = up;
}
inline void NetworkInterfaceImpl::setMTU(unsigned interfaceMTU)
inline void NetworkInterfaceImpl::setMTU(unsigned mtu)
{
_mtu = interfaceMTU;
_mtu = mtu;
}
inline void NetworkInterfaceImpl::setType(Type interfaceType)
inline void NetworkInterfaceImpl::setType(Type type)
{
_type = interfaceType;
_type = type;
}
inline void NetworkInterfaceImpl::setIndex(unsigned interfaceIndex)
inline void NetworkInterfaceImpl::setIndex(unsigned index)
{
_index = interfaceIndex;
_index = index;
}
inline void NetworkInterfaceImpl::setName(const std::string& rName)
inline void NetworkInterfaceImpl::setName(const std::string& name)
{
_name = rName;
_name = name;
}
inline void NetworkInterfaceImpl::setDisplayName(const std::string& rName)
inline void NetworkInterfaceImpl::setDisplayName(const std::string& name)
{
_displayName = rName;
_displayName = name;
}
inline void NetworkInterfaceImpl::setAdapterName(const std::string& rName)
inline void NetworkInterfaceImpl::setAdapterName(const std::string& name)
{
_adapterName = rName;
_adapterName = name;
}
@ -560,8 +560,8 @@ inline void NetworkInterfaceImpl::setMACAddress(const void *addr, std::size_t le
FastMutex NetworkInterface::_mutex;
NetworkInterface::NetworkInterface(unsigned interfaceIndex):
_pImpl(new NetworkInterfaceImpl(interfaceIndex))
NetworkInterface::NetworkInterface(unsigned index):
_pImpl(new NetworkInterfaceImpl(index))
{
}
@ -573,44 +573,44 @@ NetworkInterface::NetworkInterface(const NetworkInterface& interfc):
}
NetworkInterface::NetworkInterface(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, const IPAddress& rAddress, unsigned interfaceIndex, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(rName, rDisplayName, rAdapterName, rAddress, interfaceIndex, pMACAddress))
NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, const IPAddress& address, unsigned index, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(name, displayName, adapterName, address, index, pMACAddress))
{
}
NetworkInterface::NetworkInterface(const std::string& rName, const std::string& rDisplayName, const std::string& rAdapterName, unsigned interfaceIndex, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(rName, rDisplayName, rAdapterName, interfaceIndex, pMACAddress))
NetworkInterface::NetworkInterface(const std::string& name, const std::string& displayName, const std::string& adapterName, unsigned index, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(name, displayName, adapterName, index, pMACAddress))
{
}
NetworkInterface::NetworkInterface(const std::string& rName, const IPAddress& rAddress, unsigned interfaceIndex, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(rName, rName, rName, rAddress, interfaceIndex, pMACAddress))
NetworkInterface::NetworkInterface(const std::string& name, const IPAddress& address, unsigned index, MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(name, name, name, address, index, pMACAddress))
{
}
NetworkInterface::NetworkInterface(const std::string& rName,
const std::string& rDisplayName,
const std::string& rAdapterName,
const IPAddress& rAddress,
const IPAddress& rSubnetMask,
const IPAddress& rBroadcastAddress,
unsigned interfaceIndex,
NetworkInterface::NetworkInterface(const std::string& name,
const std::string& displayName,
const std::string& adapterName,
const IPAddress& address,
const IPAddress& subnetMask,
const IPAddress& broadcastAddress,
unsigned index,
MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(rName, rDisplayName, rAdapterName, rAddress, rSubnetMask, rBroadcastAddress, interfaceIndex, pMACAddress))
_pImpl(new NetworkInterfaceImpl(name, displayName, adapterName, address, subnetMask, broadcastAddress, index, pMACAddress))
{
}
NetworkInterface::NetworkInterface(const std::string& rName,
const IPAddress& rAddress,
const IPAddress& rSubnetMask,
const IPAddress& rBroadcastAddress,
unsigned interfaceIndex,
NetworkInterface::NetworkInterface(const std::string& name,
const IPAddress& address,
const IPAddress& subnetMask,
const IPAddress& broadcastAddress,
unsigned index,
MACAddress* pMACAddress):
_pImpl(new NetworkInterfaceImpl(rName, rName, rName, rAddress, rSubnetMask, rBroadcastAddress, interfaceIndex, pMACAddress))
_pImpl(new NetworkInterfaceImpl(name, name, name, address, subnetMask, broadcastAddress, index, pMACAddress))
{
}
@ -679,21 +679,21 @@ void NetworkInterface::firstAddress(IPAddress& addr, IPAddress::Family family) c
}
void NetworkInterface::addAddress(const IPAddress& rAddress)
void NetworkInterface::addAddress(const IPAddress& address)
{
_pImpl->addAddress(AddressTuple(rAddress, IPAddress(), IPAddress()));
_pImpl->addAddress(AddressTuple(address, IPAddress(), IPAddress()));
}
void NetworkInterface::addAddress(const IPAddress& rAddress, const IPAddress& rSubnetMask, const IPAddress& rBroadcastAddress)
void NetworkInterface::addAddress(const IPAddress& address, const IPAddress& subnetMask, const IPAddress& broadcastAddress)
{
_pImpl->addAddress(AddressTuple(rAddress, rSubnetMask, rBroadcastAddress));
_pImpl->addAddress(AddressTuple(address, subnetMask, broadcastAddress));
}
const IPAddress& NetworkInterface::address(unsigned interfaceIndex) const
const IPAddress& NetworkInterface::address(unsigned index) const
{
return _pImpl->address(interfaceIndex);
return _pImpl->address(index);
}
@ -703,15 +703,15 @@ const NetworkInterface::AddressList& NetworkInterface::addressList() const
}
const IPAddress& NetworkInterface::subnetMask(unsigned interfaceIndex) const
const IPAddress& NetworkInterface::subnetMask(unsigned index) const
{
return _pImpl->subnetMask(interfaceIndex);
return _pImpl->subnetMask(index);
}
const IPAddress& NetworkInterface::broadcastAddress(unsigned interfaceIndex) const
const IPAddress& NetworkInterface::broadcastAddress(unsigned index) const
{
return _pImpl->broadcastAddress(interfaceIndex);
return _pImpl->broadcastAddress(index);
}
@ -721,9 +721,9 @@ const NetworkInterface::MACAddress& NetworkInterface::macAddress() const
}
const IPAddress& NetworkInterface::destAddress(unsigned interfaceIndex) const
const IPAddress& NetworkInterface::destAddress(unsigned index) const
{
return _pImpl->destAddress(interfaceIndex);
return _pImpl->destAddress(index);
}
@ -793,14 +793,14 @@ bool NetworkInterface::isUp() const
}
NetworkInterface NetworkInterface::forName(const std::string& rName, bool requireIPv6)
NetworkInterface NetworkInterface::forName(const std::string& name, bool requireIPv6)
{
if (requireIPv6) return forName(rName, IPv6_ONLY);
else return forName(rName, IPv4_OR_IPv6);
if (requireIPv6) return forName(name, IPv6_ONLY);
else return forName(name, IPv4_OR_IPv6);
}
NetworkInterface NetworkInterface::forName(const std::string& rName, IPVersion ipVersion)
NetworkInterface NetworkInterface::forName(const std::string& name, IPVersion ipVersion)
{
Map map = NetworkInterface::map(false, false);
Map::const_iterator it = map.begin();
@ -808,7 +808,7 @@ NetworkInterface NetworkInterface::forName(const std::string& rName, IPVersion i
for (; it != end; ++it)
{
if (it->second.name() == rName)
if (it->second.name() == name)
{
if (ipVersion == IPv4_ONLY && it->second.supportsIPv4())
return it->second;
@ -818,7 +818,7 @@ NetworkInterface NetworkInterface::forName(const std::string& rName, IPVersion i
return it->second;
}
}
throw InterfaceNotFoundException(rName);
throw InterfaceNotFoundException(name);
}
@ -864,10 +864,10 @@ NetworkInterface::List NetworkInterface::list(bool ipOnly, bool upOnly)
NetworkInterface::Map::const_iterator end = m.end();
for (; it != end; ++it)
{
int interfaceIndex = it->second.index();
std::string interfaceName = it->second.name();
std::string interfaceDisplayName = it->second.displayName();
std::string interfaceAdapterName = it->second.adapterName();
int index = it->second.index();
std::string name = it->second.name();
std::string displayName = it->second.displayName();
std::string adapterName = it->second.adapterName();
NetworkInterface::MACAddress mac = it->second.macAddress();
typedef NetworkInterface::AddressList List;
@ -881,12 +881,12 @@ NetworkInterface::List NetworkInterface::list(bool ipOnly, bool upOnly)
NetworkInterface ni;
if (mask.isWildcard())
{
ni = NetworkInterface(interfaceName, interfaceDisplayName, interfaceAdapterName, addr, interfaceIndex, &mac);
ni = NetworkInterface(name, displayName, adapterName, addr, index, &mac);
}
else
{
IPAddress broadcast = ipIt->get<NetworkInterface::BROADCAST_ADDRESS>();
ni = NetworkInterface(interfaceName, interfaceDisplayName, interfaceAdapterName, addr, mask, broadcast, interfaceIndex, &mac);
ni = NetworkInterface(name, displayName, adapterName, addr, mask, broadcast, index, &mac);
}
ni._pImpl->_broadcast = it->second._pImpl->_broadcast;
@ -984,7 +984,7 @@ NetworkInterface::Type fromNative(DWORD type)
}
IPAddress subnetMaskForInterface(const std::string& rName, bool isLoopback)
IPAddress subnetMaskForInterface(const std::string& name, bool isLoopback)
{
if (isLoopback)
{
@ -994,7 +994,7 @@ IPAddress subnetMaskForInterface(const std::string& rName, bool isLoopback)
{
#if !defined(_WIN32_WCE)
std::string subKey("SYSTEM\\CurrentControlSet\\services\\Tcpip\\Parameters\\Interfaces\\");
subKey += rName;
subKey += name;
std::string netmask;
HKEY hKey;
#if defined(POCO_WIN32_UTF8) && !defined(POCO_NO_WSTRING)
@ -1081,9 +1081,9 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
poco_assert (NO_ERROR == dwRetVal);
for (; pAddress; pAddress = pAddress->Next)
{
IPAddress ipAddress;
IPAddress ipSubnetMask;
IPAddress ipBroadcastAddress;
IPAddress address;
IPAddress subnetMask;
IPAddress broadcastAddress;
unsigned ifIndex = 0;
#if defined(POCO_HAVE_IPv6)
@ -1138,26 +1138,26 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
#endif
if (ifIndex == 0) continue;
std::string interfaceName;
std::string interfaceDisplayName;
std::string interfaceAdapterName(pAddress->AdapterName);
std::string name;
std::string displayName;
std::string adapterName(pAddress->AdapterName);
#ifdef POCO_WIN32_UTF8
Poco::UnicodeConverter::toUTF8(pAddress->FriendlyName, interfaceName);
Poco::UnicodeConverter::toUTF8(pAddress->Description, interfaceDisplayName);
Poco::UnicodeConverter::toUTF8(pAddress->FriendlyName, name);
Poco::UnicodeConverter::toUTF8(pAddress->Description, displayName);
#else
char nameBuffer[1024];
int rc = WideCharToMultiByte(CP_ACP, 0, pAddress->FriendlyName, -1, nameBuffer, sizeof(nameBuffer), NULL, NULL);
if (rc) interfaceName = nameBuffer;
if (rc) name = nameBuffer;
char displayNameBuffer[1024];
rc = WideCharToMultiByte(CP_ACP, 0, pAddress->Description, -1, displayNameBuffer, sizeof(displayNameBuffer), NULL, NULL);
if (rc) interfaceDisplayName = displayNameBuffer;
if (rc) displayName = displayNameBuffer;
#endif
bool isUp = (pAddress->OperStatus == IfOperStatusUp);
bool isIP = (0 != pAddress->FirstUnicastAddress);
if (((ipOnly && isIP) || !ipOnly) && ((upOnly && isUp) || !upOnly))
{
NetworkInterface ni(interfaceName, interfaceDisplayName, interfaceAdapterName, ifIndex);
NetworkInterface ni(name, displayName, adapterName, ifIndex);
// Create interface even if it has an empty list of addresses; also, set
// physical attributes which are protocol independent (name, media type,
// MAC address, MTU, operational status, etc).
@ -1184,7 +1184,7 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
pUniAddr;
pUniAddr = pUniAddr->Next)
{
ipAddress = IPAddress(pUniAddr->Address);
address = IPAddress(pUniAddr->Address);
ADDRESS_FAMILY family = pUniAddr->Address.lpSockaddr->sa_family;
switch (family)
{
@ -1201,67 +1201,67 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
#if defined(_WIN32_WCE)
#if _WIN32_WCE >= 0x0800
prefixLength = pUniAddr->OnLinkPrefixLength;
ipBroadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, ipAddress);
broadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, address);
#else
ipBroadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, ipAddress, &prefixLength);
broadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, address, &prefixLength);
#endif
// if previous call did not do it, make last-ditch attempt for prefix and broadcast
if (prefixLength == 0 && pAddress->FirstPrefix)
prefixLength = pAddress->FirstPrefix->PrefixLength;
poco_assert (prefixLength <= 32);
if (ipBroadcastAddress.isWildcard())
if (broadcastAddress.isWildcard())
{
IPAddress mask(static_cast<unsigned>(prefixLength), IPAddress::IPv4);
IPAddress host(mask & ipAddress);
ipBroadcastAddress = host | ~mask;
IPAddress host(mask & address);
broadcastAddress = host | ~mask;
}
#elif (_WIN32_WINNT >= 0x0501) && (NTDDI_VERSION >= 0x05010100) // Win XP SP1
#if (_WIN32_WINNT >= 0x0600) // Vista and newer
if (osvi.dwMajorVersion >= 6)
{
prefixLength = pUniAddr->OnLinkPrefixLength;
ipBroadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, ipAddress);
broadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, address);
}
else
{
ipBroadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, ipAddress, &prefixLength);
broadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, address, &prefixLength);
}
#else
ipBroadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, ipAddress, &prefixLength);
broadcastAddress = getBroadcastAddress(pAddress->FirstPrefix, address, &prefixLength);
#endif
poco_assert (prefixLength <= 32);
if (ipBroadcastAddress.isWildcard())
if (broadcastAddress.isWildcard())
{
IPAddress mask(static_cast<unsigned>(prefixLength), IPAddress::IPv4);
IPAddress host(mask & ipAddress);
ipBroadcastAddress = host | ~mask;
IPAddress host(mask & address);
broadcastAddress = host | ~mask;
}
#endif // (_WIN32_WINNT >= 0x0501) && (NTDDI_VERSION >= 0x05010100)
if (prefixLength)
{
ipSubnetMask = IPAddress(static_cast<unsigned>(prefixLength), IPAddress::IPv4);
subnetMask = IPAddress(static_cast<unsigned>(prefixLength), IPAddress::IPv4);
}
else // if all of the above fails, look up the subnet mask in the registry
{
ipAddress = IPAddress(&reinterpret_cast<struct sockaddr_in*>(pUniAddr->Address.lpSockaddr)->sin_addr, sizeof(in_addr));
ipSubnetMask = subnetMaskForInterface(interfaceName, ipAddress.isLoopback());
if (!ipAddress.isLoopback())
address = IPAddress(&reinterpret_cast<struct sockaddr_in*>(pUniAddr->Address.lpSockaddr)->sin_addr, sizeof(in_addr));
subnetMask = subnetMaskForInterface(name, address.isLoopback());
if (!address.isLoopback())
{
ipBroadcastAddress = ipAddress;
ipBroadcastAddress.mask(ipSubnetMask, IPAddress::broadcast());
broadcastAddress = address;
broadcastAddress.mask(subnetMask, IPAddress::broadcast());
}
}
ifIt->second.addAddress(ipAddress, ipSubnetMask, ipBroadcastAddress);
ifIt->second.addAddress(address, subnetMask, broadcastAddress);
}
else
{
ifIt->second.addAddress(ipAddress);
ifIt->second.addAddress(address);
}
}
break;
#if defined(POCO_HAVE_IPv6)
case AF_INET6:
ifIt->second.addAddress(ipAddress);
ifIt->second.addAddress(address);
break;
#endif
} // switch family
@ -1408,7 +1408,7 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
{
if (!currIface->ifa_addr) continue;
IPAddress ipAddress, ipSubnetMask, ipBroadcastAddress;
IPAddress address, subnetMask, broadcastAddress;
unsigned family = currIface->ifa_addr->sa_family;
switch (family)
{
@ -1432,17 +1432,17 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
if ((ifIt == result.end()) && ((upOnly && intf.isUp()) || !upOnly))
ifIt = result.insert(Map::value_type(ifIndex, intf)).first;
ipAddress = IPAddress(*(currIface->ifa_addr));
address = IPAddress(*(currIface->ifa_addr));
if (( currIface->ifa_flags & IFF_LOOPBACK ) == 0 && currIface->ifa_netmask)
ipSubnetMask = IPAddress(*(currIface->ifa_netmask));
subnetMask = IPAddress(*(currIface->ifa_netmask));
if (currIface->ifa_flags & IFF_BROADCAST && currIface->ifa_broadaddr)
ipBroadcastAddress = IPAddress(*(currIface->ifa_broadaddr));
broadcastAddress = IPAddress(*(currIface->ifa_broadaddr));
else if (currIface->ifa_flags & IFF_POINTOPOINT && currIface->ifa_dstaddr)
ipBroadcastAddress = IPAddress(*(currIface->ifa_dstaddr));
broadcastAddress = IPAddress(*(currIface->ifa_dstaddr));
else
ipBroadcastAddress = IPAddress();
broadcastAddress = IPAddress();
break;
#if defined(POCO_HAVE_IPv6)
case AF_INET6:
@ -1453,10 +1453,10 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
if ((ifIt == result.end()) && ((upOnly && intf.isUp()) || !upOnly))
ifIt = result.insert(Map::value_type(ifIndex, intf)).first;
ipAddress = IPAddress(&reinterpret_cast<const struct sockaddr_in6*>(currIface->ifa_addr)->sin6_addr,
address = IPAddress(&reinterpret_cast<const struct sockaddr_in6*>(currIface->ifa_addr)->sin6_addr,
sizeof(struct in6_addr), ifIndex);
ipSubnetMask = IPAddress(*(currIface->ifa_netmask));
ipBroadcastAddress = IPAddress();
subnetMask = IPAddress(*(currIface->ifa_netmask));
broadcastAddress = IPAddress();
break;
#endif
default:
@ -1472,7 +1472,7 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
if ((upOnly && intf.isUp()) || !upOnly)
{
if ((ifIt = result.find(ifIndex)) != result.end())
ifIt->second.addAddress(ipAddress, ipSubnetMask, ipBroadcastAddress);
ifIt->second.addAddress(address, subnetMask, broadcastAddress);
}
}
}
@ -1582,7 +1582,7 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
{
if (!iface->ifa_addr) continue;
IPAddress ipAddress, ipSubnetMask, ipBroadcastAddress;
IPAddress address, subnetMask, broadcastAddress;
unsigned family = iface->ifa_addr->sa_family;
switch (family)
{
@ -1607,15 +1607,15 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
if ((ifIt == result.end()) && ((upOnly && intf.isUp()) || !upOnly))
ifIt = result.insert(Map::value_type(ifIndex, intf)).first;
ipAddress = IPAddress(*(iface->ifa_addr));
ipSubnetMask = IPAddress(*(iface->ifa_netmask));
address = IPAddress(*(iface->ifa_addr));
subnetMask = IPAddress(*(iface->ifa_netmask));
if (iface->ifa_flags & IFF_BROADCAST && iface->ifa_broadaddr)
ipBroadcastAddress = IPAddress(*(iface->ifa_broadaddr));
broadcastAddress = IPAddress(*(iface->ifa_broadaddr));
else if (iface->ifa_flags & IFF_POINTOPOINT && iface->ifa_dstaddr)
ipBroadcastAddress = IPAddress(*(iface->ifa_dstaddr));
broadcastAddress = IPAddress(*(iface->ifa_dstaddr));
else
ipBroadcastAddress = IPAddress();
broadcastAddress = IPAddress();
break;
#if defined(POCO_HAVE_IPv6)
@ -1628,9 +1628,9 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
if ((ifIt == result.end()) && ((upOnly && intf.isUp()) || !upOnly))
result.insert(Map::value_type(ifIndex, intf));
ipAddress = IPAddress(&reinterpret_cast<const struct sockaddr_in6*>(iface->ifa_addr)->sin6_addr, sizeof(struct in6_addr), ifIndex);
ipSubnetMask = IPAddress(*(iface->ifa_netmask));
ipBroadcastAddress = IPAddress();
address = IPAddress(&reinterpret_cast<const struct sockaddr_in6*>(iface->ifa_addr)->sin6_addr, sizeof(struct in6_addr), ifIndex);
subnetMask = IPAddress(*(iface->ifa_netmask));
broadcastAddress = IPAddress();
break;
#endif
@ -1644,11 +1644,11 @@ NetworkInterface::Map NetworkInterface::map(bool ipOnly, bool upOnly)
#endif
)
{
intf = NetworkInterface(std::string(iface->ifa_name), ipAddress, ipSubnetMask, ipBroadcastAddress, ifIndex);
intf = NetworkInterface(std::string(iface->ifa_name), address, subnetMask, broadcastAddress, ifIndex);
if ((upOnly && intf.isUp()) || !upOnly)
{
if ((ifIt = result.find(ifIndex)) != result.end())
ifIt->second.addAddress(ipAddress, ipSubnetMask, ipBroadcastAddress);
ifIt->second.addAddress(address, subnetMask, broadcastAddress);
}
}
} // for interface

View File

@ -30,8 +30,8 @@ PartSource::PartSource():
}
PartSource::PartSource(const std::string& rMediaType):
_mediaType(rMediaType)
PartSource::PartSource(const std::string& mediaType):
_mediaType(mediaType)
{
}

Some files were not shown because too many files have changed in this diff Show More