AtomicCounter.h   AtomicCounter.h 
// //
// AtomicCounter.h // AtomicCounter.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/AtomicCounter.h#7 $ // $Id: //poco/1.4/Foundation/include/Poco/AtomicCounter.h#8 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
// Module: AtomicCounter // Module: AtomicCounter
// //
// Definition of the AtomicCounter class. // Definition of the AtomicCounter class.
// //
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH. // Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 54 skipping to change at line 54
#elif POCO_OS == POCO_OS_MAC_OS_X #elif POCO_OS == POCO_OS_MAC_OS_X
#include <libkern/OSAtomic.h> #include <libkern/OSAtomic.h>
#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2) || __GNUC__ > 4) && (define d(__x86_64__) || defined(__i386__)) #elif ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2) || __GNUC__ > 4) && (define d(__x86_64__) || defined(__i386__))
#if !defined(POCO_HAVE_GCC_ATOMICS) && !defined(POCO_NO_GCC_ATOMICS) #if !defined(POCO_HAVE_GCC_ATOMICS) && !defined(POCO_NO_GCC_ATOMICS)
#define POCO_HAVE_GCC_ATOMICS #define POCO_HAVE_GCC_ATOMICS
#endif #endif
#elif ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) || __GNUC__ > 4) #elif ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) || __GNUC__ > 4)
#if !defined(POCO_HAVE_GCC_ATOMICS) && !defined(POCO_NO_GCC_ATOMICS) #if !defined(POCO_HAVE_GCC_ATOMICS) && !defined(POCO_NO_GCC_ATOMICS)
#define POCO_HAVE_GCC_ATOMICS #define POCO_HAVE_GCC_ATOMICS
#endif #endif
#else
#include "Poco/Mutex.h"
#endif // POCO_OS #endif // POCO_OS
#include "Poco/Mutex.h"
namespace Poco { namespace Poco {
class Foundation_API AtomicCounter class Foundation_API AtomicCounter
/// This class implements a simple counter, which /// This class implements a simple counter, which
/// provides atomic operations that are safe to /// provides atomic operations that are safe to
/// use in a multithreaded environment. /// use in a multithreaded environment.
/// ///
/// Typical usage of AtomicCounter is for implementing /// Typical usage of AtomicCounter is for implementing
/// reference counting and similar things. /// reference counting and similar things.
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added


