diff --git a/CHANGELOG b/CHANGELOG
index 185ec9069..5c00084e9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -69,6 +69,7 @@ Release 1.5.2 (2013-06-xx)
- added VarIterator
- modified behavior of empty Var (empty == empty)
- added Alignment.h header for C++03 alignment needs
+- added Data/WebNotifier (DB, WebSocket) example
Release 1.5.1 (2013-01-11)
diff --git a/Data/samples/Makefile b/Data/samples/Makefile
index 13213b108..a04bbbfed 100644
--- a/Data/samples/Makefile
+++ b/Data/samples/Makefile
@@ -14,3 +14,4 @@ projects:
$(MAKE) -C RecordSet $(MAKECMDGOALS)
$(MAKE) -C RowFormatter $(MAKECMDGOALS)
$(MAKE) -C Tuple $(MAKECMDGOALS)
+ $(MAKE) -C WebNotifier $(MAKECMDGOALS)
diff --git a/Data/samples/WebNotifier/CMakeLists.txt b/Data/samples/WebNotifier/CMakeLists.txt
new file mode 100644
index 000000000..181a9cbc1
--- /dev/null
+++ b/Data/samples/WebNotifier/CMakeLists.txt
@@ -0,0 +1,8 @@
+set(SAMPLE_NAME "WebNotifier")
+
+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} PocoDataSQLite PocoData PocoNet PocoFoundation )
diff --git a/Data/samples/WebNotifier/Makefile b/Data/samples/WebNotifier/Makefile
new file mode 100644
index 000000000..deb906201
--- /dev/null
+++ b/Data/samples/WebNotifier/Makefile
@@ -0,0 +1,17 @@
+#
+# Makefile
+#
+# $Id: //poco/Main/Data/samples/WebNotifier/Makefile#1 $
+#
+# Makefile for Poco Data WebNotifier sample
+#
+
+include $(POCO_BASE)/build/rules/global
+
+objects = WebNotifier
+
+target = WebNotifier
+target_version = 1
+target_libs = PocoDataSQLite PocoData PocoNet PocoFoundation
+
+include $(POCO_BASE)/build/rules/exec
diff --git a/Data/samples/WebNotifier/WebNotifier.html b/Data/samples/WebNotifier/WebNotifier.html
new file mode 100644
index 000000000..30b94c3dc
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier.html
@@ -0,0 +1,104 @@
+
+
+ WebSocketServer
+
+
+
+ Web Notifier Example
+
+
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier.progen b/Data/samples/WebNotifier/WebNotifier.progen
new file mode 100644
index 000000000..c966623dc
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier.progen
@@ -0,0 +1,10 @@
+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;..\\..\\..\\Data\\include;..\\..\\..\\Data\\SQLite\\include;..\\..\\..\\Net\\include
+vc.project.linker.dependencies = ws2_32.lib iphlpapi.lib
diff --git a/Data/samples/WebNotifier/WebNotifier_CE_vs90.vcproj b/Data/samples/WebNotifier/WebNotifier_CE_vs90.vcproj
new file mode 100644
index 000000000..1a687cfaa
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_CE_vs90.vcproj
@@ -0,0 +1,468 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_vs100.vcxproj b/Data/samples/WebNotifier/WebNotifier_vs100.vcxproj
new file mode 100644
index 000000000..0bb195cbc
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_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
+
+
+
+ WebNotifier
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}
+ WebNotifier
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_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
+ WebNotifierd
+ WebNotifierd
+ WebNotifierd
+ WebNotifier
+ WebNotifier
+ WebNotifier
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)
+ bin\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\static_mt\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\static_md\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_vs100.vcxproj.filters b/Data/samples/WebNotifier/WebNotifier_vs100.vcxproj.filters
new file mode 100644
index 000000000..b9b6afdfa
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_vs100.vcxproj.filters
@@ -0,0 +1,16 @@
+
+
+
+
+ {59b3834a-33cc-445d-bc2c-207a05a34cf8}
+
+
+ {85b3efc1-1bc0-45c2-9ed1-97cf9ccdb7a3}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_vs110.vcxproj b/Data/samples/WebNotifier/WebNotifier_vs110.vcxproj
new file mode 100644
index 000000000..3ed7e8835
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_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
+
+
+
+ WebNotifier
+ {90B19F28-5258-4618-873A-AF8470B7D91B}
+ WebNotifier
+ 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
+ WebNotifierd
+ WebNotifierd
+ WebNotifierd
+ WebNotifier
+ WebNotifier
+ WebNotifier
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)
+ bin\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\static_mt\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin\static_md\WebNotifierd.pdb
+ Console
+ MachineX86
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX86
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_vs110.vcxproj.filters b/Data/samples/WebNotifier/WebNotifier_vs110.vcxproj.filters
new file mode 100644
index 000000000..781826d81
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_vs110.vcxproj.filters
@@ -0,0 +1,16 @@
+
+
+
+
+ {271a256f-87f8-4f4c-a95b-2d9fb1b21db2}
+
+
+ {52deecb9-bcbf-47b1-b991-beab0a91d75a}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_vs71.vcproj b/Data/samples/WebNotifier/WebNotifier_vs71.vcproj
new file mode 100644
index 000000000..5ca82ccaa
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_vs71.vcproj
@@ -0,0 +1,395 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_vs80.vcproj b/Data/samples/WebNotifier/WebNotifier_vs80.vcproj
new file mode 100644
index 000000000..24661b1d2
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_vs80.vcproj
@@ -0,0 +1,435 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_vs90.vcproj b/Data/samples/WebNotifier/WebNotifier_vs90.vcproj
new file mode 100644
index 000000000..33a4c64fe
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_vs90.vcproj
@@ -0,0 +1,435 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_x64_vs100.vcxproj b/Data/samples/WebNotifier/WebNotifier_x64_vs100.vcxproj
new file mode 100644
index 000000000..a7794af5b
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_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
+
+
+
+ WebNotifier
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}
+ WebNotifier
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_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
+ WebNotifierd
+ WebNotifierd
+ WebNotifierd
+ WebNotifier
+ WebNotifier
+ WebNotifier
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)
+ bin64\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\static_mt\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\static_md\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/WebNotifier_x64_vs100.vcxproj.filters b/Data/samples/WebNotifier/WebNotifier_x64_vs100.vcxproj.filters
new file mode 100644
index 000000000..4219bc9c7
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_x64_vs100.vcxproj.filters
@@ -0,0 +1,16 @@
+
+
+
+
+ {e632f5f6-92dc-4bd4-a2c0-792e900a14e3}
+
+
+ {6eda1939-2478-4c10-9ae7-a65a16b74db5}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_x64_vs110.vcxproj b/Data/samples/WebNotifier/WebNotifier_x64_vs110.vcxproj
new file mode 100644
index 000000000..b06a48ff3
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_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
+
+
+
+ WebNotifier
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}
+ WebNotifier
+ 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
+ WebNotifierd
+ WebNotifierd
+ WebNotifierd
+ WebNotifier
+ WebNotifier
+ WebNotifier
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDLL
+ false
+ true
+ true
+ true
+
+ Level3
+
+ Default
+ %(DisableSpecificWarnings)
+
+
+ ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)
+ bin64\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\static_mt\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+ Disabled
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifierd.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ true
+ true
+ bin64\static_md\WebNotifierd.pdb
+ Console
+ MachineX64
+
+
+
+
+ Disabled
+ OnlyExplicitInline
+ true
+ Speed
+ true
+ .\include;..\..\..\Foundation\include;..\..\..\Net\include;..\..\..\Data\include;..\..\..\Data\SQLite\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\WebNotifier.exe
+ ..\..\..\lib64;%(AdditionalLibraryDirectories)
+ false
+ Console
+ true
+ true
+ MachineX64
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_x64_vs110.vcxproj.filters b/Data/samples/WebNotifier/WebNotifier_x64_vs110.vcxproj.filters
new file mode 100644
index 000000000..1b1b70731
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_x64_vs110.vcxproj.filters
@@ -0,0 +1,16 @@
+
+
+
+
+ {7a2bddf7-0f40-4466-9bea-5a7d428406a4}
+
+
+ {74e010a0-6275-41f8-aeaa-21cec3ec3a64}
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/Data/samples/WebNotifier/WebNotifier_x64_vs90.vcproj b/Data/samples/WebNotifier/WebNotifier_x64_vs90.vcproj
new file mode 100644
index 000000000..592d9f3ba
--- /dev/null
+++ b/Data/samples/WebNotifier/WebNotifier_x64_vs90.vcproj
@@ -0,0 +1,435 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Data/samples/WebNotifier/src/WebNotifier.cpp b/Data/samples/WebNotifier/src/WebNotifier.cpp
new file mode 100644
index 000000000..4314ac6a0
--- /dev/null
+++ b/Data/samples/WebNotifier/src/WebNotifier.cpp
@@ -0,0 +1,408 @@
+//
+// WebNotifier.cpp
+//
+// $Id: //poco/Main/Data/samples/WebNotifier/src/WebNotifier.cpp#2 $
+//
+// This sample demonstrates a combination of Data and Net libraries by
+// creating a database, registering callbacks for insert/update events
+// and sending database modifications to the web client through web socket.
+// Since callbacks are only registered for session, in order to see the
+// effects, database updates should be done through the shell provided by
+// this example.
+//
+// This is only a demo. For production-grade a better web socket management
+// facility as well as persisting notification functionality (e.g. via
+// triggers and external functions) should be used.
+//
+// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
+// and Contributors.
+//
+// Permission is hereby granted, free of charge, to any person or organization
+// obtaining a copy of the software and accompanying documentation covered by
+// this license (the "Software") to use, reproduce, display, distribute,
+// execute, and transmit the Software, and to prepare derivative works of the
+// Software, and to permit third-parties to whom the Software is furnished to
+// do so, all subject to the following:
+//
+// The copyright notices in the Software and this entire statement, including
+// the above license grant, this restriction and the following disclaimer,
+// must be included in all copies of the Software, in whole or in part, and
+// all derivative works of the Software, unless such copies or derivative
+// works are solely in the form of machine-executable object code generated by
+// a source language processor.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+
+#include "Poco/Delegate.h"
+#include "Poco/Timespan.h"
+#include "Poco/Exception.h"
+#include "Poco/Net/HTTPServer.h"
+#include "Poco/Net/HTTPRequestHandler.h"
+#include "Poco/Net/HTTPRequestHandlerFactory.h"
+#include "Poco/Net/HTTPServerParams.h"
+#include "Poco/Net/HTTPServerRequest.h"
+#include "Poco/Net/HTTPServerResponse.h"
+#include "Poco/Net/HTTPServerParams.h"
+#include "Poco/Net/ServerSocket.h"
+#include "Poco/Net/WebSocket.h"
+#include "Poco/Net/NetException.h"
+#include "Poco/Data/Session.h"
+#include "Poco/Data/RowFormatter.h"
+#include "Poco/Data/RecordSet.h"
+#include "Poco/Data/SQLite/Notifier.h"
+#include
+
+using Poco::delegate;
+using Poco::Timespan;
+using Poco::Exception;
+using Poco::NullPointerException;
+
+using Poco::Net::ServerSocket;
+using Poco::Net::WebSocket;
+using Poco::Net::WebSocketException;
+using Poco::Net::HTTPRequestHandler;
+using Poco::Net::HTTPRequestHandlerFactory;
+using Poco::Net::HTTPServer;
+using Poco::Net::HTTPServerRequest;
+using Poco::Net::HTTPResponse;
+using Poco::Net::HTTPServerResponse;
+using Poco::Net::HTTPServerParams;
+
+using namespace Poco::Data::Keywords;
+using Poco::Data::Session;
+using Poco::Data::Statement;
+using Poco::Data::RowFormatter;
+using Poco::Data::RecordSet;
+using Poco::Data::SQLite::Notifier;
+
+
+#define PROMPT "sql>"
+
+
+class PageRequestHandler: public HTTPRequestHandler
+ /// Return a HTML document with some JavaScript creating
+ /// a WebSocket connection.
+{
+public:
+ void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
+ {
+ response.setChunkedTransferEncoding(true);
+ response.sendFile("WebNotifier.html", "text/html");
+ }
+};
+
+
+/////////////////
+// WebSocket //
+/////////////////
+
+
+class WebSocketRequestHandler: public HTTPRequestHandler
+ /// Handler for the WebSocket connection.
+{
+public:
+ WebSocketRequestHandler() : _pWS(0), _flags(0)
+ {
+ }
+
+ ~WebSocketRequestHandler()
+ {
+ shutdown();
+ }
+
+ void shutdown()
+ {
+ if (_pWS)
+ {
+ _pWS->shutdown();
+ delete _pWS;
+ }
+ }
+
+ void send(const std::string& buffer)
+ /// Pushes data to web client.
+ {
+ std::cout << "Sending data: " << buffer << std::endl;
+ _pWS->sendFrame(buffer.data(), (int) buffer.size(), _flags);
+ }
+
+ void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
+ /// Creates WebSocket and accepts the connection request from web client.
+ {
+ try
+ {
+ if (!_pWS)
+ {
+ _pWS = new WebSocket(request, response);
+ Timespan ts(600, 0);
+ _pWS->setReceiveTimeout(ts);
+ _pWS->setSendTimeout(ts);
+ }
+ std::cout << std::endl << "WebSocket connection established." << std::endl << PROMPT;
+
+ char buffer[1024];
+ int n, count = 0;
+ do
+ {
+ n = _pWS->receiveFrame(buffer, sizeof(buffer), _flags);
+ }
+ while (n > 0 || (_flags & WebSocket::FRAME_OP_BITMASK) != WebSocket::FRAME_OP_CLOSE);
+ std::cout << "WebSocket connection closed." << std::endl;
+ }
+ catch (WebSocketException& exc)
+ {
+ std::cout << exc.displayText() << std::endl;
+ switch (exc.code())
+ {
+ case WebSocket::WS_ERR_HANDSHAKE_UNSUPPORTED_VERSION:
+ response.set("Sec-WebSocket-Version", WebSocket::WEBSOCKET_VERSION);
+ // fallthrough
+ case WebSocket::WS_ERR_NO_HANDSHAKE:
+ case WebSocket::WS_ERR_HANDSHAKE_NO_VERSION:
+ case WebSocket::WS_ERR_HANDSHAKE_NO_KEY:
+ response.setStatusAndReason(HTTPResponse::HTTP_BAD_REQUEST);
+ response.setContentLength(0);
+ response.send();
+ break;
+ }
+ }
+ }
+
+public:
+ WebSocket* _pWS;
+ int _flags;
+};
+
+
+class RequestHandlerFactory: public HTTPRequestHandlerFactory
+ /// Web request handler factory.
+{
+public:
+ RequestHandlerFactory() : _pHandler(0)
+ {
+ }
+
+ HTTPRequestHandler* createRequestHandler(const HTTPServerRequest& request)
+ {
+ std::string uri = request.getURI();
+ if (uri == "/")
+ {
+ return new PageRequestHandler;
+ }
+ else if (uri == "/ws")
+ {
+ if (!_pHandler) _pHandler = new WebSocketRequestHandler;
+ return _pHandler;
+ }
+
+ if (uri != "/favicon.ico")
+ std::cout << "Unknown URI: " << uri << std::endl;
+
+ return 0;
+ }
+
+ WebSocketRequestHandler& handler()
+ {
+ if (!_pHandler) throw NullPointerException("WebSocket not connected.");
+ return *_pHandler;
+ }
+
+private:
+ WebSocketRequestHandler* _pHandler;
+};
+
+
+////////////////
+// Database //
+////////////////
+
+
+class CSVFormatter : public RowFormatter
+ /// Formatter, passed to DB statement.
+{
+public:
+
+ std::string& formatValues(const ValueVec& vals, std::string& formattedValues)
+ /// Formats the result into comma separated list of values.
+ {
+ std::ostringstream str;
+
+ ValueVec::const_iterator it = vals.begin();
+ ValueVec::const_iterator end = vals.end();
+ for (; it != end;)
+ {
+ str << it->convert();
+ if (++it != end) str << ',';
+ else break;
+ }
+
+ return formattedValues = str.str();
+ }
+};
+
+
+class DBEventHandler
+ /// Handler for DB insert/update events.
+{
+public:
+ DBEventHandler(RequestHandlerFactory& factory):
+ _session("SQLite", "sample.db"),
+ _factory(factory),
+ _notifier(_session)
+ /// Constructor; opens/initializes the database and associates
+ /// notification events with their respective handlers.
+ {
+ initDB();
+ _notifier.insert += delegate(this, &DBEventHandler::onInsert);
+ _notifier.update += delegate(this, &DBEventHandler::onUpdate);
+ }
+
+ ~DBEventHandler()
+ /// Destructor; unregisters the notification events.
+ {
+ _notifier.insert -= delegate(this, &DBEventHandler::onInsert);
+ _notifier.update -= delegate(this, &DBEventHandler::onUpdate);
+ }
+
+ std::size_t execute(const std::string& sql)
+ /// Exectutes the SQL statement.
+ {
+ Statement stmt = (_session << sql);
+ return stmt.execute();
+ }
+
+ Session& session()
+ {
+ return _session;
+ }
+
+private:
+ void initDB()
+ {
+ _session << "DROP TABLE IF EXISTS Person", now;
+ _session << "CREATE TABLE Person (Name VARCHAR(30), Address VARCHAR, Age INTEGER(3))", now;
+ }
+
+ Notifier* notifier(const void* pSender)
+ {
+ return reinterpret_cast(const_cast(pSender));
+ }
+
+ void notify(Poco::Int64 rowID)
+ /// Executes the query and sends the data to the web client.
+ {
+ std::ostringstream os;
+ CSVFormatter cf;
+ Statement stmt = (_session << "SELECT rowid, Name, Address, Age FROM Person WHERE rowid = ?", use(rowID), format(cf), now);
+ os << RecordSet(stmt);
+ _factory.handler().send(os.str());
+ }
+
+ void onInsert(const void* pSender)
+ /// Insert event handler; retrieves the data for the affected row
+ /// and calls notify.
+ {
+ Notifier* pN = notifier(pSender);
+ Poco::Int64 rowID = pN->getRow();
+ std::cout << "Inserted row " << rowID << std::endl;
+ notify(rowID);
+ }
+
+ void onUpdate(const void* pSender)
+ /// Update event handler; retrieves the data for the affected row
+ /// and calls notify.
+ {
+ Notifier* pN = notifier(pSender);
+ Poco::Int64 rowID = pN->getRow();
+ std::cout << "Updated row " << rowID << std::endl;
+ notify(rowID);
+ }
+
+ Session _session;
+ RequestHandlerFactory& _factory;
+ Notifier _notifier;
+};
+
+
+void doHelp()
+ /// Displays help.
+{
+ std::cout << "Poco Data/Net example - HTML Page notifications from DB events" << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << "To observe the functionality, take following steps:" << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << "1) Run a web browser and connect to http://localhost:9980 ." << std::endl;
+ std::cout << "2) Wait until \"WebSocket connection established.\" is displayed." << std::endl;
+ std::cout << "3) Issue SQL commands to see the web page updated, e.g.:" << std::endl;
+ std::cout << "\tINSERT INTO Person VALUES('Homer Simpson', 'Springfield', 42);" << std::endl;
+ std::cout << "\tINSERT INTO Person VALUES('bart Simpson', 'Springfield', 12);" << std::endl;
+ std::cout << "\tUPDATE Person SET Age=38 WHERE Name='Homer Simpson';" << std::endl;
+ std::cout << "\tUPDATE Person SET Name='Bart Simpson' WHERE Name='bart Simpson';" << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << "To end the program, enter \"exit\"." << std::endl;
+ std::cout << "" << std::endl;
+ std::cout << "To view this help, enter \"help\" or \"?\"." << std::endl;
+}
+
+
+void doShell(DBEventHandler& dbEventHandler)
+ /// Displays the shell and dispatches commands.
+{
+ doHelp();
+
+ while (true)
+ {
+ std::cout << PROMPT;
+ char cmd[512] = {0};
+ std::cin.getline(cmd, 512);
+ if (strncmp(cmd, "exit", 4) == 0)
+ break;
+ try
+ {
+ if ((strncmp(cmd, "help", 4) == 0) || cmd[0] == '?')
+ doHelp();
+ if (strlen(cmd) > 0)
+ {
+ std::size_t rows = dbEventHandler.execute(cmd);
+ std::cout << rows << " row" << ((rows != 1) ? "s" : "") << " affected." << std::endl;
+ }
+ }
+ catch(Exception& ex)
+ {
+ std::cout << ex.displayText() << std::endl;
+ }
+ }
+}
+
+
+///////////
+// Main //
+///////////
+
+int main(int argc, char** argv)
+{
+ // HTTPServer instance
+ RequestHandlerFactory* pFactory = new RequestHandlerFactory;
+ HTTPServer srv(pFactory, 9980);
+
+ // DB stuff
+ DBEventHandler dbEventHandler(*pFactory);
+
+ // Start the HTTPServer
+ srv.start();
+
+ // Run shell
+ doShell(dbEventHandler);
+
+ // Stop the HTTPServer
+ srv.stop();
+
+ return 0;
+}
diff --git a/Data/samples/samples_vs110.sln b/Data/samples/samples_vs110.sln
index 27ca82e63..ae1125a75 100644
--- a/Data/samples/samples_vs110.sln
+++ b/Data/samples/samples_vs110.sln
@@ -10,106 +10,120 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tuple", "Tuple\Tuple_vs110.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TypeHandler", "TypeHandler\TypeHandler_vs110.vcxproj", "{65A12348-CA20-324E-9F5E-7F82753C2C65}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebNotifier", "WebNotifier\WebNotifier_vs110.vcxproj", "{90B19F28-5258-4618-873A-AF8470B7D91B}"
+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
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|Win32.Build.0 = debug_shared|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.Build.0 = release_shared|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.Deploy.0 = release_shared|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.Build.0 = release_shared|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|Win32.Deploy.0 = release_shared|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|Win32.Build.0 = release_static_md|Win32
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|Win32.Build.0 = debug_shared|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.Build.0 = release_shared|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.Deploy.0 = release_shared|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.Build.0 = release_shared|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|Win32.Deploy.0 = release_shared|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|Win32.Build.0 = release_static_md|Win32
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|Win32.Build.0 = debug_shared|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.Build.0 = release_shared|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.Deploy.0 = release_shared|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.Build.0 = release_shared|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|Win32.Deploy.0 = release_shared|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|Win32.Build.0 = release_static_md|Win32
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|Win32.Build.0 = debug_shared|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.Build.0 = release_shared|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.Deploy.0 = release_shared|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.Build.0 = release_shared|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|Win32.Deploy.0 = release_shared|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|Win32.Build.0 = release_static_md|Win32
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|Win32.Build.0 = debug_shared|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|Win32.Deploy.0 = debug_shared|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.ActiveCfg = release_shared|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.Build.0 = release_shared|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.Deploy.0 = release_shared|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|Win32.Deploy.0 = debug_static_md|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|Win32.Deploy.0 = debug_static_mt|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.Build.0 = release_shared|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|Win32.Deploy.0 = release_shared|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|Win32.Build.0 = release_static_md|Win32
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|Win32.Deploy.0 = release_static_md|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|Win32.Deploy.0 = release_static_mt|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_shared|Win32.ActiveCfg = debug_shared|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_shared|Win32.Build.0 = debug_shared|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_static_md|Win32.ActiveCfg = debug_static_md|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_static_md|Win32.Build.0 = debug_static_md|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_static_mt|Win32.ActiveCfg = debug_static_mt|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.debug_static_mt|Win32.Build.0 = debug_static_mt|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_shared|Win32.ActiveCfg = release_shared|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_shared|Win32.Build.0 = release_shared|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_static_md|Win32.ActiveCfg = release_static_md|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_static_md|Win32.Build.0 = release_static_md|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_static_mt|Win32.ActiveCfg = release_static_mt|Win32
+ {90B19F28-5258-4618-873A-AF8470B7D91B}.release_static_mt|Win32.Build.0 = release_static_mt|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Data/samples/samples_x64_vs110.sln b/Data/samples/samples_x64_vs110.sln
index 822f27a0c..510b574f6 100644
--- a/Data/samples/samples_x64_vs110.sln
+++ b/Data/samples/samples_x64_vs110.sln
@@ -10,106 +10,120 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tuple", "Tuple\Tuple_x64_vs
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TypeHandler", "TypeHandler\TypeHandler_x64_vs110.vcxproj", "{65A12348-CA20-324E-9F5E-7F82753C2C65}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebNotifier", "WebNotifier\WebNotifier_x64_vs110.vcxproj", "{D6EB2EAD-55B6-4504-958D-DC7F52D22B15}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
debug_shared|x64 = debug_shared|x64
- release_shared|x64 = release_shared|x64
- debug_static_mt|x64 = debug_static_mt|x64
- release_static_mt|x64 = release_static_mt|x64
debug_static_md|x64 = debug_static_md|x64
+ debug_static_mt|x64 = debug_static_mt|x64
+ release_shared|x64 = release_shared|x64
release_static_md|x64 = release_static_md|x64
+ release_static_mt|x64 = release_static_mt|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|x64.ActiveCfg = debug_shared|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|x64.Build.0 = debug_shared|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_shared|x64.Deploy.0 = debug_shared|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.ActiveCfg = release_shared|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.Build.0 = release_shared|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.Deploy.0 = release_shared|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.Build.0 = release_static_mt|x64
- {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|x64.Build.0 = debug_static_md|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.ActiveCfg = release_shared|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.Build.0 = release_shared|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_shared|x64.Deploy.0 = release_shared|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|x64.ActiveCfg = release_static_md|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|x64.Build.0 = release_static_md|x64
{0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {0F0DF069-83D1-378D-A949-8DF9A883B627}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|x64.ActiveCfg = debug_shared|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|x64.Build.0 = debug_shared|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_shared|x64.Deploy.0 = debug_shared|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.ActiveCfg = release_shared|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.Build.0 = release_shared|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.Deploy.0 = release_shared|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.Build.0 = release_static_mt|x64
- {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|x64.Build.0 = debug_static_md|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.ActiveCfg = release_shared|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.Build.0 = release_shared|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_shared|x64.Deploy.0 = release_shared|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|x64.ActiveCfg = release_static_md|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|x64.Build.0 = release_static_md|x64
{FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {FEE20DCE-B9E3-30AB-A40C-B6A324997328}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|x64.ActiveCfg = debug_shared|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|x64.Build.0 = debug_shared|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_shared|x64.Deploy.0 = debug_shared|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.ActiveCfg = release_shared|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.Build.0 = release_shared|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.Deploy.0 = release_shared|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.Build.0 = release_static_mt|x64
- {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|x64.Build.0 = debug_static_md|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.ActiveCfg = release_shared|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.Build.0 = release_shared|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_shared|x64.Deploy.0 = release_shared|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|x64.ActiveCfg = release_static_md|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|x64.Build.0 = release_static_md|x64
{133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {133C62C7-3301-3F43-9ABF-14DF094A042F}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|x64.ActiveCfg = debug_shared|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|x64.Build.0 = debug_shared|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_shared|x64.Deploy.0 = debug_shared|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.ActiveCfg = release_shared|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.Build.0 = release_shared|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.Deploy.0 = release_shared|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.Build.0 = release_static_mt|x64
- {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|x64.Build.0 = debug_static_md|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.ActiveCfg = release_shared|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.Build.0 = release_shared|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_shared|x64.Deploy.0 = release_shared|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|x64.ActiveCfg = release_static_md|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|x64.Build.0 = release_static_md|x64
{F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {F143DA5A-221A-3737-BCBA-F5BFD977038F}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|x64.ActiveCfg = debug_shared|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|x64.Build.0 = debug_shared|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_shared|x64.Deploy.0 = debug_shared|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.ActiveCfg = release_shared|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.Build.0 = release_shared|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.Deploy.0 = release_shared|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.Build.0 = release_static_mt|x64
- {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|x64.Build.0 = debug_static_md|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_md|x64.Deploy.0 = debug_static_md|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.debug_static_mt|x64.Deploy.0 = debug_static_mt|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.ActiveCfg = release_shared|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.Build.0 = release_shared|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_shared|x64.Deploy.0 = release_shared|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|x64.ActiveCfg = release_static_md|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|x64.Build.0 = release_static_md|x64
{65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_md|x64.Deploy.0 = release_static_md|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.Build.0 = release_static_mt|x64
+ {65A12348-CA20-324E-9F5E-7F82753C2C65}.release_static_mt|x64.Deploy.0 = release_static_mt|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_shared|x64.ActiveCfg = debug_shared|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_shared|x64.Build.0 = debug_shared|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_static_md|x64.ActiveCfg = debug_static_md|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_static_md|x64.Build.0 = debug_static_md|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_static_mt|x64.ActiveCfg = debug_static_mt|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.debug_static_mt|x64.Build.0 = debug_static_mt|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_shared|x64.ActiveCfg = release_shared|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_shared|x64.Build.0 = release_shared|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_static_md|x64.ActiveCfg = release_static_md|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_static_md|x64.Build.0 = release_static_md|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_static_mt|x64.ActiveCfg = release_static_mt|x64
+ {D6EB2EAD-55B6-4504-958D-DC7F52D22B15}.release_static_mt|x64.Build.0 = release_static_mt|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/Foundation/include/Poco/Any.h b/Foundation/include/Poco/Any.h
index d02fca6dc..ef2bb2fd3 100644
--- a/Foundation/include/Poco/Any.h
+++ b/Foundation/include/Poco/Any.h
@@ -64,6 +64,11 @@ template class VarHolderImpl;
#ifndef POCO_NO_SOO
+#ifndef POCO_ENABLE_CPP11
+ // C++11 needed for std::aligned_storage
+ #error "Any SOO can only be enabled with C++11 support"
+#endif
+
template
union Placeholder
/// ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small
@@ -89,23 +94,23 @@ public:
void erase()
{
- std::memset(holder.h, 0, sizeof(Placeholder));
+ std::memset(holder, 0, sizeof(Placeholder));
}
bool isLocal() const
{
- return holder.h[SizeV] != 0;
+ return holder[SizeV] != 0;
}
void setLocal(bool local) const
{
- holder.h[SizeV] = local ? 1 : 0;
+ holder[SizeV] = local ? 1 : 0;
}
PlaceholderT* content() const
{
if(isLocal())
- return reinterpret_cast(holder.h);
+ return reinterpret_cast(holder);
else
return pHolder;
}
@@ -114,18 +119,11 @@ public:
#if !defined(POCO_MSVC_VERSION) || (defined(POCO_MSVC_VERSION) && (POCO_MSVC_VERSION > 80))
private:
#endif
+ typedef typename std::aligned_storage::type AlignerType;
PlaceholderT* pHolder;
-#ifndef POCO_NO_SOO
- #ifndef POCO_ENABLE_CPP11
- #error "Any SOO can only be enabled with C++11 support"
- #endif
- mutable union
- {
- std::aligned_storage a;
- unsigned char h[SizeV + 1];
- } holder;
-#endif
+ mutable char holder [SizeV + 1];
+ AlignerType aligner;
friend class Any;
friend class Dynamic::Var;
@@ -285,7 +283,7 @@ public:
/// Returns true if the Any is empty.
{
char buf[POCO_SMALL_OBJECT_SIZE] = { 0 };
- return 0 == std::memcmp(_valueHolder.holder.h, buf, POCO_SMALL_OBJECT_SIZE);
+ return 0 == std::memcmp(_valueHolder.holder, buf, POCO_SMALL_OBJECT_SIZE);
}
const std::type_info & type() const
@@ -328,7 +326,7 @@ private:
{
if ((sizeof(Holder) <= POCO_SMALL_OBJECT_SIZE))
{
- new ((ValueHolder*) pPlaceholder->holder.h) Holder(_held);
+ new ((ValueHolder*) pPlaceholder->holder) Holder(_held);
pPlaceholder->setLocal(true);
}
else
@@ -354,7 +352,7 @@ private:
{
if (sizeof(Holder) <= Placeholder::Size::value)
{
- new (reinterpret_cast(_valueHolder.holder.h)) Holder(value);
+ new (reinterpret_cast(_valueHolder.holder)) Holder(value);
_valueHolder.setLocal(true);
}
else
diff --git a/Foundation/include/Poco/Config.h b/Foundation/include/Poco/Config.h
index 5fd32ea57..37c69b7cd 100644
--- a/Foundation/include/Poco/Config.h
+++ b/Foundation/include/Poco/Config.h
@@ -101,8 +101,12 @@
// cases when value holder fits into POCO_SMALL_OBJECT_SIZE
// (see below).
//
-// !!! NOTE: Any/Dynamic::Var SOO may NOT work reliably
-// !!! without C++11 (std::aligned_storage in particular)
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// !!! NOTE: Any/Dynamic::Var SOO will NOT work reliably !!!
+// !!! without C++11 (std::aligned_storage in particular). !!!
+// !!! Only comment this out if your compiler has support !!!
+// !!! for std::aligned_storage. !!!
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
//
#define POCO_NO_SOO
diff --git a/Foundation/include/Poco/Dynamic/Var.h b/Foundation/include/Poco/Dynamic/Var.h
index 874748828..f9b5633c8 100644
--- a/Foundation/include/Poco/Dynamic/Var.h
+++ b/Foundation/include/Poco/Dynamic/Var.h
@@ -625,7 +625,7 @@ private:
{
if (sizeof(VarHolderImpl) <= Placeholder::Size::value)
{
- new (reinterpret_cast(_placeholder.holder.h)) VarHolderImpl(value);
+ new (reinterpret_cast(_placeholder.holder)) VarHolderImpl(value);
_placeholder.setLocal(true);
}
else
@@ -640,7 +640,7 @@ private:
std::string val(value);
if (sizeof(VarHolderImpl) <= Placeholder::Size::value)
{
- new (reinterpret_cast(_placeholder.holder.h)) VarHolderImpl(val);
+ new (reinterpret_cast(_placeholder.holder)) VarHolderImpl(val);
_placeholder.setLocal(true);
}
else
diff --git a/Foundation/include/Poco/Dynamic/VarHolder.h b/Foundation/include/Poco/Dynamic/VarHolder.h
index 43e3c9140..69a0ca255 100644
--- a/Foundation/include/Poco/Dynamic/VarHolder.h
+++ b/Foundation/include/Poco/Dynamic/VarHolder.h
@@ -286,9 +286,9 @@ protected:
poco_check_ptr (pVarHolder);
if ((sizeof(VarHolderImpl) <= Placeholder::Size::value))
{
- new ((VarHolder*) pVarHolder->holder.h) VarHolderImpl(val);
+ new ((VarHolder*) pVarHolder->holder) VarHolderImpl(val);
pVarHolder->setLocal(true);
- return (VarHolder*) pVarHolder->holder.h;
+ return (VarHolder*) pVarHolder->holder;
}
else
{
diff --git a/Net/include/Poco/Net/IPAddress.h b/Net/include/Poco/Net/IPAddress.h
index 0e1423587..c24a2904e 100644
--- a/Net/include/Poco/Net/IPAddress.h
+++ b/Net/include/Poco/Net/IPAddress.h
@@ -399,14 +399,15 @@ private:
#ifdef POCO_ENABLE_CPP11
static const unsigned sz = sizeof(Poco::Net::Impl::IPv6AddressImpl);
+ typedef std::aligned_storage::type AlignerType;
+
union
{
- std::aligned_storage a;
- char buffer[sz];
+ char buffer[sz];
+ AlignerType aligner;
}
#else // !POCO_ENABLE_CPP11
- AlignedCharArrayUnion
+ AlignedCharArrayUnion
#endif // POCO_ENABLE_CPP11
_memory;
};