willi 5 gadi atpakaļ
vecāks
revīzija
5eb2effd1e
97 mainītis faili ar 11595 papildinājumiem un 113 dzēšanām
  1. 2 0
      .idea/vcs.xml
  2. 121 113
      .idea/workspace.xml
  3. 2 0
      CMakeLists.txt
  4. 1 0
      thirdparty/curl
  5. 47 0
      thirdparty/curlpp/.gitignore
  6. 23 0
      thirdparty/curlpp/.hgignore
  7. 54 0
      thirdparty/curlpp/.travis.yml
  8. 115 0
      thirdparty/curlpp/CMakeLists.txt
  9. 1 0
      thirdparty/curlpp/CNAME
  10. 34 0
      thirdparty/curlpp/Readme.md
  11. 1 0
      thirdparty/curlpp/_config.yml
  12. 45 0
      thirdparty/curlpp/appveyor.yml
  13. 5 0
      thirdparty/curlpp/conanfile.txt
  14. 13 0
      thirdparty/curlpp/doc/AUTHORS
  15. 21 0
      thirdparty/curlpp/doc/LICENSE
  16. 238 0
      thirdparty/curlpp/doc/README.win32
  17. 4 0
      thirdparty/curlpp/doc/TODO
  18. BIN
      thirdparty/curlpp/doc/guide.pdf
  19. 706 0
      thirdparty/curlpp/doc/guide.tex
  20. 26 0
      thirdparty/curlpp/examples/CMakeLists.txt
  21. 36 0
      thirdparty/curlpp/examples/README
  22. 43 0
      thirdparty/curlpp/examples/example00.cpp
  23. 171 0
      thirdparty/curlpp/examples/example01.cpp
  24. 104 0
      thirdparty/curlpp/examples/example02.cpp
  25. 88 0
      thirdparty/curlpp/examples/example03.cpp
  26. 89 0
      thirdparty/curlpp/examples/example04.cpp
  27. 120 0
      thirdparty/curlpp/examples/example05.cpp
  28. 144 0
      thirdparty/curlpp/examples/example06.cpp
  29. 174 0
      thirdparty/curlpp/examples/example07.cpp
  30. 98 0
      thirdparty/curlpp/examples/example08.cpp
  31. 96 0
      thirdparty/curlpp/examples/example09.cpp
  32. 99 0
      thirdparty/curlpp/examples/example10.cpp
  33. 107 0
      thirdparty/curlpp/examples/example11.cpp
  34. 75 0
      thirdparty/curlpp/examples/example12.cpp
  35. 125 0
      thirdparty/curlpp/examples/example13.cpp
  36. 147 0
      thirdparty/curlpp/examples/example14.cpp
  37. 61 0
      thirdparty/curlpp/examples/example15.cpp
  38. 78 0
      thirdparty/curlpp/examples/example16.cpp
  39. 103 0
      thirdparty/curlpp/examples/example17.cpp
  40. 115 0
      thirdparty/curlpp/examples/example18.cpp
  41. 81 0
      thirdparty/curlpp/examples/example19.cpp
  42. 74 0
      thirdparty/curlpp/examples/example20.cpp
  43. 87 0
      thirdparty/curlpp/examples/example21.cpp
  44. 75 0
      thirdparty/curlpp/examples/example22.cpp
  45. 55 0
      thirdparty/curlpp/examples/example23.cpp
  46. 104 0
      thirdparty/curlpp/examples/example24.cpp
  47. 40 0
      thirdparty/curlpp/extras/CMakeLists.txt
  48. 91 0
      thirdparty/curlpp/extras/curlpp-config.in
  49. 152 0
      thirdparty/curlpp/extras/curlpp.m4
  50. 13 0
      thirdparty/curlpp/extras/curlpp.pc.in
  51. 96 0
      thirdparty/curlpp/extras/curlpp.spec.in
  52. 170 0
      thirdparty/curlpp/include/curlpp/Easy.hpp
  53. 48 0
      thirdparty/curlpp/include/curlpp/Easy.inl
  54. 306 0
      thirdparty/curlpp/include/curlpp/Exception.hpp
  55. 272 0
      thirdparty/curlpp/include/curlpp/Form.hpp
  56. 121 0
      thirdparty/curlpp/include/curlpp/Info.hpp
  57. 79 0
      thirdparty/curlpp/include/curlpp/Info.inl
  58. 99 0
      thirdparty/curlpp/include/curlpp/Infos.hpp
  59. 82 0
      thirdparty/curlpp/include/curlpp/Multi.hpp
  60. 253 0
      thirdparty/curlpp/include/curlpp/Option.hpp
  61. 206 0
      thirdparty/curlpp/include/curlpp/Option.inl
  62. 107 0
      thirdparty/curlpp/include/curlpp/OptionBase.hpp
  63. 336 0
      thirdparty/curlpp/include/curlpp/Options.hpp
  64. 56 0
      thirdparty/curlpp/include/curlpp/Types.hpp
  65. 223 0
      thirdparty/curlpp/include/curlpp/cURLpp.hpp
  66. 203 0
      thirdparty/curlpp/include/curlpp/internal/CurlHandle.hpp
  67. 76 0
      thirdparty/curlpp/include/curlpp/internal/CurlHandle.inl
  68. 106 0
      thirdparty/curlpp/include/curlpp/internal/OptionContainer.hpp
  69. 73 0
      thirdparty/curlpp/include/curlpp/internal/OptionContainer.inl
  70. 172 0
      thirdparty/curlpp/include/curlpp/internal/OptionContainerType.hpp
  71. 122 0
      thirdparty/curlpp/include/curlpp/internal/OptionList.hpp
  72. 504 0
      thirdparty/curlpp/include/curlpp/internal/OptionSetter.hpp
  73. 56 0
      thirdparty/curlpp/include/curlpp/internal/OptionSetter.inl
  74. 92 0
      thirdparty/curlpp/include/curlpp/internal/SList.hpp
  75. 32 0
      thirdparty/curlpp/include/utilspp/EmptyType.hpp
  76. 41 0
      thirdparty/curlpp/include/utilspp/NonCopyable.hpp
  77. 32 0
      thirdparty/curlpp/include/utilspp/NullType.hpp
  78. 186 0
      thirdparty/curlpp/include/utilspp/SmartPtr.hpp
  79. 45 0
      thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.hpp
  80. 37 0
      thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.inl
  81. 52 0
      thirdparty/curlpp/include/utilspp/ThreadingSingle.hpp
  82. 50 0
      thirdparty/curlpp/include/utilspp/ThreadingSingle.inl
  83. 216 0
      thirdparty/curlpp/include/utilspp/TypeList.hpp
  84. 869 0
      thirdparty/curlpp/include/utilspp/TypeTrait.hpp
  85. 96 0
      thirdparty/curlpp/include/utilspp/clone_ptr.hpp
  86. 122 0
      thirdparty/curlpp/src/curlpp/Easy.cpp
  87. 146 0
      thirdparty/curlpp/src/curlpp/Exception.cpp
  88. 232 0
      thirdparty/curlpp/src/curlpp/Form.cpp
  89. 60 0
      thirdparty/curlpp/src/curlpp/Info.cpp
  90. 115 0
      thirdparty/curlpp/src/curlpp/Multi.cpp
  91. 44 0
      thirdparty/curlpp/src/curlpp/OptionBase.cpp
  92. 36 0
      thirdparty/curlpp/src/curlpp/Options.cpp
  93. 121 0
      thirdparty/curlpp/src/curlpp/cURLpp.cpp
  94. 345 0
      thirdparty/curlpp/src/curlpp/internal/CurlHandle.cpp
  95. 112 0
      thirdparty/curlpp/src/curlpp/internal/OptionList.cpp
  96. 296 0
      thirdparty/curlpp/src/curlpp/internal/OptionSetter.cpp
  97. 148 0
      thirdparty/curlpp/src/curlpp/internal/SList.cpp

+ 2 - 0
.idea/vcs.xml

@@ -2,6 +2,8 @@
 <project version="4">
   <component name="VcsDirectoryMappings">
     <mapping directory="$PROJECT_DIR$" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/thirdparty/curl" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/thirdparty/curlpp" vcs="Git" />
     <mapping directory="$PROJECT_DIR$/thirdparty/json" vcs="Git" />
   </component>
 </project>

+ 121 - 113
.idea/workspace.xml

@@ -3,9 +3,9 @@
   <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
     <generated>
       <config projectName="mdd" targetName="gtest" />
+      <config projectName="mdd" targetName="mdd_lib" />
       <config projectName="mdd" targetName="gtest_main" />
       <config projectName="mdd" targetName="auslegung_test" />
-      <config projectName="mdd" targetName="mdd_lib" />
     </generated>
   </component>
   <component name="CMakeSettings">
@@ -15,14 +15,9 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="4ddbafad-b85e-492e-80ec-3c73ef45688f" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/lib/include/ModuleBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ModuleBase.h" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/include/ProcessorBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ProcessorBase.h" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/src/ModuleBase.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleBase.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/src/ModuleMath.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleMath.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -41,84 +36,74 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="195">
-              <caret line="13" column="36" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
+            <state relative-caret-position="240">
+              <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
+              <folding>
+                <element signature="e#0#25#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="235">
-              <caret line="28" column="62" lean-forward="true" selection-start-line="28" selection-start-column="62" selection-end-line="28" selection-end-column="62" />
+            <state relative-caret-position="135">
+              <caret line="9" column="30" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="30" />
               <folding>
-                <element signature="e#57#72#0" expanded="true" />
+                <element signature="e#0#24#0" expanded="true" />
+                <element signature="e#70#98#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="240">
-              <caret line="16" column="24" lean-forward="true" selection-start-line="16" selection-start-column="24" selection-end-line="16" selection-end-column="24" />
+            <state relative-caret-position="885">
+              <caret line="59" selection-start-line="59" selection-end-line="59" />
               <folding>
-                <element signature="e#0#23#0" expanded="true" />
+                <element signature="e#0#24#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="237">
-              <caret line="16" column="26" lean-forward="true" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
+            <state relative-caret-position="15">
+              <caret line="55" column="31" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
               <folding>
-                <element signature="e#0#25#0" expanded="true" />
+                <element signature="e#0#24#0" expanded="true" />
+                <element signature="e#70#98#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
+        <entry file="file://$PROJECT_DIR$/thirdparty/curl/README">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="135">
-              <caret line="9" column="30" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="30" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-                <element signature="e#70#98#0" expanded="true" />
-              </folding>
-            </state>
+            <state relative-caret-position="-261" />
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
+        <entry file="file://$PROJECT_DIR$/thirdparty/curl/CMakeLists.txt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="361">
-              <caret line="59" selection-start-line="59" selection-end-line="59" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-              </folding>
-            </state>
+            <state relative-caret-position="-630" />
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
+        <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="406">
-              <caret line="49" column="1" lean-forward="true" selection-start-line="49" selection-start-column="1" selection-end-line="49" selection-end-column="1" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-                <element signature="e#70#98#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="255">
+              <caret line="17" column="65" selection-start-line="17" selection-start-column="65" selection-end-line="17" selection-end-column="65" />
             </state>
           </provider>
         </entry>
@@ -127,7 +112,7 @@
         <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="270">
-              <caret line="18" column="38" lean-forward="true" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
+              <caret line="18" column="38" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
               <folding>
                 <element signature="e#51#69#0" expanded="true" />
               </folding>
@@ -138,8 +123,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="364">
-              <caret line="50" column="34" lean-forward="true" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
+            <state relative-caret-position="750">
+              <caret line="50" column="34" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
             </state>
           </provider>
         </entry>
@@ -192,7 +177,6 @@
         <option value="$PROJECT_DIR$/lib/include/IData.h" />
         <option value="$PROJECT_DIR$/lib/include/IType.h" />
         <option value="$PROJECT_DIR$/thirdparty/json/single_include/json.hpp" />
-        <option value="$PROJECT_DIR$/CMakeLists.txt" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorBase.h.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ModuleHandler.h" />
         <option value="$PROJECT_DIR$/lib/include/ModulBase.h" />
@@ -227,6 +211,7 @@
         <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
         <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
+        <option value="$PROJECT_DIR$/CMakeLists.txt" />
       </list>
     </option>
   </component>
@@ -246,6 +231,7 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
+      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -285,11 +271,30 @@
               <item name="lib" type="462c0819:PsiDirectoryNode" />
               <item name="test" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="mdd" type="b2602c69:ProjectViewProjectNode" />
+              <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
+              <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
+              <item name="thirdparty" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="mdd" type="b2602c69:ProjectViewProjectNode" />
+              <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
+              <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
+              <item name="thirdparty" type="462c0819:PsiDirectoryNode" />
+              <item name="curl" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="mdd" type="b2602c69:ProjectViewProjectNode" />
+              <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
+              <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
+              <item name="thirdparty" type="462c0819:PsiDirectoryNode" />
+              <item name="curlpp" type="462c0819:PsiDirectoryNode" />
+            </path>
           </expand>
           <select />
         </subPane>
       </pane>
-      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -371,14 +376,14 @@
       </method>
     </configuration>
     <list>
-      <item itemvalue="CMake Application.auslegung_test" />
-      <item itemvalue="CMake Application.gtest" />
-      <item itemvalue="CMake Application.gtest_main" />
-      <item itemvalue="CMake Application.mdd_lib" />
       <item itemvalue="Google Test.All in auslegung_test" />
       <item itemvalue="Google Test.ModuleMath" />
       <item itemvalue="Google Test.ModuleMath.ARRAYINT_PLUS_ARRAYInt" />
       <item itemvalue="Google Test.ModuleMath.add" />
+      <item itemvalue="CMake Application.auslegung_test" />
+      <item itemvalue="CMake Application.gtest" />
+      <item itemvalue="CMake Application.gtest_main" />
+      <item itemvalue="CMake Application.mdd_lib" />
     </list>
     <recent_temporary>
       <list>
@@ -423,13 +428,11 @@
       <workItem from="1590139016676" duration="24307000" />
       <workItem from="1590401033286" duration="1155000" />
       <workItem from="1590443025824" duration="116000" />
+      <workItem from="1590444664396" duration="1004000" />
     </task>
     <servers />
   </component>
   <component name="TestHistory">
-    <history-entry file="All_in_auslegung_test - 2020.05.25 at 23h 18m 17s.xml">
-      <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
-    </history-entry>
     <history-entry file="All_in_auslegung_test - 2020.05.25 at 23h 20m 38s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
@@ -457,9 +460,12 @@
     <history-entry file="All_in_auslegung_test - 2020.05.25 at 23h 57m 55s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
+    <history-entry file="All_in_auslegung_test - 2020.05.25 at 23h 58m 46s.xml">
+      <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
+    </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="155226000" />
+    <option name="totallyTimeSpent" value="156880000" />
   </component>
   <component name="TodoView" selected-index="2">
     <todo-panel id="selected-file">
@@ -474,19 +480,19 @@
     <frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.24546425" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.24813233" />
       <window_info id="Structure" order="1" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
       <window_info id="Favorites" order="2" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.2980063" />
+      <window_info anchor="bottom" id="Run" order="2" weight="0.2980063" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.39874083" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" weight="0.32948583" />
       <window_info anchor="bottom" id="Database Changes" order="7" />
       <window_info anchor="bottom" id="Messages" order="8" weight="0.32423925" />
-      <window_info anchor="bottom" id="Terminal" order="9" weight="0.25393495" />
+      <window_info anchor="bottom" id="Terminal" order="9" visible="true" weight="0.25393495" />
       <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="11" weight="0.32948583" />
       <window_info anchor="bottom" id="CMake" order="12" weight="0.32948583" />
@@ -561,14 +567,6 @@
     </watches-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file:///usr/include/c++/7/bits/std_function.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="159">
-          <caret line="388" column="10" selection-start-line="388" selection-start-column="10" selection-end-line="388" selection-end-column="10" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/thirdparty/rapidjson/include/rapidjson/internal/clzll.h" />
     <entry file="file://$PROJECT_DIR$/lib/src/Data.cpp" />
     <entry file="file://$PROJECT_DIR$/lib/include/Data.h" />
     <entry file="file://$PROJECT_DIR$/lib/include/IData.h" />
@@ -650,13 +648,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="12" column="70" selection-start-line="12" selection-start-column="70" selection-end-line="12" selection-end-column="70" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="105">
@@ -801,27 +792,17 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="38" lean-forward="true" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
-          <folding>
-            <element signature="e#51#69#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="364">
-          <caret line="50" column="34" lean-forward="true" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
+        <state relative-caret-position="195">
+          <caret line="13" column="36" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="235">
-          <caret line="28" column="62" lean-forward="true" selection-start-line="28" selection-start-column="62" selection-end-line="28" selection-end-column="62" />
+        <state relative-caret-position="420">
+          <caret line="28" column="62" selection-start-line="28" selection-start-column="62" selection-end-line="28" selection-end-column="62" />
           <folding>
             <element signature="e#57#72#0" expanded="true" />
           </folding>
@@ -831,7 +812,7 @@
     <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="240">
-          <caret line="16" column="24" lean-forward="true" selection-start-line="16" selection-start-column="24" selection-end-line="16" selection-end-column="24" />
+          <caret line="16" column="24" selection-start-line="16" selection-start-column="24" selection-end-line="16" selection-end-column="24" />
           <folding>
             <element signature="e#0#23#0" expanded="true" />
           </folding>
@@ -840,56 +821,66 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="237">
-          <caret line="16" column="26" lean-forward="true" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
+        <state relative-caret-position="240">
+          <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
           <folding>
             <element signature="e#0#25#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" column="36" selection-start-line="13" selection-start-column="36" selection-end-line="13" selection-end-column="36" />
+        <state relative-caret-position="135">
+          <caret line="9" column="30" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="30" />
+          <folding>
+            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#70#98#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="390">
-          <caret line="26" column="42" selection-start-line="26" selection-start-column="42" selection-end-line="26" selection-end-column="42" />
+        <state relative-caret-position="885">
+          <caret line="59" selection-start-line="59" selection-end-line="59" />
           <folding>
-            <element signature="e#0#28#0" expanded="true" />
+            <element signature="e#0#24#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="135">
-          <caret line="9" column="30" selection-start-line="9" selection-start-column="30" selection-end-line="9" selection-end-column="30" />
+        <state relative-caret-position="270">
+          <caret line="18" column="38" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
           <folding>
-            <element signature="e#0#24#0" expanded="true" />
-            <element signature="e#70#98#0" expanded="true" />
+            <element signature="e#51#69#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="361">
-          <caret line="59" selection-start-line="59" selection-end-line="59" />
+        <state relative-caret-position="750">
+          <caret line="50" column="34" selection-start-line="50" selection-start-column="34" selection-end-line="50" selection-end-column="34" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="390">
+          <caret line="26" column="42" selection-start-line="26" selection-start-column="42" selection-end-line="26" selection-end-column="42" />
           <folding>
-            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#0#28#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="406">
-          <caret line="49" column="1" lean-forward="true" selection-start-line="49" selection-start-column="1" selection-end-line="49" selection-end-column="1" />
+        <state relative-caret-position="15">
+          <caret line="55" column="31" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
           <folding>
             <element signature="e#0#24#0" expanded="true" />
             <element signature="e#70#98#0" expanded="true" />
@@ -897,5 +888,22 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/thirdparty/curl/README">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-261" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/thirdparty/curl/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-630" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="255">
+          <caret line="17" column="65" selection-start-line="17" selection-start-column="65" selection-end-line="17" selection-end-column="65" />
+        </state>
+      </provider>
+    </entry>
   </component>
 </project>

+ 2 - 0
CMakeLists.txt

@@ -14,4 +14,6 @@ if(${TESTS_ENABLED})
 endif()
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/json/single_include)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curl)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/curlpp)
 add_subdirectory(lib)

+ 1 - 0
thirdparty/curl

@@ -0,0 +1 @@
+Subproject commit ad829b21ae9e0f11a821a0a98a1aaab161efa9a2

+ 47 - 0
thirdparty/curlpp/.gitignore

@@ -0,0 +1,47 @@
+*.Po
+*.o
+*.a
+*.la
+*.lo
+*.Plo
+*.dylib
+*.lai
+Makefile
+*~
+
+build/
+m4/
+CMakeFiles/
+
+examples/example01
+examples/example02
+examples/example03
+examples/example04
+examples/example05
+examples/example06
+examples/example07
+examples/example08
+examples/example09
+examples/example10
+examples/example11
+examples/example12
+examples/example13
+examples/example14
+examples/example15
+examples/example16
+examples/example17
+examples/example18
+examples/example19
+examples/example20
+examples/example21
+examples/example22
+examples/example23
+examples/example24
+examples/example25
+
+*.exe
+CMakeCache.txt
+
+conanbuildinfo.cmake
+conaninfo.txt
+bin/

+ 23 - 0
thirdparty/curlpp/.hgignore

@@ -0,0 +1,23 @@
+(^|/)\.svn($|/)
+(^|/)\.hg($|/)
+(^|/)\.hgtags($|/)
+^curlpp-svn.log$
+^tailor.state$
+^tailor.state.old$
+^tailor.state.journal$
+.*\.o
+.*\.lo
+.*\.a
+.*\.la
+.*\.Plo
+.*\.Po
+#.*#$
+Makefile$
+Makefile.in$
+include/curlpp/config.h.in
+include/curlpp/config.h
+^examples/example[0-9]*$
+aclocal.m4$
+.dylib$
+curlpp.pc$
+curlpp.spec$

+ 54 - 0
thirdparty/curlpp/.travis.yml

@@ -0,0 +1,54 @@
+language: cpp
+
+# precise gcc doesn't have c++11 support
+
+matrix:
+  include:
+    - os: linux
+      dist: trusty
+      compiler: clang
+      env: NAME="trusty"
+    - os: linux
+      dist: trusty
+      compiler: gcc
+      env: NAME="trusty"
+    - os: linux
+      dist: precise
+      compiler: clang
+      env: NAME="precise"
+    - os: osx
+      osx_image: xcode7.2
+    - os: osx
+      compiler: clang
+    - os: osx
+      compiler: gcc
+
+addons:
+  apt:
+    packages:
+      - libcurl4-openssl-dev
+
+before_script:
+  - mkdir build && cd build
+  - cmake ../
+
+script:
+  - make && sudo make install
+  - cd ../examples && mkdir build && cd build
+  - cmake ../
+  - make 
+
+
+install:
+- echo install-----------------------------------------------------------------
+# Download and install libcurl 
+- if [[ $TRAVIS_OS_NAME == "osx" ]]; then
+    brew update;
+    brew install curl;
+  fi
+# install cmake 3.2 for precise
+- if [[ $NAME == "precise" ]]; then
+    sudo add-apt-repository ppa:george-edison55/precise-backports --yes;
+    sudo apt-get update;
+    sudo apt-get install cmake-data cmake;
+  fi  

+ 115 - 0
thirdparty/curlpp/CMakeLists.txt