 DatagramSocketImpl.h   DatagramSocketImpl.h 
// //
// DatagramSocketImpl.h // DatagramSocketImpl.h
// //
// $Id: //poco/1.4/Net/include/Poco/Net/DatagramSocketImpl.h#1 $ // $Id: //poco/1.4/Net/include/Poco/Net/DatagramSocketImpl.h#2 $
// //
// Library: Net // Library: Net
// Package: Sockets // Package: Sockets
// Module: DatagramSocketImpl // Module: DatagramSocketImpl
// //
// Definition of the DatagramSocketImpl class. // Definition of the DatagramSocketImpl class.
// //
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 52 skipping to change at line 52
#include "Poco/Net/SocketImpl.h" #include "Poco/Net/SocketImpl.h"
namespace Poco { namespace Poco {
namespace Net { namespace Net {
class Net_API DatagramSocketImpl: public SocketImpl class Net_API DatagramSocketImpl: public SocketImpl
/// This class implements an UDP socket. /// This class implements an UDP socket.
{ {
public: public:
DatagramSocketImpl(); DatagramSocketImpl();
/// Creates a StreamSocketImpl. /// Creates a DatagramSocketImpl.
/// ///
/// If the system supports IPv6, the socket will /// If the system supports IPv6, the socket will
/// be an IPv6 socket. Otherwise, it will be /// be an IPv6 socket. Otherwise, it will be
/// an IPv4 socket. /// an IPv4 socket.
explicit DatagramSocketImpl(IPAddress::Family family); explicit DatagramSocketImpl(IPAddress::Family family);
/// Creates an unconnected datagram socket. /// Creates an unconnected datagram socket.
/// ///
/// The socket will be created for the /// The socket will be created for the
/// given address family. /// given address family.
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 DirectoryWatcher.h   DirectoryWatcher.h 
// //
// DirectoryWatcher.h // DirectoryWatcher.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/DirectoryWatcher.h#3 $ // $Id: //poco/1.4/Foundation/include/Poco/DirectoryWatcher.h#4 $
// //
// Library: Foundation // Library: Foundation
// Package: Filesystem // Package: Filesystem
// Module: DirectoryWatcher // Module: DirectoryWatcher
// //
// Definition of the DirectoryWatcher class. // Definition of the DirectoryWatcher class.
// //
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. // Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 150 skipping to change at line 150
BasicEvent<const DirectoryEvent> itemMovedTo; BasicEvent<const DirectoryEvent> itemMovedTo;
/// Fired when a file or directory has been moved. This even t delivers the new name. /// Fired when a file or directory has been moved. This even t delivers the new name.
BasicEvent<const Exception> scanError; BasicEvent<const Exception> scanError;
/// Fired when an error occurs while scanning for changes. /// Fired when an error occurs while scanning for changes.
DirectoryWatcher(const std::string& path, int eventMask = DW_FILTER_ ENABLE_ALL, int scanInterval = DW_DEFAULT_SCAN_INTERVAL); DirectoryWatcher(const std::string& path, int eventMask = DW_FILTER_ ENABLE_ALL, int scanInterval = DW_DEFAULT_SCAN_INTERVAL);
/// Creates a DirectoryWatcher for the directory given in pa th. /// Creates a DirectoryWatcher for the directory given in pa th.
/// To enable only specific events, an eventMask can be spec ified by /// To enable only specific events, an eventMask can be spec ified by
/// OR-ing the desired event IDs (e.g., DW_FILE_ADDED | DW_F ILE_MODIFIED). /// OR-ing the desired event IDs (e.g., DW_ITEM_ADDED | DW_I TEM_MODIFIED).
/// On platforms where no native filesystem notifications ar e available, /// On platforms where no native filesystem notifications ar e available,
/// scanInterval specifies the interval in seconds between s cans /// scanInterval specifies the interval in seconds between s cans
/// of the directory. /// of the directory.
DirectoryWatcher(const File& directory, int eventMask = DW_FILTER_EN ABLE_ALL, int scanInterval = DW_DEFAULT_SCAN_INTERVAL); DirectoryWatcher(const File& directory, int eventMask = DW_FILTER_EN ABLE_ALL, int scanInterval = DW_DEFAULT_SCAN_INTERVAL);
/// Creates a DirectoryWatcher for the specified directory /// Creates a DirectoryWatcher for the specified directory
/// To enable only specific events, an eventMask can be spec ified by /// To enable only specific events, an eventMask can be spec ified by
/// OR-ing the desired event IDs (e.g., DW_FILE_ADDED | DW_F ILE_MODIFIED). /// OR-ing the desired event IDs (e.g., DW_ITEM_ADDED | DW_I TEM_MODIFIED).
/// On platforms where no native filesystem notifications ar e available, /// On platforms where no native filesystem notifications ar e available,
/// scanInterval specifies the interval in seconds between s cans /// scanInterval specifies the interval in seconds between s cans
/// of the directory. /// of the directory.
~DirectoryWatcher(); ~DirectoryWatcher();
/// Destroys the DirectoryWatcher. /// Destroys the DirectoryWatcher.
void suspendEvents(); void suspendEvents();
/// Suspends sending of events. Can be called multiple times , but every /// Suspends sending of events. Can be called multiple times , but every
/// call to suspendEvent() must be matched by a call to resu meEvents(). /// call to suspendEvent() must be matched by a call to resu meEvents().
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added


 FileChannel.h   FileChannel.h 
// //
// FileChannel.h // FileChannel.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/FileChannel.h#4 $ // $Id: //poco/1.4/Foundation/include/Poco/FileChannel.h#5 $
// //
// Library: Foundation // Library: Foundation
// Package: Logging // Package: Logging
// Module: FileChannel // Module: FileChannel
// //
// Definition of the FileChannel class. // Definition of the FileChannel class.
// //
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 170 skipping to change at line 170
/// specifies the maximum number of archived log files. /// specifies the maximum number of archived log files.
/// If the number is exceeded, archived log files are /// If the number is exceeded, archived log files are
/// deleted, starting with the oldest. /// deleted, starting with the oldest.
/// ///
/// The flush property specifies whether each log message is flushed /// The flush property specifies whether each log message is flushed
/// immediately to the log file (which may hurt application performa nce, /// immediately to the log file (which may hurt application performa nce,
/// but ensures that everything is in the log in case of a system cr ash), /// but ensures that everything is in the log in case of a system cr ash),
// or whether it's allowed to stay in the system's file buffer for some time. // or whether it's allowed to stay in the system's file buffer for some time.
/// Valid values are: /// Valid values are:
/// ///
/// * true: Every essages is immediately flushed to the log file /// * true: Every essages is immediately flushed to the log file
(default). (default).
/// * false: Messages are not immediately flushed to the log file /// * false: Messages are not immediately flushed to the log file.
. ///
/// The rotateOnOpen property specifies whether an existing log file
should be
/// rotated (and archived) when the channel is opened. Valid values
are:
///
/// * true: The log file is rotated (and archived) when the chann
el is opened.
/// * false: Log messages will be appended to an existing log file
,
/// if it exists (unless other conditions for a rotation
are met).
/// This is the default.
/// ///
/// For a more lightweight file channel class, see SimpleFileChannel . /// For a more lightweight file channel class, see SimpleFileChannel .
{ {
public: public:
FileChannel(); FileChannel();
/// Creates the FileChannel. /// Creates the FileChannel.
FileChannel(const std::string& path); FileChannel(const std::string& path);
/// Creates the FileChannel for a file with the given path. /// Creates the FileChannel for a file with the given path.
skipping to change at line 195 skipping to change at line 203
void close(); void close();
/// Closes the FileChannel. /// Closes the FileChannel.
void log(const Message& msg); void log(const Message& msg);
/// Logs the given message to the file. /// Logs the given message to the file.
void setProperty(const std::string& name, const std::string& value); void setProperty(const std::string& name, const std::string& value);
/// Sets the property with the given name. /// Sets the property with the given name.
/// ///
/// The following properties are supported: /// The following properties are supported:
/// * path: The log file's path. /// * path: The log file's path.
/// * rotation: The log file's rotation mode. See the /// * rotation: The log file's rotation mode. See the
/// FileChannel class for details. /// FileChannel class for details.
/// * archive: The log file's archive mode. See the /// * archive: The log file's archive mode. See the
/// FileChannel class for details. /// FileChannel class for details.
/// * times: The log file's time mode. See the /// * times: The log file's time mode. See the
/// FileChannel class for details. /// FileChannel class for details.
/// * compress: Enable or disable compression of /// * compress: Enable or disable compression of
/// archived files. See the FileChannel clas /// archived files. See the FileChannel cl
s ass
/// for details. /// for details.
/// * purgeAge: Maximum age of an archived log file befo /// * purgeAge: Maximum age of an archived log file be
re fore
/// it is purged. See the FileChannel class /// it is purged. See the FileChannel clas
for s for
/// details. /// details.
/// * purgeCount: Maximum number of archived log files bef /// * purgeCount: Maximum number of archived log files b
ore efore
/// files are purged. See the FileChannel cl /// files are purged. See the FileChannel
ass class
/// for details. /// for details.
/// * flush: Specifies whether messages are immediate /// * flush: Specifies whether messages are immedia
ly tely
/// flushed to the log file. See the FileCha /// flushed to the log file. See the FileC
nnel class hannel class
/// for details. /// for details.
/// * rotateOnOpen: Specifies whether an existing log file
should be
/// rotated and archived when the channel
is opened.
std::string getProperty(const std::string& name) const; std::string getProperty(const std::string& name) const;
/// Returns the value of the property with the given name. /// Returns the value of the property with the given name.
/// See setProperty() for a description of the supported /// See setProperty() for a description of the supported
/// properties. /// properties.
Timestamp creationDate() const; Timestamp creationDate() const;
/// Returns the log file's creation date. /// Returns the log file's creation date.
UInt64 size() const; UInt64 size() const;
skipping to change at line 237 skipping to change at line 247
/// Returns the log file's path. /// Returns the log file's path.
static const std::string PROP_PATH; static const std::string PROP_PATH;
static const std::string PROP_ROTATION; static const std::string PROP_ROTATION;
static const std::string PROP_ARCHIVE; static const std::string PROP_ARCHIVE;
static const std::string PROP_TIMES; static const std::string PROP_TIMES;
static const std::string PROP_COMPRESS; static const std::string PROP_COMPRESS;
static const std::string PROP_PURGEAGE; static const std::string PROP_PURGEAGE;
static const std::string PROP_PURGECOUNT; static const std::string PROP_PURGECOUNT;
static const std::string PROP_FLUSH; static const std::string PROP_FLUSH;
static const std::string PROP_ROTATEONOPEN;
protected: protected:
~FileChannel(); ~FileChannel();
void setRotation(const std::string& rotation); void setRotation(const std::string& rotation);
void setArchive(const std::string& archive); void setArchive(const std::string& archive);
void setCompress(const std::string& compress); void setCompress(const std::string& compress);
void setPurgeAge(const std::string& age); void setPurgeAge(const std::string& age);
void setPurgeCount(const std::string& count); void setPurgeCount(const std::string& count);
void setFlush(const std::string& flush); void setFlush(const std::string& flush);
void setRotateOnOpen(const std::string& rotateOnOpen);
void purge(); void purge();
private: private:
std::string _path; std::string _path;
std::string _times; std::string _times;
std::string _rotation; std::string _rotation;
std::string _archive; std::string _archive;
bool _compress; bool _compress;
std::string _purgeAge; std::string _purgeAge;
std::string _purgeCount; std::string _purgeCount;
bool _flush; bool _flush;
bool _rotateOnOpen;
LogFile* _pFile; LogFile* _pFile;
RotateStrategy* _pRotateStrategy; RotateStrategy* _pRotateStrategy;
ArchiveStrategy* _pArchiveStrategy; ArchiveStrategy* _pArchiveStrategy;
PurgeStrategy* _pPurgeStrategy; PurgeStrategy* _pPurgeStrategy;
FastMutex _mutex; FastMutex _mutex;
}; };
} // namespace Poco } // namespace Poco
#endif // Foundation_FileChannel_INCLUDED #endif // Foundation_FileChannel_INCLUDED
 End of changes. 6 change blocks. 
31 lines changed or deleted 50 lines changed or added


