Merge remote-tracking branch 'origin/poco-1.9.1' into poco-1.9.1

Conflicts:
	.travis.yml
This commit is contained in:
Francis ANDRE 2018-09-27 14:45:27 +02:00
commit 608d383786
4 changed files with 85 additions and 75 deletions

View File

@ -36,6 +36,7 @@ before_script:
matrix:
include:
<<<<<<< HEAD
- env: TEST_NAME="Gradle"
os: osx
compiler: clang
@ -52,6 +53,16 @@ matrix:
- chmod 777 ./gradle/bin/gradle
- ./gradle/bin/gradle --console=plain -g travis -c travis/settings.gradle poco check -Ptest=-all
- cat Crypto/guild/tmp/linkCryptoLinux64DebugSharedLibrary/*
=======
# - env: TEST_NAME="Gradle"
# os: osx
# compiler: clang
# script:
# - brew install mysql
# - brew install unixodbc
# - chmod 777 ./gradle/bin/gradle
# - ./gradle/bin/gradle --console=plain -g travis -c settings.gradle poco check -Ptest=-all
>>>>>>> refs/remotes/origin/poco-1.9.1
- env: TEST_NAME="android API level 19"
language: android

View File

@ -36,25 +36,25 @@ namespace Data {
class Data_API SQLChannel: public Poco::Channel
/// This Channel implements logging to a SQL database.
/// The channel is dependent on the schema. The DDL for
/// table creation (subject to target DDL dialect dependent
/// table creation (subject to target DDL dialect dependent
/// modifications) is:
///
/// "CREATE TABLE T_POCO_LOG (Source VARCHAR,
/// Name VARCHAR,
/// ProcessId INTEGER,
/// Thread VARCHAR,
/// ThreadId INTEGER,
/// Priority INTEGER,
/// Text VARCHAR,
/// "CREATE TABLE T_POCO_LOG (Source VARCHAR,
/// Name VARCHAR,
/// ProcessId INTEGER,
/// Thread VARCHAR,
/// ThreadId INTEGER,
/// Priority INTEGER,
/// Text VARCHAR,
/// DateTime DATE)"
///
/// The table name is configurable through "table" property.
/// Other than DateTime filed name used for optiona time-based archiving purposes, currently the
/// The table name is configurable through "table" property.
/// Other than DateTime filed name used for optional time-based archiving purposes, currently the
/// field names are not mandated. However, it is recomended to use names as specified above.
///
/// To provide as non-intrusive operation as possbile, the log entries are cached and
/// inserted into the target database asynchronously by default . The blocking, however, will occur
/// before the next entry insertion with default timeout of 1 second. The default settings can be
///
/// To provide as non-intrusive operation as possbile, the log entries are cached and
/// inserted into the target database asynchronously by default. The blocking, however, will occur
/// before the next entry insertion with default timeout of 1 second. The default settings can be
/// overriden (see async, timeout and throw properties for details).
/// If throw property is false, insertion timeouts are ignored, otherwise a TimeoutException is thrown.
/// To force insertion of every entry, set timeout to 0. This setting, however, introduces
@ -64,21 +64,21 @@ public:
SQLChannel();
/// Creates SQLChannel.
SQLChannel(const std::string& connector,
SQLChannel(const std::string& connector,
const std::string& connect,
const std::string& name = "-");
/// Creates a SQLChannel with the given connector, connect string, timeout, table and name.
/// The connector must be already registered.
void open();
/// Opens the SQLChannel.
void close();
/// Closes the SQLChannel.
void log(const Message& msg);
/// Sends the message's text to the syslog service.
/// Writes the log message to the database.
void setProperty(const std::string& name, const std::string& value);
/// Sets the property with the given value.
///
@ -86,8 +86,6 @@ public:
/// * name: The name used to identify the source of log messages.
/// Defaults to "-".
///
/// * target: The target data storage type ("SQLite", "ODBC", ...).
///
/// * connector: The target data storage connector name.
///
/// * connect: The target data storage connection string.
@ -105,7 +103,7 @@ public:
/// * async: Indicates asynchronous execution. When excuting asynchronously,
/// messages are sent to the target using asyncronous execution.
/// However, prior to the next message being processed and sent to
/// the target, the previous operation must have been either completed
/// the target, the previous operation must have been either completed
/// or timed out (see timeout and throw properties for details on
/// how abnormal conditos are handled).
///
@ -117,7 +115,7 @@ public:
/// Setting this property to false may result in log entries being lost.
/// True values are (case insensitive) "true", "t", "yes", "y".
/// Anything else yields false.
std::string getProperty(const std::string& name) const;
/// Returns the value of the property with the given name.
@ -175,7 +173,7 @@ private:
int _timeout;
bool _throw;
bool _async;
// members for log entry cache (needed for async mode)
std::string _source;
long _pid;
@ -195,9 +193,9 @@ private:
inline std::size_t SQLChannel::wait()
{
if (_async && _pLogStatement)
if (_async && _pLogStatement)
return _pLogStatement->wait(_timeout);
return 0;
}

View File

@ -11,7 +11,7 @@ POCO Zip adds support for parsing and creating Zip files. It offers the followin
!!Restrictions
* POCO Zip does not support the DEFLATE64 algorithm.
* encrypted files are not supported
!!!Main Classes
Most users will work with two common classes: <*Compress*> and <*Decompress*>
@ -23,31 +23,31 @@ Creating a Zip file is a basically a three-step process:
Compress(std::ostream& out, bool seekableOut);
----
* Add entries: either add single files or directory entries
void addFile(std::istream& input,
const Poco::DateTime& lastModifiedAt,
const Poco::Path& fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
void addFile(std::istream& input,
const Poco::DateTime& lastModifiedAt,
const Poco::Path& fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM);
/// Adds a single file to the Zip File. fileName must not be a directory name.
void addFile(const Poco::Path& file,
const Poco::Path& fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
void addFile(const Poco::Path& file,
const Poco::Path& fileName,
ZipCommon::CompressionMethod cm = ZipCommon::CM_DEFLATE,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM);
/// Adds a single file to the Zip File. fileName must not be a directory name. The file must exist physically!
void addDirectory(const Poco::Path& entryName, const Poco::DateTime& lastModifiedAt);
/// Adds a directory entry excluding all children to the Zip file, entryName must not be empty.
void addRecursive(const Poco::Path& entry,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM,
bool excludeRoot = true,
void addRecursive(const Poco::Path& entry,
ZipCommon::CompressionLevel cl = ZipCommon::CL_MAXIMUM,
bool excludeRoot = true,
const Poco::Path& name = Poco::Path());
/// Adds a directory entry recursively to the zip file, set excludeRoot to false to exclude the parent directory.
/// The name specifies under which path the entries are added in the Zip file.
----
Note that one must always define a name when adding a file entry, otherwise the compresser can not decide if the file should be added with an absolute or a relative path.
Note that one must always define a name when adding a file entry, otherwise the compresser can not decide if the file should be added with an absolute or a relative path.
Assume you are adding the file <*c:\\data\\hello.txt*> twice to a Zip:
// MUST use binary!
@ -96,7 +96,7 @@ To get notified about the entries that are added during <*addRecursive*> registe
Poco::FIFOEvent<const ZipLocalFileHeader> EDone;
----
* Closing the Zip file: It is mandatory to manually close Compress objects. This guarantees that the Zip directory is written, thus creating a valid Zip file. It is safe to call <*close*> multiple times, only the first call takes effect.
ZipArchive close();
----
<*close*> returns a ZipArchive which describes all entries inside a Zip file.
@ -110,7 +110,7 @@ The following sample code shows how all entries can be extracted from a Zip file
std::ifstream inp("test.zip", std::ios::binary);
poco_assert (inp);
// decompress to current working dir
Decompress dec(inp, Poco::Path());
Decompress dec(inp, Poco::Path());
// if an error happens invoke the ZipTest::onDecompressError method
dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::string> >(this, &ZipTest::onDecompressError);
dec.decompressAllFiles();
@ -152,7 +152,8 @@ To decompress single files you must first parse a Zip file, and then decompress
ZipArchive arch(inp);
ZipArchive::FileHeaders::const_iterator it = arch.findHeader("data/hello.txt");
poco_assert (it != arch.headerEnd());
ZipInputStream zipin (inp, it->second);
inp.clear();
ZipInputStream zipin(inp, it->second);
std::ostringstream out(std::ios::binary);
Poco::StreamCopier::copyStream(zipin, out);
----

View File

@ -255,7 +255,7 @@ This will build POCO C++ Libraries in a subdirectory <*poco-build*>. All files p
For Makefile (default on Unix systems) and Ninja based build system (and all other single-configuration generators), there exists following build types:
* Debug
* Release
* RelWithDebInfo (Release build with Debug infos)
* RelWithDebInfo (Release build with Debug infos)
* MinSizeRel (Release build with size optimisation)
As default, POCO is build RelWithDebInfo. See cmake output like:
@ -308,7 +308,7 @@ As default, Poco build dynamic libraries, see cmake output like:
To set some additional compiler flags, you can use following parameters:
* CMAKE_C_FLAGS For C compiler
* CMAKE_CXX_FLAGS For C++ compiler
* CMAKE_CXX_FLAGS For C++ compiler
For example:
@ -327,7 +327,7 @@ For more infos see https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS
To use the compiler of your choice, you can use following paramters:
* CMAKE_C_COMPILER C compiler
* CMAKE_CXX_COMPILER C++ compiler
* CMAKE_CXX_COMPILER C++ compiler
For example to use the clang compiler, execute following cmake command:
@ -352,38 +352,38 @@ type the following command:
Here an overview of POCO build options:
* ENABLE_XML Set to OFF|ON (default is ON) to build XML support library
* ENABLE_JSON Set to OFF|ON (default is ON) to build JSON support library
* ENABLE_NET Set to OFF|ON (default is ON) to build Net support library
* ENABLE_NETSSL Set to OFF|ON (default is ON) to build NetSSL support library (Need installed openssl libraries)
* ENABLE_CRYPTO Set to OFF|ON (default is ON) to build Crypto support library (Need installed openssl libraries)
* ENABLE_DATA Set to OFF|ON (default is ON) to build Data support library
* ENABLE_DATA_SQLITE Set to OFF|ON (default is ON) to build Data SQlite support library
* ENABLE_DATA_MYSQL Set to OFF|ON (default is ON) to build Data MySQL or MariaDB support library (Need installed MySQL or MariaDB client libraries)
* ENABLE_DATA_POSTGRESQL Set to OFF|ON (default is ON) to build SQL PosgreSQL support library (Need installed PostgreSQL client libraries)
* ENABLE_DATA_ODBC Set to OFF|ON (default is ON) to build Data ODBC support library (Need installed ODBC libraries)
* ENABLE_MONGODB Set to OFF|ON (default is ON) to build MongoDB support library
* ENABLE_REDIS Set to OFF|ON (default is ON) to build Redis support library
* ENABLE_PDF Set to OFF|ON (default is OFF) to build PDF support library
* ENABLE_UTIL Set to OFF|ON (default is ON) to build Util support library
* ENABLE_ZIP Set to OFF|ON (default is ON) to build Zip support library
* ENABLE_SEVENZIP Set to OFF|ON (default is OFF) to build SevenZip support library
* ENABLE_APACHECONNECTOR Set to OFF|ON (default is ON) to build ApacheConnector support library (Need installed apache and apr libraries)
* ENABLE_CPPPARSER Set to OFF|ON (default is OFF) to build C++ parser
* ENABLE_ENCODINGS Set to OFF|ON (default is ON) to build with Encodings
* ENABLE_ENCODINGS_COMPILER Set to OFF|ON (default is OFF) to build Encodings Compiler
* ENABLE_PAGECOMPILER Set to OFF|ON (default is ON) to build PageCompiler
* ENABLE_PAGECOMPILER_FILE2PAGE Set to OFF|ON (default is ON) to build File2Page
* ENABLE_POCODOC Set to OFF|ON (default is OFF) to build Poco Documentation Generator
* ENABLE_TESTS Set to OFF|ON (default is OFF) to build Unit tests
* ENABLE_LONG_RUNNING_TESTS Set to OFF|ON (default is ON) to use long running test
* POCO_UNBUNDLED Set to OFF|ON (default is OFF) to control linking dependencies as external
* ENABLE_XML Set to OFF|ON (default is ON) to build XML support library
* ENABLE_JSON Set to OFF|ON (default is ON) to build JSON support library
* ENABLE_NET Set to OFF|ON (default is ON) to build Net support library
* ENABLE_NETSSL Set to OFF|ON (default is ON) to build NetSSL support library (Need installed openssl libraries)
* ENABLE_CRYPTO Set to OFF|ON (default is ON) to build Crypto support library (Need installed openssl libraries)
* ENABLE_DATA Set to OFF|ON (default is ON) to build Data support library
* ENABLE_DATA_SQLITE Set to OFF|ON (default is ON) to build Data SQlite support library
* ENABLE_DATA_MYSQL Set to OFF|ON (default is ON) to build Data MySQL or MariaDB support library (Need installed MySQL or MariaDB client libraries)
* ENABLE_DATA_POSTGRESQL Set to OFF|ON (default is ON) to build SQL PosgreSQL support library (Need installed PostgreSQL client libraries)
* ENABLE_DATA_ODBC Set to OFF|ON (default is ON) to build Data ODBC support library (Need installed ODBC libraries)
* ENABLE_MONGODB Set to OFF|ON (default is ON) to build MongoDB support library
* ENABLE_REDIS Set to OFF|ON (default is ON) to build Redis support library
* ENABLE_PDF Set to OFF|ON (default is OFF) to build PDF support library
* ENABLE_UTIL Set to OFF|ON (default is ON) to build Util support library
* ENABLE_ZIP Set to OFF|ON (default is ON) to build Zip support library
* ENABLE_SEVENZIP Set to OFF|ON (default is OFF) to build SevenZip support library
* ENABLE_APACHECONNECTOR Set to OFF|ON (default is ON) to build ApacheConnector support library (Need installed apache and apr libraries)
* ENABLE_CPPPARSER Set to OFF|ON (default is OFF) to build C++ parser
* ENABLE_ENCODINGS Set to OFF|ON (default is ON) to build with Encodings
* ENABLE_ENCODINGS_COMPILER Set to OFF|ON (default is OFF) to build Encodings Compiler
* ENABLE_PAGECOMPILER Set to OFF|ON (default is ON) to build PageCompiler
* ENABLE_PAGECOMPILER_FILE2PAGE Set to OFF|ON (default is ON) to build File2Page
* ENABLE_POCODOC Set to OFF|ON (default is OFF) to build Poco Documentation Generator
* ENABLE_TESTS Set to OFF|ON (default is OFF) to build Unit tests
* ENABLE_LONG_RUNNING_TESTS Set to OFF|ON (default is ON) to use long running test
* POCO_UNBUNDLED Set to OFF|ON (default is OFF) to control linking dependencies as external
Windows only parameter:
* POCO_MT Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD
* ENABLE_MSVC_MP Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC
* ENABLE_NETSSL_WIN Set to OFF|ON (default is OFF) to build NetSSL support library(Need installed openssl libraries For Windows only)
* POCO_MT Set to OFF|ON (default is OFF) to control build of POCO as /MT instead of /MD
* ENABLE_MSVC_MP Set to OFF|ON (default is OFF) to control parallel build of POCO with MSVC
* ENABLE_NETSSL_WIN Set to OFF|ON (default is OFF) to build NetSSL support library(Need installed openssl libraries For Windows only)
You can also see and enable or disable available options execute following command: