diff --git a/.gitignore b/.gitignore index caf247df3..951d94454 100644 --- a/.gitignore +++ b/.gitignore @@ -59,6 +59,7 @@ XML/testsuite/rss.xml Icon? ehthumbs.db Thumbs.db +*~ # VS generated files # ###################### @@ -86,10 +87,16 @@ Thumbs.db *.lastbuildstate *.unsuccessfulbuild release_shared/ -debug_share/ +debug_shared/ release_static/ debug_static/ +release_static_md/ +debug_static_md/ +release_static_mt/ +debug_static_mt/ bin/ bin64/ +lib/ +lib64/ pocomsg.h diff --git a/CHANGELOG b/CHANGELOG index c9598fda1..8e69616dd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,20 @@ Release 1.5.0 (2012-12-17) - Android compile/build support (by Rangel Reale) - TypeHandler::prepare() now takes const-reference - fixed GH #27: Poco::URI::decode() doesn't properly handle '+' +- fixed GH #31: JSON implementation bug +- fixed SF #597: Configure script ignores cflags +- fixed SF #593: Poco 1.5.0 on FreeBSD: cannot find -ldl +- added SF #542: SocketAddress() needs port-only constructor +- fixed SF #215: Wrong return type in SocketConnector.h +- applied SF Patch #97: fix c++0x / clang++ bugs +- fixed GH32/SF596: Poco::JSON: Parsing long integer (int64) value fails. +- added Net ifconfig sample (contributed by Philip Prindeville) +- merged GH #34: add algorithm header (Roger Meier/Philip Prindeville) +- fixed GH #26: Cannot compile on gcc +- merged SF #111: FTP Client logging (Marian Krivos) +- fixed GH #30: Poco::Path::home() throws when called from Windows Service +- fixed GH #22: MySQL connection string lowercased +- added MySQL support for Date/Time Release 1.5.0 (2012-10-14) ========================== diff --git a/CONTRIBUTORS b/CONTRIBUTORS index c40d556c6..30956cf0f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,23 +1,23 @@ -Guenter Obiltschnig -Alex Fabijanic -Peter Schojer -Ferdinand Beyer -Krzysztof Burghardt -Claus Dabringer -Caleb Epstein -Eran Hammer-Lahav -Chris Johnson -Sergey Kholodilov -Ryan Kraay -Larry Lewis -Andrew J. P. Maclean -Andrew Marlow -Paschal Mushubi -Jiang Shan -David Shawley -Sergey Skorokhodov +Guenter Obiltschnig +Alex Fabijanic +Peter Schojer +Ferdinand Beyer +Krzysztof Burghardt +Claus Dabringer +Caleb Epstein +Eran Hammer-Lahav +Chris Johnson +Sergey Kholodilov +Ryan Kraay +Larry Lewis +Andrew J. P. Maclean +Andrew Marlow +Paschal Mushubi +Jiang Shan +David Shawley +Sergey Skorokhodov Tom Tan -Sergey N. Yatskevich +Sergey N. Yatskevich Marc Chevrier Philippe Cuvillier Marian Krivos @@ -28,6 +28,7 @@ Rangel Reale Fabrizio Duhem Patrick White Mike Naquin +Roger Meier -- $Id$ diff --git a/CppUnit/include/CppUnit/CppUnit.h b/CppUnit/include/CppUnit/CppUnit.h index e86535a2e..57583bc8b 100644 --- a/CppUnit/include/CppUnit/CppUnit.h +++ b/CppUnit/include/CppUnit/CppUnit.h @@ -37,7 +37,11 @@ #if !defined(CppUnit_API) - #define CppUnit_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define CppUnit_API __attribute__ ((visibility ("default"))) + #else + #define CppUnit_API + #endif #endif diff --git a/Crypto/include/Poco/Crypto/Crypto.h b/Crypto/include/Poco/Crypto/Crypto.h index 792eff1aa..6f2ac0f1e 100644 --- a/Crypto/include/Poco/Crypto/Crypto.h +++ b/Crypto/include/Poco/Crypto/Crypto.h @@ -90,7 +90,11 @@ enum RSAPaddingMode #if !defined(Crypto_API) - #define Crypto_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Crypto_API __attribute__ ((visibility ("default"))) + #else + #define Crypto_API + #endif #endif diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h index 8a99f1b64..10e33075d 100644 --- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h +++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h @@ -61,7 +61,11 @@ #if !defined(MySQL_API) - #define MySQL_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define MySQL_API __attribute__ ((visibility ("default"))) + #else + #define MySQL_API + #endif #endif diff --git a/Data/MySQL/src/ResultMetadata.cpp b/Data/MySQL/src/ResultMetadata.cpp index a45f71ff6..b018b7d46 100644 --- a/Data/MySQL/src/ResultMetadata.cpp +++ b/Data/MySQL/src/ResultMetadata.cpp @@ -130,7 +130,16 @@ namespace case MYSQL_TYPE_LONGLONG: if (unsig) return Poco::Data::MetaColumn::FDT_UINT64; return Poco::Data::MetaColumn::FDT_INT64; - + + case MYSQL_TYPE_DATE: + return Poco::Data::MetaColumn::FDT_DATE; + + case MYSQL_TYPE_TIME: + return Poco::Data::MetaColumn::FDT_TIME; + + case MYSQL_TYPE_DATETIME: + return Poco::Data::MetaColumn::FDT_TIMESTAMP; + case MYSQL_TYPE_STRING: case MYSQL_TYPE_VAR_STRING: return Poco::Data::MetaColumn::FDT_STRING; diff --git a/Data/MySQL/src/SessionImpl.cpp b/Data/MySQL/src/SessionImpl.cpp index 6884fd0f6..22f26bdb3 100644 --- a/Data/MySQL/src/SessionImpl.cpp +++ b/Data/MySQL/src/SessionImpl.cpp @@ -1,5 +1,5 @@ // -// MySQLException.cpp +// SessionImpl.cpp // // $Id: //poco/1.4/Data/MySQL/src/SessionImpl.cpp#1 $ // @@ -67,7 +67,7 @@ const std::string SessionImpl::MYSQL_SERIALIZABLE = "SERIALIZABLE"; SessionImpl::SessionImpl(const std::string& connectionString, std::size_t loginTimeout) : - Poco::Data::AbstractSessionImpl(toLower(connectionString), loginTimeout), + Poco::Data::AbstractSessionImpl(connectionString, loginTimeout), _handle(0), _connected(false), _inTransaction(false) diff --git a/Data/MySQL/testsuite/src/MySQLTest.cpp b/Data/MySQL/testsuite/src/MySQLTest.cpp index 6db543d09..f9e457e0a 100644 --- a/Data/MySQL/testsuite/src/MySQLTest.cpp +++ b/Data/MySQL/testsuite/src/MySQLTest.cpp @@ -417,6 +417,19 @@ void MySQLTest::testEmptyDB() } +void MySQLTest::testDateTime() +{ + if (!_pSession) fail ("Test not available."); + + recreatePersonDateTimeTable(); + _pExecutor->dateTime(); + recreatePersonDateTable(); + _pExecutor->date(); + recreatePersonTimeTable(); + _pExecutor->time(); +} + + void MySQLTest::testBLOB() { if (!_pSession) fail ("Test not available."); @@ -697,6 +710,33 @@ void MySQLTest::recreatePersonBLOBTable() } +void MySQLTest::recreatePersonDateTimeTable() +{ + dropTable("Person"); + try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday DATETIME)", now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonDateTimeTable()"); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonDateTimeTable()"); } +} + + +void MySQLTest::recreatePersonDateTable() +{ + dropTable("Person"); + try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday DATE)", now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonDateTable()"); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonDateTable()"); } +} + + +void MySQLTest::recreatePersonTimeTable() +{ + dropTable("Person"); + try { *_pSession << "CREATE TABLE Person (LastName VARCHAR(30), FirstName VARCHAR(30), Address VARCHAR(30), Birthday TIME)", now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail ("recreatePersonTimeTable()"); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail ("recreatePersonTimeTable()"); } +} + + void MySQLTest::recreateIntsTable() { dropTable("Strings"); @@ -833,6 +873,7 @@ CppUnit::Test* MySQLTest::suite() CppUnit_addTest(pSuite, MySQLTest, testIllegalRange); CppUnit_addTest(pSuite, MySQLTest, testSingleSelect); CppUnit_addTest(pSuite, MySQLTest, testEmptyDB); + CppUnit_addTest(pSuite, MySQLTest, testDateTime); //CppUnit_addTest(pSuite, MySQLTest, testBLOB); CppUnit_addTest(pSuite, MySQLTest, testBLOBStmt); CppUnit_addTest(pSuite, MySQLTest, testFloat); diff --git a/Data/MySQL/testsuite/src/MySQLTest.h b/Data/MySQL/testsuite/src/MySQLTest.h index b84b94d7c..887f69af1 100644 --- a/Data/MySQL/testsuite/src/MySQLTest.h +++ b/Data/MySQL/testsuite/src/MySQLTest.h @@ -95,7 +95,7 @@ public: void testIllegalRange(); void testSingleSelect(); void testEmptyDB(); - + void testDateTime(); void testBLOB(); void testBLOBStmt(); @@ -129,6 +129,9 @@ private: void dropTable(const std::string& tableName); void recreatePersonTable(); void recreatePersonBLOBTable(); + void recreatePersonDateTimeTable(); + void recreatePersonDateTable(); + void recreatePersonTimeTable(); void recreateStringsTable(); void recreateIntsTable(); void recreateFloatsTable(); diff --git a/Data/MySQL/testsuite/src/SQLExecutor.cpp b/Data/MySQL/testsuite/src/SQLExecutor.cpp index c4a4f150b..73b7205c1 100644 --- a/Data/MySQL/testsuite/src/SQLExecutor.cpp +++ b/Data/MySQL/testsuite/src/SQLExecutor.cpp @@ -35,9 +35,12 @@ #include "Poco/String.h" #include "Poco/Format.h" #include "Poco/Tuple.h" +#include "Poco/DateTime.h" #include "Poco/Any.h" #include "Poco/Exception.h" #include "Poco/Data/LOB.h" +#include "Poco/Data/Date.h" +#include "Poco/Data/Time.h" #include "Poco/Data/StatementImpl.h" #include "Poco/Data/RecordSet.h" #include "Poco/Data/Transaction.h" @@ -58,6 +61,7 @@ using Poco::Data::MySQL::ConnectionException; using Poco::Data::MySQL::StatementException; using Poco::format; using Poco::Tuple; +using Poco::DateTime; using Poco::Any; using Poco::AnyCast; using Poco::NotFoundException; @@ -1251,6 +1255,90 @@ void SQLExecutor::emptyDB() } +void SQLExecutor::dateTime() +{ + std::string funct = "dateTime()"; + std::string lastName("Bart"); + std::string firstName("Simpson"); + std::string address("Springfield"); + DateTime birthday(1980, 4, 1, 5, 45, 12); + + int count = 0; + try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (count == 1); + + DateTime bd; + assert (bd != birthday); + try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (bd == birthday); + + std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person"); +} + + +void SQLExecutor::date() +{ + std::string funct = "date()"; + std::string lastName("Bart"); + std::string firstName("Simpson"); + std::string address("Springfield"); + Date birthday(1980, 4, 1); + + int count = 0; + try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (count == 1); + + Date bd; + assert (bd != birthday); + try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (bd == birthday); + + std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person"); +} + + +void SQLExecutor::time() +{ + std::string funct = "date()"; + std::string lastName("Bart"); + std::string firstName("Simpson"); + std::string address("Springfield"); + Time birthday(1, 2, 3); + + int count = 0; + try { *_pSession << "INSERT INTO Person VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(birthday), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + try { *_pSession << "SELECT COUNT(*) FROM Person", into(count), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (count == 1); + + Time bd; + assert (bd != birthday); + try { *_pSession << "SELECT Birthday FROM Person", into(bd), now; } + catch(ConnectionException& ce){ std::cout << ce.displayText() << std::endl; fail (funct); } + catch(StatementException& se){ std::cout << se.displayText() << std::endl; fail (funct); } + assert (bd == birthday); + + std::cout << std::endl << RecordSet(*_pSession, "SELECT * FROM Person"); +} + + void SQLExecutor::blob(int bigSize) { std::string funct = "blob()"; @@ -1295,6 +1383,7 @@ void SQLExecutor::blob(int bigSize) assert (res == big); } + void SQLExecutor::blobStmt() { std::string funct = "blobStmt()"; @@ -1320,6 +1409,7 @@ void SQLExecutor::blobStmt() poco_assert (res == blob); } + void SQLExecutor::tuples() { typedef Tuple TupleType; @@ -1338,6 +1428,7 @@ void SQLExecutor::tuples() assert (ret == t); } + void SQLExecutor::tupleVector() { typedef Tuple TupleType; diff --git a/Data/MySQL/testsuite/src/SQLExecutor.h b/Data/MySQL/testsuite/src/SQLExecutor.h index 4166224d1..ae6e1f3bd 100644 --- a/Data/MySQL/testsuite/src/SQLExecutor.h +++ b/Data/MySQL/testsuite/src/SQLExecutor.h @@ -102,7 +102,9 @@ public: void blob(int bigSize = 1024); void blobStmt(); - + void dateTime(); + void date(); + void time(); void floats(); void doubles(); void tuples(); diff --git a/Data/ODBC/include/Poco/Data/ODBC/ODBC.h b/Data/ODBC/include/Poco/Data/ODBC/ODBC.h index 8500e4ecc..889877113 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/ODBC.h +++ b/Data/ODBC/include/Poco/Data/ODBC/ODBC.h @@ -66,7 +66,11 @@ #if !defined(ODBC_API) - #define ODBC_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define ODBC_API __attribute__ ((visibility ("default"))) + #else + #define ODBC_API + #endif #endif diff --git a/Data/ODBC/include/Poco/Data/ODBC/Unicode_UNIXODBC.h b/Data/ODBC/include/Poco/Data/ODBC/Unicode_UNIXODBC.h index f45f3a3f0..5e0746e96 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/Unicode_UNIXODBC.h +++ b/Data/ODBC/include/Poco/Data/ODBC/Unicode_UNIXODBC.h @@ -56,7 +56,7 @@ inline void makeUTF16(SQLCHAR* pSQLChar, SQLSMALLINT length, std::string& target } -inline void makeUTF8(Poco::Buffer& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength); +void makeUTF8(Poco::Buffer& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength); /// Utility function for conversion from UTF-16 to UTF-8. diff --git a/Data/ODBC/include/Poco/Data/ODBC/Unicode_WIN32.h b/Data/ODBC/include/Poco/Data/ODBC/Unicode_WIN32.h index 33d451a8f..78846ed32 100644 --- a/Data/ODBC/include/Poco/Data/ODBC/Unicode_WIN32.h +++ b/Data/ODBC/include/Poco/Data/ODBC/Unicode_WIN32.h @@ -42,7 +42,7 @@ namespace Poco { namespace Data { -namespace ODBC { +namespace ODBC { inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target) @@ -56,16 +56,15 @@ inline void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::wstring& target } -inline void makeUTF16(SQLCHAR* pSQLChar, SQLSMALLINT length, std::wstring& target) - /// Utility function for conversion from UTF-8 to UTF-16. +inline void makeUTF8(Poco::Buffer& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength) + /// Utility function for conversion from UTF-16 to UTF-8. Length is in bytes. { - makeUTF16(pSQLChar, (SQLINTEGER) length, target); -} + if (buffer.sizeBytes() < length) + throw InvalidArgumentException("Specified length exceeds available length."); + else if ((length % 2) != 0) + throw InvalidArgumentException("Length must be an even number."); - -inline void makeUTF8(Poco::Buffer& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength) - /// Utility function for conversion from UTF-16 to UTF-8. -{ + length /= sizeof(wchar_t); std::string result; UnicodeConverter::toUTF8(buffer.begin(), length, result); @@ -74,13 +73,6 @@ inline void makeUTF8(Poco::Buffer& buffer, int length, SQLPOINTER pTarg } -inline void makeUTF8(Poco::Buffer& buffer, int length, SQLPOINTER pTarget, SQLSMALLINT targetLength) - /// Utility function for conversion from UTF-16 to UTF-8. -{ - makeUTF8(buffer, length, pTarget, (SQLINTEGER) targetLength); -} - - } } } // namespace Poco::Data::ODBC diff --git a/Data/ODBC/src/Unicode_UNIXODBC.cpp b/Data/ODBC/src/Unicode_UNIXODBC.cpp index c82762860..5e453a529 100644 --- a/Data/ODBC/src/Unicode_UNIXODBC.cpp +++ b/Data/ODBC/src/Unicode_UNIXODBC.cpp @@ -72,14 +72,14 @@ void makeUTF16(SQLCHAR* pSQLChar, SQLINTEGER length, std::string& target) } -void makeUTF8(Poco::Buffer& buffer, int length, SQLPOINTER pTarget, SQLINTEGER targetLength) +void makeUTF8(Poco::Buffer& buffer, SQLINTEGER length, SQLPOINTER pTarget, SQLINTEGER targetLength) { UTF8Encoding utf8Encoding; UTF16Encoding utf16Encoding; TextConverter converter(utf16Encoding, utf8Encoding); std::string result; - if (0 != converter.convert(buffer.begin(), length * sizeof(SQLWCHAR), result)) + if (0 != converter.convert(buffer.begin(), length, result)) throw DataFormatException("Error converting UTF-16 to UTF-8"); std::memset(pTarget, 0, targetLength); @@ -103,7 +103,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt, iCol, iField, buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR), + (SQLSMALLINT) buffer.sizeBytes(), pcbCharAttr, pNumAttr); @@ -157,8 +157,8 @@ SQLRETURN SQLConnect(SQLHDBC hdbc, makeUTF16(szAuthStr, cbAuthStr, sqlPWD); return SQLConnectW(hdbc, - (SQLWCHAR*) sqlDSN.c_str(), cbDSN, - (SQLWCHAR*) sqlUID.c_str(), cbUID, + (SQLWCHAR*) sqlDSN.c_str(), cbDSN, + (SQLWCHAR*) sqlUID.c_str(), cbUID, (SQLWCHAR*) sqlPWD.c_str(), cbAuthStr); } @@ -184,7 +184,7 @@ SQLRETURN SQLDescribeCol(SQLHSTMT hstmt, pibScale, pfNullable); - makeUTF8(buffer, *pcbColName, szColName, cbColNameMax); + makeUTF8(buffer, *pcbColName * sizeof(SQLWCHAR), szColName, cbColNameMax); return rc; } @@ -227,7 +227,7 @@ SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc, SQLRETURN rc = SQLGetConnectAttrW(hdbc, fAttribute, buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(SQLWCHAR), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax); @@ -293,7 +293,7 @@ SQLRETURN SQLGetDescField(SQLHDESC hdesc, iRecord, iField, buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(SQLWCHAR), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax); @@ -343,7 +343,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType, iRecord, fDiagField, buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR), + (SQLSMALLINT) buffer.sizeBytes(), pcbDiagInfo); makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax); @@ -383,8 +383,8 @@ SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType, (SQLSMALLINT) bufErr.size(), pcbErrorMsg); - makeUTF8(bufState, stateLen, szSqlState, stateLen); - makeUTF8(bufErr, *pcbErrorMsg, szErrorMsg, cbErrorMsgMax); + makeUTF8(bufState, stateLen * sizeof(SQLWCHAR), szSqlState, stateLen); + makeUTF8(bufErr, *pcbErrorMsg * sizeof(SQLWCHAR), szErrorMsg, cbErrorMsgMax); return rc; } @@ -462,11 +462,11 @@ SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt, return SQLGetStmtAttrW(hstmt, fAttribute, (SQLPOINTER) buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(SQLWCHAR), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); } - return SQLGetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax, pcbValue); + return SQLGetStmtAttrW(hstmt, fAttribute, rgbValue, cbValueMax, pcbValue); } @@ -505,7 +505,7 @@ SQLRETURN SQLGetInfo(SQLHDBC hdbc, SQLRETURN rc = SQLGetInfoW(hdbc, fInfoType, (SQLPOINTER) buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(SQLWCHAR), + (SQLSMALLINT) buffer.sizeBytes(), pcbInfoValue); makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax); @@ -595,8 +595,8 @@ SQLRETURN SQLDataSources(SQLHENV henv, (SQLSMALLINT) bufDesc.size(), pcbDesc); - makeUTF8(bufDSN, *pcbDSN, szDSN, cbDSNMax); - makeUTF8(bufDesc, *pcbDesc, szDesc, cbDescMax); + makeUTF8(bufDSN, *pcbDSN * sizeof(SQLWCHAR), szDSN, cbDSNMax); + makeUTF8(bufDesc, *pcbDesc * sizeof(SQLWCHAR), szDesc, cbDescMax); return rc; } @@ -628,7 +628,7 @@ SQLRETURN SQLDriverConnect(SQLHDBC hdbc, pcbConnStrOut, fDriverCompletion); - makeUTF8(out, *pcbConnStrOut, pcbConnStrOut, cbConnStrOutMax); + makeUTF8(out, *pcbConnStrOut * sizeof(SQLWCHAR), pcbConnStrOut, cbConnStrOutMax); return rc; } @@ -653,7 +653,7 @@ SQLRETURN SQLBrowseConnect(SQLHDBC hdbc, (SQLSMALLINT) bufConnStrOut.size(), pcbConnStrOut); - makeUTF8(bufConnStrOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax); + makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(SQLWCHAR), szConnStrOut, cbConnStrOutMax); return rc; } @@ -710,7 +710,7 @@ SQLRETURN SQLNativeSql(SQLHDBC hdbc, (SQLINTEGER) bufSQLOut.size(), pcbSqlStr); - makeUTF8(bufSQLOut, *pcbSqlStr, szSqlStr, cbSqlStrMax); + makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(SQLWCHAR), szSqlStr, cbSqlStrMax); return rc; } @@ -787,8 +787,8 @@ SQLRETURN SQLDrivers(SQLHENV henv, (SQLSMALLINT) bufDriverAttr.size(), pcbDrvrAttr); - makeUTF8(bufDriverDesc, *pcbDriverDesc, szDriverDesc, cbDriverDescMax); - makeUTF8(bufDriverAttr, *pcbDrvrAttr, szDriverAttributes, cbDrvrAttrMax); + makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(SQLWCHAR), szDriverDesc, cbDriverDescMax); + makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(SQLWCHAR), szDriverAttributes, cbDrvrAttrMax); return rc; } diff --git a/Data/ODBC/src/Unicode_WIN32.cpp b/Data/ODBC/src/Unicode_WIN32.cpp index e11de14cf..2513e7e16 100644 --- a/Data/ODBC/src/Unicode_WIN32.cpp +++ b/Data/ODBC/src/Unicode_WIN32.cpp @@ -54,7 +54,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt, SQLUSMALLINT iCol, SQLUSMALLINT iField, SQLPOINTER pCharAttr, - SQLSMALLINT cbCharAttrMax, + SQLSMALLINT cbCharAttrMax, SQLSMALLINT* pcbCharAttr, NumAttrPtrType pNumAttr) { @@ -66,7 +66,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt, iCol, iField, buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(wchar_t), + (SQLSMALLINT) buffer.sizeBytes(), pcbCharAttr, pNumAttr); @@ -78,7 +78,7 @@ SQLRETURN SQLColAttribute(SQLHSTMT hstmt, iCol, iField, pCharAttr, - cbCharAttrMax, + cbCharAttrMax, pcbCharAttr, pNumAttr); } @@ -150,7 +150,7 @@ SQLRETURN SQLDescribeCol(SQLHSTMT hstmt, pibScale, pfNullable); - makeUTF8(buffer, *pcbColName, szColName, cbColNameMax); + makeUTF8(buffer, *pcbColName * sizeof(wchar_t), szColName, cbColNameMax); return rc; } @@ -195,7 +195,7 @@ SQLRETURN SQLGetConnectAttr(SQLHDBC hdbc, SQLRETURN rc = SQLGetConnectAttrW(hdbc, fAttribute, buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(wchar_t), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax); @@ -263,7 +263,7 @@ SQLRETURN SQLGetDescField(SQLHDESC hdesc, iRecord, iField, buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(wchar_t), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); makeUTF8(buffer, *pcbValue, rgbValue, cbValueMax); @@ -312,7 +312,7 @@ SQLRETURN SQLGetDiagField(SQLSMALLINT fHandleType, iRecord, fDiagField, buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(wchar_t), + (SQLSMALLINT) buffer.sizeBytes(), pcbDiagInfo); makeUTF8(buffer, *pcbDiagInfo, rgbDiagInfo, cbDiagInfoMax); @@ -351,8 +351,8 @@ SQLRETURN SQLGetDiagRec(SQLSMALLINT fHandleType, (SQLSMALLINT) bufErr.size(), pcbErrorMsg); - makeUTF8(bufState, stateLen, szSqlState, stateLen); - makeUTF8(bufErr, *pcbErrorMsg, szErrorMsg, cbErrorMsgMax); + makeUTF8(bufState, stateLen * sizeof(wchar_t), szSqlState, stateLen); + makeUTF8(bufErr, *pcbErrorMsg * sizeof(wchar_t), szErrorMsg, cbErrorMsgMax); return rc; } @@ -438,7 +438,7 @@ SQLRETURN SQLGetStmtAttr(SQLHSTMT hstmt, return SQLGetStmtAttrW(hstmt, fAttribute, (SQLPOINTER) buffer.begin(), - (SQLINTEGER) buffer.size() * sizeof(wchar_t), + (SQLINTEGER) buffer.sizeBytes(), pcbValue); } @@ -485,7 +485,7 @@ SQLRETURN SQLGetInfo(SQLHDBC hdbc, SQLRETURN rc = SQLGetInfoW(hdbc, fInfoType, (SQLPOINTER) buffer.begin(), - (SQLSMALLINT) buffer.size() * sizeof(wchar_t), + (SQLSMALLINT) buffer.sizeBytes(), pcbInfoValue); makeUTF8(buffer, *pcbInfoValue, rgbInfoValue, cbInfoValueMax); @@ -579,8 +579,8 @@ SQLRETURN SQLDataSources(SQLHENV henv, (SQLSMALLINT) bufDesc.size(), pcbDesc); - makeUTF8(bufDSN, *pcbDSN, szDSN, cbDSNMax); - makeUTF8(bufDesc, *pcbDesc, szDesc, cbDescMax); + makeUTF8(bufDSN, *pcbDSN * sizeof(wchar_t), szDSN, cbDSNMax); + makeUTF8(bufDesc, *pcbDesc * sizeof(wchar_t), szDesc, cbDescMax); return rc; } @@ -612,7 +612,7 @@ SQLRETURN SQLDriverConnect(SQLHDBC hdbc, pcbConnStrOut, fDriverCompletion); - makeUTF8(bufOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax); + makeUTF8(bufOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax); return rc; } @@ -637,7 +637,7 @@ SQLRETURN SQLBrowseConnect(SQLHDBC hdbc, (SQLSMALLINT) bufConnStrOut.size(), pcbConnStrOut); - makeUTF8(bufConnStrOut, *pcbConnStrOut, szConnStrOut, cbConnStrOutMax); + makeUTF8(bufConnStrOut, *pcbConnStrOut * sizeof(wchar_t), szConnStrOut, cbConnStrOutMax); return rc; } @@ -694,7 +694,7 @@ SQLRETURN SQLNativeSql(SQLHDBC hdbc, (SQLINTEGER) bufSQLOut.size(), pcbSqlStr); - makeUTF8(bufSQLOut, *pcbSqlStr, szSqlStr, cbSqlStrMax); + makeUTF8(bufSQLOut, *pcbSqlStr * sizeof(wchar_t), szSqlStr, cbSqlStrMax); return rc; } @@ -771,8 +771,8 @@ SQLRETURN SQLDrivers(SQLHENV henv, (SQLSMALLINT) bufDriverAttr.size(), pcbDrvrAttr); - makeUTF8(bufDriverDesc, *pcbDriverDesc, szDriverDesc, cbDriverDescMax); - makeUTF8(bufDriverAttr, *pcbDrvrAttr, szDriverAttributes, cbDrvrAttrMax); + makeUTF8(bufDriverDesc, *pcbDriverDesc * sizeof(wchar_t), szDriverDesc, cbDriverDescMax); + makeUTF8(bufDriverAttr, *pcbDrvrAttr * sizeof(wchar_t), szDriverAttributes, cbDrvrAttrMax); return rc; } diff --git a/Data/ODBC/testsuite/Makefile b/Data/ODBC/testsuite/Makefile index e48c7e4db..2fe7e4340 100644 --- a/Data/ODBC/testsuite/Makefile +++ b/Data/ODBC/testsuite/Makefile @@ -20,7 +20,10 @@ include $(POCO_BASE)/Data/ODBC/ODBC.make # Note: # # Do not change linking order or move this line up, these libs have to be linked in this order. # ################################################################################################## -SYSLIBS += -lltdl -ldl +SYSLIBS += -lltdl +ifneq ($(POCO_CONFIG),FreeBSD) +SYSLIBS += -ldl +endif objects = ODBCTestSuite Driver \ ODBCDB2Test ODBCMySQLTest ODBCOracleTest ODBCPostgreSQLTest \ diff --git a/Data/SQLite/include/Poco/Data/SQLite/Extractor.h b/Data/SQLite/include/Poco/Data/SQLite/Extractor.h index 30ded04fe..d95dd184e 100644 --- a/Data/SQLite/include/Poco/Data/SQLite/Extractor.h +++ b/Data/SQLite/include/Poco/Data/SQLite/Extractor.h @@ -48,6 +48,8 @@ #include "Poco/Data/Constants.h" #include "Poco/Data/Date.h" #include "Poco/Data/Time.h" +#include "Poco/Data/Date.h" +#include "Poco/Data/Time.h" #include "Poco/Any.h" #include "Poco/DynamicAny.h" #include "sqlite3.h" diff --git a/Data/SQLite/include/Poco/Data/SQLite/SQLite.h b/Data/SQLite/include/Poco/Data/SQLite/SQLite.h index b9b9fa2e8..a971d57a7 100644 --- a/Data/SQLite/include/Poco/Data/SQLite/SQLite.h +++ b/Data/SQLite/include/Poco/Data/SQLite/SQLite.h @@ -63,7 +63,11 @@ #if !defined(SQLite_API) - #define SQLite_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define SQLite_API __attribute__ ((visibility ("default"))) + #else + #define SQLite_API + #endif #endif diff --git a/Data/include/Poco/Data/Data.h b/Data/include/Poco/Data/Data.h index 0b8005a8e..b473149a3 100644 --- a/Data/include/Poco/Data/Data.h +++ b/Data/include/Poco/Data/Data.h @@ -63,7 +63,11 @@ #if !defined(Data_API) - #define Data_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Data_API __attribute__ ((visibility ("default"))) + #else + #define Data_API + #endif #endif diff --git a/Data/include/Poco/Data/LOB.h b/Data/include/Poco/Data/LOB.h index 456fe676c..e2b1f7392 100644 --- a/Data/include/Poco/Data/LOB.h +++ b/Data/include/Poco/Data/LOB.h @@ -45,6 +45,7 @@ #include "Poco/Dynamic/VarHolder.h" #include "Poco/Exception.h" #include +#include namespace Poco { @@ -221,6 +222,7 @@ inline void swap(LOB& b1, LOB& b2) namespace std { + using std::swap; template<> inline void swap(Poco::Data::BLOB& b1, Poco::Data::BLOB& b2) diff --git a/Data/include/Poco/Data/RowIterator.h b/Data/include/Poco/Data/RowIterator.h index 91c42e18d..047cb6e49 100644 --- a/Data/include/Poco/Data/RowIterator.h +++ b/Data/include/Poco/Data/RowIterator.h @@ -44,6 +44,7 @@ #include "Poco/Data/Row.h" #include "Poco/Dynamic/Var.h" #include +#include namespace Poco { @@ -158,6 +159,7 @@ inline bool RowIterator::operator != (const RowIterator& other) const namespace std { + using std::swap; template<> inline void swap(Poco::Data::RowIterator& s1, Poco::Data::RowIterator& s2) diff --git a/Data/include/Poco/Data/Session.h b/Data/include/Poco/Data/Session.h index 16b0abf99..1fbe6046a 100644 --- a/Data/include/Poco/Data/Session.h +++ b/Data/include/Poco/Data/Session.h @@ -47,6 +47,7 @@ #include "Poco/Data/Binding.h" #include "Poco/AutoPtr.h" #include "Poco/Any.h" +#include namespace Poco { @@ -502,6 +503,7 @@ inline void swap(Session& s1, Session& s2) namespace std { + using std::swap; template<> inline void swap(Poco::Data::Session& s1, Poco::Data::Session& s2) diff --git a/Data/include/Poco/Data/Statement.h b/Data/include/Poco/Data/Statement.h index f95d52057..d983dda05 100644 --- a/Data/include/Poco/Data/Statement.h +++ b/Data/include/Poco/Data/Statement.h @@ -51,6 +51,7 @@ #include "Poco/ActiveMethod.h" #include "Poco/ActiveResult.h" #include "Poco/Format.h" +#include namespace Poco { @@ -834,6 +835,7 @@ inline void swap(Statement& s1, Statement& s2) namespace std { + using std::swap; template<> inline void swap(Poco::Data::Statement& s1, Poco::Data::Statement& s2) diff --git a/Data/include/Poco/Data/TypeHandler.h b/Data/include/Poco/Data/TypeHandler.h index e206d34c8..3a94b6352 100644 --- a/Data/include/Poco/Data/TypeHandler.h +++ b/Data/include/Poco/Data/TypeHandler.h @@ -294,11 +294,11 @@ public: poco_assert_dbg (pPreparator != 0); if (obj.isNull()) { - pPreparator->prepare(pos++, (Poco::Any&)Poco::Data::Keywords::null); + pPreparator->prepare(pos++, Poco::Data::Keywords::null); } else { - pPreparator->prepare(pos++, (T&)obj.value()); + pPreparator->prepare(pos++, obj.value()); } } diff --git a/Data/samples/RecordSet/src/RecordSet.cpp b/Data/samples/RecordSet/src/RecordSet.cpp index 1d20d139a..a1a4823fb 100644 --- a/Data/samples/RecordSet/src/RecordSet.cpp +++ b/Data/samples/RecordSet/src/RecordSet.cpp @@ -71,8 +71,10 @@ int main(int argc, char** argv) session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3), Birthday DATE)", now; // insert some rows - session << "INSERT INTO Person VALUES('Bart Simpson', 'Springfield', 12, ?)", use(DateTime(1980, 4, 1)), now; - session << "INSERT INTO Person VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(DateTime(1982, 5, 9)), now; + DateTime bd(1980, 4, 1); + DateTime ld(1982, 5, 9); + session << "INSERT INTO Person VALUES('Bart Simpson', 'Springfield', 12, ?)", use(bd), now; + session << "INSERT INTO Person VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(ld), now; // a simple query Statement select(session); diff --git a/Data/samples/RowFormatter/src/RowFormatter.cpp b/Data/samples/RowFormatter/src/RowFormatter.cpp index 3b9073393..f2b93cb19 100644 --- a/Data/samples/RowFormatter/src/RowFormatter.cpp +++ b/Data/samples/RowFormatter/src/RowFormatter.cpp @@ -116,10 +116,14 @@ int main(int argc, char** argv) session << "CREATE TABLE Simpsons (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3), Birthday DATE)", now; // insert some rows - session << "INSERT INTO Simpsons VALUES('Homer Simpson', 'Springfield', 42, ?)", use(DateTime(1956, 3, 1)), now; - session << "INSERT INTO Simpsons VALUES('Marge Simpson', 'Springfield', 38, ?)", use(DateTime(1954, 10, 1)), now; - session << "INSERT INTO Simpsons VALUES('Bart Simpson', 'Springfield', 12, ?)", use(DateTime(1980, 4, 1)), now; - session << "INSERT INTO Simpsons VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(DateTime(1982, 5, 9)), now; + DateTime hd(1956, 3, 1); + session << "INSERT INTO Simpsons VALUES('Homer Simpson', 'Springfield', 42, ?)", use(hd), now; + DateTime md(1954, 10, 1); + session << "INSERT INTO Simpsons VALUES('Marge Simpson', 'Springfield', 38, ?)", use(md), now; + DateTime bd(1980, 4, 1); + session << "INSERT INTO Simpsons VALUES('Bart Simpson', 'Springfield', 12, ?)", use(bd), now; + DateTime ld(1982, 5, 9); + session << "INSERT INTO Simpsons VALUES('Lisa Simpson', 'Springfield', 10, ?)", use(ld), now; // create a statement and print the column names and data as HTML table HTMLTableFormatter tf; diff --git a/Foundation/Foundation_CE_vs90.vcproj b/Foundation/Foundation_CE_vs90.vcproj index 1410a1cb5..f3b552211 100644 --- a/Foundation/Foundation_CE_vs90.vcproj +++ b/Foundation/Foundation_CE_vs90.vcproj @@ -6217,6 +6217,10 @@ /> + + @@ -6601,6 +6605,10 @@ RelativePath=".\include\Poco\Environment_WINCE.h" > + + diff --git a/Foundation/Foundation_vs110.sln b/Foundation/Foundation_vs110.sln index 9d6c8230a..21faa17af 100644 --- a/Foundation/Foundation_vs110.sln +++ b/Foundation/Foundation_vs110.sln @@ -15,7 +15,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLibrary", "testsuite\Te EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSuite", "testsuite\TestSuite_vs110.vcxproj", "{F1EE93DF-347F-4CB3-B191-C4E63F38E972}" ProjectSection(ProjectDependencies) = postProject + {0955EB03-544B-4BD4-9C10-89CF38078F5F} = {0955EB03-544B-4BD4-9C10-89CF38078F5F} {8164D41D-B053-405B-826C-CF37AC0EF176} = {8164D41D-B053-405B-826C-CF37AC0EF176} + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A} = {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A} EndProjectSection EndProject Global @@ -28,30 +30,6 @@ Global release_static_mt|Win32 = release_static_mt|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.ActiveCfg = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.Build.0 = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.ActiveCfg = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.Build.0 = debug_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.Build.0 = release_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.ActiveCfg = release_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.Build.0 = release_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.ActiveCfg = release_shared|Win32 - {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.Build.0 = release_shared|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.Build.0 = debug_shared|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.Build.0 = release_shared|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.Build.0 = release_static_md|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 {8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {8164D41D-B053-405B-826C-CF37AC0EF176}.debug_shared|Win32.Build.0 = debug_shared|Win32 {8164D41D-B053-405B-826C-CF37AC0EF176}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 @@ -64,6 +42,30 @@ Global {8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_md|Win32.Build.0 = release_static_md|Win32 {8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 {8164D41D-B053-405B-826C-CF37AC0EF176}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_shared|Win32.Build.0 = release_shared|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_md|Win32.Build.0 = release_static_md|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {6C41E55D-C0FC-4E01-AA8D-B7DA40E31D3A}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.ActiveCfg = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_md|Win32.Build.0 = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.ActiveCfg = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.debug_static_mt|Win32.Build.0 = debug_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_shared|Win32.Build.0 = release_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.ActiveCfg = release_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_md|Win32.Build.0 = release_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.ActiveCfg = release_shared|Win32 + {0955EB03-544B-4BD4-9C10-89CF38078F5F}.release_static_mt|Win32.Build.0 = release_shared|Win32 {F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_shared|Win32.Build.0 = debug_shared|Win32 {F1EE93DF-347F-4CB3-B191-C4E63F38E972}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 diff --git a/Foundation/Foundation_vs110.vcxproj b/Foundation/Foundation_vs110.vcxproj index 1af432b66..30e807248 100644 --- a/Foundation/Foundation_vs110.vcxproj +++ b/Foundation/Foundation_vs110.vcxproj @@ -334,6 +334,7 @@ true true + @@ -1004,6 +1005,7 @@ + diff --git a/Foundation/Foundation_vs110.vcxproj.filters b/Foundation/Foundation_vs110.vcxproj.filters index 512dc207d..ba3474bac 100644 --- a/Foundation/Foundation_vs110.vcxproj.filters +++ b/Foundation/Foundation_vs110.vcxproj.filters @@ -222,6 +222,9 @@ Core\Source Files + + Core\Source Files + Core\Source Files @@ -953,6 +956,9 @@ Core\Header Files + + Core\Header Files + Core\Header Files diff --git a/Foundation/Foundation_vs80.vcproj b/Foundation/Foundation_vs80.vcproj index 8d16d82ca..c321e3157 100644 --- a/Foundation/Foundation_vs80.vcproj +++ b/Foundation/Foundation_vs80.vcproj @@ -735,6 +735,10 @@ /> + + @@ -1123,6 +1127,10 @@ RelativePath=".\include\Poco\Environment_WIN32U.h" > + + diff --git a/Foundation/Foundation_vs90.vcproj b/Foundation/Foundation_vs90.vcproj index 5be3445e2..3bb20cf15 100644 --- a/Foundation/Foundation_vs90.vcproj +++ b/Foundation/Foundation_vs90.vcproj @@ -732,6 +732,10 @@ /> + + @@ -1120,6 +1124,10 @@ RelativePath=".\include\Poco\Environment_WIN32U.h" > + + diff --git a/Foundation/Foundation_x64_vs100.vcxproj b/Foundation/Foundation_x64_vs100.vcxproj index 11ab74d76..94b8ceb6a 100644 --- a/Foundation/Foundation_x64_vs100.vcxproj +++ b/Foundation/Foundation_x64_vs100.vcxproj @@ -334,6 +334,7 @@ true true + @@ -1003,6 +1004,7 @@ + diff --git a/Foundation/Foundation_x64_vs100.vcxproj.filters b/Foundation/Foundation_x64_vs100.vcxproj.filters index 84d3fcef9..94b5ee37e 100644 --- a/Foundation/Foundation_x64_vs100.vcxproj.filters +++ b/Foundation/Foundation_x64_vs100.vcxproj.filters @@ -222,6 +222,9 @@ Core\Source Files + + Core\Source Files + Core\Source Files @@ -953,6 +956,9 @@ Core\Header Files + + Core\Header Files + Core\Header Files diff --git a/Foundation/Foundation_x64_vs110.vcxproj b/Foundation/Foundation_x64_vs110.vcxproj index befff146f..13a842e3a 100644 --- a/Foundation/Foundation_x64_vs110.vcxproj +++ b/Foundation/Foundation_x64_vs110.vcxproj @@ -340,6 +340,7 @@ true true + @@ -1009,6 +1010,7 @@ + diff --git a/Foundation/Foundation_x64_vs110.vcxproj.filters b/Foundation/Foundation_x64_vs110.vcxproj.filters index 84d3fcef9..94b5ee37e 100644 --- a/Foundation/Foundation_x64_vs110.vcxproj.filters +++ b/Foundation/Foundation_x64_vs110.vcxproj.filters @@ -222,6 +222,9 @@ Core\Source Files + + Core\Source Files + Core\Source Files @@ -953,6 +956,9 @@ Core\Header Files + + Core\Header Files + Core\Header Files diff --git a/Foundation/Foundation_x64_vs90.vcproj b/Foundation/Foundation_x64_vs90.vcproj index d47d6a431..886387cc9 100644 --- a/Foundation/Foundation_x64_vs90.vcproj +++ b/Foundation/Foundation_x64_vs90.vcproj @@ -738,6 +738,10 @@ /> + + @@ -1126,6 +1130,10 @@ RelativePath=".\include\Poco\Environment_WIN32U.h" > + + diff --git a/Foundation/include/Poco/Buffer.h b/Foundation/include/Poco/Buffer.h index 4aedf38ec..cefdc9267 100644 --- a/Foundation/include/Poco/Buffer.h +++ b/Foundation/include/Poco/Buffer.h @@ -51,9 +51,8 @@ namespace Poco { template class Buffer - /// A very simple buffer class that allocates a buffer of - /// a given type and size in the constructor and - /// deallocates the buffer in the destructor. + /// A buffer class that allocates a buffer of a given type and size + /// in the constructor and deallocates the buffer in the destructor. /// /// This class is useful everywhere where a temporary buffer /// is needed. @@ -179,11 +178,17 @@ public: } std::size_t capacity() const - /// Returns the allocated memory size. + /// Returns the allocated memory size in elements. { return _capacity; } + std::size_t capacityBytes() const + /// Returns the allocated memory size in bytes. + { + return _capacity * sizeof(T); + } + void swap(Buffer& other) /// Swaps the buffer with another one. { @@ -225,10 +230,16 @@ public: } std::size_t size() const - /// Returns the used size of the buffer. + /// Returns the used size of the buffer in elements. { return _used; } + + std::size_t sizeBytes() const + /// Returns the used size of the buffer in bytes. + { + return _used * sizeof(T); + } T* begin() /// Returns a pointer to the beginning of the buffer. diff --git a/Foundation/include/Poco/Foundation.h b/Foundation/include/Poco/Foundation.h index 3a062d8b7..65998ba7d 100644 --- a/Foundation/include/Poco/Foundation.h +++ b/Foundation/include/Poco/Foundation.h @@ -76,7 +76,11 @@ #if !defined(Foundation_API) - #define Foundation_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Foundation_API __attribute__ ((visibility ("default"))) + #else + #define Foundation_API + #endif #endif diff --git a/Foundation/include/Poco/Path_WIN32.h b/Foundation/include/Poco/Path_WIN32.h index 956b6ae19..066c64a1d 100644 --- a/Foundation/include/Poco/Path_WIN32.h +++ b/Foundation/include/Poco/Path_WIN32.h @@ -54,6 +54,7 @@ public: static std::string homeImpl(); static std::string tempImpl(); static std::string nullImpl(); + static std::string systemImpl(); static std::string expandImpl(const std::string& path); static void listRootsImpl(std::vector& roots); }; diff --git a/Foundation/include/Poco/Path_WIN32U.h b/Foundation/include/Poco/Path_WIN32U.h index ac05a4629..f12c71894 100644 --- a/Foundation/include/Poco/Path_WIN32U.h +++ b/Foundation/include/Poco/Path_WIN32U.h @@ -54,6 +54,7 @@ public: static std::string homeImpl(); static std::string tempImpl(); static std::string nullImpl(); + static std::string systemImpl(); static std::string expandImpl(const std::string& path); static void listRootsImpl(std::vector& roots); diff --git a/Foundation/include/Poco/Path_WINCE.h b/Foundation/include/Poco/Path_WINCE.h index ef6b9f06a..dc3a12647 100644 --- a/Foundation/include/Poco/Path_WINCE.h +++ b/Foundation/include/Poco/Path_WINCE.h @@ -55,6 +55,7 @@ public: static std::string homeImpl(); static std::string tempImpl(); static std::string nullImpl(); + static std::string systemImpl(); static std::string expandImpl(const std::string& path); static void listRootsImpl(std::vector& roots); diff --git a/Foundation/include/Poco/PatternFormatter.h b/Foundation/include/Poco/PatternFormatter.h index 9f19ff294..6f7e75c11 100644 --- a/Foundation/include/Poco/PatternFormatter.h +++ b/Foundation/include/Poco/PatternFormatter.h @@ -44,6 +44,7 @@ #include "Poco/Formatter.h" #include "Poco/Message.h" +#include namespace Poco { @@ -91,6 +92,7 @@ class Foundation_API PatternFormatter: public Formatter /// * %z - time zone differential in ISO 8601 format (Z or +NN.NN) /// * %Z - time zone differential in RFC format (GMT or +NNNN) /// * %E - epoch time (UTC, seconds since midnight, January 1, 1970) + /// * %v[width] - the message source (%s) but text length is padded/cropped to 'width' /// * %[name] - the value of the message parameter with the given name /// * %% - percent sign @@ -138,8 +140,27 @@ protected: /// Returns a string for the given priority value. private: - bool _localTime; - std::string _pattern; + + struct PatternAction + { + PatternAction(): key(0), length(0) {} + + char key; + int length; + std::string property; + std::string prepend; + }; + + std::vector _patternActions; + bool _localTime; + Timestamp::TimeDiff _localTimeOffset; + std::string _pattern; + + + void ParsePattern(); + /// Will parse the _pattern string into the vector of PatternActions, + /// which contains the message key, any text that needs to be written first + /// a proprety in case of %[] and required length. }; diff --git a/Foundation/include/Poco/String.h b/Foundation/include/Poco/String.h index ea2e26093..ace024aa6 100644 --- a/Foundation/include/Poco/String.h +++ b/Foundation/include/Poco/String.h @@ -44,6 +44,7 @@ #include "Poco/Ascii.h" #include #include +#include namespace Poco { diff --git a/Foundation/include/Poco/Token.h b/Foundation/include/Poco/Token.h index fb1a910be..dea7faa1b 100644 --- a/Foundation/include/Poco/Token.h +++ b/Foundation/include/Poco/Token.h @@ -105,8 +105,13 @@ public: virtual std::string asString() const; /// Returns a string representation of the token. +#if defined(POCO_HAVE_INT64) + virtual Int64 asInteger() const; + /// Returns a 64-bit integer representation of the token. +#else virtual int asInteger() const; /// Returns an integer representation of the token. +#endif virtual double asFloat() const; /// Returns a floating-point representation of the token. diff --git a/Foundation/src/Path.cpp b/Foundation/src/Path.cpp index acc19dfce..c96bd956c 100644 --- a/Foundation/src/Path.cpp +++ b/Foundation/src/Path.cpp @@ -599,7 +599,7 @@ Path& Path::clear() _dirs.clear(); _version.clear(); _absolute = false; - return *this; + return *this; } diff --git a/Foundation/src/Path_WIN32.cpp b/Foundation/src/Path_WIN32.cpp index f38d6594a..4b6c68640 100644 --- a/Foundation/src/Path_WIN32.cpp +++ b/Foundation/src/Path_WIN32.cpp @@ -57,10 +57,36 @@ std::string PathImpl::currentImpl() } +std::string PathImpl::systemImpl() +{ + char buffer[MAX_PATH]; + DWORD n = GetSystemDirectoryA(buffer, sizeof(buffer)); + if (n > 0 && n < sizeof(buffer)) + { + std::string result(buffer, n); + if (result[n - 1] != '\\') + result.append("\\"); + return result; + } + else throw SystemException("Cannot get system directory"); +} + + std::string PathImpl::homeImpl() { - std::string result = EnvironmentImpl::getImpl("HOMEDRIVE"); - result.append(EnvironmentImpl::getImpl("HOMEPATH")); + std::string result; + + // windows service has no home dir, return system directory instead + try + { + result = EnvironmentImpl::getImpl("HOMEDRIVE"); + result.append(EnvironmentImpl::getImpl("HOMEPATH")); + } + catch (NotFoundException&) + { + result = systemImpl(); + } + std::string::size_type n = result.size(); if (n > 0 && result[n - 1] != '\\') result.append("\\"); diff --git a/Foundation/src/Path_WIN32U.cpp b/Foundation/src/Path_WIN32U.cpp index d9fe50003..99b162ffa 100644 --- a/Foundation/src/Path_WIN32U.cpp +++ b/Foundation/src/Path_WIN32U.cpp @@ -65,10 +65,38 @@ std::string PathImpl::currentImpl() } +std::string PathImpl::systemImpl() +{ + Buffer buffer(MAX_PATH_LEN); + DWORD n = GetSystemDirectoryW(buffer.begin(), static_cast(buffer.size())); + if (n > 0) + { + n = GetLongPathNameW(buffer.begin(), buffer.begin(), static_cast(buffer.size())); + if (n <= 0) throw SystemException("Cannot get system directory long path name"); + std::string result; + UnicodeConverter::toUTF8(buffer.begin(), result); + if (result[result.size() - 1] != '\\') result.append("\\"); + return result; + } + throw SystemException("Cannot get temporary directory path"); +} + + std::string PathImpl::homeImpl() { - std::string result = EnvironmentImpl::getImpl("HOMEDRIVE"); - result.append(EnvironmentImpl::getImpl("HOMEPATH")); + std::string result; + + // windows service has no home dir, return system directory instead + try + { + result = EnvironmentImpl::getImpl("HOMEDRIVE"); + result.append(EnvironmentImpl::getImpl("HOMEPATH")); + } + catch (NotFoundException&) + { + result = systemImpl(); + } + std::string::size_type n = result.size(); if (n > 0 && result[n - 1] != '\\') result.append("\\"); diff --git a/Foundation/src/Path_WINCE.cpp b/Foundation/src/Path_WINCE.cpp index 612711407..8c02a76e0 100644 --- a/Foundation/src/Path_WINCE.cpp +++ b/Foundation/src/Path_WINCE.cpp @@ -58,19 +58,9 @@ std::string PathImpl::homeImpl() } -std::string PathImpl::tempImpl() +std::string PathImpl::systemImpl() { - Buffer buffer(MAX_PATH_LEN); - DWORD n = GetTempPathW(static_cast(buffer.size()), buffer.begin()); - if (n > 0) - { - std::string result; - UnicodeConverter::toUTF8(buffer.begin(), result); - if (result[n - 1] != '\\') - result.append("\\"); - return result; - } - throw SystemException("Cannot get current directory"); + return("\\"); } diff --git a/Foundation/src/PatternFormatter.cpp b/Foundation/src/PatternFormatter.cpp index d8b9d66bf..71748f413 100644 --- a/Foundation/src/PatternFormatter.cpp +++ b/Foundation/src/PatternFormatter.cpp @@ -43,6 +43,7 @@ #include "Poco/Timestamp.h" #include "Poco/Timezone.h" #include "Poco/Environment.h" +#include "Poco/NumberParser.h" namespace Poco { @@ -53,15 +54,18 @@ const std::string PatternFormatter::PROP_TIMES = "times"; PatternFormatter::PatternFormatter(): - _localTime(false) + _localTime(false), + _localTimeOffset(0) { } PatternFormatter::PatternFormatter(const std::string& format): _localTime(false), + _localTimeOffset(0), _pattern(format) { + ParsePattern(); } @@ -75,86 +79,139 @@ void PatternFormatter::format(const Message& msg, std::string& text) Timestamp timestamp = msg.getTime(); if (_localTime) { - timestamp += Timezone::utcOffset()*Timestamp::resolution(); - timestamp += Timezone::dst()*Timestamp::resolution(); + timestamp += _localTimeOffset; } DateTime dateTime = timestamp; + for (std::vector::iterator ip = _patternActions.begin(); ip != _patternActions.end(); ++ip) + { + text.append(ip->prepend); + switch (ip->key) + { + case 's': text.append(msg.getSource()); break; + case 't': text.append(msg.getText()); break; + case 'l': NumberFormatter::append(text, (int) msg.getPriority()); break; + case 'p': text.append(getPriorityName((int) msg.getPriority())); break; + case 'q': text += getPriorityName((int) msg.getPriority()).at(0); break; + case 'P': NumberFormatter::append(text, msg.getPid()); break; + case 'T': text.append(msg.getThread()); break; + case 'I': NumberFormatter::append(text, msg.getTid()); break; + case 'N': text.append(Environment::nodeName()); break; + case 'U': text.append(msg.getSourceFile() ? msg.getSourceFile() : ""); break; + case 'u': NumberFormatter::append(text, msg.getSourceLine()); break; + case 'w': text.append(DateTimeFormat::WEEKDAY_NAMES[dateTime.dayOfWeek()], 0, 3); break; + case 'W': text.append(DateTimeFormat::WEEKDAY_NAMES[dateTime.dayOfWeek()]); break; + case 'b': text.append(DateTimeFormat::MONTH_NAMES[dateTime.month() - 1], 0, 3); break; + case 'B': text.append(DateTimeFormat::MONTH_NAMES[dateTime.month() - 1]); break; + case 'd': NumberFormatter::append0(text, dateTime.day(), 2); break; + case 'e': NumberFormatter::append(text, dateTime.day()); break; + case 'f': NumberFormatter::append(text, dateTime.day(), 2); break; + case 'm': NumberFormatter::append0(text, dateTime.month(), 2); break; + case 'n': NumberFormatter::append(text, dateTime.month()); break; + case 'o': NumberFormatter::append(text, dateTime.month(), 2); break; + case 'y': NumberFormatter::append0(text, dateTime.year() % 100, 2); break; + case 'Y': NumberFormatter::append0(text, dateTime.year(), 4); break; + case 'H': NumberFormatter::append0(text, dateTime.hour(), 2); break; + case 'h': NumberFormatter::append0(text, dateTime.hourAMPM(), 2); break; + case 'a': text.append(dateTime.isAM() ? "am" : "pm"); break; + case 'A': text.append(dateTime.isAM() ? "AM" : "PM"); break; + case 'M': NumberFormatter::append0(text, dateTime.minute(), 2); break; + case 'S': NumberFormatter::append0(text, dateTime.second(), 2); break; + case 'i': NumberFormatter::append0(text, dateTime.millisecond(), 3); break; + case 'c': NumberFormatter::append(text, dateTime.millisecond()/100); break; + case 'F': NumberFormatter::append0(text, dateTime.millisecond()*1000 + dateTime.microsecond(), 6); break; + case 'z': text.append(DateTimeFormatter::tzdISO(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break; + case 'Z': text.append(DateTimeFormatter::tzdRFC(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break; + case 'E': NumberFormatter::append(text, msg.getTime().epochTime()); break; + case 'v': + if (ip->length > msg.getSource().length()) //append spaces + text.append(msg.getSource()).append(ip->length - msg.getSource().length(), ' '); + else if (ip->length && ip->length < msg.getSource().length()) // crop + text.append(msg.getSource(), msg.getSource().length()-ip->length, ip->length); + else + text.append(msg.getSource()); + break; + case 'x': + try + { + text.append(msg[ip->property]); + } + catch (...) + { + } + break; + } + } +} + +void PatternFormatter::ParsePattern() +{ + _patternActions.clear(); std::string::const_iterator it = _pattern.begin(); std::string::const_iterator end = _pattern.end(); + PatternAction end_act; while (it != end) { if (*it == '%') { if (++it != end) { - switch (*it) - { - case 's': text.append(msg.getSource()); break; - case 't': text.append(msg.getText()); break; - case 'l': NumberFormatter::append(text, (int) msg.getPriority()); break; - case 'p': text.append(getPriorityName((int) msg.getPriority())); break; - case 'q': text += getPriorityName((int) msg.getPriority()).at(0); break; - case 'P': NumberFormatter::append(text, msg.getPid()); break; - case 'T': text.append(msg.getThread()); break; - case 'I': NumberFormatter::append(text, msg.getTid()); break; - case 'N': text.append(Environment::nodeName()); break; - case 'U': text.append(msg.getSourceFile() ? msg.getSourceFile() : ""); break; - case 'u': NumberFormatter::append(text, msg.getSourceLine()); break; - case 'w': text.append(DateTimeFormat::WEEKDAY_NAMES[dateTime.dayOfWeek()], 0, 3); break; - case 'W': text.append(DateTimeFormat::WEEKDAY_NAMES[dateTime.dayOfWeek()]); break; - case 'b': text.append(DateTimeFormat::MONTH_NAMES[dateTime.month() - 1], 0, 3); break; - case 'B': text.append(DateTimeFormat::MONTH_NAMES[dateTime.month() - 1]); break; - case 'd': NumberFormatter::append0(text, dateTime.day(), 2); break; - case 'e': NumberFormatter::append(text, dateTime.day()); break; - case 'f': NumberFormatter::append(text, dateTime.day(), 2); break; - case 'm': NumberFormatter::append0(text, dateTime.month(), 2); break; - case 'n': NumberFormatter::append(text, dateTime.month()); break; - case 'o': NumberFormatter::append(text, dateTime.month(), 2); break; - case 'y': NumberFormatter::append0(text, dateTime.year() % 100, 2); break; - case 'Y': NumberFormatter::append0(text, dateTime.year(), 4); break; - case 'H': NumberFormatter::append0(text, dateTime.hour(), 2); break; - case 'h': NumberFormatter::append0(text, dateTime.hourAMPM(), 2); break; - case 'a': text.append(dateTime.isAM() ? "am" : "pm"); break; - case 'A': text.append(dateTime.isAM() ? "AM" : "PM"); break; - case 'M': NumberFormatter::append0(text, dateTime.minute(), 2); break; - case 'S': NumberFormatter::append0(text, dateTime.second(), 2); break; - case 'i': NumberFormatter::append0(text, dateTime.millisecond(), 3); break; - case 'c': NumberFormatter::append(text, dateTime.millisecond()/100); break; - case 'F': NumberFormatter::append0(text, dateTime.millisecond()*1000 + dateTime.microsecond(), 6); break; - case 'z': text.append(DateTimeFormatter::tzdISO(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break; - case 'Z': text.append(DateTimeFormatter::tzdRFC(_localTime ? Timezone::tzd() : DateTimeFormatter::UTC)); break; - case 'E': NumberFormatter::append(text, msg.getTime().epochTime()); break; - case '[': + PatternAction act; + act.prepend = end_act.prepend; + end_act.prepend.clear(); + + if(*it == '[') { + act.key='x'; ++it; std::string prop; while (it != end && *it != ']') prop += *it++; if (it == end) --it; - try - { - text.append(msg[prop]); - } - catch (...) - { - } - break; + act.property = prop; } - default: text += *it; + else + { + act.key=*it; + if ((it+1) != end && *(it+1) == '[') + { + it+=2; + std::string number; + while (it != end && *it != ']') number += *it++; + if (it == end) --it; + try + { + act.length = NumberParser::parse(number); + } + catch(...) + { + } + } } + _patternActions.push_back(act); ++it; } } - else text += *it++; + else + { + end_act.prepend += *it++; + } } + if( end_act.prepend.size()) + _patternActions.push_back(end_act); } void PatternFormatter::setProperty(const std::string& name, const std::string& value) { if (name == PROP_PATTERN) + { _pattern = value; + ParsePattern(); + } else if (name == PROP_TIMES) + { _localTime = (value == "local"); + _localTimeOffset = Timestamp::resolution()*( Timezone::utcOffset() + Timezone::dst() ); + } else Formatter::setProperty(name, value); } diff --git a/Foundation/src/Thread_WIN32.cpp b/Foundation/src/Thread_WIN32.cpp index cd402fe0e..fb227610f 100644 --- a/Foundation/src/Thread_WIN32.cpp +++ b/Foundation/src/Thread_WIN32.cpp @@ -101,7 +101,7 @@ ThreadImpl::ThreadImpl(): { } - + ThreadImpl::~ThreadImpl() { if (_thread) CloseHandle(_thread); diff --git a/Foundation/src/Token.cpp b/Foundation/src/Token.cpp index 6eaa6892f..d63386958 100644 --- a/Foundation/src/Token.cpp +++ b/Foundation/src/Token.cpp @@ -76,12 +76,27 @@ std::string Token::asString() const } +#if defined(POCO_HAVE_INT64) + + +Int64 Token::asInteger() const +{ + return NumberParser::parse64(_value); +} + + +#else + + int Token::asInteger() const { return NumberParser::parse(_value); } +#endif + + double Token::asFloat() const { return NumberParser::parseFloat(_value); diff --git a/Foundation/testsuite/src/CoreTest.cpp b/Foundation/testsuite/src/CoreTest.cpp index 5e4fe4d06..f96f676eb 100644 --- a/Foundation/testsuite/src/CoreTest.cpp +++ b/Foundation/testsuite/src/CoreTest.cpp @@ -128,10 +128,10 @@ void CoreTest::testFixedLength() assert (sizeof(Poco::UInt16) == 2); assert (sizeof(Poco::Int32) == 4); assert (sizeof(Poco::UInt32) == 4); - #if defined(POCO_HAVE_INT64) +#if defined(POCO_HAVE_INT64) assert (sizeof(Poco::Int64) == 8); assert (sizeof(Poco::UInt64) == 8); - #endif +#endif assert (sizeof(Poco::IntPtr) == sizeof(void*)); assert (sizeof(Poco::UIntPtr) == sizeof(void*)); } @@ -201,7 +201,9 @@ void CoreTest::testBuffer() std::size_t s = 10; Buffer b(s); assert (b.size() == s); + assert (b.sizeBytes() == s * sizeof(int)); assert (b.capacity() == s); + assert (b.capacityBytes() == s * sizeof(int)); std::vector v; for (int i = 0; i < s; ++i) v.push_back(i); diff --git a/Foundation/testsuite/src/PathTest.cpp b/Foundation/testsuite/src/PathTest.cpp index 3f5ec1123..924e1cb1d 100644 --- a/Foundation/testsuite/src/PathTest.cpp +++ b/Foundation/testsuite/src/PathTest.cpp @@ -39,6 +39,15 @@ #include "Poco/Environment.h" #include +#if defined(POCO_OS_FAMILY_WINDOWS) && defined(POCO_WIN32_UTF8) +#if defined(_WIN32_WCE) +#include "Poco/Path_WINCE.h" +#else +#include "Poco/Path_WIN32U.h" +#endif +#elif defined(POCO_OS_FAMILY_WINDOWS) +#include "Poco/Path_WIN32.h" +#endif using Poco::Path; using Poco::PathSyntaxException; @@ -1625,6 +1634,14 @@ void PathTest::testPushPop() } +void PathTest::testWindowsSystem() +{ +#if defined(POCO_OS_FAMILY_WINDOWS) + std::cout << Poco::PathImpl::systemImpl() << std::endl; +#endif +} + + void PathTest::setUp() { } @@ -1666,6 +1683,7 @@ CppUnit::Test* PathTest::suite() CppUnit_addTest(pSuite, PathTest, testSwap); CppUnit_addTest(pSuite, PathTest, testResolve); CppUnit_addTest(pSuite, PathTest, testPushPop); + CppUnit_addTest(pSuite, PathTest, testWindowsSystem); return pSuite; } diff --git a/Foundation/testsuite/src/PathTest.h b/Foundation/testsuite/src/PathTest.h index b616d777f..5ad17a6f7 100644 --- a/Foundation/testsuite/src/PathTest.h +++ b/Foundation/testsuite/src/PathTest.h @@ -73,6 +73,7 @@ public: void testSwap(); void testResolve(); void testPushPop(); + void testWindowsSystem(); void setUp(); void tearDown(); diff --git a/Foundation/testsuite/src/PatternFormatterTest.cpp b/Foundation/testsuite/src/PatternFormatterTest.cpp index ece3b8802..3cfccf97a 100644 --- a/Foundation/testsuite/src/PatternFormatterTest.cpp +++ b/Foundation/testsuite/src/PatternFormatterTest.cpp @@ -98,6 +98,21 @@ void PatternFormatterTest::testPatternFormatter() fmt.setProperty("pattern", "%[testParam] %p"); fmt.format(msg, result); assert (result == "Test Parameter Error"); + + result.clear(); + fmt.setProperty("pattern", "start %v[10] end"); + fmt.format(msg, result); + assert (result == "start TestSource end"); + + result.clear(); + fmt.setProperty("pattern", "start %v[12] end"); + fmt.format(msg, result); + assert (result == "start TestSource end"); + + result.clear(); + fmt.setProperty("pattern", "start %v[8] end"); + fmt.format(msg, result); + assert (result == "start stSource end"); } diff --git a/JSON/include/Poco/JSON/JSON.h b/JSON/include/Poco/JSON/JSON.h index 205229d50..1373429b6 100644 --- a/JSON/include/Poco/JSON/JSON.h +++ b/JSON/include/Poco/JSON/JSON.h @@ -63,7 +63,11 @@ #if !defined(JSON_API) - #define JSON_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define JSON_API __attribute__ ((visibility ("default"))) + #else + #define JSON_API + #endif #endif diff --git a/JSON/include/Poco/JSON/Object.h b/JSON/include/Poco/JSON/Object.h index 3e62bfec7..38fb610bb 100644 --- a/JSON/include/Poco/JSON/Object.h +++ b/JSON/include/Poco/JSON/Object.h @@ -161,7 +161,7 @@ inline bool Object::has(const std::string& key) const inline bool Object::isArray(const std::string& key) const { ValueMap::const_iterator it = _values.find(key); - return it != _values.end() || it->second.type() == typeid(Array::Ptr); + return it != _values.end() && it->second.type() == typeid(Array::Ptr); } @@ -175,7 +175,7 @@ inline bool Object::isNull(const std::string& key) const inline bool Object::isObject(const std::string& key) const { ValueMap::const_iterator it = _values.find(key); - return it != _values.end() || it->second.type() == typeid(Object::Ptr); + return it != _values.end() && it->second.type() == typeid(Object::Ptr); } diff --git a/JSON/src/Parser.cpp b/JSON/src/Parser.cpp index 0c4a5a83b..99aeb413a 100644 --- a/JSON/src/Parser.cpp +++ b/JSON/src/Parser.cpp @@ -575,18 +575,20 @@ void Parser::readValue(const Token* token) case Token::INTEGER_LITERAL_TOKEN: if ( _handler != NULL ) { - int value = token->asInteger(); #if defined(POCO_HAVE_INT64) - if ( value == std::numeric_limits::max() - || value == std::numeric_limits::min() ) - { - _handler->value(NumberParser::parse64(token->asString())); - } - else - { - _handler->value(token->asInteger()); - } + Int64 value = token->asInteger(); + // if number is 32-bit, then handle as such + if ( value > std::numeric_limits::max() + || value < std::numeric_limits::min() ) + { + _handler->value(value); + } + else + { + _handler->value(static_cast(value)); + } #else + int value = token->asInteger(); _handle->value(value); #endif } @@ -697,5 +699,4 @@ bool Parser::readElements(bool firstCall) throw JSONException(format("Invalid token '%s' found.", token->asString())); } - } } // namespace Poco::JSON diff --git a/JSON/testsuite/src/JSONTest.cpp b/JSON/testsuite/src/JSONTest.cpp index 5fe906b73..dbb2521da 100644 --- a/JSON/testsuite/src/JSONTest.cpp +++ b/JSON/testsuite/src/JSONTest.cpp @@ -203,6 +203,40 @@ void JSONTest::testNumberProperty() assert(value == 1969); } +#if defined(POCO_HAVE_INT64) + + +void JSONTest::testNumber64Property() +{ + std::string json = "{ \"test\" : 5000000000000000 }"; + Parser parser; + Var result; + + try + { + DefaultHandler handler; + parser.setHandler(&handler); + parser.parse(json); + result = handler.result(); + } + catch(JSONException& jsone) + { + std::cout << jsone.message() << std::endl; + assert(false); + } + + assert(result.type() == typeid(Object::Ptr)); + + Object::Ptr object = result.extract(); + Var test = object->get("test"); + assert(test.isInteger()); + Poco::Int64 value = test; + assert(value == 5000000000000000); +} + + +#endif + void JSONTest::testStringProperty() { @@ -366,8 +400,11 @@ void JSONTest::testObjectProperty() } assert(result.type() == typeid(Object::Ptr)); - + Object::Ptr object = result.extract(); + assert (object->isObject("test")); + assert (!object->isArray("test")); + Var test = object->get("test"); assert(test.type() == typeid(Object::Ptr)); object = test.extract(); @@ -379,6 +416,36 @@ void JSONTest::testObjectProperty() } +void JSONTest::testObjectArray() +{ + std::string json = "{ \"test\" : { \"test1\" : [1, 2, 3], \"test2\" : 4 } }"; + Parser parser; + Var result; + + try + { + DefaultHandler handler; + parser.setHandler(&handler); + parser.parse(json); + result = handler.result(); + } + catch(JSONException& jsone) + { + std::cout << jsone.message() << std::endl; + assert(false); + } + + assert(result.type() == typeid(Object::Ptr)); + Object::Ptr object = result.extract(); + assert(object->isObject("test")); + object = object->getObject("test"); + assert(!object->isObject("test1")); + assert(object->isArray("test1")); + assert(!object->isObject("test2")); + assert(!object->isArray("test2")); +} + + void JSONTest::testEmptyArray() { std::string json = "[]"; @@ -827,12 +894,16 @@ CppUnit::Test* JSONTest::suite() CppUnit_addTest(pSuite, JSONTest, testTrueProperty); CppUnit_addTest(pSuite, JSONTest, testFalseProperty); CppUnit_addTest(pSuite, JSONTest, testNumberProperty); +#if defined(POCO_HAVE_INT64) + CppUnit_addTest(pSuite, JSONTest, testNumber64Property); +#endif CppUnit_addTest(pSuite, JSONTest, testStringProperty); CppUnit_addTest(pSuite, JSONTest, testEmptyObject); CppUnit_addTest(pSuite, JSONTest, testDoubleProperty); CppUnit_addTest(pSuite, JSONTest, testDouble2Property); CppUnit_addTest(pSuite, JSONTest, testDouble3Property); CppUnit_addTest(pSuite, JSONTest, testObjectProperty); + CppUnit_addTest(pSuite, JSONTest, testObjectArray); CppUnit_addTest(pSuite, JSONTest, testEmptyArray); CppUnit_addTest(pSuite, JSONTest, testNestedArray); CppUnit_addTest(pSuite, JSONTest, testNullElement); diff --git a/JSON/testsuite/src/JSONTest.h b/JSON/testsuite/src/JSONTest.h index 858197ae2..956181b09 100644 --- a/JSON/testsuite/src/JSONTest.h +++ b/JSON/testsuite/src/JSONTest.h @@ -51,12 +51,16 @@ public: void testTrueProperty(); void testFalseProperty(); void testNumberProperty(); +#if defined(POCO_HAVE_INT64) + void testNumber64Property(); +#endif void testStringProperty(); void testEmptyObject(); void testDoubleProperty(); void testDouble2Property(); void testDouble3Property(); void testObjectProperty(); + void testObjectArray(); void testEmptyArray(); void testNestedArray(); void testNullElement(); diff --git a/Net/include/Poco/Net/FTPClientSession.h b/Net/include/Poco/Net/FTPClientSession.h index 4eeae4581..d177b672a 100644 --- a/Net/include/Poco/Net/FTPClientSession.h +++ b/Net/include/Poco/Net/FTPClientSession.h @@ -1,7 +1,7 @@ // // FTPClientSession.h // -// $Id: //poco/1.4/Net/include/Poco/Net/FTPClientSession.h#1 $ +// $Id: //poco/svn/Net/include/Poco/Net/FTPClientSession.h#2 $ // // Library: Net // Package: FTP @@ -80,15 +80,24 @@ public: TYPE_BINARY // TYPE I (Image) }; + FTPClientSession(); + /// Creates an FTPClientSession. + /// + /// Passive mode will be used for data transfers. + explicit FTPClientSession(const StreamSocket& socket); /// Creates an FTPClientSession using the given /// connected socket for the control connection. /// /// Passive mode will be used for data transfers. - FTPClientSession(const std::string& host, Poco::UInt16 port = FTP_PORT); + FTPClientSession(const std::string& host, + Poco::UInt16 port = FTP_PORT, + const std::string& username = "", + const std::string& password = ""); /// Creates an FTPClientSession using a socket connected - /// to the given host and port. + /// to the given host and port. If username is supplied, + /// login is attempted. /// /// Passive mode will be used for data transfers. @@ -112,6 +121,13 @@ public: bool getPassive() const; /// Returns true iff passive mode is enabled for this connection. + void open(const std::string& host, + Poco::UInt16 port, + const std::string& username = "", + const std::string& password = ""); + /// Opens the FTP connection to the given host and port. + /// If username is supplied, login is attempted. + void login(const std::string& username, const std::string& password); /// Authenticates the user against the FTP server. Must be /// called before any other commands (except QUIT) can be sent. @@ -122,8 +138,10 @@ public: /// Throws a FTPException in case of a FTP-specific error, or a /// NetException in case of a general network communication failure. + void logout(); + void close(); - /// Sends a QUIT command and closes the connection to the server. + /// Sends a QUIT command and closes the connection to the server. /// /// Throws a FTPException in case of a FTP-specific error, or a /// NetException in case of a general network communication failure. @@ -300,6 +318,12 @@ public: /// Sends the given command verbatim to the server /// and waits for a response. + bool isOpen() const; + /// Returns true if the connection with FTP server is opened. + + bool isLoggedIn() const; + /// Returns true if the session is logged in. + protected: enum StatusClass { @@ -334,16 +358,18 @@ protected: void endTransfer(); private: - FTPClientSession(); FTPClientSession(const FTPClientSession&); FTPClientSession& operator = (const FTPClientSession&); - DialogSocket _controlSocket; + std::string _host; + Poco::UInt16 _port; + DialogSocket* _pControlSocket; SocketStream* _pDataStream; - bool _passiveMode; + bool _passiveMode; FileType _fileType; - bool _supports1738; - bool _isOpen; + bool _supports1738; + bool _serverReady; + bool _isLoggedIn; Poco::Timespan _timeout; }; @@ -381,6 +407,18 @@ inline bool FTPClientSession::isPermanentNegative(int status) } +inline bool FTPClientSession::isOpen() const +{ + return _pControlSocket != 0; +} + + +inline bool FTPClientSession::isLoggedIn() const +{ + return _isLoggedIn; +} + + } } // namespace Poco::Net diff --git a/Net/include/Poco/Net/Net.h b/Net/include/Poco/Net/Net.h index 943433955..89355a3f0 100644 --- a/Net/include/Poco/Net/Net.h +++ b/Net/include/Poco/Net/Net.h @@ -63,7 +63,11 @@ #if !defined(Net_API) - #define Net_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Net_API __attribute__ ((visibility ("default"))) + #else + #define Net_API + #endif #endif diff --git a/Net/include/Poco/Net/NetworkInterface.h b/Net/include/Poco/Net/NetworkInterface.h index 41d4f5526..bfbee2081 100644 --- a/Net/include/Poco/Net/NetworkInterface.h +++ b/Net/include/Poco/Net/NetworkInterface.h @@ -241,9 +241,6 @@ public: static NetworkInterface forIndex(unsigned index); /// Returns the NetworkInterface for the given interface index. - /// If an index of 0 is specified, a NetworkInterface instance - /// representing the default interface (empty name and - /// wildcard address) is returned. /// /// Throws an InterfaceNotFoundException if an interface /// with the given index does not exist (or IPv6 is not diff --git a/Net/include/Poco/Net/SocketAddress.h b/Net/include/Poco/Net/SocketAddress.h index ba4d3a9f1..c4c569bd4 100644 --- a/Net/include/Poco/Net/SocketAddress.h +++ b/Net/include/Poco/Net/SocketAddress.h @@ -64,16 +64,20 @@ public: /// Creates a wildcard (all zero) IPv4 SocketAddress. SocketAddress(const IPAddress& host, Poco::UInt16 port); - /// Creates a SocketAddress from an IP address and a port number. + /// Creates a SocketAddress from an IP address and given port number. + + SocketAddress(Poco::UInt16 port); + /// Creates a SocketAddress with unspecified (wildcard) IP address + /// and given port number. SocketAddress(const std::string& host, Poco::UInt16 port); - /// Creates a SocketAddress from an IP address and a port number. + /// Creates a SocketAddress from an IP address and given port number. /// /// The IP address must either be a domain name, or it must /// be in dotted decimal (IPv4) or hex string (IPv6) format. SocketAddress(const std::string& host, const std::string& port); - /// Creates a SocketAddress from an IP address and a + /// Creates a SocketAddress from an IP address and the /// service name or port number. /// /// The IP address must either be a domain name, or it must @@ -83,7 +87,7 @@ public: /// a service name. explicit SocketAddress(const std::string& hostAndPort); - /// Creates a SocketAddress from an IP address or host name and a + /// Creates a SocketAddress from an IP address or host name and the /// port number/service name. Host name/address and port number must /// be separated by a colon. In case of an IPv6 address, /// the address part must be enclosed in brackets. diff --git a/Net/include/Poco/Net/SocketConnector.h b/Net/include/Poco/Net/SocketConnector.h index 98adfe085..ae0369223 100644 --- a/Net/include/Poco/Net/SocketConnector.h +++ b/Net/include/Poco/Net/SocketConnector.h @@ -205,7 +205,7 @@ protected: return _pReactor; } - Socket& socket() + StreamSocket& socket() /// Returns a reference to the SocketConnector's socket. { return _socket; diff --git a/Net/samples/EchoServer/src/EchoServer.cpp b/Net/samples/EchoServer/src/EchoServer.cpp index ab5a56a04..bdf3fa735 100644 --- a/Net/samples/EchoServer/src/EchoServer.cpp +++ b/Net/samples/EchoServer/src/EchoServer.cpp @@ -133,7 +133,7 @@ public: { // receive bytes and transfer(echo) them to the output FIFO buffer int len = _socket.receiveBytes(_fifoIn); - _fifoIn.drain(_fifoOut.write(_fifoIn.buffer(), len)); + _fifoIn.drain(_fifoOut.write(_fifoIn.buffer())); } void onSocketWritable(const AutoPtr& pNf) diff --git a/Net/samples/Makefile b/Net/samples/Makefile index b4daacab8..55cd04cf1 100644 --- a/Net/samples/Makefile +++ b/Net/samples/Makefile @@ -22,3 +22,4 @@ projects: $(MAKE) -C TwitterClient $(MAKECMDGOALS) $(MAKE) -C WebSocketServer $(MAKECMDGOALS) $(MAKE) -C SMTPLogger $(MAKECMDGOALS) + $(MAKE) -C ifconfig $(MAKECMDGOALS) diff --git a/Net/samples/ifconfig/CMakeLists.txt b/Net/samples/ifconfig/CMakeLists.txt new file mode 100644 index 000000000..996e3ff72 --- /dev/null +++ b/Net/samples/ifconfig/CMakeLists.txt @@ -0,0 +1,8 @@ +set(SAMPLE_NAME "ifconfig") + +set(LOCAL_SRCS "") +aux_source_directory(src LOCAL_SRCS) + +add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +#set_target_properties( ${SAMPLE_NAME} PROPERTIES COMPILE_FLAGS ${RELEASE_CXX_FLAGS} ) +target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation ) diff --git a/Net/samples/ifconfig/Makefile b/Net/samples/ifconfig/Makefile new file mode 100644 index 000000000..ccd62a2ee --- /dev/null +++ b/Net/samples/ifconfig/Makefile @@ -0,0 +1,17 @@ +# +# Makefile +# +# $Id: //poco/Main/template/sample.make#4 $ +# +# Makefile for Poco download +# + +include $(POCO_BASE)/build/rules/global + +objects = ifconfig + +target = ifconfig +target_version = 1 +target_libs = PocoNet PocoFoundation + +include $(POCO_BASE)/build/rules/exec diff --git a/Net/samples/ifconfig/ifconfig.progen b/Net/samples/ifconfig/ifconfig.progen new file mode 100644 index 000000000..789048c79 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig.progen @@ -0,0 +1,12 @@ +vc.project.guid = ${vc.project.guidFromName} +vc.project.name = ${vc.project.baseName} +vc.project.target = ${vc.project.name} +vc.project.type = executable +vc.project.pocobase = ..\\..\\.. +vc.project.platforms = Win32, x64, WinCE +vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md +vc.project.prototype = ${vc.project.name}_vs90.vcproj +vc.project.compiler.include = ..\\..\\..\\Foundation\\include;..\\..\\..\\XML\\include;..\\..\\..\\Util\\include;..\\..\\..\\Net\\include +vc.project.linker.dependencies.Win32 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.x64 = ws2_32.lib iphlpapi.lib +vc.project.linker.dependencies.WinCE = ws2.lib iphlpapi.lib diff --git a/Net/samples/ifconfig/ifconfig_CE_vs90.vcproj b/Net/samples/ifconfig/ifconfig_CE_vs90.vcproj new file mode 100644 index 000000000..4fc1677bc --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_CE_vs90.vcproj @@ -0,0 +1,466 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_vs100.vcxproj b/Net/samples/ifconfig/ifconfig_vs100.vcxproj new file mode 100644 index 000000000..afcfd154e --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs100.vcxproj @@ -0,0 +1,299 @@ + + + + + debug_shared + Win32 + + + debug_static_md + Win32 + + + debug_static_mt + Win32 + + + release_shared + Win32 + + + release_static_md + Win32 + + + release_static_mt + Win32 + + + + ifconfig + {34993998-D465-4BCC-8C37-9B868F8498D0} + ifconfig + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + bin\ + obj\$(Configuration)\ + true + bin\ + obj\$(Configuration)\ + false + bin\static_mt\ + obj\$(Configuration)\ + true + bin\static_mt\ + obj\$(Configuration)\ + false + bin\static_md\ + obj\$(Configuration)\ + true + bin\static_md\ + obj\$(Configuration)\ + false + downloadd + downloadd + downloadd + ifconfig + ifconfig + ifconfig + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_mt\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_md\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + + + + \ No newline at end of file diff --git a/Net/samples/ifconfig/ifconfig_vs100.vcxproj.filters b/Net/samples/ifconfig/ifconfig_vs100.vcxproj.filters new file mode 100644 index 000000000..759e74882 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs100.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {83f7be8b-e80c-4772-a252-0a82e922575d} + + + + + Source Files + + + \ No newline at end of file diff --git a/Net/samples/ifconfig/ifconfig_vs110.vcxproj b/Net/samples/ifconfig/ifconfig_vs110.vcxproj new file mode 100644 index 000000000..bb9cf68d3 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs110.vcxproj @@ -0,0 +1,305 @@ + + + + + debug_shared + Win32 + + + debug_static_md + Win32 + + + debug_static_mt + Win32 + + + release_shared + Win32 + + + release_static_md + Win32 + + + release_static_mt + Win32 + + + + ifconfig + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D} + ifconfig + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + bin\ + obj\$(Configuration)\ + true + bin\ + obj\$(Configuration)\ + false + bin\static_mt\ + obj\$(Configuration)\ + true + bin\static_mt\ + obj\$(Configuration)\ + false + bin\static_md\ + obj\$(Configuration)\ + true + bin\static_md\ + obj\$(Configuration)\ + false + downloadd + downloadd + downloadd + ifconfig + ifconfig + ifconfig + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_mt\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_mt\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + EditAndContinue + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\downloadd.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + true + true + bin\static_md\downloadd.pdb + Console + MachineX86 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin\static_md\ifconfig.exe + ..\..\..\lib;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX86 + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_vs110.vcxproj.filters b/Net/samples/ifconfig/ifconfig_vs110.vcxproj.filters new file mode 100644 index 000000000..e818d85d6 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs110.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {8178cf99-4be5-4049-bed2-6e410e991f70} + + + + + Source Files + + + \ No newline at end of file diff --git a/Net/samples/ifconfig/ifconfig_vs71.vcproj b/Net/samples/ifconfig/ifconfig_vs71.vcproj new file mode 100644 index 000000000..2322219f6 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs71.vcproj @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_vs80.vcproj b/Net/samples/ifconfig/ifconfig_vs80.vcproj new file mode 100644 index 000000000..1f18e0f44 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs80.vcproj @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_vs90.vcproj b/Net/samples/ifconfig/ifconfig_vs90.vcproj new file mode 100644 index 000000000..0d13b0c79 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_vs90.vcproj @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj b/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj new file mode 100644 index 000000000..c8d6d4094 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj @@ -0,0 +1,299 @@ + + + + + debug_shared + x64 + + + debug_static_md + x64 + + + debug_static_mt + x64 + + + release_shared + x64 + + + release_static_md + x64 + + + release_static_mt + x64 + + + + ifconfig + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D} + ifconfig + Win32Proj + + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + Application + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + bin64\ + obj64\$(Configuration)\ + true + bin64\ + obj64\$(Configuration)\ + false + bin64\static_mt\ + obj64\$(Configuration)\ + true + bin64\static_mt\ + obj64\$(Configuration)\ + false + bin64\static_md\ + obj64\$(Configuration)\ + true + bin64\static_md\ + obj64\$(Configuration)\ + false + downloadd + downloadd + downloadd + ifconfig + ifconfig + ifconfig + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_mt\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_md\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj.filters b/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj.filters new file mode 100644 index 000000000..714b1a3a2 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_x64_vs100.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {25ce49c0-b3a1-4334-9cc8-0a38996eff3a} + + + + + Source Files + + + \ No newline at end of file diff --git a/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj b/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj new file mode 100644 index 000000000..166b20ca1 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj @@ -0,0 +1,305 @@ + + + + + debug_shared + x64 + + + debug_static_md + x64 + + + debug_static_mt + x64 + + + release_shared + x64 + + + release_static_md + x64 + + + release_static_mt + x64 + + + + ifconfig + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D} + ifconfig + Win32Proj + + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + Application + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + bin64\ + obj64\$(Configuration)\ + true + bin64\ + obj64\$(Configuration)\ + false + bin64\static_mt\ + obj64\$(Configuration)\ + true + bin64\static_mt\ + obj64\$(Configuration)\ + false + bin64\static_md\ + obj64\$(Configuration)\ + true + bin64\static_md\ + obj64\$(Configuration)\ + false + downloadd + downloadd + downloadd + ifconfig + ifconfig + ifconfig + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebug + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_mt\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_mt\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + Disabled + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + true + EnableFastChecks + MultiThreadedDebugDLL + true + true + true + true + + Level3 + ProgramDatabase + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\downloadd.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + true + true + bin64\static_md\downloadd.pdb + Console + MachineX64 + + + + + Disabled + OnlyExplicitInline + true + Speed + true + .\include;..\..\..\Foundation\include;..\..\..\XML\include;..\..\..\Util\include;..\..\..\Net\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + true + true + + Level3 + + Default + %(DisableSpecificWarnings) + + + iphlpapi.lib;winmm.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + bin64\static_md\ifconfig.exe + ..\..\..\lib64;%(AdditionalLibraryDirectories) + false + Console + true + true + MachineX64 + + + + + + + + diff --git a/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj.filters b/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj.filters new file mode 100644 index 000000000..f2212302e --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_x64_vs110.vcxproj.filters @@ -0,0 +1,13 @@ + + + + + {466b345c-48bd-4a7a-a48b-0d351ad0ad12} + + + + + Source Files + + + \ No newline at end of file diff --git a/Net/samples/ifconfig/ifconfig_x64_vs90.vcproj b/Net/samples/ifconfig/ifconfig_x64_vs90.vcproj new file mode 100644 index 000000000..275624ce9 --- /dev/null +++ b/Net/samples/ifconfig/ifconfig_x64_vs90.vcproj @@ -0,0 +1,433 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Net/samples/ifconfig/src/ifconfig.cpp b/Net/samples/ifconfig/src/ifconfig.cpp new file mode 100644 index 000000000..6e88569af --- /dev/null +++ b/Net/samples/ifconfig/src/ifconfig.cpp @@ -0,0 +1,150 @@ +// +// ifconfig.cpp +// +// $Id: //poco/1.4/Net/samples/download/src/ifconfig.cpp#1 $ +// +// This sample demonstrates the (display only) ifconfig-like capabilities +// of the NetworkInterface class. +// +// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. +// and Contributors. +// +// Permission is hereby granted, free of charge, to any person or organization +// obtaining a copy of the software and accompanying documentation covered by +// this license (the "Software") to use, reproduce, display, distribute, +// execute, and transmit the Software, and to prepare derivative works of the +// Software, and to permit third-parties to whom the Software is furnished to +// do so, all subject to the following: +// +// The copyright notices in the Software and this entire statement, including +// the above license grant, this restriction and the following disclaimer, +// must be included in all copies of the Software, in whole or in part, and +// all derivative works of the Software, unless such copies or derivative +// works are solely in the form of machine-executable object code generated by +// a source language processor. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. +// + + +#include "Poco/Path.h" +#include "Poco/Exception.h" +#include "Poco/Net/IPAddress.h" +#include "Poco/Net/NetworkInterface.h" +#include +#include + + +using Poco::Path; +using Poco::Exception; +using Poco::Net::IPAddress; +using Poco::Net::NetworkInterface; + + +int main(int argc, char** argv) +{ + + if (argc != 1) + { + Path p(argv[0]); + std::cerr << "usage: " << p.getBaseName() << std::endl; + return 1; + } + + try + { + const NetworkInterface::Map map = NetworkInterface::map(); + for ( NetworkInterface::Map::const_iterator it = map.begin(); + it != map.end(); ++it) + { + const NetworkInterface& intf = it->second; + std::string sep(""); + std::cout << intf.name() << " [" << intf.index() << "]: "; + std::cout << "<"; + if (intf.isUp()) + { + std::cout << sep << "UP"; + sep = ","; + } + + if (intf.isRunning()) + { + std::cout << sep << "RUNNING"; + sep = ","; + } + + if (intf.isLoopback()) + { + std::cout << sep << "LOOPBACK"; + sep = ","; + } + + if (intf.isPointToPoint()) + { + std::cout << sep << "P2P"; + sep = ","; + } + + if (intf.supportsIPv4()) + { + std::cout << sep << "IPv4"; + sep = ","; + } + + if (intf.supportsIPv6()) + { + std::cout << sep << "IPv6"; + sep = ","; + } + + if (intf.supportsBroadcast()) + { + std::cout << sep << "BCAST"; + sep = ","; + } + + if (intf.supportsMulticast()) + { + std::cout << sep << "MCAST"; + sep = ","; + } + + if (!intf.isLoopback()) + { + std::cout << sep << std::dec << intf.mtu(); + sep = ","; + } + + std::cout << ">" << std::endl; + + const NetworkInterface::AddressList& ipList = intf.addressList(); + + NetworkInterface::AddressList::const_iterator ipIt = ipList.begin(); + NetworkInterface::AddressList::const_iterator ipEnd = ipList.end(); + for (; ipIt != ipEnd; ++ipIt) + { + std::cout << " " << ipIt->get().toString(); + IPAddress addr; + addr = ipIt->get(); + if (!addr.isWildcard()) std::cout << '/' << addr.toString() << " (" << addr.prefixLength() << ')'; + addr = ipIt->get(); + if (!addr.isWildcard()) std::cout << (intf.isPointToPoint() ? " dest " : " bcast ") << addr.toString(); + std::cout << std::endl; + } + std::cout << std::endl; + } + } + catch (Exception& exc) + { + std::cerr << exc.displayText() << std::endl; + return 1; + } + + return 0; +} diff --git a/Net/samples/samples_vs100.sln b/Net/samples/samples_vs100.sln index 5152cf346..9e6c8a6cb 100644 --- a/Net/samples/samples_vs100.sln +++ b/Net/samples/samples_vs100.sln @@ -26,250 +26,264 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebSocketServer", "WebSocke EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SMTPLogger", "SMTPLogger\SMTPLogger_vs100.vcxproj", "{83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ifconfig", "ifconfig\ifconfig_vs100.vcxproj", "{34993998-D465-4BCC-8C37-9B868F8498D0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution debug_shared|Win32 = debug_shared|Win32 - release_shared|Win32 = release_shared|Win32 - debug_static_mt|Win32 = debug_static_mt|Win32 - release_static_mt|Win32 = release_static_mt|Win32 debug_static_md|Win32 = debug_static_md|Win32 + debug_static_mt|Win32 = debug_static_mt|Win32 + release_shared|Win32 = release_shared|Win32 release_static_md|Win32 = release_static_md|Win32 + release_static_mt|Win32 = release_static_mt|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_shared|Win32.Build.0 = debug_shared|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.Build.0 = release_shared|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.Build.0 = release_shared|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_shared|Win32.Deploy.0 = release_shared|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_md|Win32.Build.0 = release_static_md|Win32 {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {90F24341-F59F-385F-A8D6-66AB377FF033}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_shared|Win32.Build.0 = debug_shared|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.Build.0 = release_shared|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.Build.0 = release_shared|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_shared|Win32.Deploy.0 = release_shared|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_md|Win32.Build.0 = release_static_md|Win32 {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {D853F3D6-0D6F-3E8E-82C7-4216D7A21C4D}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_shared|Win32.Build.0 = debug_shared|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.Build.0 = release_shared|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.Build.0 = release_shared|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_shared|Win32.Deploy.0 = release_shared|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_md|Win32.Build.0 = release_static_md|Win32 {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {5074CE3E-05F5-31BA-BA79-1AD54C3416F7}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_shared|Win32.Build.0 = debug_shared|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.Build.0 = release_shared|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.Build.0 = release_shared|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_shared|Win32.Deploy.0 = release_shared|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_md|Win32.Build.0 = release_static_md|Win32 {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {19B162EB-DDAA-37BA-AE93-7FDED89274DE}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_shared|Win32.Build.0 = debug_shared|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.Build.0 = release_shared|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.Build.0 = release_shared|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_shared|Win32.Deploy.0 = release_shared|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_md|Win32.Build.0 = release_static_md|Win32 {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {5A299876-BF4E-37B9-922D-4E6FC1FA9520}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_shared|Win32.Build.0 = debug_shared|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.Build.0 = release_shared|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.Build.0 = release_shared|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_shared|Win32.Deploy.0 = release_shared|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_md|Win32.Build.0 = release_static_md|Win32 {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {A140D236-D64B-370A-A7E7-3000725D9869}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_shared|Win32.Build.0 = debug_shared|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.Build.0 = release_shared|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.Build.0 = release_shared|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_shared|Win32.Deploy.0 = release_shared|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_md|Win32.Build.0 = release_static_md|Win32 {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {18A0143A-444A-38E3-838C-1ACFBE4EE18C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_shared|Win32.Build.0 = debug_shared|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.Build.0 = release_shared|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.Build.0 = release_shared|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_shared|Win32.Deploy.0 = release_shared|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_md|Win32.Build.0 = release_static_md|Win32 {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {BF75C029-EFC9-3A0F-A8F2-8001C11D1FBA}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_shared|Win32.Build.0 = debug_shared|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.Build.0 = release_shared|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.Build.0 = release_shared|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_shared|Win32.Deploy.0 = release_shared|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_md|Win32.Build.0 = release_static_md|Win32 {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {154EC2E2-A1CC-3F3E-9BAA-8134DF82B0B5}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Build.0 = debug_shared|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Build.0 = release_shared|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Build.0 = release_shared|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_shared|Win32.Deploy.0 = release_shared|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_md|Win32.Build.0 = release_static_md|Win32 {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {59EDFD20-9968-30F7-9532-44C08DA58C6E}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_shared|Win32.Build.0 = debug_shared|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.Build.0 = release_shared|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.Build.0 = release_shared|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_shared|Win32.Deploy.0 = release_shared|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_md|Win32.Build.0 = release_static_md|Win32 {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {CCDD82BC-680D-39C0-AE25-1FBC5B615F7E}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_shared|Win32.Build.0 = debug_shared|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.Build.0 = release_shared|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.Build.0 = release_shared|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_shared|Win32.Deploy.0 = release_shared|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_md|Win32.Build.0 = release_static_md|Win32 {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {0DC40FE3-6C42-365E-8DAB-899C50ECFB1C}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_shared|Win32.Build.0 = debug_shared|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_shared|Win32.Deploy.0 = debug_shared|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.ActiveCfg = release_shared|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.Build.0 = release_shared|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.Deploy.0 = release_shared|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 - {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.Build.0 = release_shared|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_shared|Win32.Deploy.0 = release_shared|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_md|Win32.Build.0 = release_static_md|Win32 {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_md|Win32.Deploy.0 = release_static_md|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 + {83E96E4E-A7E8-340B-B6D2-31B4D40D99AF}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_shared|Win32.ActiveCfg = debug_shared|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_shared|Win32.Build.0 = debug_shared|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_static_md|Win32.Build.0 = debug_static_md|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_shared|Win32.ActiveCfg = release_shared|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_shared|Win32.Build.0 = release_shared|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_static_md|Win32.ActiveCfg = release_static_md|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_static_md|Win32.Build.0 = release_static_md|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32 + {34993998-D465-4BCC-8C37-9B868F8498D0}.release_static_mt|Win32.Build.0 = release_static_mt|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Net/src/FTPClientSession.cpp b/Net/src/FTPClientSession.cpp index 700984351..ea57a7e9d 100644 --- a/Net/src/FTPClientSession.cpp +++ b/Net/src/FTPClientSession.cpp @@ -1,7 +1,7 @@ // // FTPClientSession.cpp // -// $Id: //poco/1.4/Net/src/FTPClientSession.cpp#1 $ +// $Id: //poco/svn/Net/src/FTPClientSession.cpp#2 $ // // Library: Net // Package: FTP @@ -50,48 +50,72 @@ namespace Poco { namespace Net { -FTPClientSession::FTPClientSession(const StreamSocket& socket): - _controlSocket(socket), +FTPClientSession::FTPClientSession(): + _port(0), + _pControlSocket(0), _pDataStream(0), _passiveMode(true), _fileType(TYPE_BINARY), _supports1738(true), - _isOpen(true), + _serverReady(false), + _isLoggedIn(false), _timeout(DEFAULT_TIMEOUT) { - _controlSocket.setReceiveTimeout(_timeout); } -FTPClientSession::FTPClientSession(const std::string& host, Poco::UInt16 port): - _controlSocket(SocketAddress(host, port)), +FTPClientSession::FTPClientSession(const StreamSocket& socket): + _host(socket.address().host().toString()), + _port(socket.address().port()), + _pControlSocket(new DialogSocket(socket)), _pDataStream(0), _passiveMode(true), _fileType(TYPE_BINARY), _supports1738(true), - _isOpen(true), + _serverReady(false), + _isLoggedIn(false), _timeout(DEFAULT_TIMEOUT) { - _controlSocket.setReceiveTimeout(_timeout); + _pControlSocket->setReceiveTimeout(_timeout); } +FTPClientSession::FTPClientSession(const std::string& host, + Poco::UInt16 port, + const std::string& username, + const std::string& password): + _host(host), + _port(port), + _pControlSocket(new DialogSocket(SocketAddress(host, port))), + _pDataStream(0), + _passiveMode(true), + _fileType(TYPE_BINARY), + _supports1738(true), + _serverReady(false), + _isLoggedIn(false), + _timeout(DEFAULT_TIMEOUT) + { + if (!username.empty()) + login(username, password); + else + _pControlSocket->setReceiveTimeout(_timeout); + } + + FTPClientSession::~FTPClientSession() -{ - try { - close(); - } - catch (...) - { - } + try { close(); } + catch (...) { } } void FTPClientSession::setTimeout(const Poco::Timespan& timeout) { + if (!isOpen()) + throw FTPException("Connection is closed."); + _timeout = timeout; - _controlSocket.setReceiveTimeout(timeout); + _pControlSocket->setReceiveTimeout(timeout); } @@ -114,35 +138,78 @@ bool FTPClientSession::getPassive() const } +void FTPClientSession::open(const std::string& host, + Poco::UInt16 port, + const std::string& username, + const std::string& password) +{ + _host = host; + _port = port; + if (!username.empty()) + login(username, password); + else + { + _pControlSocket = new DialogSocket(SocketAddress(_host, _port)); + _pControlSocket->setReceiveTimeout(_timeout); + } +} + + void FTPClientSession::login(const std::string& username, const std::string& password) { + if (_isLoggedIn) logout(); + + int status = FTP_POSITIVE_COMPLETION * 100; std::string response; - int status = _controlSocket.receiveStatusMessage(response); - if (!isPositiveCompletion(status)) throw FTPException("Cannot login to server", response, status); + if (!_pControlSocket) + { + _pControlSocket = new DialogSocket(SocketAddress(_host, _port)); + _pControlSocket->setReceiveTimeout(_timeout); + } + + if (!_serverReady) + { + status = _pControlSocket->receiveStatusMessage(response); + if (!isPositiveCompletion(status)) + throw FTPException("Cannot login to server", response, status); + + _serverReady = true; + } + status = sendCommand("USER", username, response); if (isPositiveIntermediate(status)) status = sendCommand("PASS", password, response); - if (!isPositiveCompletion(status)) throw FTPException("Login denied", response, status); + if (!isPositiveCompletion(status)) + throw FTPException("Login denied", response, status); + setFileType(_fileType); + _isLoggedIn = true; +} + + +void FTPClientSession::logout() + { + if (!isOpen()) + throw FTPException("Connection is closed."); + + if (_isLoggedIn) + { + try { endTransfer(); } + catch (...) { } + std::string response; + sendCommand("QUIT", response); + _isLoggedIn = false; + } } void FTPClientSession::close() { - if (_isOpen) - { - try - { - endTransfer(); - } - catch (...) - { - } - std::string response; - sendCommand("QUIT", response); - _controlSocket.close(); - _isOpen = false; - } + logout(); + _pControlSocket->close(); + delete _pControlSocket; + _pControlSocket = 0; + _serverReady = false; } @@ -176,7 +243,8 @@ void FTPClientSession::setWorkingDirectory(const std::string& path) { std::string response; int status = sendCommand("CWD", path, response); - if (!isPositiveCompletion(status)) throw FTPException("Cannot change directory", response, status); + if (!isPositiveCompletion(status)) + throw FTPException("Cannot change directory", response, status); } @@ -195,7 +263,8 @@ void FTPClientSession::cdup() { std::string response; int status = sendCommand("CDUP", response); - if (!isPositiveCompletion(status)) throw FTPException("Cannot change directory", response, status); + if (!isPositiveCompletion(status)) + throw FTPException("Cannot change directory", response, status); } @@ -203,9 +272,11 @@ void FTPClientSession::rename(const std::string& oldName, const std::string& new { std::string response; int status = sendCommand("RNFR", oldName, response); - if (!isPositiveIntermediate(status)) throw FTPException(std::string("Cannot rename ") + oldName, response, status); + if (!isPositiveIntermediate(status)) + throw FTPException(std::string("Cannot rename ") + oldName, response, status); status = sendCommand("RNTO", newName, response); - if (!isPositiveCompletion(status)) throw FTPException(std::string("Cannot rename to ") + newName, response, status); + if (!isPositiveCompletion(status)) + throw FTPException(std::string("Cannot rename to ") + newName, response, status); } @@ -213,7 +284,8 @@ void FTPClientSession::remove(const std::string& path) { std::string response; int status = sendCommand("DELE", path, response); - if (!isPositiveCompletion(status)) throw FTPException(std::string("Cannot remove " + path), response, status); + if (!isPositiveCompletion(status)) + throw FTPException(std::string("Cannot remove " + path), response, status); } @@ -221,7 +293,8 @@ void FTPClientSession::createDirectory(const std::string& path) { std::string response; int status = sendCommand("MKD", path, response); - if (!isPositiveCompletion(status)) throw FTPException(std::string("Cannot create directory ") + path, response, status); + if (!isPositiveCompletion(status)) + throw FTPException(std::string("Cannot create directory ") + path, response, status); } @@ -229,12 +302,16 @@ void FTPClientSession::removeDirectory(const std::string& path) { std::string response; int status = sendCommand("RMD", path, response); - if (!isPositiveCompletion(status)) throw FTPException(std::string("Cannot remove directory ") + path, response, status); + if (!isPositiveCompletion(status)) + throw FTPException(std::string("Cannot remove directory ") + path, response, status); } std::istream& FTPClientSession::beginDownload(const std::string& path) { + if (!isOpen()) + throw FTPException("Connection is closed."); + delete _pDataStream; _pDataStream = 0; _pDataStream = new SocketStream(establishDataConnection("RETR", path)); @@ -250,6 +327,9 @@ void FTPClientSession::endDownload() std::ostream& FTPClientSession::beginUpload(const std::string& path) { + if (!isOpen()) + throw FTPException("Connection is closed."); + delete _pDataStream; _pDataStream = 0; _pDataStream = new SocketStream(establishDataConnection("STOR", path)); @@ -265,6 +345,9 @@ void FTPClientSession::endUpload() std::istream& FTPClientSession::beginList(const std::string& path, bool extended) { + if (!isOpen()) + throw FTPException("Connection is closed."); + delete _pDataStream; _pDataStream = 0; _pDataStream = new SocketStream(establishDataConnection(extended ? "LIST" : "NLST", path)); @@ -280,27 +363,37 @@ void FTPClientSession::endList() void FTPClientSession::abort() { - _controlSocket.sendByte(DialogSocket::TELNET_IP); - _controlSocket.synch(); + if (!isOpen()) + throw FTPException("Connection is closed."); + + _pControlSocket->sendByte(DialogSocket::TELNET_IP); + _pControlSocket->synch(); std::string response; int status = sendCommand("ABOR", response); if (status == 426) - status = _controlSocket.receiveStatusMessage(response); - if (status != 226) throw FTPException("Cannot abort transfer", response, status); + status = _pControlSocket->receiveStatusMessage(response); + if (status != 226) + throw FTPException("Cannot abort transfer", response, status); } int FTPClientSession::sendCommand(const std::string& command, std::string& response) { - _controlSocket.sendMessage(command); - return _controlSocket.receiveStatusMessage(response); + if (!isOpen()) + throw FTPException("Connection is closed."); + + _pControlSocket->sendMessage(command); + return _pControlSocket->receiveStatusMessage(response); } int FTPClientSession::sendCommand(const std::string& command, const std::string& arg, std::string& response) { - _controlSocket.sendMessage(command, arg); - return _controlSocket.receiveStatusMessage(response); + if (!isOpen()) + throw FTPException("Connection is closed."); + + _pControlSocket->sendMessage(command, arg); + return _pControlSocket->receiveStatusMessage(response); } @@ -329,23 +422,24 @@ std::string FTPClientSession::extractPath(const std::string& response) StreamSocket FTPClientSession::establishDataConnection(const std::string& command, const std::string& arg) { - StreamSocket ss; if (_passiveMode) - ss = passiveDataConnection(command, arg); + return passiveDataConnection(command, arg); else - ss = activeDataConnection(command, arg); - ss.setReceiveTimeout(_timeout); - return ss; + return activeDataConnection(command, arg); } StreamSocket FTPClientSession::activeDataConnection(const std::string& command, const std::string& arg) { - ServerSocket server(SocketAddress(_controlSocket.address().host(), 0)); + if (!isOpen()) + throw FTPException("Connection is closed."); + + ServerSocket server(SocketAddress(_pControlSocket->address().host(), 0)); sendPortCommand(server.address()); std::string response; int status = sendCommand(command, arg, response); - if (!isPositivePreliminary(status)) throw FTPException(command + " command failed", response, status); + if (!isPositivePreliminary(status)) + throw FTPException(command + " command failed", response, status); if (server.poll(_timeout, Socket::SELECT_READ)) return server.acceptConnection(); else @@ -359,7 +453,8 @@ StreamSocket FTPClientSession::passiveDataConnection(const std::string& command, StreamSocket sock(sa); std::string response; int status = sendCommand(command, arg, response); - if (!isPositivePreliminary(status)) throw FTPException(command + " command failed", response, status); + if (!isPositivePreliminary(status)) + throw FTPException(command + " command failed", response, status); return sock; } @@ -426,7 +521,8 @@ void FTPClientSession::sendPORT(const SocketAddress& addr) arg += NumberFormatter::format(port % 256); std::string response; int status = sendCommand("PORT", arg, response); - if (!isPositiveCompletion(status)) throw FTPException("PORT command failed", response, status); + if (!isPositiveCompletion(status)) + throw FTPException("PORT command failed", response, status); } @@ -451,7 +547,8 @@ void FTPClientSession::sendPASV(SocketAddress& addr) { std::string response; int status = sendCommand("PASV", response); - if (!isPositiveCompletion(status)) throw FTPException("PASV command failed", response, status); + if (!isPositiveCompletion(status)) + throw FTPException("PASV command failed", response, status); parseAddress(response, addr); } @@ -492,7 +589,7 @@ void FTPClientSession::parseExtAddress(const std::string& str, SocketAddress& ad if (it != end && *it == delim) ++it; Poco::UInt16 port = 0; while (it != end && Poco::Ascii::isDigit(*it)) { port *= 10; port += *it++ - '0'; } - addr = SocketAddress(_controlSocket.peerAddress().host(), port); + addr = SocketAddress(_pControlSocket->peerAddress().host(), port); } @@ -503,8 +600,9 @@ void FTPClientSession::endTransfer() delete _pDataStream; _pDataStream = 0; std::string response; - int status = _controlSocket.receiveStatusMessage(response); - if (!isPositiveCompletion(status)) throw FTPException("Data transfer failed", response, status); + int status = _pControlSocket->receiveStatusMessage(response); + if (!isPositiveCompletion(status)) + throw FTPException("Data transfer failed", response, status); } } diff --git a/Net/src/SocketAddress.cpp b/Net/src/SocketAddress.cpp index f79a15fc9..fd0486df0 100644 --- a/Net/src/SocketAddress.cpp +++ b/Net/src/SocketAddress.cpp @@ -233,6 +233,12 @@ SocketAddress::SocketAddress(const IPAddress& addr, Poco::UInt16 port) } +SocketAddress::SocketAddress(Poco::UInt16 port) +{ + init(IPAddress(), port); +} + + SocketAddress::SocketAddress(const std::string& addr, Poco::UInt16 port) { init(addr, port); diff --git a/Net/testsuite/src/FTPClientSessionTest.cpp b/Net/testsuite/src/FTPClientSessionTest.cpp index 7d80eb8bb..d49bbc5d0 100644 --- a/Net/testsuite/src/FTPClientSessionTest.cpp +++ b/Net/testsuite/src/FTPClientSessionTest.cpp @@ -1,7 +1,7 @@ // // FTPClientSessionTest.cpp // -// $Id: //poco/1.4/Net/testsuite/src/FTPClientSessionTest.cpp#1 $ +// $Id: //poco/svn/Net/testsuite/src/FTPClientSessionTest.cpp#2 $ // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. @@ -93,14 +93,11 @@ FTPClientSessionTest::~FTPClientSessionTest() } -void FTPClientSessionTest::testLogin() +void FTPClientSessionTest::login(DialogServer& server, FTPClientSession& session) { - DialogServer server; - server.addResponse("220 localhost FTP ready"); server.addResponse("331 Password required"); server.addResponse("230 Welcome"); server.addResponse("200 Type set to I"); - FTPClientSession session("localhost", server.port()); session.login("user", "password"); std::string cmd = server.popCommand(); assert (cmd == "USER user"); @@ -110,12 +107,86 @@ void FTPClientSessionTest::testLogin() assert (cmd == "TYPE I"); assert (session.getFileType() == FTPClientSession::TYPE_BINARY); - +} + + +void FTPClientSessionTest::testLogin1() +{ + DialogServer server; + server.addResponse("220 localhost FTP ready"); + FTPClientSession session("localhost", server.port()); + assert (session.isOpen()); + assert (!session.isLoggedIn()); + login(server, session); + assert (session.isOpen()); + assert (session.isLoggedIn()); + server.addResponse("221 Good Bye"); + session.logout(); + assert (session.isOpen()); + assert (!session.isLoggedIn()); + + server.clearCommands(); + server.clearResponses(); + login(server, session); + assert (session.isOpen()); + assert (session.isLoggedIn()); server.addResponse("221 Good Bye"); session.close(); + assert (!session.isOpen()); + assert (!session.isLoggedIn()); } +void FTPClientSessionTest::testLogin2() +{ + DialogServer server; + server.addResponse("220 localhost FTP ready"); + server.addResponse("331 Password required"); + server.addResponse("230 Welcome"); + server.addResponse("200 Type set to I"); + FTPClientSession session("localhost", server.port(), "user", "password"); + assert (session.isOpen()); + assert (session.isLoggedIn()); + server.addResponse("221 Good Bye"); + session.close(); + assert (!session.isOpen()); + assert (!session.isLoggedIn()); + + server.clearCommands(); + server.clearResponses(); + server.addResponse("220 localhost FTP ready"); + server.addResponse("331 Password required"); + server.addResponse("230 Welcome"); + server.addResponse("200 Type set to I"); + session.open("localhost", server.port(), "user", "password"); + assert (session.isOpen()); + assert (session.isLoggedIn()); + server.addResponse("221 Good Bye"); + session.close(); + assert (!session.isOpen()); + assert (!session.isLoggedIn()); +} + + +void FTPClientSessionTest::testLogin3() +{ + DialogServer server; + server.addResponse("220 localhost FTP ready"); + server.addResponse("331 Password required"); + server.addResponse("230 Welcome"); + server.addResponse("200 Type set to I"); + FTPClientSession session; + assert (!session.isOpen()); + assert (!session.isLoggedIn()); + session.open("localhost", server.port(), "user", "password"); + server.addResponse("221 Good Bye"); + session.close(); + assert (!session.isOpen()); + assert (!session.isLoggedIn()); +} + + + void FTPClientSessionTest::testLoginFailed1() { DialogServer server; @@ -535,7 +606,9 @@ CppUnit::Test* FTPClientSessionTest::suite() { CppUnit::TestSuite* pSuite = new CppUnit::TestSuite("FTPClientSessionTest"); - CppUnit_addTest(pSuite, FTPClientSessionTest, testLogin); + CppUnit_addTest(pSuite, FTPClientSessionTest, testLogin1); + CppUnit_addTest(pSuite, FTPClientSessionTest, testLogin2); + CppUnit_addTest(pSuite, FTPClientSessionTest, testLogin3); CppUnit_addTest(pSuite, FTPClientSessionTest, testLoginFailed1); CppUnit_addTest(pSuite, FTPClientSessionTest, testLoginFailed2); CppUnit_addTest(pSuite, FTPClientSessionTest, testCommands); diff --git a/Net/testsuite/src/FTPClientSessionTest.h b/Net/testsuite/src/FTPClientSessionTest.h index e73eb0eba..aa6f62aaa 100644 --- a/Net/testsuite/src/FTPClientSessionTest.h +++ b/Net/testsuite/src/FTPClientSessionTest.h @@ -1,7 +1,7 @@ // // FTPClientSessionTest.h // -// $Id: //poco/1.4/Net/testsuite/src/FTPClientSessionTest.h#1 $ +// $Id: //poco/svn/Net/testsuite/src/FTPClientSessionTest.h#2 $ // // Definition of the FTPClientSessionTest class. // @@ -40,13 +40,24 @@ #include "CppUnit/TestCase.h" +namespace Poco { +namespace Net { + +class FTPClientSession; + +} } + +class DialogServer; + class FTPClientSessionTest: public CppUnit::TestCase { public: FTPClientSessionTest(const std::string& name); ~FTPClientSessionTest(); - void testLogin(); + void testLogin1(); + void testLogin2(); + void testLogin3(); void testLoginFailed1(); void testLoginFailed2(); void testCommands(); @@ -63,6 +74,7 @@ public: static CppUnit::Test* suite(); private: + void login(DialogServer& server, Poco::Net::FTPClientSession& session); }; diff --git a/Net/testsuite/src/FTPClientTestSuite.cpp b/Net/testsuite/src/FTPClientTestSuite.cpp index 6bf5a7f03..198e2aac1 100644 --- a/Net/testsuite/src/FTPClientTestSuite.cpp +++ b/Net/testsuite/src/FTPClientTestSuite.cpp @@ -1,7 +1,7 @@ // // FTPClientTestSuite.cpp // -// $Id: //poco/1.4/Net/testsuite/src/FTPClientTestSuite.cpp#1 $ +// $Id: //poco/svn/Net/testsuite/src/FTPClientTestSuite.cpp#2 $ // // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // and Contributors. diff --git a/Net/testsuite/src/FTPClientTestSuite.h b/Net/testsuite/src/FTPClientTestSuite.h index ecb7ace85..262a91c3f 100644 --- a/Net/testsuite/src/FTPClientTestSuite.h +++ b/Net/testsuite/src/FTPClientTestSuite.h @@ -1,7 +1,7 @@ // // FTPClientTestSuite.h // -// $Id: //poco/1.4/Net/testsuite/src/FTPClientTestSuite.h#1 $ +// $Id: //poco/svn/Net/testsuite/src/FTPClientTestSuite.h#2 $ // // Definition of the FTPClientTestSuite class. // diff --git a/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h b/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h index e04e4e5ad..ad0b8d182 100644 --- a/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h +++ b/NetSSL_OpenSSL/include/Poco/Net/NetSSL.h @@ -63,7 +63,11 @@ #if !defined(NetSSL_API) - #define NetSSL_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define NetSSL_API __attribute__ ((visibility ("default"))) + #else + #define NetSSL_API + #endif #endif diff --git a/PDF/include/Poco/PDF/PDF.h b/PDF/include/Poco/PDF/PDF.h index 86670d220..f4b6b5494 100644 --- a/PDF/include/Poco/PDF/PDF.h +++ b/PDF/include/Poco/PDF/PDF.h @@ -72,7 +72,11 @@ #if !defined(PDF_API) - #define PDF_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define PDF_API __attribute__ ((visibility ("default"))) + #else + #define PDF_API + #endif #endif diff --git a/Util/include/Poco/Util/Util.h b/Util/include/Poco/Util/Util.h index 2abceede4..4c54e5972 100644 --- a/Util/include/Poco/Util/Util.h +++ b/Util/include/Poco/Util/Util.h @@ -63,7 +63,11 @@ #if !defined(Util_API) - #define Util_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Util_API __attribute__ ((visibility ("default"))) + #else + #define Util_API + #endif #endif diff --git a/XML/include/Poco/XML/XML.h b/XML/include/Poco/XML/XML.h index 0da417d50..648f971c1 100644 --- a/XML/include/Poco/XML/XML.h +++ b/XML/include/Poco/XML/XML.h @@ -63,7 +63,11 @@ #if !defined(XML_API) - #define XML_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define XML_API __attribute__ ((visibility ("default"))) + #else + #define XML_API + #endif #endif diff --git a/Zip/include/Poco/Zip/Zip.h b/Zip/include/Poco/Zip/Zip.h index 7fc151b23..bbb9ad8b1 100644 --- a/Zip/include/Poco/Zip/Zip.h +++ b/Zip/include/Poco/Zip/Zip.h @@ -63,7 +63,11 @@ #if !defined(Zip_API) - #define Zip_API + #if defined (__GNUC__) && (__GNUC__ >= 4) + #define Zip_API __attribute__ ((visibility ("default"))) + #else + #define Zip_API + #endif #endif diff --git a/configure b/configure index 8951f982b..df4da5781 100755 --- a/configure +++ b/configure @@ -150,7 +150,7 @@ while [ $# -ge 1 ]; do odbcinclude="`echo ${1} | awk '{print substr($0,16)}'`" ;; --cflags=*) - cflags="`echo ${1} | awk '{print substr($0,10)}'`" ;; + flags="`echo ${1} | awk '{print substr($0,10)}'`" ;; --no-samples) samples="" ;;