 Foundation.h   Foundation.h 
// //
// Foundation.h // Foundation.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/Foundation.h#2 $ // $Id: //poco/1.4/Foundation/include/Poco/Foundation.h#3 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
// Module: Foundation // Module: Foundation
// //
// Basic definitions for the POCO Foundation library. // Basic definitions for the POCO Foundation library.
// This file must be the first file included by every other Foundation // This file must be the first file included by every other Foundation
// header file. // header file.
// //
// Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2010, Applied Informatics Software Engineering GmbH.
skipping to change at line 121 skipping to change at line 121
#include "Poco/Platform_WIN32.h" #include "Poco/Platform_WIN32.h"
#elif defined(__VMS) #elif defined(__VMS)
#include "Poco/Platform_VMS.h" #include "Poco/Platform_VMS.h"
#elif defined(POCO_VXWORKS) #elif defined(POCO_VXWORKS)
#include "Poco/Platform_VX.h" #include "Poco/Platform_VX.h"
#elif defined(POCO_OS_FAMILY_UNIX) #elif defined(POCO_OS_FAMILY_UNIX)
#include "Poco/Platform_POSIX.h" #include "Poco/Platform_POSIX.h"
#endif #endif
// //
// Cleanup inconsistencies
//
#ifdef POCO_OS_FAMILY_WINDOWS
#if defined(POCO_WIN32_UTF8) && defined(POCO_NO_WSTRING)
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually excl
usive.
#endif
#else
#ifdef POCO_WIN32_UTF8
#undef POCO_WIN32_UTF8
#endif
#endif
//
// POCO_JOIN // POCO_JOIN
// //
// The following piece of macro magic joins the two // The following piece of macro magic joins the two
// arguments together, even when one of the arguments is // arguments together, even when one of the arguments is
// itself a macro (see 16.3.1 in C++ standard). The key // itself a macro (see 16.3.1 in C++ standard). The key
// is that macro expansion of macro arguments does not // is that macro expansion of macro arguments does not
// occur in POCO_DO_JOIN2 but does in POCO_DO_JOIN. // occur in POCO_DO_JOIN2 but does in POCO_DO_JOIN.
// //
#define POCO_JOIN(X, Y) POCO_DO_JOIN(X, Y) #define POCO_JOIN(X, Y) POCO_DO_JOIN(X, Y)
#define POCO_DO_JOIN(X, Y) POCO_DO_JOIN2(X, Y) #define POCO_DO_JOIN(X, Y) POCO_DO_JOIN2(X, Y)
 End of changes. 2 change blocks. 
1 lines changed or deleted 15 lines changed or added