@@ -0,0 +1,115 @@
+project(curlpp) 
+
+
+# In response to CMake 3.0 generating warnings regarding policy CMP0042,
+# the OSX RPATH settings have been updated per recommendations found
+# in the CMake Wiki:
+#  http://www.cmake.org/Wiki/CMake_RPATH_handling#Mac_OS_X_and_the_RPATH
+if(POLICY CMP0042)
+    cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH
+    set(CMAKE_MACOSX_RPATH TRUE)
+endif()
+
+# for unix platform, define install directories.
+include(GNUInstallDirs)
+
+if(WIN32)
+    # cmake 3.4 is required for CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
+    cmake_minimum_required(VERSION 3.4)
+
+    # c++ 11 support from cmake 3.4 or newer
+    set(CMAKE_CXX_STANDARD 11) # C++11...
+    set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
+    set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
+
+    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+  else()
+    if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_LESS 3.1)
+        cmake_minimum_required(VERSION 2.8)
+        # c++11 support for cmake 2.8.12 - 3.0.x
+        #
+        # for non-windows platform we try to keep cmake 2.8 support
+        # since entreprise distribution tends to have 2.8 version.
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+    else()
+        # c++ 11 support from cmake 3.1 or newer
+        set(CMAKE_CXX_STANDARD 11) # C++11...
+        set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
+        set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
+    endif()
+endif()
+
+
+# Conan.io integration
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
+    include(${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake)
+    conan_basic_setup()
+endif()
+
+# extra (pkg-config-related files)
+add_subdirectory(extras)
+
+#########################################################################################
+# Look for dependencies
+
+# Documented at https://cmake.org/cmake/help/v3.0/module/FindCURL.html?highlight=curlpp
+# Seems simple.
+
+message(STATUS "Looking for CURL")
+include(FindCURL)
+find_package(CURL REQUIRED)
+
+if(CURL_FOUND)
+  message(STATUS "Found CURL version: ${CURL_VERSION_STRING}")
+  message(STATUS "Using CURL include dir(s): ${CURL_INCLUDE_DIRS}")
+  message(STATUS "Using CURL lib(s): ${CURL_LIBRARIES}")
+else()
+  message(FATAL_ERROR "Could not find CURL")
+endif()
+
+# All following targets should search these directories for headers
+include_directories( 
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
+  ${CURL_INCLUDE_DIRS}
+)
+
+#########################################################################################
+# Define Targets
+
+# If building on windows, install path will be in build/winbuild
+if(CMAKE_SYSTEM MATCHES "Windows")
+   if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+      set(CMAKE_INSTALL_PREFIX "winbuild")
+   endif()
+endif()
+
+file(GLOB_RECURSE HeaderFileList "${CMAKE_CURRENT_SOURCE_DIR}/include/*")
+file(GLOB_RECURSE SourceFileList "${CMAKE_CURRENT_SOURCE_DIR}/src/*")
+add_library(${PROJECT_NAME} SHARED ${HeaderFileList} ${SourceFileList})
+target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS})
+set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 VERSION 1.0.0)
+
+add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList})
+
+# Make sure that on unix-platforms shared and static libraries have
+# the same root name, but different suffixes.
+#
+#  (solution taken from https://cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F)
+# 
+# Making shared and static libraries have the same root name, but different suffixes
+SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
+# Now the library target "curlpp_static" will be named "curlpp.lib" with MS tools.
+# This conflicts with the "curlpp.lib" import library corresponding to "curlpp.dll",
+# so we add a "lib" prefix (which is default on other platforms anyway):
+SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib")
+target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS})
+
+# install headers
+install(DIRECTORY include/utilspp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/utilspp")
+install(DIRECTORY include/curlpp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/curlpp")
+
+install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static
+        RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+        LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+        ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+

+ 1 - 0
thirdparty/curlpp/CNAME

@@ -0,0 +1 @@
+www.curlpp.org

+ 34 - 0
thirdparty/curlpp/Readme.md

@@ -0,0 +1,34 @@
+[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Travis CI](https://img.shields.io/travis/jpbarrette/curlpp.svg)](https://travis-ci.org/jpbarrette/curlpp) [![AppVeyor CI](https://img.shields.io/appveyor/ci/jpbarrette/curlpp.svg)](https://ci.appveyor.com/project/jpbarrette/curlpp)
+
+# Description
+
+[cURLpp](http://www.curlpp.org) is a C++ wrapper for libcURL. libcURL is described as:
+
+<cite>
+a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
+</cite>
+
+<cite>
+libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS and more...
+</cite>
+
+<cite>
+libcurl is free, thread-safe, IPv6 compatible, feature rich, well supported and fast.
+</cite>
+
+First, I need to quote Daniel Stenberg, the maintener of libcURL:
+<cite>You can use libcURL instantly from within your C++ programs. You don't need cURLpp for that, cURLpp just adds an OO'ified layer that libcURL doesn't normally provide.</cite> It means that you need to be sure that you need, or want, cURLpp features. If not, I suggest to use directly the libcURL library. So, what are thoses features that cURLpp offers?
+
+* You can query handles for option values (version 0.5.x and newer only).
+* It uses the C++ standard library structures instead of home made ones.
+* It is exception safe.
+* It is type safe.
+
+# Download
+
+Latest version is available on GitHub [here](https://github.com/jpbarrette/curlpp/releases/latest).
+
+# Documentation
+
+The programming guide is [here](https://github.com/jpbarrette/curlpp/tree/master/doc/guide.pdf). This guide is greatly inspired by the libcURL guide, that I strongly suggest to read. There's also some examples in the "[examples](http://github.com/jpbarrette/curlpp/tree/master/examples)/" source directory of cURLpp.
+

+ 1 - 0
thirdparty/curlpp/_config.yml

@@ -0,0 +1 @@
+theme: jekyll-theme-minimal

+ 45 - 0
thirdparty/curlpp/appveyor.yml

@@ -0,0 +1,45 @@
+version: '0.7.4.{build}'
+
+environment:
+    matrix:
+      - PRJ_GEN: "Visual Studio 11 2012 Win64"
+        BDIR: msvc2012
+        PRJ_CFG: Release
+        PRJ_GEN_VERSION: 11
+      - PRJ_GEN: "Visual Studio 12 2013 Win64"
+        BDIR: msvc2013
+        PRJ_CFG: Release
+        PRJ_GEN_VERSION: 12
+      - PRJ_GEN: "Visual Studio 14 2015 Win64"
+        BDIR: msvc2015
+        PRJ_CFG: Release
+        PRJ_GEN_VERSION: 14
+      - PRJ_GEN: "Visual Studio 11 2012 Win64"
+        BDIR: msvc2012
+        PRJ_CFG: Debug
+        PRJ_GEN_VERSION: 11
+      - PRJ_GEN: "Visual Studio 12 2013 Win64"
+        BDIR: msvc2013
+        PRJ_CFG: Debug
+        PRJ_GEN_VERSION: 12
+      - PRJ_GEN: "Visual Studio 14 2015 Win64"
+        BDIR: msvc2015
+        PRJ_CFG: Debug
+        PRJ_GEN_VERSION: 14
+
+install:
+      - cmd: echo "Downloading conan..."
+      - cmd: set PATH=%PATH%;%PYTHON%/Scripts/
+      - cmd: pip.exe install conan
+      - cmd: conan user # Create the conan data directory
+      - cmd: conan --version
+
+build_script:
+    - mkdir build.%BDIR%
+    - IF %PRJ_GEN_VERSION% == 11 call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\vsvars32.bat"
+    - conan install --build=missing -s compiler="Visual Studio" -s compiler.version=%PRJ_GEN_VERSION% -s build_type=%PRJ_CFG% .
+    - cd build.%BDIR%
+    - cmake .. -G"%PRJ_GEN%"
+    - cmake --build . --config %PRJ_CFG% --clean-first
+
+

+ 5 - 0
thirdparty/curlpp/conanfile.txt

@@ -0,0 +1,5 @@
+[requires]
+libcurl/7.50.3@bincrafters/stable
+
+[generators]
+cmake

+ 13 - 0
thirdparty/curlpp/doc/AUTHORS

@@ -0,0 +1,13 @@
+Eric Lavigne (erlavigne at wanadoo.fr)
+Jean-Philippe Barrette-LaPierre (jpb at rrette.com)
+
+Thanks to some patch providers:
+Thomas Boutry
+Jonathan Wakely
+Peter Krumins
+Ben Golding
+Glenn <crass_no_spam at users dot berlios dot de>
+Hoef Jan
+Gisle Vanem
+Paul Lacy
+Nicolas Le Goff

+ 21 - 0
thirdparty/curlpp/doc/LICENSE

@@ -0,0 +1,21 @@
+Copyright (c) <2002-2004> <Jean-Philippe Barrette-LaPierre>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files 
+(cURLpp), to deal in the Software without restriction, 
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so, 
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+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 AND NONINFRINGEMENT. 
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+

+ 238 - 0
thirdparty/curlpp/doc/README.win32

@@ -0,0 +1,238 @@
+Read the README file first.
+
+As of version 0.6.0 curlpp has been built and run on win32.
+
+Information contained in this file does not apply to cygwin builds.
+
+curlpp has been tested on 
+Microsoft Visual C++ 7.1 (2003), (by Giuseppe "Cowo" Corbelli)
+Microsoft Visual C++ 8.0 (2005), (by Andrei Korostelev)
+Microsoft Visual C++ 9.0 (2008), (by Piotr Dobrogost)
+but any modern C++ compiler should do the job.
+
+BUILDING CURLPP WITH MSVC
+-------------------------
+
+BUILDING CURLPP
+
+You can build curlpp in three different ways
+
+A. from within MS Visual Studio IDE
+B. using msbuild tool and solution files
+C. using namke and makefile
+
+
+A. and B.
+
+	In case of A. and B. first you have to create solution files for your version of MS Visual Studio.
+	To do this use win32\create-vc-solution.bat	batch file with one of the following parameters:
+	7.1, for Visual Studio 2003
+	8, for Visual Studio 2005
+	9, for Visual Studio 2008
+	This batch file needs sed to be run successfully. You can download sed for win32 platform here
+	http://gnuwin32.sourceforge.net/packages/sed.htm
+    
+
+A. Building from within IDE
+
+    Choosing configuration
+
+        Choose configuration you would like to build. What configuration you want depens on three aspects.
+        1. Weather you want to build dynamic library (dll) or static library (lib). 
+           Choose configuration with DynamicLib or StaticLib prefix.
+        2. Weather you want to build debug or release version of the library.
+           Choose configuration with Debug or Release infix.
+        3. Weather you want static runtime library (RTL) to be used by curlpp or dynamic one.
+           Choose configuration with StaticRTL or DynamicRTL suffix.
+       
+        Names' suffixes of output .lib and .dll files depend on the all three choices.
+
+        MTd - dynamic, debug, static RTL
+        MT -  dynamic, release, static RTL
+        MDd - dynamic, debug, dynamic RTL
+        MD -  dynamic, release, dynamic RTL
+		
+        staticMTd - static, debug, static RTL
+        staticMT -  static, release, static RTL
+        staticMDd - static, debug, dynamic RTL
+        staticMD -  static, release, dynamic RTL
+
+        We will refer to these suffixes and types of libraries as "build category" further in this document.
+
+    Setting include directory
+    
+        If you are building curlpp using the original directory structure then you don't need to set value of user macro 
+        CURLPP_INCLUDE_PATH (by default ".\include"). If however you modified the original directory structure you have
+        to set value of this macro to the path, where you have curlpp source files.
+		
+	Setting output directory
+	
+		The output files will be placed in a directory set in CURLPP_LIB_PATH user macro (by default ".out\lib").
+
+		
+B. Building using msbuild
+
+    Open a command prompt and change folder to the root of curlpp tree.
+
+    set LIBCURL_PATH=/where/curl/is/installed
+    set OPENSSL_PATH=/where/openssl/is/installed (only if you have libcurl with ssl support and ssl installed)
+    msbuild curlpp.sln /t:Rebuild /p:Configuration=<Configuration>
+        where <Configuration> is one of
+        - DynamicLibDebugDynamicRTL
+        - DynamicLibDebugStaticRTL
+        - DynamicLibReleaseDynamicRTL
+        - DynamicLibReleaseStaticRTL
+        - StaticLibDebugDynamicRTL
+        - StaticLibDebugStaticRTL
+        - StaticLibReleaseDynamicRTL
+        - StaticLibReleaseStaticRTL
+        
+    Output files will be placed in a directory set in CURLPP_LIB_PATH.
+    
+    Any of DynamicLib* configurations will build a .dll library file and a .lib library import file.
+    Any of StaticLib* configurations will build the .lib static (inline) library.
+	Any of *Debug* configurations will in addition build a .pdb Program Database file.
+
+	
+C. Building using nmake
+
+	Open a command prompt and change folder to the root of curlpp tree.
+	Run nmake /f makefile with the following parameters
+	BUILD_CFG=[dynamic|static]-[debug|release]
+	RTLIB_CFG=[dynamic|static]-[debug|release]
+	LIBCURL_CFG=[dynamic|static]-[debug|release]
+
+	All options are optional.
+	Default for BUILD_CFG is dynamic-release.
+	Default for others is the value of BUILD_CFG.
+	Edit the LIBCURL_PATH or set LIBCURL_PATH envvar!
+
+
+NOTES
+    
+    Linking with libcurl
+    
+    All versions of this library need libcurl (c library) include files to compile and lib file to link successfully.
+    To build curlpp you first have to set value of LIBCURL_PATH user macro to your installation of libcurl.
+    This macro is used in the project file for VC9 to find include and lib files of libcurl.
+    Steps to set user macro. Select View/Property Manager, double-click curlpp property sheet, go to
+    Common Properties/User Macros/, double-click name of macro you want to modify, modify it and click OK.
+    Filename of libcurl's lib file should be in the form libcurlX.lib where X denotes build category chosen for curlpp.
+    (see Linking with RTL)
+    If it has different name you have to change .lib filename in
+    Project properties\Librarian\Additional Dependencies (when building static library)
+    or
+    Project properties\Linker\Input\Additional Dependencies (when building dynamic library).
+    
+
+    Linking with static libcurl
+    
+    If you are not going to use libcurl as a dll and you would like to include it into your library/executable by
+    linking to static version of libcurl you have to define preprocessor symbol CURL_STATICLIB. You can do it in
+    Project/Properties/C/C++/Preprocessor/Preprocessor Definitions.
+    By default all StaticLib* configurations define this symbol. If for some reason you would like to build static
+    curlpp library which links do dynamic libcurl library you have to remove CURL_STATICLIB define.
+
+    
+    Linking with RTL
+    
+    You have to link with libcurl which uses RTL in the same way as you are going to use RTL in curlpp lib.
+    Refering to build categories defined earlier in section "Choosing configuration" both libcurl and curlpp
+    must have the same build category.
+    If you are going to use dynamic RTL in curlpp (MD[x]), use libcurl which also uses dynamic RTL (MD[x]).
+    If you are going to use static RTL in curlpp (MT[x]), use libcurl which also uses static RTL (MT[x]).
+    You can use debug build of libcurl (MDd or MTd) in the release build of curlpp (MD or MT) and
+    you can use release build of libcurl (MD or MT) in the debug build of curlpp (MDd or MTd).
+    However you shouldn't do this.
+
+	Building self-contained version of the library
+	
+	curlpp is mostly a template library. For this reason during build of it, only non template entities are placed in the
+	.lib and .dll files. Most of the library's features used in your application causes code generation during compilation
+	of _your project_ and the code is placed in your executable. This is often not desirable. If you want to build 
+	the curlpp as self-contained library (one which has all code called by clients in its .lib and .dll files) you can
+	define preprocesor symbol CURL_SELF_CONTAINED. In this case curlpp uses explicit template instantiation (all such
+	instantiantions are placed in separte .ins files) to force generating code into .lib and .dll files. You have to
+	define this preprocesor symbol during build of your application to avoid including templates' definitions as they
+	are not needed in this phase. If you get linker errors connected with curlpp features when using self-contained 
+	version of the library it's because there are some missing explicit instantiantions. Please let us know if it happens.
+
+    
+    Using curlpp in .NET applications 
+    
+    If you are going to use curlpp library in a .NET project you have to use dynamic RTL.
+    This is because all .NET applications must use dynamic RTL and if your application uses curlpp,
+    the library itself has to use dynamic RTL as well.
+
+    
+    Additional dependencies
+    
+    To build examples (and your project as well) you need the following Windows lib files to link successfully
+    WSock32.lib, Wldap32.lib
+    These files comes with WindowsSDK. Macro $(WIN_SDK_DIR) (by default $(WindowsSdkDir)) is used in the properties
+	sheet file curlpp.examples.VC9.vsprops by VC9 solution to find these libraries.
+
+    
+    Linking with OpenSSL
+    
+    If you have libcurl compiled with OpenSSL support and want to have support for OpenSSL in curlpp as well
+    you have to set value of OPENSSL_PATH user macro to your installation of OpenSSL before building curlpp.
+    This variable is used in the project file for VC9 to find include and lib files of OpenSSL.
+    Steps to set user macro. Select View/Property Manager, double-click curlpp property sheet, go to
+    Common Properties/User Macros/, double-click name of macro you want to modify, modify it and click OK.
+    You have to link with OpenSSL which uses RTL in the same way as you are going to use RTL in curlpp lib.
+    Refering to build categories defined earlier in section "Choosing configuration" both OpenSSL and curlpp
+    must have the same build category.
+    Filenames of OpenSSL lib files should be in the form libeay32X.lib and ssleay32X.lib, where X denotes
+    build category chosen for curlpp. You have to add both this filenames to
+    Project properties\Librarian\Additional Dependencies (when building static library)
+    or
+    Project properties\Linker\Input\Additional Dependencies (when building dynamic library).
+
+    If you need OpenSSL for Windows platform take a look at http://www.slproweb.com/products/Win32OpenSSL.html
+    If you installed OpenSSL downloaded from the above link you'll find .lib files of all four build categories
+    in the /lib/vc directory.
+    
+    
+    Building with support for Boost
+    
+    curlpp has ability to use some features from the Boost library. If you want to build curlpp with support for Boost
+    you have to set value of BOOST_PATH user macro to your installation of Boost before building curlpp.
+    This variable is used in the project file for VC9 to find include files of Boost.
+    You also have to define preprocessor symbol HAVE_BOOST. You can do it in
+    Project/Properties/C/C++/Preprocessor/Preprocessor Definitions.
+	
+
+    Project propery sheets
+    
+    All user macros like LIBCURL_PATH, OPENSSL_PATH, BOOST_PATH, CURLPP_INCLUDE_PATH, CURLPP_LIB_PATH, WIN_SDK_DIR,
+	CURLPP_EXAMPLES_OUT_DIR, etc. 
+	are defined in project property sheet files named 
+	curlpp.common.vsprops   - options and macros used during build of library itself and during build of examples
+	curlpp.lib.vsprops      - options and macros used during build of library itself
+	curlpp.examples.vsprops - options and macros used during build of examples
+	
+
+	Compiler warnings
+	
+	There are a few kinds of compiler warnings which we haven't managed to remove.
+	
+	warning C4251: class X needs to have dll-interface to be used by clients of class Y
+	warning C4275: non dll-interface class X used as base for dll-interface class Y
+	warning C4512: X : assignment operator could not be generated
+	warning C4661: methodX : no suitable definition provided for explicit template instantiation request
+
+	
+BUILDING CURLPP EXAMPLES
+
+Your can either build the examples from MS Visual Studio IDE or from the command line from within examples folder:
+
+    nmake -f Makefile.msvc all
+      or    
+    nmake -f Makefile.msvc exampleXY
+      to build example XY
+
+
+Giuseppe "Cowo" Corbelli, cowo at lugbs dot linux dot it
+Andrei Korostelev, andrei at korostelev dot net
+Piotr Dobrogost, pd.curlpp.org (November 2008 - March 2009)

+ 4 - 0
thirdparty/curlpp/doc/TODO

@@ -0,0 +1,4 @@
+- Need to fix the OptionList::print function.
+- Need to put WriteStream and ReadStream to be exception safe.
+- Need to put WriteStream and ReadStream to be exception safe.
+- Get rid of example 18 and 20

BIN
thirdparty/curlpp/doc/guide.pdf


+ 706 - 0
thirdparty/curlpp/doc/guide.tex

@@ -0,0 +1,706 @@
+\LoadClass[12pt,letterpaper]{article}
+\documentclass{article}
+\usepackage{verbatim}
+\author{Jean-Philippe Barrette-LaPierre}
+\title{Programming with cURLpp}
+\begin{document}
+\maketitle
+\section{About this Document}
+\newcommand{\Cpp}{C{\tt ++}}
+
+
+This document attempts to describe the general principles and some basic
+approaches to consider when programming with cURLpp. Don't forget that cURLpp
+is a \Cpp wrapper of libcurl, so cURLpp needs libcurl to be installed already.
+
+This document will refer to 'the user' as the person writing the source code
+that uses cURLpp. That would probably be you or someone in a similar position.
+What will be generally refered to as 'the program' will be the collective
+source code that you write and that is using cURLpp for transfers. The program
+is outside cURLpp and cURLpp is outside of the program.
+
+To get more details on all options and functions described herein, please
+refer to their respective man pages. You should always have in mind that this
+is a \Cpp wrapper of libcurl. It would be unproductive to duplicate libcurl's 
+documentation here, so this document will show you how to interact with cURLpp,
+but you should read the libcurl programming tutorial, which this document is 
+strongly inspired from, and the libcurl man pages.
+
+\section{Building}
+
+There are many different ways to build C++ programs. This chapter will assume a
+unix-style build process. If you use a different build system, you can still
+read this to get general information that may apply to your environment as
+well. Note that cURLpp need libcurl to be already installed.
+
+\subsection{Compiling the Program}
+
+Your compiler needs to know where cURLpp's and libcurl's headers are
+located. Therefore you must set your compiler's include path to point to
+the directory where you installed them. The 'curlpp-config'\footnote{
+The curlpp-config tool, which wraps all functions of curl-config,
+is generated at build-time (on unix-like systems) and should be installed 
+with the 'make install' or similar instruction that installs the library, 
+header files, man pages etc.} tool can be
+used to get this information:
+
+\begin{verbatim} # curlpp-config --cflags\end{verbatim}
+
+If pkg-config is installed, you can use it this way:
+
+\begin{verbatim} # pkg-config --cflags curlpp\end{verbatim}  
+
+But, if you're using \verb+autoconf+ for your project you can use 
+\verb+pkg-config+ macros. See \verb+pkg-config+ man pages for more
+details.
+
+\subsection{Linking the Program with cURLpp}
+
+When having compiled the program, you need to link your object files to
+create a single executable. For that to succeed, you need to link with
+cURLpp and possibly also with other libraries that cURLpp itself depends
+on (such as libcurl). This may include OpenSSL libraries and even some standard
+OS libraries may be needed on the command line. To figure out which flags to use,
+the 'curlpp-config' tool comes to the rescue once again:
+
+\begin{verbatim} # curlpp-config --libs\end{verbatim}
+
+Again, if pkg-config is installed, you can use it this way:
+
+\begin{verbatim} # pkg-config --libs curlpp\end{verbatim}  
+
+\subsection{SSL or Not}
+
+cURLpp, like libcurl, can be built and customized in many ways. One of the things that
+varies between different libraries and builds is the support for SSL-based
+transfers, like HTTPS and FTPS. If OpenSSL was detected properly by libcurl 
+at build-time, cURLpp will be built with SSL support. To figure out if an
+installed cURLpp has been built with SSL support enabled, use
+'curlpp-config' like this:
+
+\begin{verbatim} # curlpp-config --feature\end{verbatim}
+
+If SSL is supported, the keyword 'SSL' will be written to stdout,
+possibly together with a few other features that can be on and off on
+different cURLpps.
+
+
+\subsection{Portable Code in a Portable World}
+
+The people behind libcurl have put a considerable effort to make libcurl work
+on a large number of different operating systems and environments.
+
+You program cURLpp the same way on all platforms that cURLpp runs on. There
+are only very few minor considerations that differ. If you make sure just to
+write your code portably enough, you may very well create yourself a very
+portable program. cURLpp shouldn't stop you from that.
+
+\section{Global Preparation}
+
+The program must initialize some of the cURLpp functionality globally. That
+means it should be done exactly once, no matter how many times you intend to
+use the library. Once for your program's entire lifetime. This is done using
+
+\begin{verbatim} 
+cURLpp::initialize( long flags = cURLpp::CURL_GLOBAL_ALL ) 
+\end{verbatim}
+
+and it takes one parameter which is a bit pattern that tells cURLpp what to
+intialize. Check the man page of \verb+curl_global_init+ for more details on flags.
+
+When the program no longer uses cURLpp, it should call \verb+cURLpp::terminate()+, 
+which is the opposite of the init call. It will then do the operations needed 
+to cleanup the resources that the \verb+cURLpp::initialize()+ call initialized. 
+
+Repeated calls to \verb+cURLpp::initialize()+ and \verb+cURLpp::terminate()+ must not be made. 
+They must only be called once each. The cURLpp::Cleanup class can be used to do this. It will
+call the \verb+cURLpp::initialize()+ function in its constructor and \verb+cURLpp::terminate()+
+in its destructor.  Check example01.cpp in the examples/ directory of
+the source distribution for an example. 
+
+\section{Handle the Easy cURLpp}
+
+To use the easy interface, you must first create yourself an easy handle. You
+need one handle for each easy session you want to perform. Basically, you
+should use one handle for every thread you plan to use for transferring. You
+must never share the same handle in multiple threads.
+
+Get an easy handle with
+
+\begin{verbatim} cURLpp::Easy easyhandle;\end{verbatim}
+
+This creates an easy handle. Using that you proceed to the next step: setting
+up your preferred actions. A handle is just a logic entity for the upcoming
+transfer or series of transfers. You can use it to do HTTP or FTP 
+requests.
+
+You set properties and options for this handle using \verb+cURLpp::Options+, 
+or \verb+cURLpp::OptionList+ classes; we will discuss \verb+cURLpp::OptionList+
+later. They control how the subsequent transfer or transfers will be made. 
+Options remain set in the handle until set again to something different. 
+Alas, multiple requests using the same handle will use the same options.
+
+Many of the informationals you set in cURLpp are \Cpp standard library strings. 
+Keep in mind that when you set strings with member functions, cURLpp will copy 
+the data. It will not merely point to the data. You don't need to make sure 
+that the data remains available for cURLpp.
+
+One of the most basic properties to set in the handle is the URL. You set
+your preferred URL to transfer with a 
+\verb+void cURLpp::Options::Url(const char *link)+
+option class, in a manner similar to:
+
+\begin{verbatim} 
+easyhandle.setOpt(cURLpp::Options::Url("http://example.com/"));
+\end{verbatim}
+
+There are of course many more options you can set, and we'll get back to a
+few of them later. Let's instead continue to the actual transfer:
+
+\begin{verbatim}
+easyhandle.perform();
+\end{verbatim}
+
+The \verb+cURLpp::Easy::perform()+ will connect to the remote site, do the necessary
+commands and receive the transfer. Whenever it receives data, it calls the
+trait function we previously set. The function may get one byte at a time,
+or it may get many kilobytes at once. cURLpp delivers as much as possible as
+often as possible. Your trait function should return the number of bytes
+it "took care of". If that is not the exact same amount of bytes that was
+passed to it, cURLpp will abort the operation and throw an exception.
+
+When the transfer is complete, the function throws a 
+\verb+cURLpp::Exception+ if it 
+doesn't succeed in its mission. the \verb+const char *cURLpp::Exception::what()+ will
+return the human readable reason of failure.
+
+\section{Wrapping libcurl}
+
+As previously said, \verb+cURLpp+ is just a \Cpp libcurl wrapper. It wouldn't be a good 
+idea to reproduce here, in this project, all the libcurl documentation. This means 
+that when you will be programming with \verb+cURLpp+, you will refer more to libcurl's 
+documentation than to \verb+cURLpp+'s. We will explain here how \verb+cURLpp+ wraps libcurl, so
+you will able to use it, without constantly refering to its manual. 
+
+First, you must know that there are two main things that constitute \verb+cURLpp+: There are
+its options value setting/retrieving behavior and its utilities that helps you to use
+libcurl's options more easily. 
+
+\subsection{Option setting/retrieving}
+
+The main feature of \verb+cURLpp+ is that you can retrieve options previously set on handles.
+\verb+cURLpp+ gives you the opportunity to retrieve options values that were previously set
+on a specific handle and then use them again for other handles. But first, let's show
+you how to set an option on a handle, in comparison to libcurl's way of setting an option.
+
+libcurl sets options on handles with this function:
+
+\begin{verbatim}
+curl_easy_setopt(CURL *handle, CURLoption option, parameter)
+\end{verbatim}
+
+Here's a part of the documentation taken from the man pages:
+
+\begin{quote}
+\verb+curl_easy_setopt()+ is  used to tell libcurl how to behave. By using the appropriate options to 
+\verb+curl_easy_setopt()+, you can change libcurl's behavior.  All options are set with the option 
+followed by a parameter.  That  parameter can  be  a long, a function pointer or an object pointer, 
+all depending on what the specific option expects.
+\end{quote}
+
+Lets code a simple example:
+
+\begin{verbatim}
+CURL *handle = curl_easy_init();
+if(handle == NULL) {
+   //something went wrong.
+}
+
+CURLcode code = curl_easy_setopt(handle, 
+   CURLOPT_URL, ``http://www.example.com'');
+if(code != CURLE_OK) {
+   //something went wrong
+}
+\end{verbatim}
+The code below does the same thing but with \verb+cURLpp+:
+
+\begin{verbatim}
+cURLpp::Easy handle;
+handle.setOpt(cURLpp::Options::Url(``http://www.example.com'');
+\end{verbatim}
+
+If a problem occur, \verb+cURLpp+ will throw an exception, for more detail on this subject,
+see the next section named \textit{Exception issues}. As you see, the equivalent
+of the \verb+curl_easy_setopt+ function is the cURLpp::Easy::setOpt member function.
+
+\subsubsection{cURLpp::Options}
+
+The question that you might ask you at this moment is: ``what exactly is the 
+\verb+cURLpp::Options::Url+ class mentioned in the previous example?'' In fact, 
+this class is used to store values of options, but also to retrieve them, as shown
+below:
+
+\begin{verbatim}
+cURLpp::Easy handle;
+handle.setOpt(cURLpp::Options::Url(``http://www.example.com'');
+
+cURLpp::Options::Url myUrl;
+handle.getOpt(myUrl);
+std::cout << myUrl.getValue() << std::endl;
+\end{verbatim}
+
+This piece of code should print the URL on the standard output. Here's the
+code of the \verb+examples/example01.cpp+ file.
+
+\begin{verbatim}
+#include <string>
+#include <iostream>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Options.hpp>
+
+#define MY_PORT 8080
+
+/** 
+ * This example is made to show you how you can use the Options.
+ */
+int main()
+{
+  try
+    {
+      cURLpp::Cleanup myCleanup;
+
+      // Creation of the URL option.
+      cURLpp::Options::Url myUrl(
+        std::string("http://example.com"));
+      
+      // Copy construct from the other URL.
+      cURLpp::Options::Url myUrl2(myUrl);
+
+      // Creation of the port option.
+      cURLpp::Options::Port myPort(MY_PORT);
+
+      // Creation of the request.
+      cURLpp::Easy myRequest;
+
+
+      // Creation of an option that contain a copy 
+      // of the URL option.
+      cURLpp::OptionBase *mytest = myUrl.clone();
+      myRequest.setOpt(*mytest);
+
+      // You can reuse the base option for other type of option
+      // and set the option to the request. but first, don't forget 
+      // to delete the previous memory. You can delete it since the 
+      // option is internally duplicated for the request.
+      delete mytest;
+      mytest = myPort.clone();
+      myRequest.setOpt(*mytest);
+      delete mytest;
+
+      // You can clone an option directly to the same type of 
+      // option.
+      cURLpp::Options::Url *myUrl3 = myUrl.clone();
+      myRequest.setOpt(myUrl3);
+      // Now myUrl3 is owned by the request we will NOT use 
+      // it anymore.
+
+
+      // You don't need to declare an option if you just want 
+      // to use it once.
+      myRequest.setOpt(cURLpp::Options::Url("example.com"));
+
+
+      // Note that the previous line wasn't really efficient
+      // because we create the option, this option is duplicated
+      // for the request and then the option destructor is called.
+      // You can use this instead:
+      myRequest.setOpt(new cURLpp::Options::Url("example.com"));
+      // Note that with this the request will use directly this
+      // instance we just created. Be aware that if you pass an
+      // Option pointer to the setOpt function, it will consider
+      // the instance has its own instance. The Option instance
+      // will be deleted when the request will be deleted, so
+      // don't use the instance further in your code.
+
+
+      // Doing the previous line is efficient as this:
+      myRequest.setOpt(myUrl.clone());
+
+      
+      // You can retrieve the value of a specific option.
+      std::cout << myUrl2.getValue() << std::endl;
+
+
+      // You can see what are the options set for a request
+      // with this function. This function will print the option
+      // to the stdout.
+      myRequest.print();
+    
+      // Perform the transaction with the options set.
+      myRequest.perform();
+    }
+  catch( cURLpp::RuntimeError &e )
+    {
+      std::cout << e.what() << std::endl;
+    }
+  catch( cURLpp::LogicError &e )
+    {
+      std::cout << e.what() << std::endl;
+    }
+    
+  return 0;
+}
+\end{verbatim}
+
+
+
+\subsection{cURLpp::Option types}
+This section will explain the use of the types that we use for 
+some options that differ from types that libcurl uses for the
+same option.
+
+\subsubsection{The bool type}
+A true value is binded to a non-zero long value, a false value
+is binded to a zero long value.
+
+\subsubsection{The std::string type}
+The \verb+std::string::c_str()+ function is passed to libcurl.
+
+\subsubsection{The std::list template of std::string type}
+This type is used when libcurl's option need a \verb+curl_slist+. Instead of
+using this homemade struct, cURLpp allow you to use a known type, the 
+\verb+std::list+. cURLpp this transform internally the \verb+std::list+
+to a \verb+curl_slist+.
+
+\subsection{cURLpp::Options}
+This section just list how each libcurl's option is binded by cURLpp.
+Some options might not be there, if it's the case and you want to use them,
+see the ``how to enhance cURLpp'' section.
+
+\subsubsection{Behavior options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< bool, 
+        CURLOPT_VERBOSE > Verbose;
+      typedef cURLpp::OptionTrait< bool, 
+        CURLOPT_HEADER > Header;
+      typedef cURLpp::OptionTrait< bool, 
+        CURLOPT_NOSIGNAL > NoSignal;
+      typedef cURLpp::OptionTrait< bool, 
+        CURLOPT_NOPROGRESS > NoProgress;
+\end{verbatim}
+
+\subsubsection{Callback options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< cURL::curl_write_callback,
+        CURLOPT_WRITEFUNCTION > WriteFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        CURLOPT_WRITEDATA > WriteData;
+      typedef cURLpp::OptionTrait< cURL::curl_read_callback, 
+        CURLOPT_READFUNCTION > ReadFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        CURLOPT_READDATA > ReadData;
+      typedef cURLpp::OptionTrait< cURL::curl_progress_callback, 
+        CURLOPT_PROGRESSFUNCTION > ProgressFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        CURLOPT_PROGRESSDATA > ProgressData;
+      typedef cURLpp::OptionTrait< cURL::curl_write_callback, 
+        CURLOPT_HEADERFUNCTION > HeaderFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        CURLOPT_HEADERDATA > HeaderData;
+      typedef cURLpp::OptionTrait< cURL::curl_debug_callback, 
+        CURLOPT_DEBUGFUNCTION > DebugFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        CURLOPT_DEBUGDATA > DebugData;
+#ifdef CURLOPT_SSL_CTX_FUNCTION
+      typedef cURLpp::OptionTrait< cURL::curl_ssl_ctx_callback, 
+        CURLOPT_SSL_CTX_FUNCTION > SslCtxFunction;
+      typedef cURLpp::OptionTrait< void *, 
+        cURL::CURLOPT_SSL_CTX_DATA > SslCtxData;
+#endif
+\end{verbatim}
+
+\subsubsection{Error options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< char *, 
+        cURL::CURLOPT_ERRORBUFFER > ErrorBuffer;
+      typedef cURLpp::OptionTrait< FILE *, 
+        cURL::CURLOPT_STDERR > StdErr;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FAILONERROR > FailOnError;
+\end{verbatim}
+
+\subsubsection{Network options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_URL > Url;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_PROXY > Proxy;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_PROXYPORT > ProxyPort;
+      typedef cURLpp::OptionTrait< curl_proxytype, 
+        cURL::CURLOPT_PROXYTYPE > ProxyType;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_HTTPPROXYTUNNEL > HttpProxyTunnel;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_INTERFACE > Interface;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_DNS_CACHE_TIMEOUT > DnsCacheTimeout;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_DNS_USE_GLOBAL_CACHE > DnsUseGlobalCache;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_BUFFERSIZE > BufferSize;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_PORT > Port;
+#ifdef cURL::CURLOPT_TCP_NODELAY
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_TCP_NODELAY > TcpNoDelay;
+#endif
+\end{verbatim}
+
+
+\subsubsection{Names and passwords options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_NETRC > Netrc;
+#ifdef cURL::CURLOPT_NETRC_FILE
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_NETRC_FILE > NetrcFile;
+#endif
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_USERPWD > UserPwd;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_PROXYUSERPWD > ProxyUserPwd;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_HTTPAUTH > HttpAuth;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_PROXYAUTH > ProxyAuth;
+\end{verbatim}
+
+\subsubsection{HTTP options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_AUTOREFERER > AutoReferer;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_ENCODING > Encoding;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FOLLOWLOCATION > FollowLocation;
+#ifdef cURL::CURLOPT_UNRESTRICTED_AUTH
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_UNRESTRICTED_AUTH > UnrestrictedAuth;
+#endif
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_MAXREDIRS > MaxRedirs;
+#ifndef cURL::CURLOPT_UPLOAD
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_PUT > Put;
+#else
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_UPLOAD > Put;
+#endif
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_POST > Post;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_POSTFIELDS > PostFields;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_POSTFIELDSIZE > PostFieldSize;
+#ifdef cURL::CURLOPT_POSTFIELDSIZE_LARGE
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_POSTFIELDSIZE_LARGE > PostFieldSizeLarge;
+#endif
+      typedef cURLpp::OptionTrait< struct cURLpp::cURL::HttpPost *, 
+        cURL::CURLOPT_HTTPPOST > HttpPost;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_REFERER > Referer;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_USERAGENT > UserAgent;
+      typedef cURLpp::OptionTrait< std::list< std::string >, 
+        cURL::CURLOPT_HTTPHEADER > HttpHeader;
+      typedef cURLpp::OptionTrait< std::list< std::string >, 
+        cURL::CURLOPT_HTTP200ALIASES > Http200Aliases;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_COOKIE > Cookie;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_COOKIEFILE > CookieFile;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_COOKIEJAR > CookieJar;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_COOKIESESSION > CookieSession;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_HTTPGET > HttpGet;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_HTTP_VERSION > HttpVersion;
+\end{verbatim}
+
+\subsubsection{FTP options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_FTPPORT > FtpPort;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_QUOTE > Quote;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_POSTQUOTE > PostQuote;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_PREQUOTE > PreQuote;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FTPLISTONLY > FtpListOnly;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FTPAPPEND > FtpAppend;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FTP_USE_EPSV > FtpUseEpsv;
+#ifdef cURL::CURLOPT_FTP_CREATE_MISSING_DIRS
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FTP_CREATE_MISSING_DIRS > FtpCreateMissingDirs;
+#endif
+#ifdef cURL::CURLOPT_FTP_RESPONSE_TIMEOUT
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FTP_RESPONSE_TIMEOUT > FtpResponseTimeout;
+#endif
+#ifdef cURL::CURLOPT_FTP_SSL
+      typedef cURLpp::OptionTrait< cURLpp::curl_ftpssl, 
+        cURL::CURLOPT_FTP_SSL > FtpSsl;
+#endif
+#ifdef cURL::CURLOPT_FTP_AUTH
+      typedef cURLpp::OptionTrait< cURLpp::curl_ftpauth, 
+        cURL::CURLOPT_FTP_AUTH > FtpAuth;
+#endif
+\end{verbatim}      
+
+\subsubsection{Protocol options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_TRANSFERTEXT > TransferText;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_CRLF > Crlf;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_RANGE > Range;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_RESUME_FROM > ResumeFrom;
+#ifdef cURL::CURLOPT_RESUME_FROM_LARGE
+      typedef cURLpp::OptionTrait< curl_off_t, 
+        cURL::CURLOPT_RESUME_FROM_LARGE > ResumeFromLarge;
+#endif
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_CUSTOMREQUEST > CustomRequest;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FILETIME > FileTime;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_NOBODY > NoBody;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_INFILESIZE > InfileSize;
+#ifdef cURL::CURLOPT_INFILESIZE_LARGE
+      typedef cURLpp::OptionTrait< cURL::curl_off_t, 
+        cURL::CURLOPT_INFILESIZE_LARGE > InfileSizeLarge;
+#endif
+#ifdef cURL::CURLOPT_UPLOAD
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_UPLOAD > Upload;
+#else
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_PUT > Upload;
+#endif
+#ifdef cURL::CURLOPT_MAXFILESIZE
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_MAXFILESIZE > MaxFileSize;
+#endif
+#ifdef cURL::CURLOPT_MAXFILESIZE_LARGE
+      typedef cURLpp::OptionTrait< cURL::curl_off_t, 
+        cURL::CURLOPT_MAXFILESIZE_LARGE > MaxFileSizeLarge;
+#endif
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_TIMECONDITION > TimeCondition;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_TIMECONDITION > TimeValue;
+\end{verbatim}
+
+\subsubsection{Connection options}
+\begin{verbatim}       
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_TIMEOUT > Timeout;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_LOW_SPEED_LIMIT > LowSpeedLimit;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_LOW_SPEED_TIME > LowSpeedTime;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_MAXCONNECTS > MaxConnects;
+      typedef cURLpp::OptionTrait< cURL::curl_closepolicy, 
+        cURL::CURLOPT_CLOSEPOLICY > ClosePolicy;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FRESH_CONNECT > FreshConnect;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_FORBID_REUSE > ForbidReuse;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_CONNECTTIMEOUT > ConnectTimeout;
+#ifdef cURL::CURLOPT_IPRESOLVE
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_IPRESOLVE > IpResolve;
+#endif
+\end{verbatim}
+
+\subsubsection{SSL and security options}
+\begin{verbatim}       
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLCERT > SslCert;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLCERTTYPE > SslCertType;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLCERTPASSWD > SslCertPasswd;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLKEY > SslKey;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLKEYTYPE > SslKeyType;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLKEYPASSWD > SslKeyPasswd;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSLENGINE > SslEngine;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_SSLVERSION > SslVersion;
+      typedef cURLpp::OptionTrait< bool, 
+        cURL::CURLOPT_SSL_VERIFYPEER > SslVerifyPeer;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_CAINFO > CaInfo;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_CAPATH > CaPath;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_RANDOM_FILE > RandomFile;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_EGDSOCKET > EgdSocket;
+      typedef cURLpp::OptionTrait< long, 
+        cURL::CURLOPT_SSL_VERIFYHOST > SslVerifyHost;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_SSL_CIPHER_LIST > SslCipherList;
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_KRB4LEVEL > Krb4Level;
+\end{verbatim}
+
+\subsubsection{Others options}
+\begin{verbatim}
+      typedef cURLpp::OptionTrait< std::string, 
+        cURL::CURLOPT_KRB4LEVEL > Krb4Level;
+\end{verbatim}
+
+
+\section{How the enhance cURLpp}
+Need to be written.
+
+\section{Exceptions issues}
+
+As previously said, cURLpp (libcurl in fact) offer the possibility to reimplement the data 
+writing/reading functions. Those functions called from within libcurl might 
+raise exceptions. Raising an exception in C code might cause problems. cURLpp
+protect you from doing so\footnote{This feature will be added only in the 
+0.6.0 version}. All exceptions are caught by cURLpp before they could
+cause damage to libcurl. If you want to raise an exception within traits, you need
+to do this:
+
+\begin{verbatim}
+ cURLpp::raiseException(MyException(``Exception Raised'');
+\end{verbatim}
+
+Then, the \verb+cURLpp::Easy::perform()+ will raise your exception at the end of 
+the process. If an exception is raised but not by this mechanism, a 
+\verb+cURLpp::UnknownExceptionError+ will be raised.
+
+
+
+\end{document}

+ 26 - 0
thirdparty/curlpp/examples/CMakeLists.txt

@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.0)
+include(FindPkgConfig)
+pkg_check_modules(CURLPP REQUIRED curlpp)
+
+set(CMAKE_CXX_STANDARD 11) # C++11...
+set(CMAKE_CXX_STANDARD_REQUIRED ON) #...is required...
+set(CMAKE_CXX_EXTENSIONS OFF) #...without compiler extensions like gnu++11
+
+
+file(GLOB ExamplesFileList "*.cpp")
+
+# Create a meta target to create examples
+add_custom_target(build_all_examples COMMENT A target that requires all the examples.)
+
+message(STATUS "Creating build rules for Examples:")
+foreach(Example ${ExamplesFileList})
+  message(STATUS "\tCreating build rule for ${Example}")
+  # Get the name without extension or directory
+  get_filename_component(ExampleName ${Example} NAME_WE)
+  # Define example executable
+  add_executable(${ExampleName} ${Example})
+  # Link example against curlpp
+  target_link_libraries(${ExampleName} ${CURLPP_LDFLAGS})
+  # make the meta target depend on this example.
+  add_dependencies(build_all_examples ${ExampleName})
+endforeach(Example ${ExamplesFileList})

+ 36 - 0
thirdparty/curlpp/examples/README

@@ -0,0 +1,36 @@
+configure.in is a good example to add curlpp to your project
+
+Note that example 22 is contains the easiest and shorter examples of cURLpp 
+usage.
+
+ Example 01: This example is made to show you how you can use the Options.
+ Example 02: an upload example.
+ Example 03: verbose callback example.
+ Example 04: GetInfo example.
+ Example 05: Function functor for WriteFunction example.
+ Example 06: Method functor for WriteFunction example.
+ Example 07: Cookie interface example via getInfo.
+             Demonstrates usage of Infos::CookieList which example04 did not.
+ Example 08: verbose callback example, with exception safe handling.
+ Example 09: verbose callback example, with exception safe handling, 
+             but without raiseException function.
+ Example 10: Binded function functor for WriteFunction example.
+ Example 11: Plain write function example.
+ Example 12: HTTP POST example.
+ Example 13: Simple Multi interface example.
+ Example 14: Multi interface example with info function example.
+ Example 15: Simple example for demonstrating the NoValueOptionTrait. 
+             (SslEngineDefault)
+ Example 16: HTTP POST example with HTTP Authentification.
+ Example 17: Binded method functor for WriteFunction example.
+ Example 18: No longer available. This used to be a boost usage example, but it's no longer relevant since c++11.
+ Example 19: Multipart/formdata HTTP POST example.
+ Example 20: std::ostream usage.
+ Example 21: upload example with std::istream.
+ Example 22: Real easy and quick examples.
+ Example 23: Setting request options using iterators to custom container 
+             of curlpp options.
+ Example 24: Binded method functor for DebugFunction example.
+
+
+

+ 43 - 0
thirdparty/curlpp/examples/example00.cpp

@@ -0,0 +1,43 @@
+/**
+* \file
+* The most simple example.
+* 
+*/
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+
+
+using namespace curlpp::options;
+
+int main(int, char **)
+{
+	try
+	{
+		// That's all that is needed to do cleanup of used resources (RAII style).
+		curlpp::Cleanup myCleanup;
+
+		// Our request to be sent.
+		curlpp::Easy myRequest;
+
+		// Set the URL.
+		myRequest.setOpt<Url>("http://example.com");
+
+		// Send request and get a result.
+		// By default the result goes to standard output.
+		myRequest.perform();
+	}
+
+	catch(curlpp::RuntimeError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch(curlpp::LogicError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+    
+  return 0;
+}

+ 171 - 0
thirdparty/curlpp/examples/example01.cpp

@@ -0,0 +1,171 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Setting and copying options.
+* 
+*/
+
+
+#include <string>
+#include <sstream>
+#include <iostream>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+
+
+namespace
+{
+const long MyPort = 80;
+}
+
+/** 
+ * This example is made to show you how you can use the Options.
+ */
+int main(int, char **)
+{
+	try
+	{
+		curlpp::Cleanup myCleanup;
+
+		// First easy example.
+		{
+		  // The first easiest example is to retreive the content of
+		  // a web page and put it in a stream.
+		  std::cout << curlpp::options::Url("http://example.com");
+
+		  // You don't need to use just the standard outputs. You
+		  // can use any stream:
+		  std::ostringstream os;
+		  os << curlpp::options::Url("http://example.com");
+		}
+
+		// More elaborate example.
+		{
+		  // What the previous example done there was simply 
+		  // to create a curlpp::Easy class, which is the basic
+		  // object in cURLpp, and then set the Url option.
+		  // curlpp::options classes are the primitives that allow to specify 
+		  // values to the requests. 
+		  curlpp::options::Url myUrl(std::string("http://example.com"));
+		  curlpp::Easy myRequest;
+		  myRequest.setOpt(myUrl);
+
+		  // Now that all the options we wanted to set are there, we need to
+		  // actually do the request. the "perform" method does actually that.
+		  // With that call, the request will be done and the content of that URL
+		  // will be printed in std::cout (which is the default).
+		  myRequest.perform();
+
+		  // If we wanted to put the content of the URL within a string stream
+		  // (or any type of std::ostream, for that matter), like the first example, 
+		  // we would use the WriteStrem option like this:
+		  std::ostringstream os;
+		  curlpp::options::WriteStream ws(&os);
+		  myRequest.setOpt(ws);
+		  myRequest.perform();
+
+		  // There is some shorcut within curlpp that allow you to write shorter code
+		  // like this:
+		  os << myRequest;
+
+		  // That would do exactly what the previous code was doing.
+		}
+
+		// Creation of the URL option.
+		curlpp::options::Url myUrl(std::string("http://example.com"));
+
+		// Copy construct from the other URL.
+		curlpp::options::Url myUrl2(myUrl);
+
+		// Creation of the port option.
+		curlpp::options::Port myPort(MyPort);
+
+		// Creation of the request.
+		curlpp::Easy myRequest;
+
+		// Creation of an option that contain a copy of the URL option.
+		curlpp::OptionBase *mytest = myUrl.clone();
+		myRequest.setOpt(*mytest);
+
+		// You can reuse the base option for other type of option
+		// and set the option to the request. but first, don't forget 
+		// to delete the previous memory. You can delete it since the 
+		// option is internally duplicated for the request.
+		delete mytest;
+		mytest = myPort.clone();
+		myRequest.setOpt(*mytest);
+		delete mytest;
+
+		// You can clone an option directly to the same type of 
+		// option.
+		curlpp::options::Url *myUrl3 = myUrl.clone();
+		myRequest.setOpt(myUrl3);
+		// Now myUrl3 is owned by the request we will NOT use 
+		// it anymore.
+
+
+		// You don't need to declare an option if you just want 
+		// to use it once.
+		myRequest.setOpt(curlpp::options::Url("example.com"));
+
+
+		// Note that the previous line wasn't really efficient
+		// because we create the option, this option is duplicated
+		// for the request and then the option destructor is called.
+		// You can use this instead:
+		myRequest.setOpt(new curlpp::options::Url("example.com"));
+		// Note that with this the request will use directly this
+		// instance we just created. Be aware that if you pass an
+		// Option pointer to the setOpt function, it will consider
+		// the instance has its own instance. The Option instance
+		// will be deleted when the request will be deleted, so
+		// don't use the instance further in your code.
+
+
+		// Doing the previous line is efficient as this:
+		myRequest.setOpt(myUrl.clone());
+
+
+		// You can retreive the value of a specific option.
+		std::cout << myUrl2.getValue() << std::endl;
+
+		// Perform the transaction with the options set.
+		myRequest.perform();
+	}
+
+	catch( curlpp::RuntimeError &e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch( curlpp::LogicError &e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+    
+  return 0;
+}

+ 104 - 0
thirdparty/curlpp/examples/example02.cpp

@@ -0,0 +1,104 @@
+/*
+*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+* \file
+* Uploading of string.
+* ReadFunction option using functor.
+* Setting custom headers.
+*/
+
+
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+ 
+/*
+   anonymous namespace to prevent name clash in case other examples using the same global entities
+   would be compiled in the same project
+*/
+namespace
+{
+
+char *data = NULL;
+
+size_t readData(char *buffer, size_t size, size_t nitems)
+{
+	strncpy(buffer, data, size * nitems);
+	return size * nitems;
+}
+
+} // namespace
+
+int main(int argc, char *argv[])
+{
+	if(argc != 3)
+	{
+		std::cerr << "Example 2: Missing argument" << std::endl 
+							<< "Example 2: Usage: example02 url string-to-send" 
+							<< std::endl;
+		return EXIT_FAILURE;
+	}
+
+	char *url = argv[1];
+	data = argv[2];
+	int size = strlen(data);
+
+	char buf[50];
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		std::list<std::string> headers;
+		headers.push_back("Content-Type: text/*"); 
+		sprintf(buf, "Content-Length: %d", size); 
+		headers.push_back(buf);
+
+		using namespace curlpp::Options;
+		request.setOpt(new Verbose(true));
+		request.setOpt(new ReadFunction(curlpp::types::ReadFunctionFunctor(readData)));
+		request.setOpt(new InfileSize(size));
+		request.setOpt(new Upload(true));
+		request.setOpt(new HttpHeader(headers));
+		request.setOpt(new Url(url));
+
+		request.perform();
+	}
+	catch (curlpp::LogicError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+	catch (curlpp::RuntimeError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	return 0;
+}
+

+ 88 - 0
thirdparty/curlpp/examples/example03.cpp

@@ -0,0 +1,88 @@
+/*
+*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+* \file
+* DebugFunction option using functor as a callback.
+*/
+
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+class MyWindow
+{
+public:
+	int writeDebug(curl_infotype, char *data, size_t size)
+	{
+		fprintf(stderr, "Debug: ");
+		fwrite(data, size, 1, stderr);
+		return size;
+	}
+};
+
+int main(int argc, char *argv[])
+{
+
+	if(argc != 2)
+	{
+		std::cerr	<< "Example 3: Wrong number of arguments" << std::endl 
+							<< "Example 3: Usage: example3 url" 
+							<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+
+	MyWindow myWindow;
+
+	try 
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		using namespace curlpp::Options;
+		request.setOpt(Verbose(true));
+		using namespace std::placeholders;
+		request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
+		request.setOpt(Url(url));
+
+		request.perform();
+	}
+
+	catch ( curlpp::LogicError & e ) 
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch ( curlpp::RuntimeError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	return 0;
+}
+

+ 89 - 0
thirdparty/curlpp/examples/example04.cpp

@@ -0,0 +1,89 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Getting options using curlpp::infos.
+* 
+*/
+
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+#include <curlpp/Infos.hpp>
+ 
+
+int main(int argc, char *argv[])
+{
+	if(argc != 2)
+	{
+		std::cerr << "Example 04: Wrong number of arguments" << std::endl 
+			<< "Example 04: Usage: example04 url" 
+			<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+
+	try 
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		using namespace curlpp::Options;
+		request.setOpt(Verbose(true));
+		request.setOpt(Url(url));
+
+		request.perform();
+
+		std::string effURL;
+		curlpp::infos::EffectiveUrl::get(request, effURL);
+		std::cout << "Effective URL: " << effURL << std::endl;
+
+		//other way to retreive URL
+		std::cout << std::endl 
+			<< "Effective URL: " 
+			<< curlpp::infos::EffectiveUrl::get(request)
+			<< std::endl;
+
+		std::cout << "Response code: " 
+			<< curlpp::infos::ResponseCode::get(request) 
+			<< std::endl;
+
+		std::cout << "SSL engines: " 
+			<< curlpp::infos::SslEngines::get(request)
+			<< std::endl;
+	}
+	catch ( curlpp::LogicError & e ) {
+		std::cout << e.what() << std::endl;
+	}
+	catch ( curlpp::RuntimeError & e ) {
+		std::cout << e.what() << std::endl;
+	}
+
+	return 0;
+}
+

+ 120 - 0
thirdparty/curlpp/examples/example05.cpp

@@ -0,0 +1,120 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Write function using free function as a callback.
+* 
+*/
+
+
+#include <cstdlib>
+#include <cstring>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#define MAX_FILE_LENGTH 20000
+
+char *m_pBuffer = NULL;
+size_t m_Size = 0;
+
+void* Realloc(void* ptr, size_t size)
+{
+  if(ptr)
+    return realloc(ptr, size);
+  else
+    return malloc(size);
+};
+
+// Callback must be declared static, otherwise it won't link...
+size_t WriteMemoryCallback(char* ptr, size_t size, size_t nmemb)
+{
+  // Calculate the real size of the incoming buffer
+  size_t realsize = size * nmemb;
+  
+  // (Re)Allocate memory for the buffer
+  m_pBuffer = (char*) Realloc(m_pBuffer, m_Size + realsize);
+  
+  // Test if Buffer is initialized correctly & copy memory
+  if (m_pBuffer == NULL) {
+    realsize = 0;
+  }
+  
+  memcpy(&(m_pBuffer[m_Size]), ptr, realsize);
+  m_Size += realsize;
+  
+  // return the real size of the buffer...
+  return realsize;
+};
+
+
+void print() 
+{
+	std::cout << "Size: " << m_Size << std::endl;
+	std::cout << "Content: " << std::endl << m_pBuffer << std::endl;
+}
+
+
+int main(int argc, char *argv[])
+{
+	m_pBuffer = (char*) malloc(MAX_FILE_LENGTH * sizeof(char));
+
+	if(argc != 2)
+	{
+		std::cerr << "Example 05: Wrong number of arguments" << std::endl 
+			<< "Example 05: Usage: example05 url" 
+			<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		// Set the writer callback to enable cURL 
+		// to write result in a memory area
+		curlpp::types::WriteFunctionFunctor functor(WriteMemoryCallback);
+		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(functor);
+		request.setOpt(test);
+
+		// Setting the URL to retrive.
+		request.setOpt(new curlpp::options::Url(url));
+		request.setOpt(new curlpp::options::Verbose(true));
+		request.perform();
+
+		print();
+	}
+	catch ( curlpp::LogicError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+	catch ( curlpp::RuntimeError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+}

+ 144 - 0
thirdparty/curlpp/examples/example06.cpp

@@ -0,0 +1,144 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* WriteFunction option using functor as a callback.
+* 
+*/
+
+
+#include <cstdlib>
+#include <cstring>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#define MAX_FILE_LENGTH 20000
+
+class WriterMemoryClass
+{
+public:
+	// Helper Class for reading result from remote host
+	WriterMemoryClass()
+	{
+		this->m_pBuffer = NULL;
+		this->m_pBuffer = (char*) malloc(MAX_FILE_LENGTH * sizeof(char));
+		this->m_Size = 0;
+	};
+
+	~WriterMemoryClass()
+	{
+		if (this->m_pBuffer)
+			free(this->m_pBuffer);
+	};
+
+	void* Realloc(void* ptr, size_t size)
+	{
+		if(ptr)
+			return realloc(ptr, size);
+		else
+			return malloc(size);
+	};
+
+	// Callback must be declared static, otherwise it won't link...
+	size_t WriteMemoryCallback(char* ptr, size_t size, size_t nmemb)
+	{
+		// Calculate the real size of the incoming buffer
+		size_t realsize = size * nmemb;
+
+		// (Re)Allocate memory for the buffer
+		m_pBuffer = (char*) Realloc(m_pBuffer, m_Size + realsize);
+
+		// Test if Buffer is initialized correctly & copy memory
+		if (m_pBuffer == NULL) {
+			realsize = 0;
+		}
+
+		memcpy(&(m_pBuffer[m_Size]), ptr, realsize);
+		m_Size += realsize;
+
+
+		// return the real size of the buffer...
+		return realsize;
+	};
+
+
+	void print() 
+	{
+		std::cout << "Size: " << m_Size << std::endl;
+		std::cout << "Content: " << std::endl << m_pBuffer << std::endl;
+	}
+
+	// Public member vars
+	char* m_pBuffer;
+	size_t m_Size;
+};
+
+
+int main(int argc, char *argv[])
+{
+	if(argc != 2)
+	{
+		std::cerr << "Example 06: Wrong number of arguments" << std::endl 
+			<< "Example 06: Usage: example06 url" 
+			<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		WriterMemoryClass mWriterChunk;
+
+		// Set the writer callback to enable cURL 
+		// to write result in a memory area
+		using namespace std::placeholders;
+		curlpp::types::WriteFunctionFunctor functor = std::bind(&WriterMemoryClass::WriteMemoryCallback, &mWriterChunk, _1, _2, _3);
+
+		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(functor);
+		request.setOpt(test);
+
+		// Setting the URL to retrive.
+		request.setOpt(new curlpp::options::Url(url));
+		request.setOpt(new curlpp::options::Verbose(true));
+		request.perform();
+
+		mWriterChunk.print();
+	}
+	
+	catch ( curlpp::LogicError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+	
+	catch ( curlpp::RuntimeError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+}

+ 174 - 0
thirdparty/curlpp/examples/example07.cpp

@@ -0,0 +1,174 @@
+/**
+* \file
+* Cookies.
+* 
+*/
+
+#include <string>
+#include <sstream>
+#include <vector>
+#include <iostream>
+
+#include <cstdlib>
+#include <ctime>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+
+#define CURLPP_ALLOW_NOT_AVAILABLE
+
+#include <curlpp/Infos.hpp>
+#include <curlpp/Options.hpp>
+
+
+class YesNo
+{
+public:
+    explicit YesNo(bool yn) : yesno(yn) {}
+		std::string operator()() const {
+        return yesno ? "Yes" : "No";
+    }
+		friend std::ostream &operator<<(std::ostream &strm, const YesNo &yn) {
+        strm << yn();
+        return strm;
+    }
+private:
+    bool yesno;
+};
+
+struct MyCookie
+{
+	std::string name;
+	std::string value;
+	std::string domain;
+	std::string path;
+	time_t expires;
+	bool tail;
+	bool secure;
+};
+
+std::ostream &
+operator<<(std::ostream &strm, const MyCookie &cook)
+{
+	strm << "Cookie: '" << cook.name << "' (secure: " << YesNo(cook.secure) << ", tail: "
+		<< YesNo(cook.tail) << ") for domain: '" << cook.domain << "', "
+		<< "path: '" << cook.path << "'.\n";
+	strm << "Value: '" << cook.value << "'.\n";
+	strm << "Expires: '" << ctime(&cook.expires) << "'.\n";
+
+	return strm;
+}
+
+std::vector<std::string> &
+split_cookie_str(const std::string &str, std::vector<std::string> &in)
+{
+	std::string part;
+
+	std::istringstream strm(str);
+	while (getline(strm, part, '\t'))
+		in.push_back(part);
+
+	return in;
+}
+
+std::vector<std::string>
+splitCookieStr(const std::string &str)
+{
+	std::vector<std::string> split;
+	split_cookie_str(str, split);
+	return split;
+}
+
+std::vector<std::string> &
+splitCookieStr(const std::string &str, std::vector<std::string> &in)
+{
+	return split_cookie_str(str, in);
+}
+
+int StrToInt(const std::string &str)
+{
+	std::istringstream strm(str);
+	int i = 0;
+	if (!(strm >> i)) {
+		throw curlpp::RuntimeError("Unable to convert string '" + str + "' to integer!");
+	}
+	return i;
+}
+
+MyCookie
+MakeCookie(const std::string &str_cookie)
+{
+	std::vector<std::string> vC = splitCookieStr(str_cookie);
+	MyCookie cook;
+
+	cook.domain = vC[0];
+	cook.tail = vC[1] == "TRUE";
+	cook.path = vC[2];
+	cook.secure = vC[3] == "TRUE";
+	cook.expires = StrToInt(vC[4]);
+	cook.name = vC[5];
+	cook.value = vC[6];
+
+	return cook;
+}
+
+int
+main(void)
+{
+	try
+	{
+		curlpp::Cleanup myCleanup;
+		curlpp::Easy exEasy;
+		std::vector<std::string> cookieList;
+
+		// a cookie as in HTTP header
+		cookieList.push_back("Set-Cookie: GMAIL_AT=EXPIRED;expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com");
+
+		// a Netscape style cookie with \t
+		cookieList.push_back(".google.com\tTRUE\t/\tFALSE\t2147483647\tLSID\tI like you GOOGLE");
+
+		// a Netscape style cookie with tabs in string
+		cookieList.push_back(".yahoo.com	TRUE	/	FALSE	0	YAHOO_COOKIE	I like you yahoo, too");
+
+		exEasy.setOpt(new curlpp::options::Url("http://www.google.com"));
+		exEasy.setOpt(new curlpp::options::FileTime(true));
+		exEasy.setOpt(new curlpp::options::Verbose(true));
+
+		// loop throught the cookies and add one by one
+		//
+		for (std::vector<std::string>::iterator it = cookieList.begin();
+			it != cookieList.end();
+			++it)
+		{
+			exEasy.setOpt(curlpp::options::CookieList(*it));
+		}
+		exEasy.perform();
+
+		// see what cookies we got
+		//
+		std::cout << "\nCookies from cookie engine:" << std::endl;
+		std::list<std::string> cookies;
+		curlpp::infos::CookieList::get(exEasy, cookies);
+		int i = 1;
+		for (std::list<std::string>::const_iterator it = cookies.begin();
+			it != cookies.end();
+			++it, i++)
+		{
+			std::cout << "[" << i << "]: " << MakeCookie(*it) << std::endl;
+		}
+
+		exit(EXIT_SUCCESS);
+	}
+
+	catch(curlpp::RuntimeError &e)
+	{
+		std::cerr << e.what() << std::endl;
+		exit(EXIT_FAILURE);
+	}
+
+	catch(curlpp::LogicError &e)
+	{
+		std::cout << e.what() << std::endl;
+		exit(EXIT_FAILURE);
+	}
+}

+ 98 - 0
thirdparty/curlpp/examples/example08.cpp

@@ -0,0 +1,98 @@
+/*
+*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+* \file
+* DebugFunction option using functor.
+* 
+*/
+
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+ 
+
+
+class MyWindow
+{
+
+public:
+
+	int writeDebug(curl_infotype, char *, size_t)
+	{
+		curlpp::raiseException(std::runtime_error("This is our exception."));
+		std::cout << "We never reach this line." << std::endl;
+		return 0;
+	}
+};
+
+
+int main(int argc, char *argv[])
+{
+	if(argc != 2)
+	{
+		std::cerr << "Example 8: Wrong number of arguments" << std::endl 
+			<< "Example 8: Usage: example8 url" 
+			<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+
+	MyWindow myWindow;
+
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		using namespace curlpp::Options;
+		request.setOpt(Verbose(true));
+		using namespace std::placeholders;
+		request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
+		request.setOpt(Url(url));
+
+		request.perform();
+	}
+
+	catch ( curlpp::LogicError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch ( curlpp::RuntimeError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch ( std::runtime_error &e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	return 0;
+}
+

+ 96 - 0
thirdparty/curlpp/examples/example09.cpp

@@ -0,0 +1,96 @@
+/*
+*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+* \file
+* DebugFunction option using functor.
+* 
+*/
+
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+
+class MyWindow
+{
+
+public:
+
+	int writeDebug(curl_infotype, char *, size_t)
+  {
+		throw std::runtime_error("This is the unknown exception.");
+    std::cout << "We never reach this line." << std::endl;
+    return 0;
+  }
+};
+
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2)
+	{
+    std::cerr << "Example 9: Wrong number of arguments" << std::endl 
+	      << "Example 9: Usage: example9 url" 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  char *url = argv[1];
+     
+  MyWindow myWindow;
+  try
+  {
+      curlpp::Cleanup cleaner;
+      curlpp::Easy request;
+      
+      using namespace curlpp::Options;
+      request.setOpt(Verbose(true));
+      using namespace std::placeholders;
+      request.setOpt(DebugFunction(std::bind(&MyWindow::writeDebug, &myWindow, _1, _2, _3)));
+      request.setOpt(Url(url));
+      
+      request.perform();
+  }
+
+	catch ( curlpp::LogicError & e )
+	{
+    std::cout << e.what() << std::endl;
+  }
+
+	catch ( curlpp::RuntimeError & e )
+	{
+    std::cout << e.what() << std::endl;
+  }
+
+	catch ( std::runtime_error &e )
+	{
+    std::cout << e.what() << std::endl;
+  }
+  
+  return 0;
+}
+

+ 99 - 0
thirdparty/curlpp/examples/example10.cpp

@@ -0,0 +1,99 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* WriteFunction option using functor.
+* Writing to FILE*
+* 
+*/
+
+
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#define MAX_FILE_LENGTH 20000
+
+size_t 
+FileCallback(FILE *f, char* ptr, size_t size, size_t nmemb)
+{
+	return fwrite(ptr, size, nmemb, f);
+};
+
+
+int main(int argc, char *argv[])
+{
+	if(argc != 3)
+	{
+		std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+			<< argv[0] << ": Usage: " << " url file" 
+			<< std::endl;
+
+		return EXIT_FAILURE;
+	}
+
+	char *url = argv[1];
+	char *filename = argv[2];
+	FILE * file = fopen(filename, "w");
+	if (!file)
+	{
+		std::cerr << "Error opening " << filename << std::endl;
+		return EXIT_FAILURE;
+	}
+
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		// Set the writer callback to enable cURL to write result in a memory area
+		using namespace std::placeholders;
+		curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(std::bind(&FileCallback, file, _1, _2, _3));
+		request.setOpt(test);
+
+		// Setting the URL to retrive.
+		request.setOpt(new curlpp::options::Url(url));
+		request.setOpt(new curlpp::options::Verbose(true));
+		request.perform();
+
+		return EXIT_SUCCESS;
+	}
+
+	catch ( curlpp::LogicError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch ( curlpp::RuntimeError & e )
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	return EXIT_FAILURE;
+}

+ 107 - 0
thirdparty/curlpp/examples/example11.cpp

@@ -0,0 +1,107 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* WriteFunction option using free function.
+* Writing to FILE*
+* 
+*/
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#include <cerrno>
+
+
+/// Callback must be declared static, otherwise it won't link...
+size_t WriteCallback(char* ptr, size_t size, size_t nmemb, void *f)
+{
+	FILE *file = (FILE *)f;
+	return fwrite(ptr, size, nmemb, file);
+};
+
+
+int main(int argc, char *argv[])
+{
+	if(argc < 2)
+	{
+		std::cerr << "Example 11: Wrong number of arguments" << std::endl 
+			<< "Example 11: Usage: example11 url [file]" 
+			<< std::endl;
+		return EXIT_FAILURE;
+	}
+	char *url = argv[1];
+	char *filename = NULL;
+	if(argc >= 3)
+	{
+		filename = argv[2];
+	}
+
+	try
+	{
+		curlpp::Cleanup cleaner;
+		curlpp::Easy request;
+
+		/// Set the writer callback to enable cURL to write result in a memory area
+		curlpp::options::WriteFunctionCurlFunction
+			myFunction(WriteCallback);
+
+		FILE *file = stdout;
+		if(filename != NULL)
+		{
+			file = fopen(filename, "wb");
+			if(file == NULL)
+			{
+			  fprintf(stderr, "%s/n", strerror(errno));
+			  return EXIT_FAILURE;
+			}
+		} 
+
+		curlpp::OptionTrait<void *, CURLOPT_WRITEDATA> 
+			myData(file);
+
+		request.setOpt(myFunction);
+		request.setOpt(myData);
+
+		/// Setting the URL to retrive.
+		request.setOpt(new curlpp::options::Url(url));
+		request.setOpt(new curlpp::options::Verbose(true));
+		request.perform();
+	}
+
+	catch (curlpp::LogicError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch (curlpp::RuntimeError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+}

+ 75 - 0
thirdparty/curlpp/examples/example12.cpp

@@ -0,0 +1,75 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Simple POST demo.
+* 
+*/
+
+
+#include <cstdlib>
+#include <cerrno>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+int main(int argc, char *argv[])
+{
+  if(argc < 2) {
+    std::cerr << "Example 11: Wrong number of arguments" << std::endl 
+	      << "Example 11: Usage: example12 url" 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+    
+    request.setOpt(new curlpp::options::Url(url)); 
+    request.setOpt(new curlpp::options::Verbose(true)); 
+    
+    std::list<std::string> header; 
+    header.push_back("Content-Type: application/octet-stream"); 
+    
+    request.setOpt(new curlpp::options::HttpHeader(header)); 
+    
+    request.setOpt(new curlpp::options::PostFields("abcd"));
+    request.setOpt(new curlpp::options::PostFieldSize(5));
+    
+    request.perform(); 
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_SUCCESS;
+}

+ 125 - 0
thirdparty/curlpp/examples/example13.cpp

@@ -0,0 +1,125 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Simple Multi demo.
+* 
+*/
+
+
+#include <iostream>
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Multi.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+#pragma comment(lib, "Ws2_32.lib")
+#endif // WIN32
+
+int main(int argc, char *argv[])
+{
+  if(argc < 3) {
+    std::cerr << "Example 13: Wrong number of arguments" << std::endl 
+	      << "Example 13: Usage: example13 url1 url2" 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  char *url1 = argv[1];
+  char *url2 = argv[2];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    
+    curlpp::Easy request1;
+    curlpp::Easy request2;
+    
+    request1.setOpt(new curlpp::options::Url(url1)); 
+    request1.setOpt(new curlpp::options::Verbose(true)); 
+    
+    request2.setOpt(new curlpp::options::Url(url2)); 
+    request2.setOpt(new curlpp::options::Verbose(true)); 
+    
+    int nbLeft;
+    curlpp::Multi requests;
+    requests.add(&request1);
+    requests.add(&request2);
+    
+    /* we start some action by calling perform right away */
+    while(!requests.perform(&nbLeft)) {};
+    
+    while(nbLeft) {
+      struct timeval timeout;
+      int rc; /* select() return code */
+      
+      fd_set fdread;
+      fd_set fdwrite;
+      fd_set fdexcep;
+      int maxfd;
+      
+      FD_ZERO(&fdread);
+      FD_ZERO(&fdwrite);
+      FD_ZERO(&fdexcep);
+      
+      /* set a suitable timeout to play around with */
+      timeout.tv_sec = 1;
+      timeout.tv_usec = 0;
+      
+      /* get file descriptors from the transfers */
+      requests.fdset(&fdread, &fdwrite, &fdexcep, &maxfd);
+      
+      rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+      
+      switch(rc) {
+      case -1:
+	/* select error */
+	nbLeft = 0;
+	printf("select() returns error, this is badness\n");
+	break;
+      case 0:
+      default:
+	/* timeout or readable/writable sockets */
+	while(!requests.perform(&nbLeft)) {};
+	break;
+      }
+    }
+    
+    std::cout << "NB lefts: " << nbLeft << std::endl;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_SUCCESS;
+}
+
+  

+ 147 - 0
thirdparty/curlpp/examples/example14.cpp

@@ -0,0 +1,147 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Multi demo.
+* 
+*/
+
+#include <iostream>
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Multi.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+#pragma comment(lib, "Ws2_32.lib")
+#endif // WIN32
+
+int main(int argc, char *argv[])
+{
+  if(argc < 3) {
+    std::cerr << "Example 13: Wrong number of arguments" << std::endl 
+	      << "Example 13: Usage: example13 url1 url2" 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  char *url1 = argv[1];
+  char *url2 = argv[2];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    
+    curlpp::Easy request1;
+    curlpp::Easy request2;
+    
+    request1.setOpt(new curlpp::options::Url(url1)); 
+    request1.setOpt(new curlpp::options::Verbose(true)); 
+    
+    request2.setOpt(new curlpp::options::Url(url2)); 
+    request2.setOpt(new curlpp::options::Verbose(true)); 
+    
+    int nbLeft;
+    curlpp::Multi requests;
+    requests.add(&request1);
+    requests.add(&request2);
+    
+    /* we start some action by calling perform right away */
+    while(!requests.perform(&nbLeft)) {};
+    
+    while(nbLeft) {
+      struct timeval timeout;
+      int rc; /* select() return code */
+      
+      fd_set fdread;
+      fd_set fdwrite;
+      fd_set fdexcep;
+      int maxfd;
+      
+      FD_ZERO(&fdread);
+      FD_ZERO(&fdwrite);
+      FD_ZERO(&fdexcep);
+      
+      /* set a suitable timeout to play around with */
+      timeout.tv_sec = 1;
+      timeout.tv_usec = 0;
+      
+      /* get file descriptors from the transfers */
+      requests.fdset(&fdread, &fdwrite, &fdexcep, &maxfd);
+      
+      rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
+      switch(rc) {
+      case -1:
+	/* select error */
+	nbLeft = 0;
+	printf("select() returns error, this is badness\n");
+	break;
+      case 0:
+	/* timeout, do something else */
+	break;
+      default:
+	/* one or more of curl's file descriptors say there's data to read
+	   or write */
+	while(!requests.perform(&nbLeft)) {};
+	break;
+      }
+    }
+    
+    std::cout << "NB lefts: " << nbLeft << std::endl;
+
+    /* See how the transfers went */
+    /* 
+       Multi::info returns a list of:
+       std::pair< curlpp::Easy, curlpp::Multi::Info >
+    */
+    curlpp::Multi::Msgs msgs = requests.info();
+    for(curlpp::Multi::Msgs::iterator pos = msgs.begin();
+	pos != msgs.end();
+	pos++) {
+      if(pos->second.msg == CURLMSG_DONE) {
+
+	/* Find out which handle this message is about */
+	if(pos->first == &request1) {
+	  printf("First request completed with status %d\n", pos->second.code);
+	}
+	else if(pos->first == &request2) {
+	  printf("Second request completed with status %d\n", pos->second.code);
+	}
+      }
+    }
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_SUCCESS;
+}
+
+  

+ 61 - 0
thirdparty/curlpp/examples/example15.cpp

@@ -0,0 +1,61 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Using options.
+* 
+*/
+
+
+#include <string>
+#include <iostream>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+
+
+int main(int, char **)
+{
+  try
+  {
+      curlpp::Cleanup myCleanup;
+      
+      // Creation of the URL option.
+      curlpp::Easy myRequest;
+      myRequest.setOpt(new curlpp::options::Url(std::string("https://example.com")));
+      myRequest.setOpt(new curlpp::options::SslEngineDefault());
+      myRequest.perform();
+    }
+  catch( curlpp::RuntimeError &e )
+    {
+      std::cout << e.what() << std::endl;
+    }
+  catch( curlpp::LogicError &e )
+    {
+      std::cout << e.what() << std::endl;
+    }
+    
+  return 0;
+}

+ 78 - 0
thirdparty/curlpp/examples/example16.cpp

@@ -0,0 +1,78 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Simple POST demo.
+* 
+*/
+
+
+#include <cstdlib>
+#include <cerrno>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+
+int main(int argc, char *argv[])
+{
+  if(argc < 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << "Usage: " << argv[0] << " url"
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+    
+    request.setOpt(new curlpp::options::Url(url)); 
+    request.setOpt(new curlpp::options::Verbose(true)); 
+    
+    std::list<std::string> header; 
+    header.push_back("Content-Type: application/octet-stream"); 
+    
+    request.setOpt(new curlpp::options::HttpHeader(header)); 
+    
+    request.setOpt(new curlpp::options::PostFields("abcd"));
+    request.setOpt(new curlpp::options::PostFieldSize(5));
+
+    request.setOpt(new curlpp::options::UserPwd("user:password"));
+    
+    request.perform(); 
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_SUCCESS;
+}

+ 103 - 0
thirdparty/curlpp/examples/example17.cpp

@@ -0,0 +1,103 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+#include <curlpp/Infos.hpp>
+
+#include <cstdlib>
+
+
+struct MethodClass
+{
+private:
+  MethodClass();
+
+public:
+  MethodClass(std::ostream * stream)
+    : mStream(stream)
+    , writeRound(0)
+  {}
+
+  // Helper Class for reading result from remote host
+  size_t write(curlpp::Easy *handle, char* ptr, size_t size, size_t nmemb)
+  {
+    ++writeRound;
+
+		curlpp::options::Url url;
+    handle->getOpt(url);
+
+    // Calculate the real size of the incoming buffer
+    size_t realsize = size * nmemb;
+    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << std::endl;
+    mStream->write(ptr, realsize);
+    // return the real size of the buffer...
+    return realsize;
+  };
+
+  // Public member vars
+  std::ostream * mStream;
+  unsigned writeRound;
+};
+
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << argv[0] << ": Usage: " << " url " 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+
+    MethodClass mObject(&std::cout);
+    
+    // Set the writer callback to enable cURL 
+    // to write result in a memory area
+    using namespace std::placeholders;
+    curlpp::options::WriteFunction *test = new curlpp::options::WriteFunction(std::bind(&MethodClass::write, &mObject, &request, _1, _2, _3));
+    request.setOpt(test);
+    
+    // Setting the URL to retrive.
+    request.setOpt(new curlpp::options::Url(url));
+    request.perform();
+
+    return EXIT_SUCCESS;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_FAILURE;
+}

+ 115 - 0
thirdparty/curlpp/examples/example18.cpp

@@ -0,0 +1,115 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* WriteFunction using streams.
+* 
+*/
+
+
+#include <sstream>
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+#include <curlpp/Infos.hpp>
+
+		
+struct MethodClass
+{
+private:
+  MethodClass();
+
+public:
+  MethodClass(std::ostream * stream)
+    : mStream(stream)
+    , writeRound(0)
+  {}
+
+  // Helper Class for reading result from remote host
+  size_t write(curlpp::Easy *handle, char* ptr, size_t size, size_t nmemb)
+  {
+    ++writeRound;
+
+		curlpp::options::Url url;
+    handle->getOpt(url);
+
+    // Calculate the real size of the incoming buffer
+    size_t realsize = size * nmemb;
+    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << std::endl;
+    mStream->write(ptr, realsize);
+    // return the real size of the buffer...
+    return realsize;
+  };
+
+  // Public member vars
+  std::ostream * mStream;
+  unsigned writeRound;
+};
+
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << argv[0] << ": Usage: " << " url " 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+
+    std::ostringstream myStream;
+    MethodClass mObject(&myStream);
+    
+
+    // Set the writer callback to enable cURL 
+    // to write result in a memory area
+#ifdef HAVE_BOOST
+    curlpp::options::BoostWriteFunction *test = new curlpp::options::BoostWriteFunction(boost::bind(&MethodClass::write, &mObject, &request, _1, _2, _3));
+    request.setOpt(test);
+#endif /* HAVE_BOOST */
+    
+    // Setting the URL to retrive.
+    request.setOpt(new curlpp::options::Url(url));
+
+    request.perform();
+
+    return EXIT_SUCCESS;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_FAILURE;
+}

+ 81 - 0
thirdparty/curlpp/examples/example19.cpp

@@ -0,0 +1,81 @@
+/*
+ *    Copyright (c) <2002-2005> <Gazihan Alankus>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Forms demo.
+* 
+*/
+
+
+#include <fstream>
+
+#include <cstdlib>
+#include <cerrno>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+int main(int argc, char *argv[])
+{
+  if(argc < 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << "Usage: " << argv[0] << " url"
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+    
+    request.setOpt(new curlpp::options::Url(url)); 
+    //request.setOpt(new curlpp::options::Verbose(true)); 
+    
+    {
+      // Forms takes ownership of pointers!
+      curlpp::Forms formParts;
+      formParts.push_back(new curlpp::FormParts::Content("name1", "value1"));
+      formParts.push_back(new curlpp::FormParts::Content("name2", "value2"));
+      
+      request.setOpt(new curlpp::options::HttpPost(formParts)); 
+    }
+
+    // The forms have been cloned and are valid for the request, even
+    // if the original forms are out of scope.
+    std::ofstream myfile("/dev/null");
+    myfile << request << std::endl << request << std::endl;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_SUCCESS;
+}

+ 74 - 0
thirdparty/curlpp/examples/example20.cpp

@@ -0,0 +1,74 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Using WriteStream option.
+* 
+*/
+
+
+#include <sstream>
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << argv[0] << ": Usage: " << " url " 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+
+    // Set the writer callback to enable cURL 
+    // to write result in a memory area
+    request.setOpt(new curlpp::options::WriteStream(&std::cout));
+    
+    // Setting the URL to retrive.
+    request.setOpt(new curlpp::options::Url(url));
+
+    request.perform();
+
+    return EXIT_SUCCESS;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_FAILURE;
+}

+ 87 - 0
thirdparty/curlpp/examples/example21.cpp

@@ -0,0 +1,87 @@
+/*
+*    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+* \file
+* Using ReadStream option.
+* 
+*/
+
+
+#include <sstream>
+
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+ 
+int main(int argc, char *argv[])
+{
+  if(argc != 3) {
+    std::cerr << "Example 2: Missing argument" << std::endl 
+	      << "Example 2: Usage: example02 url string-to-send" 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+  char *url = argv[1];
+
+  std::istringstream myStream(argv[2]);
+  int size = myStream.str().size();
+     
+  char buf[50];
+   try
+   {
+      curlpp::Cleanup cleaner;
+      curlpp::Easy request;
+
+      std::list< std::string > headers;
+      headers.push_back("Content-Type: text/*"); 
+      sprintf(buf, "Content-Length: %d", size); 
+      headers.push_back(buf);
+      
+      using namespace curlpp::Options;
+      request.setOpt(new Verbose(true));
+      request.setOpt(new ReadStream(&myStream));
+      request.setOpt(new InfileSize(size));
+      request.setOpt(new Upload(true));
+      request.setOpt(new HttpHeader(headers));
+      request.setOpt(new Url(url));
+       
+      request.perform();
+   }
+   catch ( curlpp::LogicError & e )
+     {
+       std::cout << e.what() << std::endl;
+     }
+   catch ( curlpp::RuntimeError & e )
+     {
+       std::cout << e.what() << std::endl;
+     }
+   
+   return 0;
+}
+

+ 75 - 0
thirdparty/curlpp/examples/example22.cpp

@@ -0,0 +1,75 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+* \file
+* Using options::Url as stream input.
+* 
+*/
+
+
+#include <sstream>
+
+#include <cstdlib>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << argv[0] << ": Usage: " << " url " 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+
+    // Setting the URL to retrive.
+    request.setOpt(new curlpp::options::Url(url));
+
+    std::cout << request << std::endl;
+
+    // Even easier version. It does the same thing 
+    // but if you need to download only an url,
+    // this is the easiest way to do it.
+    std::cout << curlpp::options::Url(url) << std::endl;
+
+    return EXIT_SUCCESS;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_FAILURE;
+}

+ 55 - 0
thirdparty/curlpp/examples/example23.cpp

@@ -0,0 +1,55 @@
+/**
+* \file
+* Setting request options using iterators to custom container of curlpp options.
+* 
+*/
+
+#include <vector>
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+
+
+using namespace curlpp::options;
+
+int main(int, char **)
+{
+
+	try
+	{
+
+		// That's all that is needed to do cleanup of used resources (RAII style).
+		curlpp::Cleanup myCleanup;
+
+		// Our request to be sent.
+		curlpp::Easy myRequest;
+
+		// Container of our choice with pointers to curlpp options.
+		std::vector<curlpp::OptionBase *> options;
+
+		options.push_back(new Url("http://example.com"));
+		options.push_back(new Port(80));
+
+		// Set all options in range to the Easy handle.
+		myRequest.setOpt(options.begin(), options.end());
+
+		// Send request and get a result.
+		// By default the result goes to standard output.
+		myRequest.perform();
+
+	}
+
+
+	catch(curlpp::RuntimeError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+
+	catch(curlpp::LogicError & e)
+	{
+		std::cout << e.what() << std::endl;
+	}
+    
+  return 0;
+}

+ 104 - 0
thirdparty/curlpp/examples/example24.cpp

@@ -0,0 +1,104 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include <curlpp/cURLpp.hpp>
+#include <curlpp/Easy.hpp>
+#include <curlpp/Options.hpp>
+#include <curlpp/Exception.hpp>
+#include <curlpp/Infos.hpp>
+
+#include <cstdlib>
+
+
+struct MethodClass
+{
+private:
+  MethodClass();
+
+public:
+  MethodClass(std::ostream * stream)
+    : mStream(stream)
+    , writeRound(0)
+  {}
+
+  // Helper Class for reading result from remote host
+  size_t debug(curlpp::Easy *handle, curl_infotype type, char* ptr, size_t size)
+  {
+    ++writeRound;
+
+    curlpp::options::Url url;
+    handle->getOpt(url);
+
+    // Calculate the real size of the incoming buffer
+    std::cerr << "write round: " << writeRound << ", url: " << url.getValue() << ", type: " << type << std::endl;
+    mStream->write(ptr, size);
+
+    // return the real size of the buffer...
+    return size;
+  };
+
+  // Public member vars
+  std::ostream * mStream;
+  unsigned writeRound;
+};
+
+
+int main(int argc, char *argv[])
+{
+  if(argc != 2) {
+    std::cerr << argv[0] << ": Wrong number of arguments" << std::endl 
+	      << argv[0] << ": Usage: " << " url " 
+	      << std::endl;
+    return EXIT_FAILURE;
+  }
+
+  char *url = argv[1];
+  
+  try {
+    curlpp::Cleanup cleaner;
+    curlpp::Easy request;
+
+    MethodClass mObject(&std::cerr);
+    
+    // Set the debug callback to enable cURL 
+    // to write result in a stream
+    using namespace std::placeholders;
+    curlpp::options::DebugFunction * test = new curlpp::options::DebugFunction(std::bind(&MethodClass::debug, &mObject, &request, _1, _2, _3));
+    request.setOpt(test);
+    
+    // Setting the URL to retrive.
+    request.setOpt(new curlpp::options::Url(url));
+    request.setOpt(new curlpp::options::Verbose(true));
+    request.perform();
+
+    return EXIT_SUCCESS;
+  }
+  catch ( curlpp::LogicError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+  catch ( curlpp::RuntimeError & e ) {
+    std::cout << e.what() << std::endl;
+  }
+
+  return EXIT_FAILURE;
+}

+ 40 - 0
thirdparty/curlpp/extras/CMakeLists.txt

@@ -0,0 +1,40 @@
+# extracting curlpp version text + version num
+file (READ ${CMAKE_CURRENT_SOURCE_DIR}/../include/curlpp/cURLpp.hpp CURLPP_VERSION_H_CONTENTS)
+
+string (REGEX MATCH "#define LIBCURLPP_VERSION \"[^\"]*"
+  CURLPP_VERSION ${CURLPP_VERSION_H_CONTENTS})
+string (REGEX REPLACE "[^\"]+\"" "" CURLPP_VERSION ${CURLPP_VERSION})
+string (REGEX MATCH "#define LIBCURLPP_VERSION_NUM 0x[0-9a-fA-F]+"
+  CURLPP_VERSION_NUM ${CURLPP_VERSION_H_CONTENTS})
+string (REGEX REPLACE "[^0]+0x" "" CURLPP_VERSION_NUM ${CURLPP_VERSION_NUM})
+
+message(STATUS "curlpp version=[${CURLPP_VERSION}]")
+message(STATUS "curlpp version num=[${CURLPP_VERSION_NUM}]")
+
+
+# curlpp-config needs the following options to be set.
+string(REPLACE "." "" libext "${CMAKE_STATIC_LIBRARY_SUFFIX}")
+set(CC "${CMAKE_C_COMPILER}")
+set(libdir "${CMAKE_INSTALL_LIBDIR}")
+set(libdir_static "${CMAKE_INSTALL_LIBDIR}")
+set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+
+set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+# Finally generate a "curl-config" matching this config
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/curlpp-config.in"
+               "${CMAKE_CURRENT_BINARY_DIR}/curlpp-config" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/curlpp-config"
+        DESTINATION ${CMAKE_INSTALL_BINDIR}
+        PERMISSIONS
+          OWNER_READ OWNER_WRITE OWNER_EXECUTE
+          GROUP_READ GROUP_EXECUTE
+          WORLD_READ WORLD_EXECUTE)
+
+
+# Finally generate a pkg-config file matching this config
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/curlpp.pc.in"
+               "${CMAKE_CURRENT_BINARY_DIR}/curlpp.pc" @ONLY)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/curlpp.pc"
+        DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)

+ 91 - 0
thirdparty/curlpp/extras/curlpp-config.in

@@ -0,0 +1,91 @@
+#! /bin/sh
+#
+# The idea to this kind of setup info script was stolen from numerous
+# other packages, such as neon, libxml and gnome.
+#
+# $Id: curlpp-config.in,v 1.4 2004/10/05 01:48:40 jpbl Exp $
+#
+prefix=@prefix@
+includedir=@includedir@
+
+usage()
+{
+    cat <<EOF
+Usage: curlpp-config [OPTION]
+
+Available values for OPTION include:
+
+  --cc        compiler
+  --cflags    pre-processor and compiler flags
+  --feature   newline separated list of enabled features
+  --help      display this help and exit
+  --libs      library linking information
+  --prefix    curl install prefix
+  --version   output version information
+  --vernum    output the version information as a number (hexadecimal)
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+while test $# -gt 0; do
+    case "$1" in
+    # this deals with options in the style
+    # --option=value and extracts the value part
+    # [not currently used]
+    -*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) value= ;;
+    esac
+
+    case "$1" in
+    --cc)
+	echo @CC@
+	;;
+
+    --prefix)
+	echo $prefix
+	;;
+
+    --feature)
+	curl-config --feature
+        ;;
+
+    --version)
+	echo libcurlpp @CURLPP_VERSION@
+	exit 0
+	;;
+
+    --vernum)
+	echo @CURLPP_VERSION_NUM@
+	exit 0
+	;;
+
+    --help)
+	usage 0
+	;;
+
+    --cflags)
+       	echo -I@includedir@ @CURLPP_CXXFLAGS@ `curl-config --cflags`
+       	;;
+
+    --libs)
+       	echo -L@libdir@ @LDFLAGS@ @LIBS@ `curl-config --libs` -lcurlpp
+       	;;
+    --static-libs)
+       	echo @libdir_static@/libcurlpp.@libext@ @LDFLAGS@ @LIBS@ `curl-config --static-libs`
+        ;;
+
+    *)
+        echo "unknown option: $1"
+	usage
+	exit 1
+	;;
+    esac
+    shift
+done
+
+exit 0

+ 152 - 0
thirdparty/curlpp/extras/curlpp.m4

@@ -0,0 +1,152 @@
+# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
+#                       [ACTION-IF-YES], [ACTION-IF-NO])
+# ----------------------------------------------------------
+#      David Shaw <dshaw@jabberwocky.com>   Jun-21-2005
+#
+# Checks for libcurl.  DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-libcurl or --without-libcurl.
+# If not supplied, DEFAULT-ACTION is yes.  MINIMUM-VERSION is the
+# minimum version of libcurl to accept.  Pass the version as a regular
+# version number like 7.10.1. If not supplied, any version is
+# accepted.  ACTION-IF-YES is a list of shell commands to run if
+# libcurl was successfully found and passed the various tests.
+# ACTION-IF-NO is a list of shell commands that are run otherwise.
+# Note that using --without-libcurl does run ACTION-IF-NO.
+#
+# This macro defines HAVE_LIBCURL if a working libcurl setup is found,
+# and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary values.
+# Other useful defines are LIBCURL_FEATURE_xxx where xxx are the
+# various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
+# where yyy are the various protocols supported by libcurl.  Both xxx
+# and yyy are capitalized.  See the list of AH_TEMPLATEs at the top of
+# the macro for the complete list of possible defines.  Shell
+# variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
+# defined to 'yes' for those features and protocols that were found.
+# Note that xxx and yyy keep the same capitalization as in the
+# curl-config list (e.g. it's "HTTP" and not "http").
+#
+# Users may override the detected values by doing something like:
+# LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# For the sake of sanity, this macro assumes that any libcurl that is
+# found is after version 7.7.2, the first version that included the
+# curl-config script.  Note that it is very important for people
+# packaging binary versions of libcurl to include this script!
+# Without curl-config, we can only guess what protocols are available.
+
+AC_DEFUN([CURLPP_CHECK_CONFIG],
+[
+  LIBCURL_CHECK_CONFIG
+
+  if test x"$LIBCURL" != "x" ; then
+
+  AC_ARG_WITH(curlpp,
+     AC_HELP_STRING([--with-curlpp=DIR],[look for the curlpp library in DIR]),
+     [_curlpp_with=$withval],[_curlpp_with=ifelse([$1],,[yes],[$1])])
+
+  if test "$_curlpp_with" != "no" ; then
+
+     AC_PROG_AWK
+
+     _curlpp_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
+
+     _curlpp_try_link=yes
+
+     if test -d "$_curlpp_with" ; then
+        CPPFLAGS="${CPPFLAGS} -I$withval/include"
+        LDFLAGS="${LDFLAGS} -L$withval/lib"
+     fi
+
+     AC_PATH_PROG([_curlpp_config],[curlpp-config])
+
+     if test x$_curlpp_config != "x" ; then
+        AC_CACHE_CHECK([for the version of curlpp],
+	   [curlpp_cv_lib_curlpp_version],
+           [curlpp_cv_lib_curlpp_version=`$_curlpp_config --version | $AWK '{print $[]2}'`])
+
+	_curlpp_version=`echo $curlpp_cv_lib_curlpp_version | $_curlpp_version_parse`
+	_curlpp_wanted=`echo ifelse([$2],,[0],[$2]) | $_curlpp_version_parse`
+
+        if test $_curlpp_wanted -gt 0 ; then
+	   AC_CACHE_CHECK([for curlpp >= version $2],
+	      [curlpp_cv_lib_version_ok],
+              [
+   	      if test $_curlpp_version -ge $_curlpp_wanted ; then
+	         curlpp_cv_lib_version_ok=yes
+      	      else
+	         curlpp_cv_lib_version_ok=no
+  	      fi
+              ])
+        fi
+
+	if test $_curlpp_wanted -eq 0 || test x$curlpp_cv_lib_version_ok = xyes ; then
+           if test x"$CURLPP_CPPFLAGS" = "x" ; then
+              CURLPP_CPPFLAGS=`$_curlpp_config --cflags`
+           fi
+           if test x"$CURLPP" = "x" ; then
+              CURLPP=`$_curlpp_config --libs`
+           fi
+	else
+           _curlpp_try_link=no
+	fi
+
+	unset _curlpp_wanted
+     fi
+
+     if test $_curlpp_try_link = yes ; then
+
+        # we didn't find curl-config, so let's see if the user-supplied
+        # link line (or failing that, "-lcurl") is enough.
+        CURLPP=${CURLPP-"-lcurl"}
+
+        AC_CACHE_CHECK([whether curlpp is usable],
+           [curlpp_cv_lib_curlpp_usable],
+           [
+           _curlpp_save_cppflags=$CPPFLAGS
+           CPPFLAGS="$CPPFLAGS $CURLPP_CPPFLAGS"
+           _libcurl_save_libs=$LIBS
+           LIBS="$LIBS $CURLPP"
+
+           AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curlpp/cURLpp.hpp>],[
+/* Try and use a few common options to force a failure if we are
+   missing symbols or can't link. */
+int x;	
+cURLpp::initialize();
+]),curlpp_cv_lib_curlpp_usable=yes,curlpp_cv_lib_curlpp_usable=no)
+
+           CPPFLAGS=$_curlpp_save_cppflags
+           LIBS=$_curlpp_save_libs
+           unset _curlpp_save_cppflags
+           unset _curlpp_save_libs
+           ])
+
+        if test $curlpp_cv_lib_curlpp_usable = yes ; then
+
+           AC_DEFINE(HAVE_CURLPP,1,
+             [Define to 1 if you have a functional curlpp library.])
+           AC_SUBST(CURLPP_CPPFLAGS)
+           AC_SUBST(CURLPP)
+        fi
+     fi
+
+     unset _curlpp_try_link
+     unset _curlpp_version_parse
+     unset _curlpp_config
+     unset _curlpp_feature
+     unset _curlpp_features
+     unset _curlpp_protocol
+     unset _curlpp_protocols
+     unset _curlpp_version
+  fi
+
+  if test x$_curlpp_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
+     # This is the IF-NO path
+     ifelse([$4],,:,[$4])
+  else
+     # This is the IF-YES path
+     ifelse([$3],,:,[$3])
+  fi
+
+  unset _curlpp_with
+  fi
+])dnl

+ 13 - 0
thirdparty/curlpp/extras/curlpp.pc.in

@@ -0,0 +1,13 @@
+# This is a comment
+prefix=@prefix@
+exec_prefix=@prefix@
+includedir=@includedir@
+
+Name: curlpp
+Description: cURLpp is a libcurl C++ wrapper
+Version: @VERSION@                           
+Libs: -L@libdir@ -lcurlpp @LDFLAGS@ @LIBS@
+Cflags: -I@includedir@ @CURLPP_CXXFLAGS@
+# libcurl is required as non-private because CurlHandle.inl uses curl_easy_setopt.
+Requires: libcurl
+ 

+ 96 - 0
thirdparty/curlpp/extras/curlpp.spec.in

@@ -0,0 +1,96 @@
+Summary: cURLpp is a libcurl C++ wrapper
+Name: cURLpp
+Version: @RPM_VERSION@
+Release: 1
+License: MIT
+Group: Development/Libraries
+URL: http://rrette.com/curlpp.html
+Source0: curlpp-@VERSION@.tar.gz
+BuildRoot: %{_tmppath}/curlpp-@VERSION@-%{release}-buildroot
+Requires: curl >= 7.10.0
+
+
+%package	devel
+Summary:	The includes and libs to develop with cURLpp
+Group:		Development/Libraries
+Requires:	curl >= 7.10.0
+Provides:	curlpp-devel
+
+%description
+cURLpp is a libcurl C++ wrapper. There is the libcurl description: "libcurl is a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP form based upload, proxies, cookies, user+password authentication, file transfer resume, http proxy tunneling and more!
+
+libcurl is highly portable, it builds and works identically on numerous platforms, including Solaris, Net/Free/Open BSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS and more... "
+
+%description devel
+This packages contains all the libs and headers to develop applications using cURLpp.
+
+
+%prep
+%setup -qn curlpp-@VERSION@
+
+
+%build
+%configure
+make 
+
+%install
+[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install
+
+%clean
+rm -rf %{buildroot}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%files 
+%defattr(-,root,root)
+%{_libdir}/libcurlpp.so*
+
+
+%files devel
+%defattr(-,root,root)
+%attr(0755,root,root) %{_bindir}/curlpp-config
+%dir %{_includedir}/curlpp
+%{_includedir}/curlpp/*.hpp
+%{_includedir}/curlpp/*.inl
+%{_includedir}/curlpp/*.h
+%dir %{_includedir}/curlpp/utilspp
+%dir %{_includedir}/curlpp/utilspp/singleton
+%{_includedir}/curlpp/utilspp/singleton/*.hpp
+%{_includedir}/curlpp/utilspp/singleton/*.inl
+%dir %{_includedir}/utilspp
+%{_includedir}/utilspp/*.hpp
+%{_includedir}/utilspp/*.inl
+%dir %{_includedir}/utilspp/functor
+%{_includedir}/utilspp/functor/*.hpp
+%{_libdir}/libcurlpp.la
+%{_libdir}/libcurlpp.a
+%{_libdir}/pkgconfig/curlpp.pc
+%dir 
+
+
+%changelog
+
+* Sun Jul 17 2005 Jean-Philippe Barrette-LaPierre <jpb@rrette.com> - 0.5.1-1
+- removed {%name} use
+
+* Wed Jan  5 2005 Jean-Philippe Barrette-LaPierre <jpb@rrette.com> - 0.3.2-rc1-1
+- Version depends now on configure script
+
+* Thu Sep 30 2004 Jean-Philippe Barrette-LaPierre <jpb@rrette.com> 0.3.1-1
+- Removed any utilspp reference. (Not used anymore)
+
+* Thu Jun 17 2004 Jean-Philippe Barrette-LaPierre <jpbarrette@savoirfairelinux.net> 0.3.1-1
+- Removed the unusefull BuildRequires
+
+* Mon Oct 20 2003 Jean-Philippe Barrette-LaPierre <jpbarrette@savoirfairelinux.net> - 0.3.0-2
+- Added the devel package
+
+* Wed Oct 15 2003 Jean-Philippe Barrette-LaPierre <jpb@rrette.com> - 0.3.0-1
+- Initial build.
+
+

+ 170 - 0
thirdparty/curlpp/include/curlpp/Easy.hpp

@@ -0,0 +1,170 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_EASY_HPP
+#define CURLPP_EASY_HPP
+
+
+#include "internal/CurlHandle.hpp"
+#include "internal/OptionList.hpp"
+
+#include "Option.hpp"
+
+#include <memory>
+
+
+namespace curlpp
+{
+
+
+	/**
+	* Easy class.
+	* Detailed description.
+	*/
+
+	class Easy
+	{
+
+	public: 
+
+		friend struct InfoGetter;
+
+		Easy();
+
+		/**
+		* This allow to have a handle, which might have
+		* some option set, but we don't care about them.
+		*/
+		Easy(std::unique_ptr<internal::CurlHandle> handle);
+		virtual ~Easy();
+
+		/**
+		* it will call the curl_easy_perform function will all the options
+		* previously set for this handle.
+		*/
+		void perform();
+
+		/**
+		* This function will set the option value of the OptionBase
+		* to the handle.
+		*/
+		virtual void setOpt(const OptionBase & option);
+
+		/**
+		* This function will set the option value of the OptionBase to the 
+		* handle. 
+		*/
+		virtual void setOpt(std::unique_ptr<OptionBase> option);
+
+		/**
+		* This function will set the option value of the OptionBase to the 
+		* handle. 
+		*
+		* Note: be carefull when using this function, see 
+		* curlpp::OptionList::setOpt(OptionBase * option) function for more
+		* details.
+		*/
+		virtual void setOpt(OptionBase * option);
+
+		/**
+		* This function will create OptionTrait class with the value given and call
+		* virtual void setOpt(const OptionBase & option) with it.
+		*/
+		template<typename OptionTrait>
+		void setOpt(typename OptionTrait::ParamType);
+
+		/**
+		* Setting options from custom container with curlpp options.
+		*/
+		template<typename InputIterator>
+		void setOpt(InputIterator first, InputIterator last);
+
+		/**
+		* This function will get the current option value of the corresponding 
+		* OptionBase. Note that if the option is not set, the option passed in
+		* parameter will be cleared. (See Option::getOpt for more details)
+		*/
+		void getOpt(OptionBase * option) const;
+
+		/**
+		* This function will get the current option value of the corresponding 
+		* OptionBase. Note that if the option is not set, the option passed in
+		* parameter will be cleared. (See Option::getOpt for more details)
+		*/
+		void getOpt(OptionBase & option) const;
+
+		/**
+		* Get all options.
+		*/
+		//template<typename OutputIterator>
+		//void getOptions(OutputIterator out);
+
+		/*
+		* This function empties the option collection and reset all options
+		* to their default value
+ 		*/
+		virtual void reset ();
+
+ 		/**
+		* This function will return the cURL * handle.
+		* DO NOT use this, unless you REALLY know what you
+		* are doing.
+		*/
+		CURL * getHandle() const;
+
+		internal::CurlHandle & getCurlHandle() { return *mCurl; }
+		const internal::CurlHandle & getCurlHandle() const { return *mCurl; }
+
+	private:
+
+		/**
+		* This function will call the setOpt on each options
+		* contained by * the option list passed in argument.
+		*/
+		virtual void setOpt(const internal::OptionList & options);
+
+		/**
+		* This is the function that curlpp::InfoGetter will call
+		* to retrieve option.
+		*/
+		template<typename T>
+		void getInfo(CURLINFO info, T & value) const;
+
+		std::unique_ptr<internal::CurlHandle> mCurl;
+
+		internal::OptionList mOptions;
+
+	};
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+#include "Easy.inl"
+
+// Not quite sure if we shouldn't pass a const handle and clone it instead.
+std::ostream & operator<<(std::ostream & stream, const curlpp::Easy & handle);
+
+
+#endif // #ifndef CURLPP_EASY_HPP

+ 48 - 0
thirdparty/curlpp/include/curlpp/Easy.inl

@@ -0,0 +1,48 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+template<typename T>
+void curlpp::Easy::getInfo(CURLINFO info, T & value) const
+{
+  mCurl->getInfo(info, value);
+}
+
+
+template<typename OptionTrait>
+void 
+curlpp::Easy::setOpt(typename OptionTrait::ParamType value)
+{
+  setOpt(curlpp::OptionTrait<typename OptionTrait::OptionType, OptionTrait::option>(value));
+} 
+
+
+template<typename InputIterator>
+void 
+curlpp::Easy::setOpt(InputIterator first, InputIterator last)
+{
+	for(InputIterator it=first; it != last; ++it)
+	{
+		setOpt(*it);
+	}
+} 

+ 306 - 0
thirdparty/curlpp/include/curlpp/Exception.hpp

@@ -0,0 +1,306 @@
+/*
+*    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef CURLPP_EXCEPTION_HPP
+#define CURLPP_EXCEPTION_HPP
+
+
+
+#include <curl/curl.h>
+
+#include <string>
+#include <stdexcept>
+
+
+namespace curlpp
+{
+
+
+	/**
+	* This class is a parent to all curlpp's RuntimeErrors.
+	*
+	* This class takes a const std::string & as argument for it's parent: std::runtime_errors. 
+	* This class is thrown when curlpp is encountering an error, but for runtime 
+	* considerations, "unpredictable" by the library user.
+	*/
+
+	class RuntimeError : public std::runtime_error
+	{
+	
+	public:
+	
+		RuntimeError(const char * reason);
+		RuntimeError(const std::string & string);
+		virtual ~RuntimeError() throw();
+
+	};
+
+
+	/**
+	* This class is a parent to all curlpp's RuntimeErrors.
+	*
+	* This class takes a const std::string & as argument for it's parent: std::runtime_errors. 
+	* This class is thrown when curlpp is encountering an error, but for logic 
+	* considerations, "predictable" by the library user. Predictable means 
+	* that the library user is missusing the library.
+	*/
+
+	class LogicError : public std::logic_error
+	{
+
+	public:
+
+		LogicError(const char * reason);
+		LogicError(const std::string & string);
+		virtual ~LogicError() throw();
+
+	};
+
+
+	/**
+	* This is a class derived from curlpp::RuntimeError.
+	*
+	* It takes a const char * and a CURLcode as arguments. This class is thrown when libcurl is
+	* returning an error with a CURLcode, but for runtime considerations, 
+	* "unpredictable" by the library user.
+	*/
+
+	class LibcurlRuntimeError : public curlpp::RuntimeError
+	{
+
+	public:
+
+		LibcurlRuntimeError(const std::string & reason, CURLcode code);
+		LibcurlRuntimeError(const char * reason, CURLcode code);
+
+		/**
+		* Returns the CURLcode that libcurl returned.
+		*/
+		CURLcode whatCode() const throw();
+
+	private:
+
+		CURLcode mCode;
+
+	};
+
+
+	/*
+	* This is a class derived from curlpp::LogicError, that takes a const 
+	* char * and a CURLcode as arguments. This class is thrown when libcurl is
+	* returning an error with a CURLcode,  but for logic considerations, 
+	* "predictable" by the library user. Predictable means that the library 
+	* user is missusing the library.
+	*/
+
+	class LibcurlLogicError : public curlpp::LogicError
+	{
+
+	public:
+
+		LibcurlLogicError(const std::string & reason, CURLcode code);
+		LibcurlLogicError(const char * reason, CURLcode code);
+
+		/* 
+		* return the CURLcode that libcurl returned
+		*/
+		CURLcode whatCode() const throw();
+
+	private:
+
+		CURLcode mCode;
+
+	};
+
+
+	/**
+	* This exception is thrown when you try to retrieve a value for an
+	* unset option.
+	*/
+
+	class UnsetOption : public curlpp::RuntimeError
+	{
+
+	public:
+
+		UnsetOption(const std::string & reason);
+		UnsetOption(const char * reason);
+
+	};
+
+
+	/**
+	* This exception is thrown when you try to instantiate an option 
+	* that isn't available for your current libcURL version.
+	*/
+
+	class NotAvailable : public curlpp::LogicError
+	{
+
+	public:
+
+		NotAvailable();
+
+	};
+
+
+	/**
+	* This exception is thrown when an exception is thrown within
+	* a callback without the curlpp::raiseException function.
+	*/
+
+	class UnknowException : public curlpp::RuntimeError
+	{
+
+	public:
+
+		UnknowException();
+
+	};
+
+
+	/**
+	* This exception is thrown by the curlpp::raiseException function.
+	* It's used to throw exceptions within callbacks
+	*/
+
+	class CallbackExceptionBase : public curlpp::RuntimeError
+	{
+
+	protected:
+
+		CallbackExceptionBase();
+		CallbackExceptionBase(const CallbackExceptionBase & other);
+
+	public:
+
+		virtual void throwMe() = 0;
+		virtual CallbackExceptionBase * clone() = 0;
+
+	};
+
+
+	/**
+	* This exception is thrown by the curlpp::raiseException function.
+	* It's used to throw exceptions within callbacks
+	*/
+
+	template<typename ExceptionType>
+	class CallbackException : public CallbackExceptionBase
+	{
+
+	public: 
+
+		typedef CallbackException<ExceptionType> _CE;
+
+		CallbackException(const ExceptionType & e) 
+			: mException(e)
+		{}
+
+		virtual void throwMe() 
+		{
+			throw mException;
+		}
+
+		virtual _CE * clone() 
+		{
+			return new _CE(*this);
+		}
+
+	private:
+
+		ExceptionType mException;
+
+	};
+
+
+	/**
+	* This function is the function to be called within callbacks
+	* if you want an exception to be thrown at the 
+	* curlpp::Easy::perform function call level.
+	*/
+
+	template<typename T>
+	void raiseException(const T & e) 
+	{
+		throw (CallbackExceptionBase *)(new CallbackException<T>(e));
+	}
+
+
+	template<typename T>
+	CallbackException<T> * createCallbackException(const T & e)
+	{
+		return CallbackException<T>(e);
+	}
+
+
+	/**
+	* if CURLcode is not equal to CURLE_OK, it throws a 
+	* curlpp::LibcurlRuntimeError with the reason and the code. It's used 
+	* in inline function, because throwing an exception is heavy in binary 
+	* code, something we don't want in inline functions.
+	*/
+
+	void libcurlRuntimeAssert(const std::string & reason, CURLcode code);
+	void libcurlRuntimeAssert(const char * reason, CURLcode code);
+
+
+	/**
+	* if CURLcode is not equal to CURLE_OK, it throws a 
+	* curlpp::LibcurlLogicError with the reason and the code. It's used 
+	* in inline function, because throwing an exception is heavy in binary 
+	* code, something we don't want in inline functions.
+	*/
+
+	void libcurlLogicAssert(const std::string & reason, CURLcode code);
+	void libcurlLogicAssert(const char * reason, CURLcode code);
+
+
+	/**
+	* if isOkay is false, it throws a curlpp::RuntimeError 
+	* with the reason. It's used in inline function, because throwing 
+	* an exception is heavy in binary code, something we don't want in 
+	* an inline function.
+	*/
+
+	void runtimeAssert(const std::string & reason, bool isOkay);
+	void runtimeAssert(const char * reason, bool isOkay);
+
+
+	/**
+	* if is_true is false, it throws a curlpp::LogicError with 
+	* the reason. It's used in inline function, because throwing 
+	* an exception is heavy in binary code, something we don't 
+	* want in an inline function.
+	*/
+
+	void logicAssert(const std::string & reason, bool isOkay);
+	void logicAssert(const char * reason, bool isOkay);
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_EXCEPTION_HPP

+ 272 - 0
thirdparty/curlpp/include/curlpp/Form.hpp

@@ -0,0 +1,272 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_FORM_HPP
+#define CURLPP_FORM_HPP
+
+
+#include <utilspp/clone_ptr.hpp>
+
+#include <curl/curl.h>
+
+#include <list>
+#include <string>
+
+
+namespace curlpp
+{
+
+
+	class FormPart;
+
+
+	typedef std::list<utilspp::clone_ptr<curlpp::FormPart> > Forms;
+
+
+	/**
+	* This class is used internally to wrap over curl_httppost
+	* class.
+	*/
+
+	class HttpPost
+	{
+
+	public:
+
+		HttpPost(const Forms & posts);
+		HttpPost();
+		~HttpPost();
+
+		/**
+		* initialize the HTTP post with the list of forms. The Forms 
+		* will be cloned.
+		*/
+		HttpPost & operator=(const Forms & posts);
+
+		operator Forms() { return getList(); }
+
+
+		/**
+		* return the curl_httppost representation of this HTTP Post.
+		* Be aware that the memory return is owned by the current 
+		* instance, so don't try to delete it.
+		*/
+		::curl_httppost * cHttpPost() const;
+
+		/**
+		* Free all HTTP posts.
+		*/
+		void clear();
+
+		/**
+		* Get the list. 
+		*/
+		Forms getList();
+
+	private:
+
+		::curl_httppost * mFirst;
+		::curl_httppost * mLast;
+		Forms mForms;
+
+	};
+
+
+	/**
+	* This class is the base representation of a post. You need
+	* to inherit from it to define a type of post.
+	*/
+
+	class FormPart
+	{
+		friend class HttpPost;
+
+	public:
+
+		/**
+		* initialize the FormPart. "name" is the name of the field.
+		*/
+		FormPart(const char * name);
+
+		/**
+		* initialize the FormPart. "name" is the name of the field.
+		*/
+		FormPart(const std::string & name);
+
+		virtual ~FormPart();
+
+		virtual FormPart * clone() const = 0;
+
+	protected:
+
+		/**
+		* it will add himself to the curl_httppost * first.
+		*/
+		virtual void add(::curl_httppost ** first, 
+			::curl_httppost ** last) = 0;
+
+		/**
+		* Contain the name of the field.
+		*/
+		const std::string mName;
+
+	};
+
+
+namespace FormParts
+{
+
+
+	/**
+	* This class is a file post. It will send a file in the
+	* HTTP post.
+	*/
+
+	class File : public FormPart
+	{
+
+	public:
+
+		/**
+		* initialize a File part. "name" is the name of the field. 
+		* "filename" is the string that holds the filename.
+		*/
+		File(const char * name, 
+			const char * filename);
+
+		/**
+		* initialize a File part. "name" is the name of the field. 
+		* "filename" is the string that holds the filename. 
+		* "contentType" is the MIME type of the file.
+		*/
+		File(const char * name, 
+			const char * filename, 
+			const char * contentType);
+
+		/**
+		* initialize a File part. "name" is the name of the field. 
+		* "filename" is the string that holds the filename.
+		*/
+		File(const std::string & name, 
+			const std::string & filename);
+
+		/**
+		* initialize a File part. "name" is the name of the field. 
+		* "filename" is the string that holds the filename. 
+		* "contentType" is the MIME type of the file.
+		*/
+		File(const std::string & name, 
+			const std::string & filename,
+			const std::string & contentType);
+
+		virtual ~File();
+
+		/**
+		* This function will return a copy of the instance.
+		*/
+		virtual File * clone() const;
+
+	private:
+
+		void add(::curl_httppost ** first, 
+			::curl_httppost ** last);
+
+	private:
+
+		const std::string mFilename; 
+		const std::string mContentType;
+
+	};
+
+
+	/**
+	* This class is a file post. It will send a file in the
+	* HTTP post.
+	*/
+
+	class Content : public FormPart
+	{
+
+	public:
+
+		/**
+		* initialize a Content part. "name" is the name of the field. 
+		* "content" is the string that holds the filename.
+		*/
+		Content(const char * name, 
+			const char * content);
+
+		/**
+		* initialize a Content part. "name" is the name of the field. 
+		* "content" is the string that holds the filename. 
+		* "contentType" is the MIME type of the file.
+		*/
+		Content(const char * name, 
+			const char * content, 
+			const char * contentType);
+
+		/**
+		* initialize a Content part. "name" is the name of the field. 
+		* "content" is the string that holds the content.
+		*/
+		Content(const std::string & name, 
+			const std::string & content);
+
+		/**
+		* initialize a Content part. "name" is the name of the field. 
+		* "content" is the string that holds the content. 
+		* "content_type" is the MIME type of the file.
+		*/
+		Content(const std::string & name, 
+			const std::string & content,
+			const std::string & content_type);
+
+		virtual ~Content();
+
+		/**
+		* This function will return a copy of the instance.
+		*/
+		virtual Content * clone() const;
+
+	private:
+
+		void add(::curl_httppost ** first, 
+			::curl_httppost ** last);
+
+	private:
+
+		const std::string mContent; 
+		const std::string mContentType;
+
+	};
+
+
+} // namespace FormParts
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif //CURLPP_FORM_HPP

+ 121 - 0
thirdparty/curlpp/include/curlpp/Info.hpp

@@ -0,0 +1,121 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef CURLPP_INFO_HPP
+#define CURLPP_INFO_HPP
+
+
+
+#include "Easy.hpp"
+
+
+namespace curlpp
+{
+
+
+	/**
+	* This class is responsible of retreiving the Info from
+	* a handle. This is the class you use when you want to do
+	* so.
+	*/
+
+	template<CURLINFO info, typename T>
+	struct Info 
+	{
+		static void get(const curlpp::Easy & handle, T & value);
+		static T get(const curlpp::Easy & handle);
+	};
+
+
+	/**
+	* This class is used when an info is not available for the
+	* current libcURL version.
+	*/
+
+	template<CURLINFO info, typename T>
+	struct NotAvailableInfo : Info<info, T>
+	{
+		static void get(const curlpp::Easy & handle, T & value);
+		static T get(const curlpp::Easy & handle);
+	};
+
+
+	/**
+	* This is the class you need to specialize if you use
+	* a special type that libcURL is not aware of. This class
+	* need to call curlpp::InfoGetter::get function. See 
+	* curlpp::InfoGetter for more information.
+	*/
+
+	template<typename T>
+	struct InfoTypeConverter
+	{
+		static void get(const curlpp::Easy & handle, CURLINFO info, T & value);
+	}; 
+
+
+	template<>
+	void InfoTypeConverter<std::string>
+		::get(const curlpp::Easy & handle, CURLINFO info, std::string & value);
+
+
+	template<>
+	void InfoTypeConverter<std::list<std::string> >
+		::get(const curlpp::Easy & handle, CURLINFO info, std::list<std::string> & value);
+
+
+	template<>
+	void InfoTypeConverter<long>
+		::get(const curlpp::Easy & handle, CURLINFO info, long & value);
+
+
+	template<>
+	void InfoTypeConverter<double>
+		::get(const curlpp::Easy & handle, CURLINFO info, double & value);
+
+
+	/**
+	* This is the only class that is authorized to retrieve
+	* info from a curlpp::Easy class. So, this is the class
+	* you need to use when you specialize the class
+	* curlpp::InfoTypeConverter. This class is in fact used
+	* as a proxy, just to be sure that nobody access curlpp::Easy's 
+	* private data.
+	*/
+
+	struct InfoGetter
+	{
+		template<typename T>
+		static void get(const curlpp::Easy & handle, CURLINFO info, T & value);
+	};
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#include "Info.inl"
+
+#endif // #ifndef CURLPP_INFO_HPP

+ 79 - 0
thirdparty/curlpp/include/curlpp/Info.inl

@@ -0,0 +1,79 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_INFO_INL
+#define CURLPP_INFO_INL
+
+template<CURLINFO info, typename T>
+void
+curlpp::Info<info, T>::get(const curlpp::Easy & handle, T & value)
+{
+   curlpp::InfoTypeConverter<T>::get(handle, info, value);
+}
+
+template<CURLINFO info, typename T>
+T
+curlpp::Info<info, T>::get(const curlpp::Easy & handle)
+{
+  T value;
+  curlpp::InfoTypeConverter<T>::get(handle, info, value);
+  return value;
+}
+
+template<CURLINFO info, typename T>
+void
+curlpp::NotAvailableInfo<info, T>::get(const curlpp::Easy &, T &)
+{
+  throw curlpp::NotAvailable();
+}
+
+template<CURLINFO info, typename T>
+T
+curlpp::NotAvailableInfo<info, T>::get(const curlpp::Easy &)
+{
+  throw curlpp::NotAvailable();
+}
+
+
+
+template<typename T>
+void
+curlpp::InfoGetter::get(const curlpp::Easy & handle, 
+	                CURLINFO info,
+ 			T & value)
+{
+   handle.getInfo(info, value);
+}
+
+
+template<typename T>
+void
+curlpp::InfoTypeConverter<T>::get(const curlpp::Easy & handle, 
+				    CURLINFO info,
+				    T & value)
+{
+  InfoGetter::get(handle, info, value);
+}
+
+
+#endif

+ 99 - 0
thirdparty/curlpp/include/curlpp/Infos.hpp

@@ -0,0 +1,99 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef CURLPP_INFOS_HPP
+#define CURLPP_INFOS_HPP
+
+
+#include "Info.hpp"
+
+#include <curl/curl.h>
+
+#include <list>
+
+
+namespace curlpp
+{
+
+
+namespace infos
+{
+
+
+	typedef curlpp::Info<CURLINFO_EFFECTIVE_URL, std::string> EffectiveUrl;
+	typedef curlpp::Info<CURLINFO_RESPONSE_CODE, long> ResponseCode;
+	typedef curlpp::Info<CURLINFO_HTTP_CONNECTCODE, long> HttpConnectCode;
+	typedef curlpp::Info<CURLINFO_FILETIME, long> FileTime;
+	typedef curlpp::Info<CURLINFO_TOTAL_TIME, double> TotalTime;
+	typedef curlpp::Info<CURLINFO_NAMELOOKUP_TIME, double> NameLookupTime;
+	typedef curlpp::Info<CURLINFO_CONNECT_TIME, double> ConnectTime;
+	typedef curlpp::Info<CURLINFO_PRETRANSFER_TIME, double> PreTransferTime;
+	typedef curlpp::Info<CURLINFO_STARTTRANSFER_TIME, double> StartTransferTime;
+	typedef curlpp::Info<CURLINFO_REDIRECT_TIME, double> RedirectTime;
+	typedef curlpp::Info<CURLINFO_REDIRECT_COUNT, long> RedirectCount;
+	typedef curlpp::Info<CURLINFO_SIZE_UPLOAD, double> SizeUpload;
+	typedef curlpp::Info<CURLINFO_SIZE_DOWNLOAD, double> SizeDownload;
+	typedef curlpp::Info<CURLINFO_SPEED_DOWNLOAD, double> SpeedDownload;
+	typedef curlpp::Info<CURLINFO_SPEED_UPLOAD, double> SpeedUpload;
+	typedef curlpp::Info<CURLINFO_HEADER_SIZE, long> HeaderSize;
+	typedef curlpp::Info<CURLINFO_REQUEST_SIZE, long> RequestSize;
+	typedef curlpp::Info<CURLINFO_SSL_VERIFYRESULT, long> SslVerifyResult;
+#if LIBCURL_VERSION_NUM >= 0x070c03
+	typedef curlpp::Info<CURLINFO_SSL_ENGINES, std::list<std::string> > SslEngines;
+#endif 
+	typedef curlpp::Info<CURLINFO_CONTENT_LENGTH_DOWNLOAD, double> ContentLengthDownload;
+	typedef curlpp::Info<CURLINFO_CONTENT_LENGTH_UPLOAD, double> ContentLengthUpload;
+	typedef curlpp::Info<CURLINFO_CONTENT_TYPE, std::string> ContentType;
+	typedef curlpp::Info<CURLINFO_HTTPAUTH_AVAIL, long> HttpAuthAvail;
+	typedef curlpp::Info<CURLINFO_PROXYAUTH_AVAIL, long> ProxyAuthAvail;
+#if LIBCURL_VERSION_NUM >= 0x070c02
+	typedef curlpp::Info<CURLINFO_OS_ERRNO, long> OsErrno;
+#endif
+#if LIBCURL_VERSION_NUM >= 0x070c03
+	typedef curlpp::Info<CURLINFO_NUM_CONNECTS, long> NumConnects;
+#endif
+
+#if LIBCURL_VERSION_NUM >= 0x070e01
+	typedef curlpp::Info<CURLINFO_COOKIELIST, std::list<std::string> > CookieList;
+#else
+#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+	// This curlinfo text must be specified, so we specify something
+	// that we know will be there.
+	typedef curlpp::NotAvailableInfo<CURLINFO_EFFECTIVE_URL,
+		std::list<std::string> > CookieList;
+#endif
+#endif
+
+
+} // namespace infos
+
+namespace Infos = infos;
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_INFOS_HPP

+ 82 - 0
thirdparty/curlpp/include/curlpp/Multi.hpp

@@ -0,0 +1,82 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_MULTI_HPP
+#define CURLPP_MULTI_HPP
+
+
+#include <curl/multi.h>
+
+#include <list>
+#include <map>
+
+
+namespace curlpp
+{
+
+
+	class Easy;
+
+	class Multi
+	{
+
+	public:
+
+		struct Info 
+		{
+			CURLcode code;
+			CURLMSG msg;
+		};
+
+	public:
+
+		Multi();
+		~Multi();
+
+		void add(const curlpp::Easy * handle);
+		void remove(const curlpp::Easy * handle);
+
+		bool perform(int * nbHandles);
+		void fdset(fd_set * read_fd_set,
+								fd_set * write_fd_set,
+								fd_set * exc_fd_set,
+								int * max_fd);
+
+		typedef std::list<std::pair<const curlpp::Easy *, Multi::Info> >
+			Msgs;
+		
+		Msgs info();
+
+	private:
+
+		CURLM * mMultiHandle;
+		std::map<CURL *, const curlpp::Easy *> mHandles;
+	};
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_MULTI_HPP

+ 253 - 0
thirdparty/curlpp/include/curlpp/Option.hpp

@@ -0,0 +1,253 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_HPP
+#define CURLPP_OPTION_HPP
+
+
+#include "internal/OptionContainer.hpp"
+
+#include "OptionBase.hpp"
+
+
+namespace curlpp
+{
+
+
+	class Easy;
+
+	/**
+	* This class is representing an option that you set on a class. 
+	*
+	* We use utilspp::pointer_on_member_function and utilspp::type_trait to simplify
+	* the declaration of an option object.
+	*/
+
+        template<typename OT>
+	class Option : public curlpp::OptionBase
+	{
+
+	public:
+
+		typedef OT OptionType;
+
+		typedef typename internal::OptionContainer<OptionType>::ParamType ParamType;
+		typedef typename internal::OptionContainer<OptionType>::ValueType ValueType;
+		typedef typename internal::OptionContainer<OptionType>::ReturnType ReturnType;
+		typedef typename internal::OptionContainer<OptionType>::HandleOptionType HandleOptionType;
+
+	protected:
+
+		/**
+		* The constructor takes the a value to set a handle.
+		*/
+		Option(CURLoption option, typename Option<OptionType>::ParamType value);
+
+		/**
+		* The construction will copy the value of the Option passed in argument.
+		*/
+		Option(const Option<OptionType> & other);
+
+		/**
+		* The constructor will contain an unset option value.
+		* Note that if you try to retrieve the value of this option
+		* before calling the curlpp::Option::setValue function it will
+		* throw a UnsetOption exception.
+		*/
+		Option(CURLoption option);
+
+	public:
+
+		/**
+		* What can I say? Everyone is dying one time or another...
+		*/
+		virtual ~Option();
+
+
+		/**
+		* This function will set the value that will be set on handle when we
+		* will call the "update" function on a handle.
+		*/
+		void setValue(typename Option<OptionType>::ParamType value);
+
+		/** 
+		* This function will return the value that this option was set to.
+		*
+		* Note: if you didn't set any value by the curlpp::Option::setValue function,
+		* or the handle option value, retrieved by the curlpp::Option::updateMeToHandle
+		* function, is a unset value, it will throw a UnsetOption exception.
+		*/
+		typename Option<OptionType>::ReturnType getValue() const;
+
+		/**
+		* This function will reset the option value. That means that if you try to
+		* retrieve the value of this option, or if you try to set this option to a
+		* handle, it will throw an UnsetOption exception.
+		*/
+		virtual void clear();
+
+		/**
+		* Will update the value of the option with the value of the
+		* option passed is argument.
+		*/
+		virtual void updateMeToOption(const OptionBase & other);
+
+	private:
+
+		/**
+		* This function will update the given handle to the value previously set,
+		* by the curlpp::Option::setValue function.
+		*/
+		void setOpt(curlpp::Easy * handle) const;
+
+		/**
+		* This function will update the current value of the option to the handle
+		* option value.
+		*/
+		void getOpt(curlpp::Easy * handle);
+
+	protected:
+
+		/**
+		* the class that actually have the value.
+		*/
+		typename curlpp::internal::OptionContainer<OptionType> * mContainer;
+
+	};
+
+
+	/**
+	* This class is just a wrapper around curlpp::Option, in order to
+	* be able to typedef Options. 
+	*/
+
+        template<typename OptionType, CURLoption opt>
+	class OptionTrait : public Option<OptionType>
+	{
+		
+		friend class Easy;
+
+	public:
+
+		static const CURLoption option = opt;
+
+		/**
+		* The constructor takes the a value to set a handle.
+		*/
+		OptionTrait(typename Option<OptionType>::ParamType value);
+
+		/**
+		* The constructor will contain an unset option value.
+		* Note that if you try to retrieve the value of this option
+		* before calling the curlpp::Option::setValue function it will
+		* throw a UnsetOption exception.
+		*/
+		OptionTrait();
+
+		/**
+		* Return a copy of the current option. 
+		* Note that the option value is copied too.
+		*/
+		virtual OptionTrait * clone() const;
+
+	private:
+
+		/**
+		* will call the actual libcurl option function with the value we got 
+		* on the handle.
+		*/
+		virtual void updateHandleToMe(internal::CurlHandle * handle) const;
+
+	};
+
+
+	/**
+	* This class is just a wrapper around curlpp::OptionTrait, in order to
+	* be able to have "No value" option, like SslDefaultEngine.
+	*/
+
+	template<CURLoption option>
+	class NoValueOptionTrait : public OptionTrait<bool, option>
+	{
+
+	public:
+
+		NoValueOptionTrait();
+
+		/**
+		* Return a copy of the current option. 
+		* Note that the option value is copied too.
+		*/
+		virtual NoValueOptionTrait * clone() const;
+
+	};
+
+
+	/**
+	* This class is used when the option is not implemented.
+	*/
+
+	template<typename OptionType>
+	class NotAvailableOptionTrait : public Option<OptionType>
+	{
+
+	public:
+
+		/**
+		* The constructor takes the a value to set a handle.
+		*/
+		NotAvailableOptionTrait(typename Option<OptionType>::ParamType value);
+
+		/**
+		* The constructor will contain an unset option value.
+		* Note that if you try to retrieve the value of this option
+		* before calling the curlpp::Option::setValue function it will
+		* throw a UnsetOption exception.
+		*/
+		NotAvailableOptionTrait();
+
+		/**
+		* Return a copy of the current option. 
+		* Note that the option value is copied too.
+		*/
+		virtual NotAvailableOptionTrait * clone() const;
+
+	private:
+
+		/**
+		* will call the actual libcurl option function with the value we got 
+		* on the handle.
+		*/
+		virtual void updateHandleToMe(internal::CurlHandle * handle) const;
+
+	};
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#include "Option.inl"
+
+#endif // #ifndef CURLPP_OPTION_HPP

+ 206 - 0
thirdparty/curlpp/include/curlpp/Option.inl

@@ -0,0 +1,206 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_INL
+#define CURLPP_OPTION_INL
+
+#include "internal/OptionSetter.hpp"
+#include "Exception.hpp"
+
+#include <iostream>
+
+
+namespace curlpp
+{
+
+
+// Option
+	
+template<typename OptionType>
+Option<OptionType>::Option(CURLoption option, typename Option<OptionType>::ParamType value)
+: OptionBase(option),
+mContainer(NULL)
+{
+	setValue(value);
+}
+
+
+template<typename OptionType>
+Option<OptionType>::Option(CURLoption option)
+: OptionBase(option),
+mContainer(NULL)
+{}
+
+template<typename OptionType>
+Option<OptionType>::Option(const Option<OptionType> & other)
+  : OptionBase(other)
+  , mContainer(NULL)
+{
+	if(other.mContainer != NULL)	
+	{
+		setValue(other.getValue());
+	}
+}
+
+
+template<typename OptionType>
+Option<OptionType>::~Option()
+{
+	delete mContainer;
+	mContainer = NULL;
+}
+
+
+template<typename OptionType>
+void
+Option<OptionType>::setValue(typename Option<OptionType>::ParamType value)
+{
+	if(mContainer == NULL)
+	{	
+		mContainer = new internal::OptionContainer<OptionType>(value);
+	}
+	else
+	{
+		mContainer->setValue(value);
+	}
+}
+
+
+template<typename OptionType>
+void
+Option<OptionType>::updateMeToOption(const OptionBase & other)
+{
+	const Option<OptionType> * option = dynamic_cast<const Option<OptionType> *>(&other);
+	if(option == NULL)
+	{
+		throw UnsetOption("You are trying to update an option to an incompatible option");
+	}
+	setValue(option->getValue());
+}
+
+template<typename OptionType>
+void
+Option<OptionType>::clear()
+{
+  delete mContainer;
+  mContainer = NULL;
+}
+
+template<typename OptionType>
+typename Option<OptionType>::ReturnType
+Option<OptionType>::getValue() const
+{
+  if(mContainer == NULL)
+    throw UnsetOption("You are trying to retrieve the value of an unset option");
+
+  return mContainer->getValue();
+}
+
+
+// OptionTrait
+
+template<typename OptionType, CURLoption option>
+OptionTrait<OptionType, option>::OptionTrait(typename Option<OptionType>::ParamType value)
+: Option<OptionType>(option, value)
+{}
+
+
+template<typename OptionType, CURLoption option>
+OptionTrait<OptionType, option>::OptionTrait()
+: Option<OptionType>(option)
+{}
+
+
+template<typename OptionType, CURLoption option>
+OptionTrait<OptionType, option> *
+OptionTrait<OptionType, option>::clone() const
+{
+  return new OptionTrait<OptionType, option>(this->getValue());
+}
+
+
+template<typename OptionType, CURLoption option>
+void
+OptionTrait<OptionType, option>::updateHandleToMe(internal::CurlHandle * handle) const
+{
+	if(this->mContainer == NULL)
+	{
+		throw UnsetOption("You are trying to set an unset option to a handle");
+	}	
+
+	internal::OptionSetter<OptionType, option>::setOpt(handle, this->mContainer->getHandleOptionValue());
+}
+
+
+// NoValueOptionTrait
+
+template<CURLoption option>
+NoValueOptionTrait<option>::NoValueOptionTrait() 
+  : OptionTrait<bool, option>(true)
+{}
+
+
+template<CURLoption option>
+NoValueOptionTrait<option> *
+NoValueOptionTrait<option>::clone() const
+{
+  return new NoValueOptionTrait<option>();
+}
+
+
+// NotAvailableOptionTrait
+
+template<typename OptionType>
+NotAvailableOptionTrait<OptionType>::NotAvailableOptionTrait(typename Option<OptionType>::ParamType )
+  : Option<OptionType>(CURLOPT_URL)
+{
+  throw NotAvailable();
+}
+
+template<typename OptionType>
+NotAvailableOptionTrait<OptionType>::NotAvailableOptionTrait()
+  : Option<OptionType>(CURLOPT_URL)
+{
+  throw NotAvailable();
+}
+
+
+template<typename OptionType>
+NotAvailableOptionTrait<OptionType> *
+NotAvailableOptionTrait<OptionType>::clone() const
+{
+  throw NotAvailable();
+}
+
+
+template<typename OptionType>
+void
+NotAvailableOptionTrait<OptionType>::updateHandleToMe(internal::CurlHandle *) const
+{
+  throw NotAvailable();
+}
+
+
+} // namespace curlpp
+
+#endif

+ 107 - 0
thirdparty/curlpp/include/curlpp/OptionBase.hpp

@@ -0,0 +1,107 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_BASE_HPP
+#define CURLPP_OPTION_BASE_HPP
+
+
+
+#include <curl/curl.h>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	class CurlHandle;
+
+
+}
+
+  /**
+   * This is the parent of the curlpp::option class.
+	 *
+	 * This is only used to be able to stock a list of options.
+   */
+
+	class OptionBase
+  {
+
+	public:
+
+		OptionBase(CURLoption option);
+     
+    /**
+     * Base class needs virtual destructor.
+     */
+    virtual ~OptionBase();
+         
+    /**
+     * See curlpp::option::operator< for documentation.
+     */
+    virtual bool operator<(const OptionBase & rhs) const;
+
+    /**
+     * return a copy of the current option.
+     */
+    virtual OptionBase * clone() const = 0;
+
+    /**
+     * return the libcurl option.
+     */
+    CURLoption getOption() const;
+
+    /**
+     * will update the value of the option with the value of the
+     * option passed is argument.
+     */
+    virtual void updateMeToOption(const OptionBase & other) = 0;
+
+    /**
+     * will call the actual libcurl option function with the value we got 
+     * on the handle.
+     */
+    virtual void updateHandleToMe(internal::CurlHandle * handle) const = 0;
+
+    /**
+     * this function will reset the option value.
+     */
+    virtual void clear() = 0;
+
+  private:
+
+    CURLoption mOption;
+
+  };
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_OPTION_BASE_HPP

+ 336 - 0
thirdparty/curlpp/include/curlpp/Options.hpp

@@ -0,0 +1,336 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTIONS_HPP
+#define CURLPP_OPTIONS_HPP
+
+
+#include "Option.hpp"
+
+#include <iostream> 
+
+
+#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+#define DEF_IF_ALLOW_AVAILABLE (type,option,name) typedef curlpp::NotAvailableOptionTrait<type, option> name;
+#endif
+
+// #begin define OPTION(version,type,option,name) 
+// #if LIBCURL_VERSION_NUM >= version 
+//   typedef curlpp::OptionTrait<type, option> name;
+// #else
+// DEF_IF_ALLOW_AVAILABLE(type,option,name)
+// #endif
+// #end
+
+
+namespace curlpp
+{
+
+
+namespace options
+{
+
+
+	/**
+	* Cookie interface.
+	*/
+
+	#if LIBCURL_VERSION_NUM >= 0x070d01
+		typedef curlpp::OptionTrait<std::string, CURLOPT_COOKIELIST> CookieList;
+	#else
+	#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+		typedef curlpp::NotAvailableOptionTrait<std::string> CookieList;
+	#endif
+	#endif
+
+	/**
+	* Behavior options.
+	*/
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_VERBOSE> Verbose;
+	typedef curlpp::OptionTrait<bool, CURLOPT_HEADER> Header;
+	#if LIBCURL_VERSION_NUM >= 0x070A00
+		typedef curlpp::OptionTrait<bool, CURLOPT_NOSIGNAL> NoSignal;
+	#else
+	#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+		typedef curlpp::NotAvailableOptionTrait<bool> NoSignal;
+	#endif // CURLPP_ALLOW_NOT_AVAILABLE
+	#endif // LIBCURL_VERSION_NUM
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_NOPROGRESS> NoProgress;
+
+
+	/**
+	* Callback options. 
+	*/
+
+	typedef curlpp::OptionTrait<curl_write_callback, CURLOPT_WRITEFUNCTION>
+		WriteFunctionCurlFunction;
+
+	typedef curlpp::OptionTrait<curlpp::types::WriteFunctionFunctor, CURLOPT_WRITEFUNCTION>
+		WriteFunction;
+
+
+       /**
+	* Using this option will reset CURLOPT_WRITEFUNCTION to 
+	* default callback. In fact, use only this option if you only 
+	* want libcURL to use the FILE * given in argument instead 
+	* of stdout. 
+	*/
+
+	#if LIBCURL_VERSION_NUM >= 0x070907
+		typedef curlpp::OptionTrait<FILE *, CURLOPT_WRITEDATA> WriteFile;
+		typedef curlpp::OptionTrait<std::ostream *, CURLOPT_WRITEDATA> WriteStream;
+	#else
+	#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+		typedef curlpp::NotAvailableOptionTrait<FILE *, CURLOPT_WRITEDATA> WriteFile;
+		typedef curlpp::NotAvailableOptionTrait<std::ostream *, CURLOPT_WRITEDATA> WriteStream;
+	#endif // CURLPP_ALLOW_NOT_AVAILABLE
+	#endif // LIBCURL_VERSION_NUM
+
+
+	#if LIBCURL_VERSION_NUM >= 0x070c01
+
+		typedef curlpp::OptionTrait<curl_read_callback, CURLOPT_READFUNCTION>
+			ReadFunctionCurlFunction;
+
+		typedef curlpp::OptionTrait<curlpp::types::ReadFunctionFunctor, CURLOPT_READFUNCTION>
+			ReadFunction;
+
+	#else
+
+	#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+
+		typedef curlpp::NotAvailableOptionTrait<curl_read_callback, CURLOPT_READFUNCTION>
+			ReadFunctionCurlFunction;
+
+		typedef curlpp::NotAvailableOptionTrait<curlpp::types::ReadFunctionFunctor, CURLOPT_READFUNCTION>
+			ReadFunction;
+
+	#endif // CURLPP_ALLOW_NOT_AVAILABLE
+
+	#endif // LIBCURL_VERSION_NUM
+
+
+	/**
+	* Using this option will reset CURLOPT_READFUNCTION to 
+	* default callback. In fact, use only this option if you only 
+	* want libcURL to use the FILE * given in argument instead 
+	* of stdout. 
+	*/
+
+	#if LIBCURL_VERSION_NUM >= 0x070907
+		typedef curlpp::OptionTrait<FILE *, CURLOPT_READDATA> ReadFile;
+		typedef curlpp::OptionTrait<std::istream *, CURLOPT_READDATA> ReadStream;
+	#else
+	#ifdef CURLPP_ALLOW_NOT_AVAILABLE
+		typedef curlpp::NotAvailableOptionTrait<FILE *, CURLOPT_READDATA> ReadFile;
+		typedef curlpp::NotAvailableOptionTrait<std::istream *, CURLOPT_READDATA> ReadStream;
+	#endif // CURLPP_ALLOW_NOT_AVAILABLE
+	#endif // LIBCURL_VERSION_NUM
+
+	typedef curlpp::OptionTrait<curlpp::types::ProgressFunctionFunctor, CURLOPT_PROGRESSFUNCTION>
+		ProgressFunction;
+
+	typedef curlpp::OptionTrait<curlpp::types::WriteFunctionFunctor, CURLOPT_HEADERFUNCTION>
+		HeaderFunction;
+
+	typedef curlpp::OptionTrait<curlpp::types::DebugFunctionFunctor, CURLOPT_DEBUGFUNCTION>
+		DebugFunction;
+
+	typedef curlpp::OptionTrait<curlpp::types::SslCtxFunctionFunctor, CURLOPT_SSL_CTX_FUNCTION>
+		SslCtxFunction;
+
+	/**
+	* Error options.
+	*/
+
+	typedef curlpp::OptionTrait<char *, CURLOPT_ERRORBUFFER> ErrorBuffer;
+
+	#ifdef FILE
+		typedef curlpp::OptionTrait<FILE *, CURLOPT_STDERR> StdErr;
+	#endif
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_FAILONERROR> FailOnError;
+
+
+	/**
+	* Network options.
+	*/
+
+	typedef curlpp::OptionTrait<std::string, CURLOPT_URL> Url;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_PROXY> Proxy;
+	typedef curlpp::OptionTrait<long, CURLOPT_PROXYPORT> ProxyPort;
+	typedef curlpp::OptionTrait<curl_proxytype, CURLOPT_PROXYTYPE> ProxyType;
+	typedef curlpp::OptionTrait<bool, CURLOPT_HTTPPROXYTUNNEL> HttpProxyTunnel;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_INTERFACE> Interface;
+	typedef curlpp::OptionTrait<long, CURLOPT_DNS_CACHE_TIMEOUT> DnsCacheTimeout;
+	typedef curlpp::OptionTrait<bool, CURLOPT_DNS_USE_GLOBAL_CACHE> DnsUseGlobalCache;
+	typedef curlpp::OptionTrait<long, CURLOPT_BUFFERSIZE> BufferSize;
+	typedef curlpp::OptionTrait<long, CURLOPT_PORT> Port;
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_TCP_NODELAY> TcpNoDelay;
+
+
+	/**
+	* Names and passwords options.
+	*/
+
+	typedef curlpp::OptionTrait<long, CURLOPT_NETRC> Netrc;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_NETRC_FILE> NetrcFile;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_USERPWD> UserPwd;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_PROXYUSERPWD> ProxyUserPwd;
+	typedef curlpp::OptionTrait<long, CURLOPT_HTTPAUTH> HttpAuth;
+	typedef curlpp::OptionTrait<long, CURLOPT_PROXYAUTH> ProxyAuth;
+
+
+	/**
+	* HTTP options.
+	*/
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_AUTOREFERER> AutoReferer;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_ENCODING> Encoding;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FOLLOWLOCATION> FollowLocation;
+	typedef curlpp::OptionTrait<bool, CURLOPT_UNRESTRICTED_AUTH> UnrestrictedAuth;
+	typedef curlpp::OptionTrait<long, CURLOPT_MAXREDIRS> MaxRedirs;
+	typedef curlpp::OptionTrait<bool, CURLOPT_PUT> Put;
+	typedef curlpp::OptionTrait<bool, CURLOPT_UPLOAD> Upload;
+	typedef curlpp::OptionTrait<bool, CURLOPT_POST> Post;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_POSTFIELDS> PostFields;
+	typedef curlpp::OptionTrait<long, CURLOPT_POSTFIELDSIZE> PostFieldSize;
+	typedef curlpp::OptionTrait<curl_off_t, CURLOPT_POSTFIELDSIZE_LARGE> PostFieldSizeLarge;
+	typedef curlpp::OptionTrait<curlpp::Forms, CURLOPT_HTTPPOST> HttpPost;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_REFERER> Referer;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_USERAGENT> UserAgent;
+	typedef curlpp::OptionTrait<std::list<std::string>, CURLOPT_HTTPHEADER> HttpHeader;
+	typedef curlpp::OptionTrait<std::list<std::string>, CURLOPT_HTTP200ALIASES> Http200Aliases;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_COOKIE> Cookie;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_COOKIEFILE> CookieFile;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_COOKIEJAR> CookieJar;
+	typedef curlpp::OptionTrait<bool, CURLOPT_COOKIESESSION> CookieSession;
+	typedef curlpp::OptionTrait<bool, CURLOPT_HTTPGET> HttpGet;
+	typedef curlpp::OptionTrait<long, CURLOPT_HTTP_VERSION> HttpVersion;
+
+
+	/**
+	* FTP options.
+	*/
+
+	typedef curlpp::OptionTrait<std::string, CURLOPT_FTPPORT> FtpPort;
+	typedef curlpp::OptionTrait<std::list<std::string>, CURLOPT_QUOTE> Quote;
+	typedef curlpp::OptionTrait<std::list<std::string>, CURLOPT_POSTQUOTE> PostQuote;
+	typedef curlpp::OptionTrait<std::list<std::string>, CURLOPT_PREQUOTE> PreQuote;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FTPLISTONLY> FtpListOnly;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FTPAPPEND> FtpAppend;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FTP_USE_EPSV> FtpUseEpsv;
+	typedef curlpp::OptionTrait<long, CURLOPT_FTP_FILEMETHOD> FtpFileMethod;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FTP_CREATE_MISSING_DIRS> FtpCreateMissingDirs;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FTP_RESPONSE_TIMEOUT> FtpResponseTimeout;
+	typedef curlpp::OptionTrait<curl_ftpssl, CURLOPT_FTP_SSL> FtpSsl;
+	typedef curlpp::OptionTrait<curl_ftpauth, CURLOPT_FTPSSLAUTH> FtpSslAuth;
+
+
+	/**
+	* Protocol options.
+	*/
+
+	typedef curlpp::OptionTrait<bool, CURLOPT_TRANSFERTEXT> TransferText;
+	typedef curlpp::OptionTrait<bool, CURLOPT_CRLF> Crlf;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_RANGE> Range;
+	typedef curlpp::OptionTrait<long, CURLOPT_RESUME_FROM> ResumeFrom;
+	typedef curlpp::OptionTrait<curl_off_t, CURLOPT_RESUME_FROM_LARGE> ResumeFromLarge;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_CUSTOMREQUEST> CustomRequest;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FILETIME> FileTime;
+	typedef curlpp::OptionTrait<bool, CURLOPT_NOBODY> NoBody;
+	typedef curlpp::OptionTrait<long, CURLOPT_INFILESIZE> InfileSize;
+	typedef curlpp::OptionTrait<curl_off_t, CURLOPT_INFILESIZE_LARGE> InfileSizeLarge;
+	typedef curlpp::OptionTrait<long, CURLOPT_MAXFILESIZE> MaxFileSize;
+	typedef curlpp::OptionTrait<curl_off_t, CURLOPT_MAXFILESIZE_LARGE> MaxFileSizeLarge;
+	typedef curlpp::OptionTrait<bool, CURLOPT_TIMECONDITION> TimeCondition;
+	typedef curlpp::OptionTrait<long, CURLOPT_TIMEVALUE> TimeValue;
+
+
+	/**
+	* Connection options.
+	*/
+
+	typedef curlpp::OptionTrait<long, CURLOPT_TIMEOUT> Timeout;
+	typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_LIMIT> LowSpeedLimit;
+	typedef curlpp::OptionTrait<long, CURLOPT_LOW_SPEED_TIME> LowSpeedTime;
+	typedef curlpp::OptionTrait<long, CURLOPT_MAXCONNECTS> MaxConnects;
+	typedef curlpp::OptionTrait<curl_closepolicy, CURLOPT_CLOSEPOLICY> ClosePolicy;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FRESH_CONNECT> FreshConnect;
+	typedef curlpp::OptionTrait<bool, CURLOPT_FORBID_REUSE> ForbidReuse;
+	typedef curlpp::OptionTrait<long, CURLOPT_CONNECTTIMEOUT> ConnectTimeout;
+	typedef curlpp::OptionTrait<long, CURLOPT_IPRESOLVE> IpResolve;
+
+
+	/**
+	* SSL and security options.
+	*/
+
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLCERT> SslCert;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLCERTTYPE> SslCertType;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLCERTPASSWD> SslCertPasswd;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLKEY> SslKey;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLKEYTYPE> SslKeyType;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLKEYPASSWD> SslKeyPasswd;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSLENGINE> SslEngine;
+	typedef curlpp::NoValueOptionTrait<CURLOPT_SSLENGINE_DEFAULT> SslEngineDefault;
+	typedef curlpp::OptionTrait<long, CURLOPT_SSLVERSION> SslVersion;
+	typedef curlpp::OptionTrait<bool, CURLOPT_SSL_VERIFYPEER> SslVerifyPeer;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_CAINFO> CaInfo;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_CAPATH> CaPath;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_RANDOM_FILE> RandomFile;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_EGDSOCKET> EgdSocket;
+	typedef curlpp::OptionTrait<long, CURLOPT_SSL_VERIFYHOST> SslVerifyHost;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_SSL_CIPHER_LIST> SslCipherList;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_KRB4LEVEL> Krb4Level;
+
+
+	/**
+	* Other options.
+	*/
+
+	typedef curlpp::OptionTrait<void *, CURLOPT_PRIVATE> Private;
+	typedef curlpp::OptionTrait<std::string, CURLOPT_KRB4LEVEL> Krb4Level;
+
+
+	//Share;
+	//TelnetOptions
+
+
+} // namespace options
+
+	namespace Options = options;
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+std::ostream & operator<<(std::ostream & stream, const curlpp::options::Url & url);
+
+
+#endif // #ifndef CURLPP_OPTIONS_HPP

+ 56 - 0
thirdparty/curlpp/include/curlpp/Types.hpp

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_TYPES_HPP
+#define CURLPP_TYPES_HPP
+
+
+
+#include <functional>
+
+
+namespace curlpp
+{
+
+
+namespace types
+{
+
+	typedef std::function< size_t(char*, size_t, size_t) > WriteFunctionFunctor;
+	typedef std::function< size_t(char*, size_t, size_t) > ReadFunctionFunctor;
+	/// DebugFunctor related typedefs
+        typedef std::function< int(curl_infotype, char *, size_t) > DebugFunctionFunctor;
+        typedef std::function< CURLcode(void *) > SslCtxFunctionFunctor;
+	typedef std::function< int(double, double, double, double)> ProgressFunctionFunctor;
+  
+} // namespace types
+
+namespace Types = types;
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_TYPES_HPP

+ 223 - 0
thirdparty/curlpp/include/curlpp/cURLpp.hpp

@@ -0,0 +1,223 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef CURLPP_CURLPP_HPP
+#define CURLPP_CURLPP_HPP
+
+#define LIBCURLPP_VERSION "0.8.1"
+#define LIBCURLPP_VERSION_NUM 0x000801
+
+
+
+#include <curl/curl.h>
+
+#include <string>
+#include <cstdlib>
+
+namespace curlpp
+{
+
+	/**
+	* This function takes care of initializing curlpp (also libcURL).
+	*
+	* If you want to cleanup cURL before your application quits just call curlpp::terminate().
+	* This function should only be called once (no matter how many threads or 
+	* libcurl sessions that'll be used) by every application that uses libcurl, 
+	* it will throw a logic_error if you call it twice.
+	*
+	* The flags option is a bit pattern that tells  libcurl  exact what  features
+	* to init, as described below. Set the desired bits by ORing the values together.
+	*
+	* CURL_GLOBAL_ALL
+	* Initialize  everything  possible.  This  sets all known bits.
+	*
+	* CURL_GLOBAL_SSL
+	* Initialize SSL
+	*  
+	* CURL_GLOBAL_WIN32
+	* Initialize  the  Win32  socket  libraries.
+	*
+	* CURL_GLOBAL_NOTHING
+	* Initialise nothing extra. This sets no bit.
+	*
+	* NOTE: you should never call this function twice.
+	*/
+
+	void initialize(long flags = CURL_GLOBAL_ALL);
+
+	/**
+	* This function takes care of cleaning up curlpp (also libcURL). 
+	* 
+	* See curlpp::initialize(long flags) for more documentation.
+	* NOTE: you cannot call this function if curlpp is not loaded, or if you already
+	* called in once; it will throw a logic_error if you do otherwise.
+	*/
+
+	void terminate();
+
+	/**
+	* \depreciated This is an obsolete class. DO NOT use it. 
+	*
+	* The only reason it's still here,
+	* is to be sure that it is backward compatible. This class was taking care of 
+	* initialization and cleaning up curlpp (also libcURL) (it was calling 
+	* curlpp:terminate() in his destructor). However, from now on, you do not need
+	* this class. Note that the removal of this class was done because it was 
+	* raising some threading issues. 
+	*
+	* Old documentation of that class: 
+	*
+	* If you want to be sure that curlpp is cleaned up after you reached 
+	* the end of scope of a specific function using curlpp, instantiate 
+	* this class. This function call curlpp::initialize() in his 
+	* constructor, so you don't have to call it by yourself, when you have 
+	* decided to use it.
+	*
+	* See curlpp::initialize(long flags) and curlpp:terminate() for more documentation.
+	*/
+
+	class Cleanup
+	{
+
+	public:
+
+		Cleanup();
+		~Cleanup();
+
+	};
+
+	/**
+	* URL encodes string. 
+	*
+	* This  function  will  convert  the given input string to an URL encoded
+	* string and return that as a new allocated string. All input  characters
+	* that  are  not a-z, A-Z or 0-9 will be converted to their "URL escaped"
+	* version (%NN where NN is a two-digit hexadecimal number).
+	*/
+
+	std::string escape(const std::string & url);
+
+	/**
+	* Decodes URL encoded string. 
+	*
+	* This  function  will  convert  the  given  URL encoded input string to a
+	* "plain string" and return that as a new allocated string. All input
+	* characters that are URL encoded (%XX) where XX is a two-digit
+	* hexadecimal number, or +) will be converted to their plain text versions
+	* (up to a ? letter, no + letters to the right of a ? letter will be
+	* converted).
+	*/
+
+	std::string unescape(const std::string & url);
+
+	/**
+	* Portable wrapper for the getenv() function.
+	*
+	* It's meant to emulate 
+	* its behaviour and provide an identical interface for all operating
+	* systems libcurl builds on (including win32). Under unix operating
+	* systems, there isn't any point in returning an allocated memory,
+	* although other systems won't work  properly if this isn't done. The unix
+	* implementation thus have to suffer slightly from the drawbacks of other
+	* systems.
+	*/
+
+	std::string getenv(const std::string & name);
+
+	/**
+	* Returns  a  human readable string with the version number of libcurl and
+	* some of its important components  (like  OpenSSL version).
+	*
+	* Note:  this  returns  the  actual running lib's version, you might have
+	* installed a newer lib's include files in your system  which may turn
+	* your LIBCURL_VERSION #define value to differ from this result.
+	*/
+	std::string libcurlVersion();
+
+	/**
+	* This function returns the number of  seconds  since  January 1st  1970,
+	* for the date and time that the datestring parameter specifies. The now
+	* parameter is there and should hold the current time to allow the
+	* datestring to specify relative dates/times. Read further in the date
+	* string parser section below.
+	*
+	* PARSING DATES AND TIMES
+	* A  "date" is a string, possibly empty, containing many items separated
+	* by whitespace.  The whitespace may be omitted when no ambiguity
+	* arises.  The empty string means the beginning of today (i.e., midnight).
+	* Order of the items is immaterial. A date string may contain many
+	* flavors of items:
+	*
+	* calendar date items
+	* This can be specified in a number of different ways. Including
+	* 1970-09-17, 70-9-17, 70-09-17, 9/17/72, 24 September 1972, 24 Sept 72,
+	* 24 Sep 72, Sep 24, 1972, 24-sep-72, 24sep72.  The year can also  be
+	* omitted, for example: 9/17 or "sep 17".
+	* 
+	* time of the day items
+	* This  string specifies the time on a given day. Syntax supported
+	* includes: 18:19:0, 18:19, 6:19pm, 18:19-0500 (for specifying the time
+	* zone as well).
+	*
+	* time zone items
+	* Specifies international time zone. There are a few acronyms
+	* supported, but in general you should instead use the specific
+	* realtive time compared to UTC. Supported formats include: -1200, MST,
+	* +0100.
+	*
+	* day of the week items
+	* Specifies a day of the week. If this is mentioned alone it means that
+	* day of the week in the future. Days of the week may be spelled out in
+	* full: `Sunday', `Monday', etc or they may be abbreviated to their
+	* first three letters, optionally followed by a period. The special
+	* abbreviations `Tues' for `Tuesday', `Wednes' for `Wednesday' and `Thur'
+	* or `Thurs' for `Thursday' are also allowed. A number may precede a day
+	* of the week item to move forward supplementary weeks. It is best
+	* used in expression like `third monday'. In this context, `last DAY'
+	* or `next DAY' is also acceptable; they move one week before or after
+	* the day that DAY by itself would represent.
+	*
+	* relative items
+	* A relative item adjusts a date (or the current date if none) forward
+	* or backward. Example syntax includes: "1 year", "1 year ago",
+	* "2 days", "4 weeks". The string `tomorrow' is worth one day in the
+	* future (equivalent to `day'), the string `yesterday' is worth one
+	* day in the past (equivalent to `day ago').
+	*
+	* pure numbers
+	* If the decimal number is of the form YYYYMMDD and no other calendar date
+	* item appears before it in the date string, then YYYY is read as
+	* the year, MM as the month number and DD as the day of the month, for the
+	* specified calendar date.
+	*/
+
+	time_t getdate(const std::string & date, time_t * now = 0);
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_CURLPP_HPP

+ 203 - 0
thirdparty/curlpp/include/curlpp/internal/CurlHandle.hpp

@@ -0,0 +1,203 @@
+/*
+*    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#ifndef CURLPP_CURL_HANDLE_HPP
+#define CURLPP_CURL_HANDLE_HPP
+
+
+
+#include "../Exception.hpp"
+#include "../Types.hpp"
+
+#include <curl/curl.h>
+
+#include <memory>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	/**
+	* Wrapper for CURL * handle.
+	*/
+
+	class CurlHandle
+	{
+
+	public:
+
+		CurlHandle();
+		CurlHandle(CURL * handle);
+
+		std::unique_ptr<CurlHandle> clone() const;
+
+		/**
+		* Calls curl_easy_perform on the handle and throws exceptions on errors.
+		*/
+		void perform();
+
+		/**
+		* Simply calls curl_easy_reset on the handle.
+		*/
+		void reset();
+
+		virtual ~CurlHandle();
+
+		/**
+		* Calls curl_easy_setopt on the option.
+		*/
+		template<typename OptionType>
+		void option(CURLoption option, OptionType value);
+
+		/**
+		* Calls curl_easy_setopt on the option.
+		*/
+		template<typename OptionType, CURLoption optionType>
+		void option(OptionType value);
+
+		/**
+		* This function will return the CURL * handle.
+		*
+		* DO NOT use this, unless you REALLY know what you
+		* are doing.
+		*/
+		CURL * getHandle() const;
+
+		/**
+		* Request internal information from the curl session with this function.
+		*
+		* The third argument MUST be a pointer to a long, a pointer to a char *, 
+		* a pointer to a struct curl_slist * or a pointer to a double.
+		*/
+		template<typename T>
+		void getInfo(CURLINFO info, T & value) const;
+
+
+		template<typename FunctorType>
+		typename FunctorType::ResultType execute(FunctorType functor, typename FunctorType::ParamList params);
+
+
+		size_t executeWriteFunctor(char * buffer, size_t size, size_t nitems);
+
+		void setWriteFunctor(curlpp::types::WriteFunctionFunctor functor)
+		{
+			mWriteFunctor = functor;
+		}
+
+
+		size_t executeHeaderFunctor(char * buffer, size_t size, size_t nitems);
+
+		void setHeaderFunctor(curlpp::types::WriteFunctionFunctor functor)
+		{
+			mHeaderFunctor = functor;
+		}
+
+
+		size_t executeReadFunctor(char * buffer, size_t size, size_t nitems);
+
+		void setReadFunctor(curlpp::types::ReadFunctionFunctor functor)
+		{
+			mReadFunctor = functor;
+		}
+
+
+		int executeProgressFunctor(double dltotal, 
+																double dlnow, 
+																double ultotal, 
+																double ulnow);
+
+		void setProgressFunctor(curlpp::types::ProgressFunctionFunctor functor)
+		{
+			mProgressFunctor = functor;
+		}
+
+
+		int executeDebugFunctor(curl_infotype, char *, size_t);
+
+		void setDebugFunctor(curlpp::types::DebugFunctionFunctor functor)
+		{
+			mDebugFunctor = functor;
+		}
+
+
+		CURLcode executeSslCtxFunctor(void * ssl_ctx);
+
+		void setSslCtxFunctor(curlpp::types::SslCtxFunctionFunctor functor)
+		{
+			mSslFunctor = functor;
+		}
+
+		void setException(curlpp::CallbackExceptionBase * e);
+		void throwException();
+
+	private:
+
+		CurlHandle(const CurlHandle & other);
+		CurlHandle & operator=(const CurlHandle & other);
+
+		/**
+		* Provides libcURL a space to store error messages.
+		*
+		* Pass a char * to a buffer that the libcURL may store
+		* human readable error messages in. This may  be  more
+		* helpful  than just the return code from the library.
+		* The buffer must be at least CURL_ERROR_SIZE big.
+		* Note: if the library does not return an  error,  the
+		* buffer may not have been touched. Do not rely on the
+		* contents in those cases.
+		*/
+		void errorBuffer(char* buffer);
+
+	private:
+
+		CURL * mCurl;
+
+		char mErrorBuffer[CURL_ERROR_SIZE + 1];
+
+		curlpp::types::WriteFunctionFunctor mWriteFunctor;
+		curlpp::types::WriteFunctionFunctor mHeaderFunctor;
+		curlpp::types::ReadFunctionFunctor mReadFunctor;
+		curlpp::types::ProgressFunctionFunctor mProgressFunctor;
+		curlpp::types::DebugFunctionFunctor mDebugFunctor;
+		curlpp::types::SslCtxFunctionFunctor mSslFunctor;
+		curlpp::CallbackExceptionBase * mException;
+
+	};
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#include "CurlHandle.inl"
+
+#endif // #ifndef CURLPP_CURL_HANDLE_HPP

+ 76 - 0
thirdparty/curlpp/include/curlpp/internal/CurlHandle.inl

@@ -0,0 +1,76 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef CURLPP_CURLHANDLE_INL
+#define CURLPP_CURLHANDLE_INL
+
+
+#include "../Exception.hpp"
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+template<typename OptionType>
+void 
+CurlHandle::option(CURLoption optionType, 
+OptionType value)
+{
+	CURLcode code;
+	code = curl_easy_setopt(mCurl, optionType, value);
+	libcurlRuntimeAssert(mErrorBuffer, code);
+}
+
+
+template<typename OptionType, CURLoption optionType>
+void 
+CurlHandle::option(OptionType value)
+{
+	option(optionType, value);
+}
+
+
+template <typename T>
+void 
+CurlHandle::getInfo(CURLINFO info, T & value) const
+{
+	CURLcode code;
+	code = curl_easy_getinfo(mCurl, info, & value);
+	libcurlRuntimeAssert(mErrorBuffer, code);
+}
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+
+#endif 
+

+ 106 - 0
thirdparty/curlpp/include/curlpp/internal/OptionContainer.hpp

@@ -0,0 +1,106 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_CONTAINER_HPP
+#define CURLPP_OPTION_CONTAINER_HPP
+
+
+#include "OptionContainerType.hpp"
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	template<typename OptionType>
+	class Option;
+
+	/**
+	* This class is used to set an option to a handle and to keep it's value.
+	*/
+	template<class OptionType>
+	class OptionContainer
+	{
+
+	public:
+
+		typedef typename OptionContainerType<OptionType>::ParamType ParamType;
+		typedef typename OptionContainerType<OptionType>::ReturnType ReturnType;
+		typedef typename OptionContainerType<OptionType>::ValueType ValueType;
+		typedef typename OptionContainerType<OptionType>::HandleOptionType HandleOptionType;
+
+		/**
+		* Contructor. We pass the value of the option.
+		*/
+		OptionContainer(typename OptionContainer<OptionType>::ParamType value);
+
+		OptionContainer(OptionContainer<OptionType> & other);
+
+		/**
+		* This function set the argument that will be passed to the 
+		* option call for a handle. It will use the argument passed to
+		* this function.
+		*/
+		void setValue(typename OptionContainer<OptionType>::ParamType value);
+
+		/**
+		* This function get the argument that is set on the handle.
+		*/
+		typename OptionContainer<OptionType>::ReturnType getValue();
+
+		/** 
+		* We call this function to have the value passed to the curl_easy_setopt.
+		* 
+		* Note: DO NOT USE THIS FUNCTION! It's for internal use only.
+		*/
+		typename OptionContainer<OptionType>::HandleOptionType getHandleOptionValue();
+
+
+	private:         
+		/**
+		* We cannot call this constructor. We absolutely need an initial value.
+		*/
+		OptionContainer();
+
+		/**
+		* Current value of the option.
+		*/
+		typename OptionContainer<OptionType>::ValueType mValue;
+	};
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+#include "OptionContainer.inl"
+
+#endif // #ifndef CURLPP_OPTION_CONTAINER_HPP
+

+ 73 - 0
thirdparty/curlpp/include/curlpp/internal/OptionContainer.inl

@@ -0,0 +1,73 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef OPTION_CONTAINER_INL
+#define OPTION_CONTAINER_INL
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+template<class OptionType>
+OptionContainer<OptionType>::OptionContainer(typename OptionContainer<OptionType>::ParamType value)
+: mValue(value)
+{}
+
+
+template<class OptionType>
+OptionContainer<OptionType>::OptionContainer(OptionContainer<OptionType> & other) 
+: mValue(other.mValue)
+{}
+
+
+template<class OptionType>
+void
+OptionContainer<OptionType>::setValue(typename OptionContainer<OptionType>::ParamType value)
+{
+  mValue = value;
+}
+
+template<class OptionType>
+typename OptionContainer<OptionType>::ReturnType
+OptionContainer<OptionType>::getValue()
+{
+  return mValue;
+}
+
+template<class OptionType>
+typename OptionContainer<OptionType>::HandleOptionType
+OptionContainer<OptionType>::getHandleOptionValue()
+{
+  return mValue;
+}
+
+#endif
+
+} // namespace internal
+
+} // namespace curlpp

+ 172 - 0
thirdparty/curlpp/include/curlpp/internal/OptionContainerType.hpp

@@ -0,0 +1,172 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_CONTAINER_TYPE_HPP
+#define CURLPP_OPTION_CONTAINER_TYPE_HPP
+
+
+#include "SList.hpp"
+
+#include "../Form.hpp"
+#include "../Types.hpp"
+
+#include <string>
+#include <list>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	/**
+	* Defines types connected with the type of the option.
+	*
+	* To be able to operate on option's values we have to define
+	* value of what type do we
+	* accept as an argument (ParamType),
+	* store (ValueType),
+	* return (ReturnType).
+	*/
+
+	template<typename OptionType>
+	struct OptionContainerType
+	{
+
+		/// The type of the parameter of setOpt.
+		typedef const OptionType & ParamType;
+
+		/// The type of the value kept in the option class.
+		typedef OptionType ValueType;
+
+		/// The type of the value returned by getValue function.
+		typedef OptionType ReturnType;
+
+		/**
+		* This typedef is the type usable by the OptionSetter::setOpt to
+		* eventually call curl_easy_setopt().
+		*/
+		typedef OptionType & HandleOptionType;
+
+	};
+
+
+	/**
+	* Specialization of template<typename OptionType>	struct OptionContainerType.
+	*
+	*/
+
+	template<typename OptionType>
+	struct OptionContainerType<OptionType *>
+	{
+
+		typedef OptionType * ParamType;
+		typedef OptionType * ValueType;
+		typedef OptionType * ReturnType;
+		typedef OptionType * HandleOptionType;
+
+	};
+
+
+	/**
+	* Specialization of template<typename OptionType>	struct OptionContainerType.
+	*
+	*/
+
+	template<>
+	struct OptionContainerType<std::string>
+	{
+
+	public:
+
+		typedef const std::string & ParamType;
+		typedef std::string ValueType;
+		typedef std::string ReturnType;
+		typedef const std::string & HandleOptionType;
+
+	};
+
+
+	/**
+	* Specialization of template<typename OptionType>	struct OptionContainerType.
+	*
+	*/
+
+	template<>
+	struct OptionContainerType<std::list<std::string> >
+	{
+
+	public:
+
+		typedef const std::list<std::string> & ParamType;
+		typedef SList ValueType;
+		typedef std::list<std::string> ReturnType;
+		typedef const SList & HandleOptionType;
+
+	};
+
+
+	/**
+	* Specialization of template<typename OptionType>	struct OptionContainerType.
+	*
+	*/
+
+	template<>
+	struct OptionContainerType<curlpp::Forms>
+	{
+
+		typedef const Forms & ParamType;
+		typedef curlpp::HttpPost ValueType;
+		typedef Forms ReturnType;
+		typedef const curlpp::HttpPost & HandleOptionType;
+
+	};
+
+
+	/**
+	* Specialization of template<typename OptionType>	struct OptionContainerType.
+	*
+	*/
+
+	//   template<>
+	//   struct OptionContainerType<std::ostream *>
+	//   {
+	//     typedef const std::list<curlpp::FormPart *> & ParamType;
+	//     typedef curlpp::HttpPost ValueType;
+	//     typedef std::list<curlpp::FormPart *> ReturnType;
+	//     typedef const curlpp::HttpPost & HandleOptionType;
+	//   };
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_OPTION_CONTAINER_TYPE_HPP

+ 122 - 0
thirdparty/curlpp/include/curlpp/internal/OptionList.hpp

@@ -0,0 +1,122 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_LIST_HPP
+#define CURLPP_OPTION_LIST_HPP
+
+
+#include "../OptionBase.hpp"
+
+#include <map>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	/**
+	* This class can keep a set of option_container it's used to keep all the
+	* option set on a handle.
+	*/
+
+	class OptionList
+	{
+
+	public:
+
+		typedef std::map<CURLoption, curlpp::OptionBase *> mapType;
+
+		/**
+		* This construction initialize an empty list of options.
+		*/
+		OptionList();
+
+		/**
+		* This contructor initialize his list by calling the
+		* option_container<T>::clone() function.
+		*/
+		OptionList(const OptionList & rhs);
+
+		virtual ~OptionList();
+
+		/**
+		* This function will add an option to the list. Note that if the
+		* option is allready contained by the list, the option value of this
+		* option will be overrided by the new value. 
+		*
+		* Note: The option memory will be owned by the request, so when the 
+		* request will be deleted, the option will be deleted too. It is 
+		* suggested to not referer at all further in the code to the option 
+		* instance passed as an argument.
+		*/
+		virtual void setOpt(OptionBase * option);
+
+		/**
+		* This function will add an option to the list. Note that if the
+		* option is allready contained by the list, the option value of this
+		* option will be overrided by the new value. 
+		*/
+		virtual void setOpt(const OptionBase & option);
+
+		/**
+		* This function will call the setOpt on each options
+		* contained by * the option list passed in argument.
+		*/
+		virtual void setOpt(const OptionList & options);
+
+		/**
+		* This function will get the current option value of the corresponding 
+		* OptionBase. Note that if the option is not set, the option passed in
+		* parameter will be cleared. (See Option::getOpt for more details)
+		*/
+		virtual void getOpt(OptionBase * option) const;
+
+		/**
+		* all the options contained by the class will be deleted and we will
+		* clone the rhs option_container and store them in the class.
+		*/
+		//OptionList & operator=(const OptionList & rhs);
+
+
+	private:
+
+		void insert(const OptionList::mapType & other);
+
+		OptionList::mapType mOptions;
+
+	};
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+#endif // #ifndef CURLPP_OPTION_LIST_HPP

+ 504 - 0
thirdparty/curlpp/include/curlpp/internal/OptionSetter.hpp

@@ -0,0 +1,504 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT.
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_OPTION_SETTER_HPP
+#define CURLPP_OPTION_SETTER_HPP
+
+
+#include "OptionContainerType.hpp"
+#include "CurlHandle.hpp"
+
+#include "../Types.hpp"
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	/**
+	* Defines the way options are set.
+	*/
+
+	template<typename OptionValueType, CURLoption optionType>
+	class OptionSetter
+	{
+
+	public:
+
+		typedef typename internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<CURLoption optionType>
+	class OptionSetter<std::string, optionType>
+	{
+
+	public:
+
+		typedef curlpp::internal::OptionContainerType<std::string>::HandleOptionType
+			ParamType;
+
+		static void	setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<CURLoption optionType>
+	class OptionSetter<std::list<std::string>, optionType>
+	{
+
+	public:
+
+		typedef std::list<std::string>
+			OptionValueType;
+		
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void	setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::Forms, CURLOPT_HTTPPOST>
+	{
+
+	public:
+
+		typedef curlpp::Forms 
+			OptionValueType;
+		
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::WriteFunctionFunctor,
+																CURLOPT_WRITEFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::WriteFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostWriteFunction,
+																CURLOPT_WRITEFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostWriteFunction
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<FILE *,
+																CURLOPT_WRITEDATA>
+	{
+
+	public:
+
+		typedef FILE *
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<std::ostream *,
+																CURLOPT_WRITEDATA>
+	{
+
+	public:
+
+		typedef std::ostream *
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::ReadFunctionFunctor,
+																CURLOPT_READFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::ReadFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostReadFunction,
+																CURLOPT_READFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostReadFunction
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+	/**
+	* Specialization.
+	*/
+
+	template <>
+	class OptionSetter<FILE *,
+																CURLOPT_READDATA>
+	{
+
+	public:
+
+		typedef FILE *
+			OptionValueType;
+		
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<std::istream *,
+																CURLOPT_READDATA>
+	{
+
+	public:
+
+		typedef std::istream *
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::ProgressFunctionFunctor,
+																CURLOPT_PROGRESSFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::ProgressFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostProgressFunction,
+																CURLOPT_PROGRESSFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostProgressFunction
+			OptionValueType;
+		
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::WriteFunctionFunctor,
+																CURLOPT_HEADERFUNCTION>
+	
+	{
+
+	public:
+
+		typedef curlpp::types::WriteFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostWriteFunction,
+																CURLOPT_HEADERFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostWriteFunction
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::DebugFunctionFunctor,
+																CURLOPT_DEBUGFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::DebugFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostDebugFunction,
+																CURLOPT_DEBUGFUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostDebugFunction
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::SslCtxFunctionFunctor,
+																CURLOPT_SSL_CTX_FUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::SslCtxFunctionFunctor
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+
+	};
+
+
+#ifdef HAVE_BOOST
+
+	/**
+	* Specialization.
+	*/
+
+	template<>
+	class OptionSetter<curlpp::types::BoostSslCtxFunction,
+																CURLOPT_SSL_CTX_FUNCTION>
+	{
+
+	public:
+
+		typedef curlpp::types::BoostSslCtxFunction
+			OptionValueType;
+
+		typedef curlpp::internal::OptionContainerType<OptionValueType>::HandleOptionType
+			ParamType;
+
+		static void setOpt(internal::CurlHandle * handle, ParamType value);
+	};
+
+#endif // #ifdef HAVE_BOOST
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+#include "OptionSetter.inl"
+
+#endif // #ifndef CURLPP_OPTION_SETTER_HPP

+ 56 - 0
thirdparty/curlpp/include/curlpp/internal/OptionSetter.inl

@@ -0,0 +1,56 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#ifndef CURLPP_OPTIONSETTER_INL
+#define CURLPP_OPTIONSETTER_INL
+
+#include <string>
+
+template<typename OptionValueType, CURLoption optionType>
+void
+curlpp::internal::OptionSetter<OptionValueType, optionType>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+  handle->option(optionType, value);
+}
+
+
+template<CURLoption optionType>
+void
+curlpp::internal::OptionSetter<std::string, optionType>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(optionType, (void *)value.c_str());
+}
+
+
+template<CURLoption optionType>
+void
+curlpp::internal::OptionSetter<std::list<std::string>, optionType>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(optionType, (void *)value.cslist());
+}
+
+#endif

+ 92 - 0
thirdparty/curlpp/include/curlpp/internal/SList.hpp

@@ -0,0 +1,92 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef CURLPP_SLIST_HPP
+#define CURLPP_SLIST_HPP
+
+
+
+#include <curl/curl.h>
+
+#include <list>
+#include <string>
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+	/**
+	* This class is binding the curl_slist struct.
+	*/
+
+	class SList
+	{
+
+	public:
+
+		SList();
+		SList(const SList & rhs);
+
+		/**
+		* The list passed in as an argument is now possessed by the class.
+		*/
+		SList(curl_slist * list);
+
+		explicit SList(const std::list<std::string> & list);
+		~SList();
+
+		SList & operator=(const std::list<std::string> & list);
+		operator std::list<std::string>();
+
+		curl_slist * cslist() const;
+		std::list<std::string> list();
+
+	private:
+
+		void set(const std::list<std::string> & list);
+		void update();
+		void clear();
+		void constructFrom(curl_slist * list);
+
+		curl_slist * mList;
+		std::list<std::string> mData;
+
+	};
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+namespace cURLpp = curlpp;
+
+
+std::ostream & operator<<(std::ostream & stream, const std::list<std::string> & value);
+
+
+#endif // #ifndef CURLPP_SLIST_HPP

+ 32 - 0
thirdparty/curlpp/include/utilspp/EmptyType.hpp

@@ -0,0 +1,32 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_EMPTYTYPE_HPP
+#define UTILSPP_EMPTYTYPE_HPP
+
+namespace utilspp
+{
+  struct EmptyType {};
+}
+
+#endif

+ 41 - 0
thirdparty/curlpp/include/utilspp/NonCopyable.hpp

@@ -0,0 +1,41 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_NONCOPYABLE_HPP
+#define UTILSPP_NONCOPYABLE_HPP
+
+namespace utilspp
+{
+   class NonCopyable
+   {
+      public:
+         NonCopyable()
+         {}
+
+      private:
+         NonCopyable(const NonCopyable & r)
+         {}
+   };
+}
+
+#endif

+ 32 - 0
thirdparty/curlpp/include/utilspp/NullType.hpp

@@ -0,0 +1,32 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_NULLTYPE_HPP
+#define UTILSPP_NULLTYPE_HPP
+
+namespace utilspp
+{
+	struct NullType;
+}
+
+#endif

+ 186 - 0
thirdparty/curlpp/include/utilspp/SmartPtr.hpp

@@ -0,0 +1,186 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_SMARTPTR_HPP
+#define UTILSPP_SMARTPTR_HPP
+
+#include <stdexcept>
+#include "NonCopyable.hpp"
+
+#define NULL_BODY_ERROR "the smart pointer contain a NULL pointer"
+
+namespace utilspp
+{
+
+  template <typename Type = unsigned int>
+  class FastCount
+  {
+  public:
+    FastCount(Type count = 1) : mCount(count)
+    {}
+
+    FastCount & operator++()
+    {
+      mCount++;
+      return *this;
+    }
+
+    FastCount & operator--()
+    {
+      mCount--;
+      return *this;
+    }
+
+    operator Type()
+    {
+      return mCount;
+    }
+
+    Type useCount()
+    {
+      return mCount;
+    }
+
+  private:
+    Type mCount;
+  };
+
+  
+  template <typename ContentType, typename CountPolicy = FastCount>
+  class CountingBody : public utilspp::NonCopyable
+  {
+  public:
+    CountingBody(ContentType * body) : mBody(body)
+    {}
+
+    void inc()
+    {
+      ++mCount;
+    }
+
+    void dec()
+    {
+      --mCount;
+      if (mCount <= 0) {
+	delete this;
+      }
+    }
+
+    ContentType * get()
+    {
+      return mBody;
+    }
+
+  protected:
+    ~CountingBody()
+    {
+      if (mBody != NULL) {
+	delete mBody;
+	mBody = NULL;
+      }
+    }
+
+  private:
+    CountPolicy mCount;
+    ContentType * mBody;
+  };
+
+
+  template <typename ContentType, typename CountingBodyPolicy = CountingBody>
+  class SharedPtr
+  {
+  public:
+    SharedPtr() : mContent(new CountingPolicy<ContentType>(NULL))
+    {}
+
+    explicit SharedPtr(ContentType * content) : mContent(new CountingBodyPolicy<ContentType>(content))
+    {}
+
+    ~SharedPtr()
+    {
+      mContent->dec();
+    }
+
+    SharedPtr(const SharedPtr & other) : mContent(other.mContent)
+    {
+      mContent->inc();
+    }
+
+    SharedPtr & operator=(const SharedPtr & other)
+    {
+      if(mContent->get() != other.mContent->get()) {
+	mContent->dec();
+	mContent = other.mContent;
+	mContent->inc();
+      }
+      return (*this);
+    }
+
+    SharedPtr & operator=(ContentType * content)
+    {
+      mContent--;
+      mContent = new CountingBodyPolicy<ContentType>(content);
+    }
+
+    bool operator==(const SharedPtr & other) const
+    {
+      return (mContent->get() == other.mContent->get());
+    }
+
+    bool operator!=(const SharedPtr & other) const
+    {
+      return (mContent->get() != other.mContent->get());
+    }
+
+    bool operator<(const SharedPtr & other) const
+    {
+      return (mContent->get() < other.mContent->get());
+    }
+
+    operator ContentType*()
+    {
+      return mContent->get();
+    }
+
+    ContentType & operator*()
+    {
+      if(mContent->get() == NULL) {
+	throw std::runtime_error(NULL_BODY_ERROR);
+      }
+      return *mContent->get();
+    }
+
+    ContentType* operator->()
+    { 
+      if(mContent->get() == NULL) {
+	throw std::runtime_error(NULL_BODY_ERROR);
+      }
+      return mContent->get();
+    }
+
+  private:
+    CountingBodyPolicy * mContent;
+  };
+}
+
+#endif

+ 45 - 0
thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.hpp

@@ -0,0 +1,45 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef THREADING_FACTORY_MUTEX_HPP
+#define THREADING_FACTORY_MUTEX_HPP
+
+
+namespace utilspp
+{
+   template <typename T>
+      struct ThreadingFactoryMutex
+      {
+         struct lock
+         {
+            lock();
+            lock(const T &);
+         };
+
+         typedef T VolatileType;
+      };
+}
+
+#include "utilspp/ThreadingFactoryMutex.inl"
+
+#endif

+ 37 - 0
thirdparty/curlpp/include/utilspp/ThreadingFactoryMutex.inl

@@ -0,0 +1,37 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef THREADING_FACTORY_MUTEX_INL
+#define THREADING_FACTORY_MUTEX_INL
+
+template<typename T>
+inline
+utilspp::ThreadingSingle<T>::lock::lock()
+{};
+
+template<typename T>
+inline
+utilspp::ThreadingSingle<T>::lock::lock(const T &)
+{};
+
+#endif

+ 52 - 0
thirdparty/curlpp/include/utilspp/ThreadingSingle.hpp

@@ -0,0 +1,52 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef SINGLE_THREADED_HPP
+#define SINGLE_THREADED_HPP
+
+#include "utilspp/NullType.hpp"
+
+namespace utilspp
+{
+   template <typename T = utilspp::NullType>
+      struct ThreadingSingle
+      {
+         struct mutex
+         {
+            void lock();
+            void unlock();
+         };
+         
+         struct lock
+         {
+            lock();
+            lock(mutex & m);
+         };
+
+         typedef T VolatileType;
+      };
+}
+
+#include "utilspp/ThreadingSingle.inl"
+
+#endif

+ 50 - 0
thirdparty/curlpp/include/utilspp/ThreadingSingle.inl

@@ -0,0 +1,50 @@
+/*
+ *    Copyright (c) <2002-2005> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef SINGLE_THREADED_INL
+#define SINGLE_THREADED_INL
+
+template<typename T>
+inline
+utilspp::ThreadingSingle<T>::lock::lock()
+{};
+
+template<typename T>
+inline
+utilspp::ThreadingSingle<T>::lock::lock( 
+      typename utilspp::ThreadingSingle<T>::mutex & )
+{}
+
+template<typename T>
+inline
+void
+utilspp::ThreadingSingle<T>::mutex::lock()
+{};
+
+template<typename T>
+inline
+void
+utilspp::ThreadingSingle<T>::mutex::unlock()
+{};
+
+#endif

+ 216 - 0
thirdparty/curlpp/include/utilspp/TypeList.hpp

@@ -0,0 +1,216 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef TYPE_LIST_HPP
+#define TYPE_LIST_HPP
+
+#include "NullType.hpp"
+
+
+
+#define TYPE_LIST_1(T1) utilspp::tl::TypeList<T1, utilspp::NullType>
+#define TYPE_LIST_2(T1, T2 ) ::utilspp::tl::TypeList<T1, TYPE_LIST_1( T2)>
+#define TYPE_LIST_3(T1, T2, T3 ) ::utilspp::tl::TypeList<T1, TYPE_LIST_2( T2, T3)>
+#define TYPE_LIST_4(T1, T2, T3, T4 ) ::utilspp::tl::TypeList<T1, TYPE_LIST_3( T2, T3, T4)>
+#define TYPE_LIST_5(T1, T2, T3, T4, T5)			\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_4(T2, T3, T4, T5)>
+#define TYPE_LIST_6(T1, T2, T3, T4, T5, T6)			\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_5(T2, T3, T4, T5, T6)>
+#define TYPE_LIST_7(T1, T2, T3, T4, T5, T6, T7)			\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_6(T2, T3, T4, T5, T6, T7)>
+#define TYPE_LIST_8(T1, T2, T3, T4, T5, T6, T7, T8)			\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_7(T2, T3, T4, T5, T6, T7, T8)>
+#define TYPE_LIST_9(T1, T2, T3, T4, T5, T6, T7, T8, T9)		\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_8(T2, T3, T4, T5, T6, T7, T8, T9)>
+#define TYPE_LIST_10(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)		\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_9(T2, T3, T4, T5, T6, T7, T8, T9, T10)>
+#define TYPE_LIST_11(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)	\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_10(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)>
+#define TYPE_LIST_12(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)	\
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_11(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)>
+#define TYPE_LIST_13(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) \
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_12(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)>
+#define TYPE_LIST_14(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) \
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_13(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)>
+#define TYPE_LIST_15(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) \
+  ::utilspp::tl::TypeList<T1, TYPE_LIST_14(T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)>
+
+
+namespace utilspp
+{
+  namespace tl
+  {
+    template<class T, class U>
+    struct TypeList
+    {
+      typedef T head;
+      typedef U tail;
+    };
+
+    //Calculating length of TypeLists
+    template<class TList> 
+    struct length;
+
+    template<> 
+    struct length<NullType>
+    {
+      enum { value = 0 };
+    };
+
+    template<class T, class U>
+    struct length<TypeList<T, U> >
+    {
+      enum { value = 1 + length<U>::value };
+    };
+
+    /**
+     * Returns the type at a given position (zero-based)
+     * in TList. If the index is greather than or equal to 
+     * the length of TList, a compile-time error occurs.
+     */
+    template<class TList, unsigned int index>
+    struct TypeAt;
+
+    template<class THead, class TTail>
+    struct TypeAt<TypeList<THead, TTail>, 0>
+    {
+      typedef THead Result;
+    };
+     
+    template<class THead, class TTail, unsigned int i>
+    struct TypeAt<TypeList<THead, TTail>, i>
+    {
+      typedef typename TypeAt<TTail, i - 1>::Result Result;
+    };
+     
+    /**
+     * Returns the type at a given position (zero-based)
+     * in TList. If the index is greather than or equal to 
+     * the length of TList, OutOfBound template class is 
+     * returned.
+     */
+    template<class TList, unsigned int index, class OutOfBound = utilspp::NullType>
+    struct TypeAtNonStrict;
+
+    template<class THead, class TTail, class OutOfBound>
+    struct TypeAtNonStrict<TypeList<THead, TTail>, 0, OutOfBound>
+    {
+      typedef THead Result;
+    };
+     
+    template<class THead, class TTail, unsigned int i, class OutOfBound>
+    struct TypeAtNonStrict<TypeList<THead, TTail>, i, OutOfBound>
+    {
+      typedef typename TypeAtNonStrict<TTail, i - 1>::Result Result;
+    };
+
+    template<unsigned int i, class OutOfBound>
+    struct TypeAtNonStrict<utilspp::NullType, i , OutOfBound>
+    {
+      typedef OutOfBound Result;
+    };
+
+
+    //Searching TypeLists
+    template<class TList, class T>
+    struct IndexOf;
+
+    template<class T>
+    struct IndexOf<NullType, T>
+    {
+      enum { value = -1 };
+    };
+
+    template<class TTail, class T>
+    struct IndexOf<TypeList<T, TTail>, T>
+    {
+      enum { value = 0 };
+    };
+
+    template<class THead, class TTail, class T>
+    struct IndexOf<TypeList<THead, TTail>, T>
+    {
+    private:
+      enum { temp = IndexOf<TTail, T>::value };
+
+    public:
+      enum { value = temp == -1 ? -1 : 1 + temp };
+    };
+
+    //Appending to TypeLists
+    template<class TList, class T> 
+    struct append;
+
+    template <> 
+    struct append<NullType, NullType>
+    {
+      typedef NullType Result;
+    };
+
+    template<class T> 
+    struct append<NullType, T>
+    {
+      typedef TYPE_LIST_1(T) Result;
+    };
+
+    template<class THead, class TTail>
+    struct append<NullType, TypeList<THead, TTail> >
+    {
+      typedef TypeList<THead, TTail> Result;
+    };
+
+    template <class THead, class TTail, class T>
+    struct append<TypeList<THead, TTail>, T>
+    {
+      typedef TypeList<THead, typename append<TTail, T>::Result>
+      Result;
+    };
+
+    //Erasing a type from a TypeList
+    template<class TList, class T> 
+    struct erase;
+        
+    template<class T>
+    struct erase<NullType, T>
+    {
+      typedef NullType Result;
+    };
+        
+    template<class T, class TTail>
+    struct erase<TypeList<T, TTail>, T>
+    {
+      typedef TTail Result;
+    };
+        
+    template<class THead, class TTail, class T>
+    struct erase<TypeList<THead, TTail>, T>
+    {
+      typedef TypeList<THead, typename erase<TTail, T>::Result>
+      Result;
+    };
+  }
+}      
+
+
+#endif
+

+ 869 - 0
thirdparty/curlpp/include/utilspp/TypeTrait.hpp

@@ -0,0 +1,869 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_TYPETRAIT_HPP
+#define UTILSPP_TYPETRAIT_HPP
+
+#include "NullType.hpp"
+
+namespace utilspp
+{
+  template<typename T>
+  class TypeTrait
+  {
+  private:
+    template<typename U>
+    struct unreference
+    {
+      typedef U type;
+    };
+
+    template<typename U>
+    struct unreference<U &>
+    {
+      typedef U type;
+    };
+
+    template<typename U>
+    struct unconst
+    {
+      typedef U type;
+    };
+
+    template<typename U>
+    struct unconst<const U>
+    {
+      typedef U type;
+    };
+
+  public:
+    typedef typename unreference<T>::type NonReference;
+    typedef typename unconst<T>::type NonConst;
+    typedef typename unconst<typename unreference<T>::type>::type NonParam;
+  };
+
+  template<class T>
+  struct PointerOnMemberFunction
+  {
+    typedef utilspp::NullType ClassType;
+    typedef utilspp::NullType ReturnType;
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template<typename V, typename W>
+  struct PointerOnMemberFunction<W(V::*)()>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template<typename V, typename W, typename X>
+  struct PointerOnMemberFunction<W(V::*)(X)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_1(X) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y>
+  struct PointerOnMemberFunction<W(V::*)(X, Y)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_2(X, Y) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(X, Y, Z) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_4(X, Y, Z, A) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X ParamType;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_5(X, Y, Z, A, B) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_6(X, Y, Z, A, B, C) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_7(X, Y, Z, A, B, C, D) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_8(X, Y, Z, A, B, C, D, E) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_9(X, Y, Z, A, B, C, D, E, F) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_10(X, Y, Z, A, B, C, D, E, F, G) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_11(X, Y, Z, A, B, C, D, E, F, G, H) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_12(X, Y, Z, A, B, C, D, E, F, G, H, I) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_13(X, Y, Z, A, B, C, D, E, F, G, H, I, J) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef K Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_14(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K, typename L>
+  struct PointerOnMemberFunction<W(V::*)(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L)>
+  {
+    typedef V ClassType;
+    typedef W ReturnType;
+    typedef X Param1Type;
+    typedef Y Param2Type;
+    typedef Z Param3Type;
+    typedef A Param4Type;
+    typedef B Param5Type;
+    typedef C Param6Type;
+    typedef D Param7Type;
+    typedef E Param8Type;
+    typedef F Param9Type;
+    typedef G Param10Type;
+    typedef H Param11Type;
+    typedef I Param12Type;
+    typedef J Param13Type;
+    typedef K Param14Type;
+    typedef L Param15Type;
+
+    typedef TYPE_LIST_15(X, Y, Z, A, B, C, D, E, F, G, H, I, J, K, L) ParamList;
+  };
+
+  template<typename T>
+  struct PointerOnFunction
+  {
+    typedef utilspp::NullType ReturnType;
+
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef utilspp::NullType ParamList;
+  };
+
+  template<typename V>
+  struct PointerOnFunction<V(*)()>
+  {
+    typedef V ReturnType;
+    typedef utilspp::NullType Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+ 
+    typedef utilspp::NullType ParamList;
+ };
+
+  template<typename V, typename W>
+  struct PointerOnFunction<V(*)(W)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef utilspp::NullType Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_1(W) ParamList;
+  };
+
+  template<typename V, typename W, typename X>
+  struct PointerOnFunction<V(*)(W, X)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef utilspp::NullType Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_2(W, X) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y>
+  struct PointerOnFunction<V(*)(W, X, Y)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef utilspp::NullType Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_3(W, X, Y) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z>
+  struct PointerOnFunction<V(*)(W, X, Y, Z)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef utilspp::NullType Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+    
+    typedef TYPE_LIST_4(W, X, Y, Z) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef utilspp::NullType Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_5(W, X, Y, Z, A) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef utilspp::NullType Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_6(W, X, Y, Z, A, B) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef utilspp::NullType Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_7(W, X, Y, Z, A, B, C) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef utilspp::NullType Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_8(W, X, Y, Z, A, B, C, D) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef utilspp::NullType Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_9(W, X, Y, Z, A, B, C, D, E) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef utilspp::NullType Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_10(W, X, Y, Z, A, B, C, D, E, F) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F, G)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef utilspp::NullType Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_11(W, X, Y, Z, A, B, C, D, E, F, G) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef utilspp::NullType Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_12(W, X, Y, Z, A, B, C, D, E, F, G, H) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef utilspp::NullType Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_13(W, X, Y, Z, A, B, C, D, E, F, G, H, I ) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef J Param14Type;
+    typedef utilspp::NullType Param15Type;
+
+    typedef TYPE_LIST_14(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J ) ParamList;
+  };
+
+  template<typename V, typename W, typename X, typename Y, typename Z, typename A, typename B, typename C, typename D, typename E, typename F, typename G, typename H, typename I, typename J, typename K>
+  struct PointerOnFunction<V(*)(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K)>
+  {
+    typedef V ReturnType;
+    typedef W Param1Type;
+    typedef X Param2Type;
+    typedef Y Param3Type;
+    typedef Z Param4Type;
+    typedef A Param5Type;
+    typedef B Param6Type;
+    typedef C Param7Type;
+    typedef D Param8Type;
+    typedef E Param9Type;
+    typedef F Param10Type;
+    typedef G Param11Type;
+    typedef H Param12Type;
+    typedef I Param13Type;
+    typedef J Param14Type;
+    typedef K Param15Type;
+
+    typedef TYPE_LIST_15(W, X, Y, Z, A, B, C, D, E, F, G, H, I, J, K) ParamList;
+  };
+
+}
+
+#endif
+

+ 96 - 0
thirdparty/curlpp/include/utilspp/clone_ptr.hpp

@@ -0,0 +1,96 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef UTILSPP_CLONEPTR_HPP
+#define UTILSPP_CLONEPTR_HPP
+
+#include <cassert>
+#include <stdexcept>
+
+namespace utilspp
+{
+  // This class is meant to manage a pointer. This class will 
+  // ensure that when we go out of scope, it will delete the 
+  // pointer.
+  // 
+  // However, contrary to the std::unique_ptr, instead of 
+  // transfering the ownership on copy construction, it clones 
+  // the content. This means that we can have STL containers
+  // that uses that class for managing the pointers.
+  //
+  // So, it means that the class we stores, needs a "clone"
+  // member.
+  template <typename T> 
+  class clone_ptr
+  {
+  public:
+    clone_ptr() : value_(NULL) {}
+
+    // This constructor takes ownership of the pointer.
+    //
+    // Note that it isn't explicit. This might be a 
+    // problem.
+    clone_ptr(T * value) : value_(value) {}
+
+    ~clone_ptr() {if (value_) delete value_;}
+    
+    // This is the default constructor that takes his 
+    // value from cloning the content of the other 
+    // clone_ptr.
+    clone_ptr(const clone_ptr & other)
+    {value_ = other->clone();}
+ 
+    T * operator->() 
+    {
+      if (value_)
+	return value_;
+      
+      throw std::runtime_error("using a null clone_ptr");
+    }
+
+    const T * operator->() const
+    {
+      assert(value_);
+
+      return value_;
+    }
+
+    T * get() { return value_; }
+    const T * get() const { return value_; }
+    
+    // This just releases the pointer. It means that the
+    // pointer is no longer owned by the smart pointer.
+    T * release() 
+    { 
+      T * r = value_; 
+      value_ = NULL;
+
+      return r;
+    }
+
+  private:
+    T * value_;
+  };
+}
+
+#endif

+ 122 - 0
thirdparty/curlpp/src/curlpp/Easy.cpp

@@ -0,0 +1,122 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "curlpp/Easy.hpp"
+#include "curlpp/Options.hpp"
+
+
+#include <memory>
+
+
+curlpp::Easy::Easy()
+: mCurl(new internal::CurlHandle())
+{}
+
+
+curlpp::Easy::Easy(std::unique_ptr<internal::CurlHandle> handle)
+    : mCurl(std::move(handle))
+{}
+
+
+curlpp::Easy::~Easy()
+{}
+
+
+void 
+curlpp::Easy::perform()
+{
+	mCurl->perform();
+}
+
+
+CURL *
+curlpp::Easy::getHandle() const
+{
+	return mCurl->getHandle();
+}
+
+
+void
+curlpp::Easy::setOpt(const OptionBase & option)
+{
+	setOpt(option.clone());    
+}
+
+
+void
+curlpp::Easy::setOpt(std::unique_ptr<OptionBase> option)
+{
+	option->updateHandleToMe(mCurl.get());
+	mOptions.setOpt(option.release());    
+}
+
+
+void
+curlpp::Easy::setOpt(OptionBase * option)
+{
+	option->updateHandleToMe(mCurl.get());
+	mOptions.setOpt(option);    
+}
+
+
+void
+curlpp::Easy::getOpt(OptionBase * option) const
+{
+	mOptions.getOpt(option);
+}
+
+
+void
+curlpp::Easy::getOpt(OptionBase & option) const
+{
+	mOptions.getOpt(&option);
+}
+
+
+void
+curlpp::Easy::setOpt(const internal::OptionList & options)
+{
+	mOptions.setOpt(options);    
+}
+
+
+void
+curlpp::Easy::reset ()
+{
+	mCurl->reset();
+	mOptions.setOpt(internal::OptionList());
+}
+
+
+std::ostream & operator<<(std::ostream & stream, const curlpp::Easy & request)
+{
+  // Quick clone that doesn't copy options, only the curl handle.
+  curlpp::Easy r(request.getCurlHandle().clone());
+  r.setOpt(new curlpp::options::WriteStream(& stream));
+  r.perform();
+
+  return stream;
+}
+
+

+ 146 - 0
thirdparty/curlpp/src/curlpp/Exception.cpp

@@ -0,0 +1,146 @@
+/*
+*    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include "curlpp/Exception.hpp"
+
+curlpp::RuntimeError::~RuntimeError() throw()
+{}
+
+curlpp::RuntimeError::RuntimeError(const char * reason)
+  : std::runtime_error(std::string(reason))
+{}
+
+curlpp::RuntimeError::RuntimeError(const std::string & reason)
+  : std::runtime_error(reason)
+{}
+
+curlpp::LogicError::~LogicError() throw()
+{}
+
+curlpp::LogicError::LogicError(const char * reason)
+    : std::logic_error(std::string(reason))
+{}
+
+curlpp::LogicError::LogicError(const std::string & reason)
+    : std::logic_error(reason)
+{}
+
+curlpp::LibcurlRuntimeError::LibcurlRuntimeError(const std::string & reason, CURLcode code)
+    : curlpp::RuntimeError(reason)
+    , mCode(code)
+{}
+
+curlpp::LibcurlRuntimeError::LibcurlRuntimeError(const char * reason, CURLcode code)
+    : curlpp::RuntimeError(reason)
+    , mCode(code)
+{}
+
+CURLcode curlpp::LibcurlRuntimeError::whatCode() const throw()
+{
+   return mCode;
+}
+
+curlpp::LibcurlLogicError::LibcurlLogicError(const std::string & reason, CURLcode code)
+    : curlpp::LogicError(reason)
+    , mCode(code)
+{}
+
+curlpp::LibcurlLogicError::LibcurlLogicError(const char * reason, CURLcode code)
+    : curlpp::LogicError(reason)
+    , mCode(code)
+{}
+
+curlpp::UnsetOption::UnsetOption(const std::string & reason)
+    : curlpp::RuntimeError(reason)
+{};
+
+curlpp::UnsetOption::UnsetOption(const char * reason)
+    : curlpp::RuntimeError(reason)
+{};
+
+curlpp::NotAvailable::NotAvailable()
+    : curlpp::LogicError("This option was not available at compile time.")
+{};
+
+curlpp::UnknowException::UnknowException() 
+  : curlpp::RuntimeError("An unknown exception was thrown within a callback")
+{}
+
+CURLcode curlpp::LibcurlLogicError::whatCode() const throw()
+{
+   return mCode;
+}
+
+curlpp::CallbackExceptionBase::CallbackExceptionBase() 
+  : RuntimeError("Exception thrown within a callback")
+{}
+    
+curlpp::CallbackExceptionBase::CallbackExceptionBase(const CallbackExceptionBase & other) 
+  : RuntimeError(other)
+{}
+
+
+void curlpp::libcurlRuntimeAssert(const std::string & reason, CURLcode code)
+{
+  curlpp::libcurlRuntimeAssert(reason.c_str(), code);
+}
+
+void curlpp::libcurlRuntimeAssert(const char * reason, CURLcode code)
+{
+  if (code != CURLE_OK)
+    throw curlpp::LibcurlRuntimeError(reason, code);
+}
+
+void curlpp::libcurlLogicAssert(const std::string & reason, CURLcode code)
+{
+  libcurlLogicAssert(reason.c_str(), code);
+}
+
+void curlpp::libcurlLogicAssert(const char * reason, CURLcode code)
+{
+  if (code != CURLE_OK)
+    throw curlpp::LibcurlLogicError(reason, code);
+}
+
+void curlpp::runtimeAssert(const std::string & reason, bool isOkay)
+{
+  runtimeAssert(reason.c_str(), isOkay);
+}
+
+void curlpp::runtimeAssert(const char * reason, bool isOkay)
+{
+  if (!isOkay)
+    throw curlpp::RuntimeError(reason);
+}
+
+void curlpp::logicAssert(const std::string & reason, bool isOkay)
+{
+  logicAssert(reason.c_str(), isOkay);
+}
+
+void curlpp::logicAssert(const char * reason, bool isOkay)
+{
+   if (!isOkay)
+     throw curlpp::LogicError(reason);
+}
+

+ 232 - 0
thirdparty/curlpp/src/curlpp/Form.cpp

@@ -0,0 +1,232 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "curlpp/Form.hpp"
+
+#include <iostream>
+
+curlpp::HttpPost::HttpPost(const Forms & posts)
+  : mFirst(NULL)
+  , mLast(NULL)
+{
+  Forms::const_iterator pos;
+  for(pos = posts.begin(); pos != posts.end(); pos++) 
+  {
+    mForms.push_back(*pos);
+    mForms.back()->add(&mFirst, &mLast);
+  } 
+}
+
+curlpp::HttpPost::HttpPost()
+  : mFirst(NULL)
+  , mLast(NULL)
+{}
+
+curlpp::HttpPost::~HttpPost()
+{
+  clear();
+}
+
+
+curlpp::HttpPost &
+curlpp::HttpPost::operator=(const Forms & posts)
+{
+  clear();
+
+  Forms::const_iterator pos;
+  for(pos = posts.begin(); pos != posts.end(); pos++) 
+  {
+    mForms.push_back(*pos);
+    mForms.back()->add(&mFirst, &mLast);
+  } 
+
+  return (*this);
+}
+
+::curl_httppost *
+curlpp::HttpPost::cHttpPost() const
+{
+  return mFirst;
+}
+
+void
+curlpp::HttpPost::clear()
+{
+  if(mFirst != NULL) {
+    ::curl_formfree(mFirst);
+    mFirst = NULL;
+    mLast = NULL;
+  }
+  
+  mForms.clear();
+}
+
+curlpp::Forms curlpp::HttpPost::getList()
+{
+  //I'm not sure cloning is absolutely necessary.
+  Forms newForm;
+
+  Forms::const_iterator pos;
+  for(pos = mForms.begin(); pos != mForms.end(); pos++) 
+    newForm.push_back(*pos);
+
+  return newForm;
+}
+
+curlpp::FormPart::FormPart(const char * name)
+  : mName(name)
+{}
+
+curlpp::FormPart::~FormPart()
+{}
+
+curlpp::FormPart::FormPart(const std::string & name)
+  : mName(name)
+{}
+
+curlpp::FormParts::File::File(const char * name, const char * filename)
+  : FormPart(name)
+  , mFilename(filename)
+{}
+
+curlpp::FormParts::File::~File()
+{}
+
+curlpp::FormParts::File::File(const char * name, const char * filename, const char * contentType)
+  : FormPart(name)
+  , mFilename(filename)
+  , mContentType(contentType)
+{}
+
+curlpp::FormParts::File::File(const std::string & name, 
+			      const std::string & filename)
+  : FormPart(name)
+  , mFilename(filename)
+{}
+  
+curlpp::FormParts::File::File(const std::string & name, 
+			      const std::string & filename,
+			      const std::string & contentType)
+  : FormPart(name)
+  , mFilename(filename)
+  , mContentType(contentType)
+{}
+
+curlpp::FormParts::File *
+curlpp::FormParts::File::clone() const
+{
+   return new curlpp::FormParts::File(* this);
+}
+
+void
+curlpp::FormParts::File::add(::curl_httppost ** first, 
+			     ::curl_httppost ** last)
+{
+  // One instance = One curl_httppost, so we don't
+  // need to duplicate the memory.
+  if(mContentType.empty()) {
+    curl_formadd(first, 
+		 last, 
+		 CURLFORM_PTRNAME,
+		 mName.c_str(), 
+		 CURLFORM_FILE,
+		 mFilename.c_str(),
+		 CURLFORM_END );
+  }
+  else {
+    curl_formadd(first, 
+		 last, 
+		 CURLFORM_PTRNAME, 
+		 mName.c_str(), 
+		 CURLFORM_FILE,
+		 mFilename.c_str(),
+		 CURLFORM_CONTENTTYPE,
+		 mContentType.c_str(),
+		 CURLFORM_END);
+  }
+}
+
+
+curlpp::FormParts::Content::Content(const char * name, 
+				    const char * content)
+  : FormPart(name)
+  , mContent(content)
+{}
+
+curlpp::FormParts::Content::~Content()
+{}
+
+curlpp::FormParts::Content::Content(const char * name, 
+				    const char * content, const char * contentType)
+  : FormPart(name)
+  , mContent(content)
+  , mContentType(contentType)
+{}
+
+curlpp::FormParts::Content::Content(const std::string & name, 
+				    const std::string & content)
+  : FormPart(name)
+  , mContent(content)
+{}
+
+curlpp::FormParts::Content::Content(const std::string & name, 
+				    const std::string & content,
+				    const std::string & contentType)
+  : FormPart(name)
+  , mContent(content)
+  , mContentType(contentType)
+{}
+
+curlpp::FormParts::Content *
+curlpp::FormParts::Content::clone() const
+{
+   return new curlpp::FormParts::Content(*this);
+}
+
+void
+curlpp::FormParts::Content::add(::curl_httppost ** first, 
+				::curl_httppost ** last)
+{
+  // We uses options that will copy internally the string (c_str),
+  // so we don't need to worry about the memory.
+  if(mContentType.empty()) {
+    curl_formadd(first, 
+		 last, 
+		 CURLFORM_PTRNAME, 
+		 mName.c_str(), 
+		 CURLFORM_PTRCONTENTS,
+		 mContent.c_str(),
+		 CURLFORM_END);
+  }
+  else {
+    curl_formadd(first, 
+		 last, 
+		 CURLFORM_PTRNAME, 
+		 mName.c_str(), 
+		 CURLFORM_PTRCONTENTS,
+		 mContent.c_str(),
+		 CURLFORM_CONTENTTYPE,
+		 mContentType.c_str(),
+		 CURLFORM_END );
+  }
+}

+ 60 - 0
thirdparty/curlpp/src/curlpp/Info.cpp

@@ -0,0 +1,60 @@
+#include "curlpp/internal/SList.hpp"
+
+#include "curlpp/Info.hpp"
+
+#include <string>
+#include <list>
+
+
+namespace curlpp 
+{
+
+
+template<>
+void
+InfoTypeConverter<std::string>::get(const curlpp::Easy & handle, 
+				      CURLINFO info,
+				      std::string & value)
+{
+  char * tmp;
+  InfoGetter::get(handle, info, tmp);
+  value = tmp;
+}
+
+
+template<>
+void 
+InfoTypeConverter<std::list<std::string> >::get(const curlpp::Easy & handle,
+						   CURLINFO info,
+						   std::list<std::string> & value)
+{ 
+  curl_slist * tmpList = NULL;
+  InfoGetter::get(handle, info, tmpList);
+	internal::SList slist(tmpList);
+  value = slist.list();
+}
+
+
+template<>
+void
+InfoTypeConverter<long>::get(const curlpp::Easy & handle, 
+			       CURLINFO info,
+			       long & value)
+{
+  InfoGetter::get(handle, info, value);
+}
+
+
+template<>
+void
+InfoTypeConverter<double>::get(const curlpp::Easy & handle, 
+				 CURLINFO info,
+				 double & value)
+{
+  curl_off_t tmp;
+  InfoGetter::get(handle, info, tmp);
+  value = (double)tmp;
+}
+
+
+} // namespace curlpp

+ 115 - 0
thirdparty/curlpp/src/curlpp/Multi.cpp

@@ -0,0 +1,115 @@
+/*
+ *    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "curlpp/Easy.hpp"
+#include "curlpp/Exception.hpp"
+#include "curlpp/Multi.hpp"
+
+
+curlpp::Multi::Multi()
+{
+  mMultiHandle = curl_multi_init();
+  runtimeAssert("Error when trying to curl_multi_init() a handle", mMultiHandle != NULL);
+}
+
+curlpp::Multi::~Multi()
+{
+  // remove all the remaining easy handles
+  while (!mHandles.empty()) 
+  {
+    std::map<CURL *, const curlpp::Easy *>::iterator handle = mHandles.begin();
+    curl_multi_remove_handle(mMultiHandle, handle->second->getHandle());
+    mHandles.erase(handle);
+  }
+
+  curl_multi_cleanup(mMultiHandle);
+}
+
+void
+curlpp::Multi::add(const curlpp::Easy * handle)
+{
+  CURLMcode code = curl_multi_add_handle(mMultiHandle, handle->getHandle());
+  if(code != CURLM_CALL_MULTI_PERFORM) {
+    if(code != CURLM_OK) {
+      throw curlpp::RuntimeError(curl_multi_strerror(code));
+    }
+  }
+  mHandles.insert(std::make_pair(handle->getHandle(),handle));
+}
+
+void
+curlpp::Multi::remove(const curlpp::Easy * handle)
+{
+  CURLMcode code = curl_multi_remove_handle(mMultiHandle, handle->getHandle());
+  if(code != CURLM_CALL_MULTI_PERFORM) {
+    if(code != CURLM_OK) {
+      throw curlpp::RuntimeError(curl_multi_strerror(code));
+    }
+  }
+  mHandles.erase(handle->getHandle());
+}
+
+bool
+curlpp::Multi::perform(int * nbHandles)
+{
+  CURLMcode code = curl_multi_perform(mMultiHandle, nbHandles);
+  if(code == CURLM_CALL_MULTI_PERFORM) {
+    return false;
+  }
+
+  if(code != CURLM_OK) {
+    throw curlpp::RuntimeError(curl_multi_strerror(code));
+  }
+
+  return true;
+}
+
+void
+curlpp::Multi::fdset(fd_set * read, fd_set * write, fd_set * exc, int * max)
+{
+  CURLMcode code = curl_multi_fdset(mMultiHandle, read, write, exc, max);
+  if(code != CURLM_CALL_MULTI_PERFORM) {
+    if(code != CURLM_OK) {
+      throw curlpp::RuntimeError(curl_multi_strerror(code));
+    }
+  }
+}
+
+curlpp::Multi::Msgs
+curlpp::Multi::info()
+{
+  CURLMsg * msg; /* for picking up messages with the transfer status */
+  
+  int msgsInQueue;
+  Msgs result;
+  while ((msg = curl_multi_info_read(mMultiHandle, &msgsInQueue)) != NULL) {
+    Multi::Info inf;
+    inf.msg = msg->msg;
+    inf.code = msg->data.result;
+    result.push_back(std::make_pair(mHandles[msg->easy_handle],inf));
+  }
+
+  return result;
+}
+

+ 44 - 0
thirdparty/curlpp/src/curlpp/OptionBase.cpp

@@ -0,0 +1,44 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "curlpp/OptionBase.hpp"
+
+curlpp::OptionBase::OptionBase(CURLoption option)
+  : mOption(option)
+{};
+
+curlpp::OptionBase::~OptionBase()
+{};
+
+bool curlpp::OptionBase::operator<(const curlpp::OptionBase & rhs) const 
+{
+   return mOption < rhs.mOption;
+}
+
+CURLoption curlpp::OptionBase::getOption() const 
+{
+   return mOption;
+}
+
+

+ 36 - 0
thirdparty/curlpp/src/curlpp/Options.cpp

@@ -0,0 +1,36 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+#include "curlpp/Options.hpp"
+#include "curlpp/Easy.hpp"
+
+std::ostream & operator<<(std::ostream & stream, const curlpp::options::Url & url)
+{
+  curlpp::Easy request;
+  request.setOpt(url);
+
+  stream << request;
+
+  return stream;
+}

+ 121 - 0
thirdparty/curlpp/src/curlpp/cURLpp.cpp

@@ -0,0 +1,121 @@
+#include "curlpp/cURLpp.hpp"
+#include "curlpp/Exception.hpp"
+
+#include <cstdlib>
+
+
+namespace 
+{
+
+	
+  struct libcURLInstance
+  {
+    libcURLInstance();
+
+    ~libcURLInstance()
+      { curlpp::terminate(); }
+  };
+}
+
+
+void curlpp::initialize(long flags)
+{
+  CURLcode code;
+  code = curl_global_init(flags);
+  libcurlRuntimeAssert("cannot initialize curlpp", code);
+}
+
+
+void curlpp::terminate()
+{
+  curl_global_cleanup();
+}
+
+
+curlpp::Cleanup::Cleanup()
+{
+  curlpp::initialize();
+}
+
+
+curlpp::Cleanup::~Cleanup()
+{}
+
+
+std::string 
+curlpp::escape(const std::string & url)
+{
+   std::string buffer;
+   char* p = curl_escape(url.c_str(), (int)url.size());
+   if(!p) {
+      throw std::runtime_error("unable to escape the string"); //we got an error
+   }
+   else {
+     buffer = p;
+     curl_free(p);
+   }
+   return buffer;
+}
+
+
+std::string
+curlpp::unescape(const std::string & url)
+{
+   std::string buffer;
+   char* p = curl_unescape(url.c_str(), (int)url.size());
+   if (!p)
+   {
+      throw RuntimeError("unable to escape the string"); //we got an error
+   }
+   else
+   {
+      buffer = p;
+      curl_free(p);
+   }
+   return buffer;
+}
+
+
+std::string
+curlpp::getenv(const std::string & name)
+{
+   std::string buffer;
+   char* p = curl_getenv(name.c_str());
+   if (!p)
+   {
+      throw RuntimeError("unable to get the environnement string"); //we got an error
+   }
+   else
+   {
+      buffer = p;
+      free(p);
+   }
+   return buffer;
+}
+
+
+std::string
+curlpp::libcurlVersion()
+{
+  char* p = curl_version();
+   if (!p)
+   {
+      throw RuntimeError("unable to get the libcurl version"); //we got an error
+   }
+      
+   return std::string(p);
+}
+
+
+time_t 
+curlpp::getdate(const std::string & date, time_t * now)
+{
+  time_t return_value = curl_getdate(date.c_str(), now);
+   if(!return_value)
+   {
+      throw RuntimeError("unable to get the date");
+   }
+
+   return return_value;
+}
+

+ 345 - 0
thirdparty/curlpp/src/curlpp/internal/CurlHandle.cpp

@@ -0,0 +1,345 @@
+/*
+*    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include "curlpp/internal/CurlHandle.hpp"
+
+#include "curlpp/cURLpp.hpp"
+#include "curlpp/Exception.hpp"
+
+#include <string>
+#include <iostream>
+#include <memory>
+#include <cstring>
+
+
+using std::memset;
+using std::unique_ptr;
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+void CurlHandle::perform()
+{
+	CURLcode code;
+
+	code = curl_easy_perform(mCurl);
+	throwException();
+	libcurlRuntimeAssert(mErrorBuffer, code); //if we got an error
+}
+
+
+void CurlHandle::reset()
+{
+	curl_easy_reset(mCurl);
+	memset(mErrorBuffer,0,CURL_ERROR_SIZE + 1);
+	errorBuffer(mErrorBuffer);
+}
+
+
+CURL * CurlHandle::getHandle() const
+{
+	return mCurl;
+}
+
+
+CurlHandle::CurlHandle() 
+	: mException(nullptr)
+{
+	memset(mErrorBuffer,0,CURL_ERROR_SIZE + 1);
+	mCurl = curl_easy_init();
+	runtimeAssert("Error when trying to curl_easy_init() a handle", mCurl != nullptr);
+	errorBuffer(mErrorBuffer);
+}
+
+
+CurlHandle::CurlHandle(CURL * handle) 
+	: mException(nullptr)
+{
+	memset(mErrorBuffer,0,CURL_ERROR_SIZE + 1);
+	mCurl = handle;
+	runtimeAssert("Error when trying to curl_easy_init() a handle", mCurl != nullptr);
+	errorBuffer(mErrorBuffer);
+}
+
+
+std::unique_ptr<CurlHandle> 
+CurlHandle::clone() const
+{
+	CURL * cHandle = curl_easy_duphandle(mCurl);
+	runtimeAssert("Error when trying to curl_easy_duphandle() a handle", cHandle != nullptr);
+	unique_ptr<CurlHandle> newHandle(new CurlHandle(cHandle));
+
+	return newHandle;
+}
+
+
+CurlHandle::~CurlHandle()
+{
+	if (mException)
+	{
+		delete mException;
+		mException = nullptr;
+	}
+	curl_easy_cleanup(mCurl);
+}
+
+void
+CurlHandle::setException(curlpp::CallbackExceptionBase * e) 
+{
+	if(mException)
+	{
+		delete mException;
+	}
+
+	mException = e;
+}
+
+void
+CurlHandle::errorBuffer(char * buffer)
+{
+	option(CURLOPT_ERRORBUFFER, (void *)buffer);
+}
+
+
+template<typename FunctorType>
+typename FunctorType::ResultType 
+CurlHandle::execute(FunctorType functor, typename FunctorType::ParamList params)
+{
+	if (!functor)
+	{
+	 	setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return functor(params);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+size_t 
+CurlHandle::executeWriteFunctor(char * buffer, size_t size, size_t nitems)
+{
+	if (!mWriteFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mWriteFunctor(buffer, size, nitems);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+size_t 
+CurlHandle::executeHeaderFunctor(char * buffer, size_t size, size_t nitems)
+{
+	if (!mHeaderFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mHeaderFunctor(buffer, size, nitems);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+size_t 
+CurlHandle::executeReadFunctor(char * buffer, size_t size, size_t nitems)
+{
+	if(!mReadFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mReadFunctor(buffer, size, nitems);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+int
+CurlHandle::executeProgressFunctor(double dltotal, 
+																	 double dlnow, 
+																	 double ultotal, 
+																	 double ulnow)
+{
+	if (!mProgressFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mProgressFunctor(dltotal, dlnow, ultotal, ulnow);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+int 
+CurlHandle::executeDebugFunctor(curl_infotype info, char * buffer, size_t size)
+{
+	if (!mDebugFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mDebugFunctor(info, buffer, size);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+CURLcode 
+CurlHandle::executeSslCtxFunctor(void * ssl_ctx)
+{
+	if (!mSslFunctor)
+	{
+		setException(new CallbackException<curlpp::LogicError>(curlpp::LogicError("Null write functor")));
+		return CURLE_ABORTED_BY_CALLBACK;
+	}
+
+	try
+	{
+		return mSslFunctor(ssl_ctx);
+	}
+
+	catch(curlpp::CallbackExceptionBase * e)
+	{
+		setException(e);
+	}
+
+	catch(...)
+	{
+		setException(new CallbackException<curlpp::UnknowException>(curlpp::UnknowException()));
+	}
+
+	return CURLE_ABORTED_BY_CALLBACK;
+}
+
+
+void
+CurlHandle::throwException()
+{
+  if(mException) 
+  {
+    std::unique_ptr< cURLpp::CallbackExceptionBase > e(mException);
+    mException = nullptr;
+    e->throwMe();
+  }
+}
+
+
+} // namespace internal
+
+
+} // namespace curlpp

+ 112 - 0
thirdparty/curlpp/src/curlpp/internal/OptionList.cpp

@@ -0,0 +1,112 @@
+/*
+ *    Copyright (c) <2002-2006> <Jean-Philippe Barrette-LaPierre>
+ *    
+ *    Permission is hereby granted, free of charge, to any person obtaining
+ *    a copy of this software and associated documentation files 
+ *    (curlpp), to deal in the Software without restriction, 
+ *    including without limitation the rights to use, copy, modify, merge,
+ *    publish, distribute, sublicense, and/or sell copies of the Software,
+ *    and to permit persons to whom the Software is furnished to do so, 
+ *    subject to the following conditions:
+ *    
+ *    The above copyright notice and this permission notice shall be included
+ *    in all copies or substantial portions of the Software.
+ *    
+ *    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 AND NONINFRINGEMENT. 
+ *    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+ *    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+ *    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ *    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "curlpp/internal/OptionList.hpp"
+
+#include <iostream>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+OptionList::OptionList()
+{}
+
+OptionList::OptionList(const OptionList & rhs)
+{
+   insert(rhs.mOptions);
+}
+
+OptionList::~OptionList()
+{
+  mapType::iterator pos = mOptions.begin();
+  while (pos != mOptions.end()) {
+    delete (*pos).second;
+    pos++;
+  }
+}
+
+
+void OptionList::setOpt(curlpp::OptionBase * option)
+{
+   mapType::iterator pos = mOptions.find(option->getOption());
+   if(pos != mOptions.end())
+   {
+      delete (*pos).second;
+      mOptions.erase(pos);	
+   }
+   mOptions.insert(std::make_pair(option->getOption(), option));
+}
+
+
+void OptionList::setOpt(const OptionList & options)
+{
+  for(mapType::const_iterator pos = options.mOptions.begin();
+      pos != options.mOptions.end();
+      pos++)
+   {
+     setOpt(pos->second->clone());
+   }  
+}
+
+
+void OptionList::setOpt(const curlpp::OptionBase & option)
+{
+   setOpt(option.clone());
+}
+
+
+void OptionList::getOpt(curlpp::OptionBase * option) const
+{
+   mapType::const_iterator pos = mOptions.find(option->getOption());
+   if(pos != mOptions.end())
+   {
+      option->updateMeToOption((*(*pos).second));
+   }
+   else
+   {
+      option->clear();
+   }
+}
+
+
+void OptionList::insert(const OptionList::mapType & other)
+{
+    for( mapType::const_iterator pos = other.begin();
+         pos != other.end();
+         pos++)
+   {
+      mOptions.insert(std::make_pair(pos->second->getOption(), pos->second->clone()));
+   }
+}
+
+
+} // namespace curlpp
+
+
+} // namespace internal

+ 296 - 0
thirdparty/curlpp/src/curlpp/internal/OptionSetter.cpp

@@ -0,0 +1,296 @@
+/*
+*    Copyright (c) <2002-2009> <Jean-Philippe Barrette-LaPierre>
+*    
+*    Permission is hereby granted, free of charge, to any person obtaining
+*    a copy of this software and associated documentation files 
+*    (curlpp), to deal in the Software without restriction, 
+*    including without limitation the rights to use, copy, modify, merge,
+*    publish, distribute, sublicense, and/or sell copies of the Software,
+*    and to permit persons to whom the Software is furnished to do so, 
+*    subject to the following conditions:
+*    
+*    The above copyright notice and this permission notice shall be included
+*    in all copies or substantial portions of the Software.
+*    
+*    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 AND NONINFRINGEMENT. 
+*    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
+*    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
+*    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+*    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include "curlpp/internal/CurlHandle.hpp"
+#include "curlpp/internal/OptionSetter.hpp"
+
+#include <string>
+#include <iostream>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+	
+struct Callbacks
+{
+	static size_t 
+	WriteCallback(char * buffer, size_t size, size_t nitems, internal::CurlHandle * handle)
+	{
+		return handle->executeWriteFunctor(buffer, size, nitems);
+	};
+
+
+	static size_t
+	StreamWriteCallback(char * buffer, size_t size, size_t nitems, std::ostream * stream)
+	{
+		size_t realwrote = size * nitems;
+		stream->write(buffer, static_cast<std::streamsize>(realwrote));
+		if(!(*stream))
+			realwrote = 0;
+
+		return realwrote;
+	};
+
+
+	static size_t
+	HeaderCallback(char * buffer, size_t size, size_t nitems, internal::CurlHandle * handle)
+	{
+		return handle->executeHeaderFunctor(buffer, size, nitems);
+	};
+
+
+	static size_t
+	ReadCallback(char * buffer, size_t size, size_t nitems, internal::CurlHandle * handle)
+	{
+		return handle->executeReadFunctor(buffer, size, nitems);
+	};
+
+
+	static size_t
+	StreamReadCallback(char * buffer, size_t size, size_t nitems, std::istream * stream)
+	{
+		stream->read(buffer, static_cast<std::streamsize>(size * nitems));
+		size_t realread = stream->gcount();
+		if(!realread && !(*stream))
+			realread = CURL_READFUNC_ABORT;
+
+		return realread;
+	};
+
+
+	static int
+	ProgressCallback(internal::CurlHandle * handle, 
+											double dltotal, 
+											double dlnow, 
+											double ultotal, 
+											double ulnow)
+	{
+		return handle->executeProgressFunctor(dltotal, dlnow, ultotal, ulnow);
+	};
+
+
+	static int
+	DebugCallback(CURL *,
+									curl_infotype type,
+									char * data,
+									size_t size,
+									internal::CurlHandle * handle)
+	{
+		return handle->executeDebugFunctor(type, data, size);
+	};
+
+
+	static CURLcode 
+	SslCtxCallback(CURL *,
+										void * ssl_ctx,
+										internal::CurlHandle * handle)
+	{
+		return handle->executeSslCtxFunctor(ssl_ctx);
+	};
+
+};
+
+
+void OptionSetter<curlpp::Forms, CURLOPT_HTTPPOST>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_HTTPPOST, value.cHttpPost());
+};
+
+
+void OptionSetter<curlpp::types::WriteFunctionFunctor, CURLOPT_WRITEFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_WRITEFUNCTION, Callbacks::WriteCallback);
+	handle->option(CURLOPT_WRITEDATA, handle);
+	handle->setWriteFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostWriteFunction, CURLOPT_WRITEFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_WRITEFUNCTION, Callbacks::WriteCallback);
+	handle->option(CURLOPT_WRITEDATA, handle);
+	handle->setWriteFunctor(curlpp::types::WriteFunctionFunctor(&value,
+		&curlpp::types::BoostWriteFunction::operator()));
+};
+
+#endif
+
+
+void OptionSetter<FILE *, CURLOPT_WRITEDATA>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_WRITEFUNCTION, (void *)NULL);
+	handle->option(CURLOPT_WRITEDATA, value);
+};
+
+
+void OptionSetter<std::ostream *, CURLOPT_WRITEDATA>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_WRITEFUNCTION, (void *)Callbacks::StreamWriteCallback);
+	handle->option(CURLOPT_WRITEDATA, value);
+};
+
+
+void OptionSetter<curlpp::types::ReadFunctionFunctor, CURLOPT_READFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_READFUNCTION, Callbacks::ReadCallback);
+	handle->option(CURLOPT_READDATA, handle);
+	handle->setReadFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostReadFunction, CURLOPT_READFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_READFUNCTION, Callbacks::ReadCallback);
+	handle->option(CURLOPT_READDATA, handle);
+	handle->setReadFunctor(value);
+};
+
+#endif
+
+
+void OptionSetter<FILE *, CURLOPT_READDATA>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_READFUNCTION, (void *)NULL);
+	handle->option(CURLOPT_READDATA, value);
+};
+
+
+
+void OptionSetter<std::istream *, CURLOPT_READDATA>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_READFUNCTION, (void *)Callbacks::StreamReadCallback);
+	handle->option(CURLOPT_READDATA, value);
+};
+
+
+void OptionSetter<curlpp::types::ProgressFunctionFunctor, CURLOPT_PROGRESSFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_PROGRESSFUNCTION, Callbacks::ProgressCallback);
+	handle->option(CURLOPT_PROGRESSDATA, handle);
+	handle->setProgressFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostProgressFunction, CURLOPT_PROGRESSFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_PROGRESSFUNCTION, Callbacks::ProgressCallback);
+	handle->option(CURLOPT_PROGRESSDATA, handle);
+	handle->setProgressFunctor(value);
+};
+
+#endif
+
+
+void OptionSetter<curlpp::types::WriteFunctionFunctor, CURLOPT_HEADERFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_HEADERFUNCTION, Callbacks::HeaderCallback);
+	handle->option(CURLOPT_HEADERDATA, handle);
+	handle->setHeaderFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostWriteFunction, CURLOPT_HEADERFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_HEADERFUNCTION, Callbacks::HeaderCallback);
+	handle->option(CURLOPT_HEADERDATA, handle);
+	handle->setHeaderFunctor(value);
+};
+
+#endif
+
+
+void OptionSetter<curlpp::types::DebugFunctionFunctor, CURLOPT_DEBUGFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_DEBUGFUNCTION, Callbacks::DebugCallback);
+	handle->option(CURLOPT_DEBUGDATA, handle);
+	handle->setDebugFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostDebugFunction, CURLOPT_DEBUGFUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_DEBUGFUNCTION, Callbacks::DebugCallback);
+	handle->option(CURLOPT_DEBUGDATA, handle);
+	handle->setDebugFunctor(value);
+};
+
+#endif
+
+
+void OptionSetter<curlpp::types::SslCtxFunctionFunctor, CURLOPT_SSL_CTX_FUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_SSL_CTX_FUNCTION, Callbacks::SslCtxCallback);
+	handle->option(CURLOPT_SSL_CTX_DATA, handle);
+	handle->setSslCtxFunctor(value);
+};
+
+
+#ifdef HAVE_BOOST
+
+void OptionSetter<curlpp::types::BoostSslCtxFunction, CURLOPT_SSL_CTX_FUNCTION>
+::setOpt(internal::CurlHandle * handle, ParamType value)
+{
+	handle->option(CURLOPT_SSL_CTX_FUNCTION, Callbacks::SslCtxCallback);
+	handle->option(CURLOPT_SSL_CTX_DATA, handle);
+	handle->setSslCtxFunctor(value);
+};
+
+#endif
+
+
+}// namespace internal
+
+
+}// namespace curlpp
+

+ 148 - 0
thirdparty/curlpp/src/curlpp/internal/SList.cpp

@@ -0,0 +1,148 @@
+#include "curlpp/internal/SList.hpp"
+
+#include <ostream>
+#include <string>
+
+
+namespace curlpp
+{
+
+
+namespace internal
+{
+
+
+SList::SList(const SList & rhs) 
+	: mList(0)
+	, mData(rhs.mData)
+{
+	update();
+}
+
+
+SList::SList(curl_slist * list)
+	: mList(NULL)
+{
+	constructFrom(list);
+}
+
+
+SList::SList(const std::list<std::string> & rhs)
+	: mList(0)
+	, mData(rhs)
+{
+	update();
+}
+
+
+SList::SList() 
+	: mList(0)
+{}
+
+
+SList::~SList()
+{
+	clear();
+}
+
+
+void
+SList::clear()
+{
+	if(mList != 0)
+	{
+		curl_slist_free_all(mList);
+		mList = 0;
+	}
+}
+
+
+void 
+SList::constructFrom(curl_slist * list)
+{
+	mData.clear();
+
+	curl_slist * c = list;
+	while(c)
+	{
+		mData.push_back(c->data);
+		c = c->next;
+	}
+
+	update();
+}
+
+
+void 
+SList::set(const std::list<std::string> & list) 
+{
+	mData = list;
+	update();
+}
+
+
+void 
+SList::update() 
+{
+	clear();
+
+	for(std::list<std::string>::const_iterator pos = mData.begin();
+			pos != mData.end();
+			pos++)
+	{
+		mList = curl_slist_append(mList, (*pos).c_str());
+	}
+}
+
+
+SList::operator std::list<std::string> ()
+{
+	return list();
+}
+
+
+SList &
+SList::operator=(const std::list<std::string> & list)
+{
+	set(list);
+	return (*this);
+}
+
+
+curl_slist *
+SList::cslist() const
+{
+	return mList;
+}
+
+
+std::list<std::string>
+SList::list() 
+{
+	return mData;
+}
+
+
+
+
+} // namespace internal
+
+
+} // namespace curlpp
+
+
+std::ostream & operator<<(std::ostream & stream, const std::list<std::string> & value)
+{
+	for(std::list<std::string>::const_iterator pos = value.begin();
+			pos != value.end();
+			pos++)
+	{
+		if(pos != value.begin())
+		{
+			stream << ", ";
+		}
+		stream << (*pos);
+	}
+
+	return stream;
+}