 Platform.h   Platform.h 
// //
// Platform.h // Platform.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/Platform.h#4 $ // $Id: //poco/1.4/Foundation/include/Poco/Platform.h#7 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
// Module: Platform // Module: Platform
// //
// Platform and architecture identification macros. // Platform and architecture identification macros.
// //
// NOTE: This file may be included from both C++ and C code, so it // NOTE: This file may be included from both C++ and C code, so it
// must not contain any C++ specific things. // must not contain any C++ specific things.
// //
skipping to change at line 122 skipping to change at line 122
#define POCO_OS_FAMILY_UNIX 1 #define POCO_OS_FAMILY_UNIX 1
#define POCO_OS POCO_OS_CYGWIN #define POCO_OS POCO_OS_CYGWIN
#elif defined(__VMS) #elif defined(__VMS)
#define POCO_OS_FAMILY_VMS 1 #define POCO_OS_FAMILY_VMS 1
#define POCO_OS POCO_OS_VMS #define POCO_OS POCO_OS_VMS
#elif defined(POCO_VXWORKS) #elif defined(POCO_VXWORKS)
#define POCO_OS_FAMILY_UNIX 1 #define POCO_OS_FAMILY_UNIX 1
#define POCO_OS POCO_OS_VXWORKS #define POCO_OS POCO_OS_VXWORKS
#endif #endif
#if !defined(POCO_OS)
#error "Unknown Platform."
#endif
// //
// Hardware Architecture and Byte Order // Hardware Architecture and Byte Order
// //
#define POCO_ARCH_ALPHA 0x01 #define POCO_ARCH_ALPHA 0x01
#define POCO_ARCH_IA32 0x02 #define POCO_ARCH_IA32 0x02
#define POCO_ARCH_IA64 0x03 #define POCO_ARCH_IA64 0x03
#define POCO_ARCH_MIPS 0x04 #define POCO_ARCH_MIPS 0x04
#define POCO_ARCH_HPPA 0x05 #define POCO_ARCH_HPPA 0x05
#define POCO_ARCH_PPC 0x06 #define POCO_ARCH_PPC 0x06
#define POCO_ARCH_POWER 0x07 #define POCO_ARCH_POWER 0x07
skipping to change at line 186 skipping to change at line 190
#define POCO_ARCH_BIG_ENDIAN 1 #define POCO_ARCH_BIG_ENDIAN 1
#else #else
#define POCO_ARCH_LITTLE_ENDIAN 1 #define POCO_ARCH_LITTLE_ENDIAN 1
#endif #endif
#elif defined(__m68k__) #elif defined(__m68k__)
#define POCO_ARCH POCO_ARCH_M68K #define POCO_ARCH POCO_ARCH_M68K
#define POCO_ARCH_BIG_ENDIAN 1 #define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__s390__) #elif defined(__s390__)
#define POCO_ARCH POCO_ARCH_S390 #define POCO_ARCH POCO_ARCH_S390
#define POCO_ARCH_BIG_ENDIAN 1 #define POCO_ARCH_BIG_ENDIAN 1
#elif defined(__sh__) || defined(__sh) #elif defined(__sh__) || defined(__sh) || defined(SHx) || defined(_SHX_)
#define POCO_ARCH POCO_ARCH_SH #define POCO_ARCH POCO_ARCH_SH
#if defined(__LITTLE_ENDIAN__) #if defined(__LITTLE_ENDIAN__) || (POCO_OS == POCO_OS_WINDOWS_CE)
#define POCO_ARCH_LITTLE_ENDIAN 1 #define POCO_ARCH_LITTLE_ENDIAN 1
#else #else
#define POCO_ARCH_BIG_ENDIAN 1 #define POCO_ARCH_BIG_ENDIAN 1
#endif #endif
#elif defined (nios2) || defined(__nios2) || defined(__nios2__) #elif defined (nios2) || defined(__nios2) || defined(__nios2__)
#define POCO_ARCH POCO_ARCH_NIOS2 #define POCO_ARCH POCO_ARCH_NIOS2
#if defined(__nios2_little_endian) || defined(nios2_little_endian) || d efined(__nios2_little_endian__) #if defined(__nios2_little_endian) || defined(nios2_little_endian) || d efined(__nios2_little_endian__)
#define POCO_ARCH_LITTLE_ENDIAN 1 #define POCO_ARCH_LITTLE_ENDIAN 1
#else #else
#define POCO_ARCH_BIG_ENDIAN 1 #define POCO_ARCH_BIG_ENDIAN 1
#endif #endif
#endif #endif
#if !defined(POCO_ARCH)
#error "Unknown Hardware Architecture."
#endif
//
// Thread-safety of local static initialization
//
#if __cplusplus >= 201103L || __GNUC__ >= 4 || defined(__clang__)
#ifndef POCO_LOCAL_STATIC_INIT_IS_THREADSAFE
#define POCO_LOCAL_STATIC_INIT_IS_THREADSAFE 1
#endif
#endif
#endif // Foundation_Platform_INCLUDED #endif // Foundation_Platform_INCLUDED
 End of changes. 5 change blocks. 
3 lines changed or deleted 20 lines changed or added


 ServerApplication.h   ServerApplication.h 
// //
// ServerApplication.h // ServerApplication.h
// //
// $Id: //poco/1.4/Util/include/Poco/Util/ServerApplication.h#3 $ // $Id: //poco/1.4/Util/include/Poco/Util/ServerApplication.h#4 $
// //
// Library: Util // Library: Util
// Package: Application // Package: Application
// Module: ServerApplication // Module: ServerApplication
// //
// Definition of the ServerApplication class. // Definition of the ServerApplication class.
// //
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 47 skipping to change at line 47
#ifndef Util_ServerApplication_INCLUDED #ifndef Util_ServerApplication_INCLUDED
#define Util_ServerApplication_INCLUDED #define Util_ServerApplication_INCLUDED
#include "Poco/Util/Util.h" #include "Poco/Util/Util.h"
#include "Poco/Util/Application.h" #include "Poco/Util/Application.h"
#include "Poco/Event.h" #include "Poco/Event.h"
#if defined(POCO_OS_FAMILY_WINDOWS) #if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/NamedEvent.h" #include "Poco/NamedEvent.h"
#endif #endif
#include <iostream>
namespace Poco { namespace Poco {
namespace Util { namespace Util {
class Util_API ServerApplication: public Application class Util_API ServerApplication: public Application
/// A subclass of the Application class that is used /// A subclass of the Application class that is used
/// for implementing server applications. /// for implementing server applications.
/// ///
/// A ServerApplication allows for the application /// A ServerApplication allows for the application
/// to run as a Windows service or as a Unix daemon /// to run as a Windows service or as a Unix daemon
skipping to change at line 244 skipping to change at line 245
} } // namespace Poco::Util } } // namespace Poco::Util
// //
// Macro to implement main() // Macro to implement main()
// //
#if defined(_WIN32) && defined(POCO_WIN32_UTF8) #if defined(_WIN32) && defined(POCO_WIN32_UTF8)
#define POCO_SERVER_MAIN(App) \ #define POCO_SERVER_MAIN(App) \
int wmain(int argc, wchar_t** argv) \ int wmain(int argc, wchar_t** argv) \
{ \ { \
App app; \ try \
return app.run(argc, argv); \ {
\
App app; \
return app.run(argc, argv); \
}
\
catch (Poco::Exception& exc) \
{
\
std::cerr << exc.displayText() << std::endl; \
return Poco::Util::Application::EXIT_SOFTWARE; \
}
\
} }
#elif defined(POCO_VXWORKS) #elif defined(POCO_VXWORKS)
#define POCO_SERVER_MAIN(App) \ #define POCO_SERVER_MAIN(App) \
int pocoSrvMain(const char* appName, ...) \ int pocoSrvMain(const char* appName, ...)
{ \ \
std::vector<std::string> args; \ {
args.push_back(std::string(appName)); \ \
va_list vargs; \ std::vector<std::string> args;
va_start(vargs, appName); \ \
const char* arg = va_arg(vargs, const char*); \ args.push_back(std::string(appName));
while (arg) \ \
{ \ va_list vargs;
args.push_back(std::string(arg)); \ \
arg = va_arg(vargs, const char*); \ va_start(vargs, appName);
} \ \
va_end(vargs); \ const char* arg = va_arg(vargs, const char*); \
App app; \ while (arg)
return app.run(args); \ \
{
\
args.push_back(std::string(arg));
\
arg = va_arg(vargs, const char*);
\
}
\
va_end(vargs);
\
try
\
{
\
App app;
\
return app.run(args);
\
}
\
catch (Poco::Exception& exc)
\
{
\
std::cerr << exc.displayText() << std::endl; \
return Poco::Util::Application::EXIT_SOFTWARE; \
}
\
} }
#else #else
#define POCO_SERVER_MAIN(App) \ #define POCO_SERVER_MAIN(App) \
int main(int argc, char** argv) \ int main(int argc, char** argv) \
{ \ { \
App app; \ try \
return app.run(argc, argv); \ {
\
App app; \
return app.run(argc, argv); \
}
\
catch (Poco::Exception& exc) \
{
\
std::cerr << exc.displayText() << std::endl; \
return Poco::Util::Application::EXIT_SOFTWARE; \
}
\
} }
#endif #endif
#endif // Util_ServerApplication_INCLUDED #endif // Util_ServerApplication_INCLUDED
 End of changes. 5 change blocks. 
20 lines changed or deleted 73 lines changed or added


 Thread_POSIX.h   Thread_POSIX.h 
// //
// Thread_POSIX.h // Thread_POSIX.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/Thread_POSIX.h#5 $ // $Id: //poco/1.4/Foundation/include/Poco/Thread_POSIX.h#6 $
// //
// Library: Foundation // Library: Foundation
// Package: Threading // Package: Threading
// Module: Thread // Module: Thread
// //
// Definition of the ThreadImpl class for POSIX Threads. // Definition of the ThreadImpl class for POSIX Threads.
// //
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 209 skipping to change at line 209
(_pData->pCallbackTarget.get() != 0 && _pData->pCallbackTarg et->callback != 0); (_pData->pCallbackTarget.get() != 0 && _pData->pCallbackTarg et->callback != 0);
} }
inline void ThreadImpl::yieldImpl() inline void ThreadImpl::yieldImpl()
{ {
sched_yield(); sched_yield();
} }
inline int ThreadImpl::getStackSizeImpl() const inline int ThreadImpl::getStackSizeImpl() const
{ {
return _pData->stackSize; return static_cast<int>(_pData->stackSize);
} }
inline ThreadImpl::TIDImpl ThreadImpl::tidImpl() const inline ThreadImpl::TIDImpl ThreadImpl::tidImpl() const
{ {
return _pData->thread; return _pData->thread;
} }
} // namespace Poco } // namespace Poco
#endif // Foundation_Thread_POSIX_INCLUDED #endif // Foundation_Thread_POSIX_INCLUDED
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 Unicode.h   Unicode.h 
// //
// Unicode.h // Unicode.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/Unicode.h#1 $ // $Id: //poco/1.4/Foundation/include/Poco/Unicode.h#2 $
// //
// Library: Foundation // Library: Foundation
// Package: Text // Package: Text
// Module: Unicode // Module: Unicode
// //
// Definition of the Unicode class. // Definition of the Unicode class.
// //
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH. // Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 187 skipping to change at line 187
UCP_LEPCHA, UCP_LEPCHA,
UCP_LYCIAN, UCP_LYCIAN,
UCP_LYDIAN, UCP_LYDIAN,
UCP_OL_CHIKI, UCP_OL_CHIKI,
UCP_REJANG, UCP_REJANG,
UCP_SAURASHTRA, UCP_SAURASHTRA,
UCP_SUNDANESE, UCP_SUNDANESE,
UCP_VAI UCP_VAI
}; };
enum
{
UCP_MAX_CODEPOINT = 0x10FFFF
};
struct CharacterProperties struct CharacterProperties
/// This structure holds the character properties /// This structure holds the character properties
/// of an Unicode character. /// of an Unicode character.
{ {
CharacterCategory category; CharacterCategory category;
CharacterType type; CharacterType type;
Script script; Script script;
}; };
static void properties(int ch, CharacterProperties& props); static void properties(int ch, CharacterProperties& props);
 End of changes. 2 change blocks. 
1 lines changed or deleted 6 lines changed or added


 UnicodeConverter.h   UnicodeConverter.h 
// //
// UnicodeConverter.h // UnicodeConverter.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/UnicodeConverter.h#1 $ // $Id: //poco/1.4/Foundation/include/Poco/UnicodeConverter.h#2 $
// //
// Library: Foundation // Library: Foundation
// Package: Text // Package: Text
// Module: UnicodeConverter // Module: UnicodeConverter
// //
// Definition of the UnicodeConverter class. // Definition of the UnicodeConverter class.
// //
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 38 skipping to change at line 38
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVEN T // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVEN T
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL E // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABL E
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI SE, // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWI SE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT HER // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT HER
// DEALINGS IN THE SOFTWARE. // DEALINGS IN THE SOFTWARE.
// //
#ifndef POCO_NO_WSTRING
#ifndef Foundation_UnicodeConverter_INCLUDED #ifndef Foundation_UnicodeConverter_INCLUDED
#define Foundation_UnicodeConverter_INCLUDED #define Foundation_UnicodeConverter_INCLUDED
#include "Poco/Foundation.h" #include "Poco/Foundation.h"
namespace Poco { namespace Poco {
class Foundation_API UnicodeConverter class Foundation_API UnicodeConverter
/// A convenience class that converts strings from /// A convenience class that converts strings from
/// UTF-8 encoded std::strings to UTF-16 encoded std::wstrings /// UTF-8 encoded std::strings to UTF-16 encoded std::wstrings
skipping to change at line 76 skipping to change at line 78
static void toUTF8(const wchar_t* utf16String, int length, std::stri ng& utf8String); static void toUTF8(const wchar_t* utf16String, int length, std::stri ng& utf8String);
/// Converts the given zero-terminated UTF-16 encoded wide c haracter sequence into an UTF-8 encoded wstring. /// Converts the given zero-terminated UTF-16 encoded wide c haracter sequence into an UTF-8 encoded wstring.
static void toUTF8(const wchar_t* utf16String, std::string& utf8Stri ng); static void toUTF8(const wchar_t* utf16String, std::string& utf8Stri ng);
/// Converts the given UTF-16 encoded zero terminated charac ter sequence into an UTF-8 encoded string. /// Converts the given UTF-16 encoded zero terminated charac ter sequence into an UTF-8 encoded string.
}; };
} // namespace Poco } // namespace Poco
#endif // Foundation_UnicodeConverter_INCLUDED #endif // Foundation_UnicodeConverter_INCLUDED
#endif // POCO_NO_WSTRING
 End of changes. 3 change blocks. 
1 lines changed or deleted 3 lines changed or added


 Version.h   Version.h 
// //
// Version.h // Version.h
// //
// $Id: //poco/1.4/Foundation/include/Poco/Version.h#11 $ // $Id: //poco/1.4/Foundation/include/Poco/Version.h#12 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
// Module: Version // Module: Version
// //
// Version information for the POCO C++ Libraries. // Version information for the POCO C++ Libraries.
// //
// Copyright (c) 2004-2012, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2012, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 55 skipping to change at line 55
// - AA is the major version number, // - AA is the major version number,
// - BB is the minor version number, // - BB is the minor version number,
// - CC is the revision number, and // - CC is the revision number, and
// - DD is the patch level number. // - DD is the patch level number.
// Note that some patch level numbers have // Note that some patch level numbers have
// a special meaning: // a special meaning:
// Dx are development releases // Dx are development releases
// Ax are alpha releases // Ax are alpha releases
// Bx are beta releases // Bx are beta releases
// //
#define POCO_VERSION 0x01040400 #define POCO_VERSION 0x01040500
#endif // Foundation_Version_INCLUDED #endif // Foundation_Version_INCLUDED
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added


 WebSocketImpl.h   WebSocketImpl.h 
// //
// WebSocketImpl.h // WebSocketImpl.h
// //
// $Id: //poco/1.4/Net/include/Poco/Net/WebSocketImpl.h#4 $ // $Id: //poco/1.4/Net/include/Poco/Net/WebSocketImpl.h#5 $
// //
// Library: Net // Library: Net
// Package: WebSocket // Package: WebSocket
// Module: WebSocketImpl // Module: WebSocketImpl
// //
// Definition of the StreamSocketImpl class. // Definition of the StreamSocketImpl class.
// //
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH. // Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 92 skipping to change at line 92
bool mustMaskPayload() const; bool mustMaskPayload() const;
/// Returns true if the payload must be masked. /// Returns true if the payload must be masked.
protected: protected:
enum enum
{ {
FRAME_FLAG_MASK = 0x80, FRAME_FLAG_MASK = 0x80,
MAX_HEADER_LENGTH = 14 MAX_HEADER_LENGTH = 14
}; };
int receiveNBytes(void* buffer, int bytes);
virtual ~WebSocketImpl(); virtual ~WebSocketImpl();
private: private:
WebSocketImpl(); WebSocketImpl();
StreamSocketImpl* _pStreamSocketImpl; StreamSocketImpl* _pStreamSocketImpl;
int _frameFlags; int _frameFlags;
bool _mustMaskPayload; bool _mustMaskPayload;
Poco::Random _rnd; Poco::Random _rnd;
}; };
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added


 XMLWriter.h   XMLWriter.h 
// //
// XMLWriter.h // XMLWriter.h
// //
// $Id: //poco/1.4/XML/include/Poco/XML/XMLWriter.h#1 $ // $Id: //poco/1.4/XML/include/Poco/XML/XMLWriter.h#3 $
// //
// Library: XML // Library: XML
// Package: XML // Package: XML
// Module: XMLWriter // Module: XMLWriter
// //
// Definition of the XMLWriter class. // Definition of the XMLWriter class.
// //
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
// //
skipping to change at line 277 skipping to change at line 277
// DTDHandler // DTDHandler
void notationDecl(const XMLString& name, const XMLString* publicId, const XMLString* systemId); void notationDecl(const XMLString& name, const XMLString* publicId, const XMLString* systemId);
void unparsedEntityDecl(const XMLString& name, const XMLString* publ icId, const XMLString& systemId, const XMLString& notationName); void unparsedEntityDecl(const XMLString& name, const XMLString* publ icId, const XMLString& systemId, const XMLString& notationName);
static const std::string NEWLINE_DEFAULT; static const std::string NEWLINE_DEFAULT;
static const std::string NEWLINE_CR; static const std::string NEWLINE_CR;
static const std::string NEWLINE_CRLF; static const std::string NEWLINE_CRLF;
static const std::string NEWLINE_LF; static const std::string NEWLINE_LF;
// Namespace support.
XMLString uniquePrefix();
/// Creates and returns a unique namespace prefix that
/// can be used with startPrefixMapping().
bool isNamespaceMapped(const std::string& namespc) const;
/// Returns true if the given namespace has been mapped
/// to a prefix in the current element or its ancestors.
// Misc.
int depth() const;
/// Return the number of nested XML elements.
///
/// Will be -1 if no document or fragment has been started,
/// 0 if the document or fragment has been started,
/// 1 if the document element has been written and
/// > 1 for every element nested within the document element
.
protected: protected:
typedef std::map<XMLString, XMLString> AttributeMap; typedef std::map<XMLString, XMLString> AttributeMap;
void writeStartElement(const XMLString& namespaceURI, const XMLStrin g& localName, const XMLString& qname, const Attributes& attributes); void writeStartElement(const XMLString& namespaceURI, const XMLStrin g& localName, const XMLString& qname, const Attributes& attributes);
void writeEndElement(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname); void writeEndElement(const XMLString& namespaceURI, const XMLString& localName, const XMLString& qname);
void writeMarkup(const std::string& str) const; void writeMarkup(const std::string& str) const;
void writeXML(const XMLString& str) const; void writeXML(const XMLString& str) const;
void writeXML(XMLChar ch) const; void writeXML(XMLChar ch) const;
void writeNewLine() const; void writeNewLine() const;
void writeIndent() const; void writeIndent() const;
void writeIndent(int indent) const; void writeIndent(int indent) const;
void writeName(const XMLString& prefix, const XMLString& localName); void writeName(const XMLString& prefix, const XMLString& localName);
void writeXMLDeclaration(); void writeXMLDeclaration();
void closeStartTag(); void closeStartTag();
void declareAttributeNamespaces(const Attributes& attributes); void declareAttributeNamespaces(const Attributes& attributes);
void addNamespaceAttributes(AttributeMap& attributeMap); void addNamespaceAttributes(AttributeMap& attributeMap);
void addAttributes(AttributeMap& attributeMap, const Attributes& att ributes, const XMLString& elementNamespaceURI); void addAttributes(AttributeMap& attributeMap, const Attributes& att ributes, const XMLString& elementNamespaceURI);
void writeAttributes(const AttributeMap& attributeMap); void writeAttributes(const AttributeMap& attributeMap);
void prettyPrint() const; void prettyPrint() const;
XMLString newPrefix();
static std::string nameToString(const XMLString& localName, const XM LString& qname); static std::string nameToString(const XMLString& localName, const XM LString& qname);
private: private:
struct Namespace struct Namespace
{ {
Namespace(const XMLString& thePrefix, const XMLString& theNa mespaceURI): Namespace(const XMLString& thePrefix, const XMLString& theNa mespaceURI):
prefix(thePrefix), prefix(thePrefix),
namespaceURI(theNamespaceURI) namespaceURI(theNamespaceURI)
{ {
} }
skipping to change at line 354 skipping to change at line 371
static const std::string MARKUP_LTSLASH; static const std::string MARKUP_LTSLASH;
static const std::string MARKUP_COLON; static const std::string MARKUP_COLON;
static const std::string MARKUP_EQQUOT; static const std::string MARKUP_EQQUOT;
static const std::string MARKUP_QUOT; static const std::string MARKUP_QUOT;
static const std::string MARKUP_SPACE; static const std::string MARKUP_SPACE;
static const std::string MARKUP_TAB; static const std::string MARKUP_TAB;
static const std::string MARKUP_BEGIN_CDATA; static const std::string MARKUP_BEGIN_CDATA;
static const std::string MARKUP_END_CDATA; static const std::string MARKUP_END_CDATA;
}; };
//
// inlines
//
inline int XMLWriter::depth() const
{
return _depth;
}
} } // namespace Poco::XML } } // namespace Poco::XML
#endif // XML_XMLWriter_INCLUDED #endif // XML_XMLWriter_INCLUDED
 End of changes. 4 change blocks. 
2 lines changed or deleted 28 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/