Browse Source

Initial commit.

master
Maximilian Stiefel 6 years ago
commit
b99e816f7f
  1. 3
      .gitmodules
  2. 1
      dictcc
  3. 12
      harbour-wordbook.desktop
  4. 74
      harbour-wordbook.pro
  5. 671
      harbour-wordbook.pro.user
  6. BIN
      icons/108x108/harbour-wordbook.png
  7. BIN
      icons/128x128/harbour-wordbook.png
  8. BIN
      icons/172x172/harbour-wordbook.png
  9. BIN
      icons/86x86/harbour-wordbook.png
  10. 91
      lib/curlpp-inst-arm/bin/curlpp-config
  11. 170
      lib/curlpp-inst-arm/include/curlpp/Easy.hpp
  12. 48
      lib/curlpp-inst-arm/include/curlpp/Easy.inl
  13. 306
      lib/curlpp-inst-arm/include/curlpp/Exception.hpp
  14. 272
      lib/curlpp-inst-arm/include/curlpp/Form.hpp
  15. 121
      lib/curlpp-inst-arm/include/curlpp/Info.hpp
  16. 79
      lib/curlpp-inst-arm/include/curlpp/Info.inl
  17. 99
      lib/curlpp-inst-arm/include/curlpp/Infos.hpp
  18. 82
      lib/curlpp-inst-arm/include/curlpp/Multi.hpp
  19. 253
      lib/curlpp-inst-arm/include/curlpp/Option.hpp
  20. 206
      lib/curlpp-inst-arm/include/curlpp/Option.inl
  21. 107
      lib/curlpp-inst-arm/include/curlpp/OptionBase.hpp
  22. 336
      lib/curlpp-inst-arm/include/curlpp/Options.hpp
  23. 56
      lib/curlpp-inst-arm/include/curlpp/Types.hpp
  24. 223
      lib/curlpp-inst-arm/include/curlpp/cURLpp.hpp
  25. 203
      lib/curlpp-inst-arm/include/curlpp/internal/CurlHandle.hpp
  26. 76
      lib/curlpp-inst-arm/include/curlpp/internal/CurlHandle.inl
  27. 106
      lib/curlpp-inst-arm/include/curlpp/internal/OptionContainer.hpp
  28. 73
      lib/curlpp-inst-arm/include/curlpp/internal/OptionContainer.inl
  29. 172
      lib/curlpp-inst-arm/include/curlpp/internal/OptionContainerType.hpp
  30. 122
      lib/curlpp-inst-arm/include/curlpp/internal/OptionList.hpp
  31. 504
      lib/curlpp-inst-arm/include/curlpp/internal/OptionSetter.hpp
  32. 56
      lib/curlpp-inst-arm/include/curlpp/internal/OptionSetter.inl
  33. 92
      lib/curlpp-inst-arm/include/curlpp/internal/SList.hpp
  34. 32
      lib/curlpp-inst-arm/include/utilspp/EmptyType.hpp
  35. 41
      lib/curlpp-inst-arm/include/utilspp/NonCopyable.hpp
  36. 32
      lib/curlpp-inst-arm/include/utilspp/NullType.hpp
  37. 186
      lib/curlpp-inst-arm/include/utilspp/SmartPtr.hpp
  38. 45
      lib/curlpp-inst-arm/include/utilspp/ThreadingFactoryMutex.hpp
  39. 37
      lib/curlpp-inst-arm/include/utilspp/ThreadingFactoryMutex.inl
  40. 52
      lib/curlpp-inst-arm/include/utilspp/ThreadingSingle.hpp
  41. 50
      lib/curlpp-inst-arm/include/utilspp/ThreadingSingle.inl
  42. 216
      lib/curlpp-inst-arm/include/utilspp/TypeList.hpp
  43. 869
      lib/curlpp-inst-arm/include/utilspp/TypeTrait.hpp
  44. 96
      lib/curlpp-inst-arm/include/utilspp/clone_ptr.hpp
  45. BIN
      lib/curlpp-inst-arm/lib/libcurlpp.a
  46. BIN
      lib/curlpp-inst-arm/lib/libcurlpp.so
  47. BIN
      lib/curlpp-inst-arm/lib/libcurlpp.so.1
  48. BIN
      lib/curlpp-inst-arm/lib/libcurlpp.so.1.0.0
  49. 13
      lib/curlpp-inst-arm/lib/pkgconfig/curlpp.pc
  50. 91
      lib/curlpp-inst-i486/bin/curlpp-config
  51. 170
      lib/curlpp-inst-i486/include/curlpp/Easy.hpp
  52. 48
      lib/curlpp-inst-i486/include/curlpp/Easy.inl
  53. 306
      lib/curlpp-inst-i486/include/curlpp/Exception.hpp
  54. 272
      lib/curlpp-inst-i486/include/curlpp/Form.hpp
  55. 121
      lib/curlpp-inst-i486/include/curlpp/Info.hpp
  56. 79
      lib/curlpp-inst-i486/include/curlpp/Info.inl
  57. 99
      lib/curlpp-inst-i486/include/curlpp/Infos.hpp
  58. 82
      lib/curlpp-inst-i486/include/curlpp/Multi.hpp
  59. 253
      lib/curlpp-inst-i486/include/curlpp/Option.hpp
  60. 206
      lib/curlpp-inst-i486/include/curlpp/Option.inl
  61. 107
      lib/curlpp-inst-i486/include/curlpp/OptionBase.hpp
  62. 336
      lib/curlpp-inst-i486/include/curlpp/Options.hpp
  63. 56
      lib/curlpp-inst-i486/include/curlpp/Types.hpp
  64. 223
      lib/curlpp-inst-i486/include/curlpp/cURLpp.hpp
  65. 203
      lib/curlpp-inst-i486/include/curlpp/internal/CurlHandle.hpp
  66. 76
      lib/curlpp-inst-i486/include/curlpp/internal/CurlHandle.inl
  67. 106
      lib/curlpp-inst-i486/include/curlpp/internal/OptionContainer.hpp
  68. 73
      lib/curlpp-inst-i486/include/curlpp/internal/OptionContainer.inl
  69. 172
      lib/curlpp-inst-i486/include/curlpp/internal/OptionContainerType.hpp
  70. 122
      lib/curlpp-inst-i486/include/curlpp/internal/OptionList.hpp
  71. 504
      lib/curlpp-inst-i486/include/curlpp/internal/OptionSetter.hpp
  72. 56
      lib/curlpp-inst-i486/include/curlpp/internal/OptionSetter.inl
  73. 92
      lib/curlpp-inst-i486/include/curlpp/internal/SList.hpp
  74. 32
      lib/curlpp-inst-i486/include/utilspp/EmptyType.hpp
  75. 41
      lib/curlpp-inst-i486/include/utilspp/NonCopyable.hpp
  76. 32
      lib/curlpp-inst-i486/include/utilspp/NullType.hpp
  77. 186
      lib/curlpp-inst-i486/include/utilspp/SmartPtr.hpp
  78. 45
      lib/curlpp-inst-i486/include/utilspp/ThreadingFactoryMutex.hpp
  79. 37
      lib/curlpp-inst-i486/include/utilspp/ThreadingFactoryMutex.inl
  80. 52
      lib/curlpp-inst-i486/include/utilspp/ThreadingSingle.hpp
  81. 50
      lib/curlpp-inst-i486/include/utilspp/ThreadingSingle.inl
  82. 216
      lib/curlpp-inst-i486/include/utilspp/TypeList.hpp
  83. 869
      lib/curlpp-inst-i486/include/utilspp/TypeTrait.hpp
  84. 96
      lib/curlpp-inst-i486/include/utilspp/clone_ptr.hpp
  85. BIN
      lib/curlpp-inst-i486/lib/libcurlpp.a
  86. BIN
      lib/curlpp-inst-i486/lib/libcurlpp.so
  87. BIN
      lib/curlpp-inst-i486/lib/libcurlpp.so.1
  88. BIN
      lib/curlpp-inst-i486/lib/libcurlpp.so.1.0.0
  89. 13
      lib/curlpp-inst-i486/lib/pkgconfig/curlpp.pc
  90. 22
      qml/cover/CoverPage.qml
  91. 10
      qml/harbour-wordbook.qml
  92. 61
      qml/pages/About.qml
  93. 99
      qml/pages/FirstPage.qml
  94. 18
      rpm/harbour-wordbook.changes.in
  95. 25
      rpm/harbour-wordbook.changes.run.in
  96. 71
      rpm/harbour-wordbook.spec
  97. 45
      rpm/harbour-wordbook.yaml
  98. 104
      src/dict_model.cpp
  99. 63
      src/dict_model.h
  100. 24
      src/harbour-wordbook.cpp

3
.gitmodules

@ -0,0 +1,3 @@
[submodule "dictcc"]
path = dictcc
url = https://github.com/m3x1m0m/dictcc

1
dictcc

@ -0,0 +1 @@
Subproject commit 78d450818192bf700f20422427aca3a81a78bf92

12
harbour-wordbook.desktop

@ -0,0 +1,12 @@
[Desktop Entry]
Type=Application
X-Nemo-Application-Type=silica-qt5
Icon=harbour-wordbook
Exec=harbour-wordbook
Name=harbour-wordbook
# translation example:
# your app name in German locale (de)
#
# Remember to comment out the following line, if you do not want to use
# a different app name in German locale (de).
# Name[de]=harbour-wordbook

74
harbour-wordbook.pro

@ -0,0 +1,74 @@
# NOTICE:
#
# Application name defined in TARGET has a corresponding QML filename.
# If name defined in TARGET is changed, the following needs to be done
# to match new name:
# - corresponding QML filename must be changed
# - desktop icon filename must be changed
# - desktop filename must be changed
# - icon definition filename in desktop file must be changed
# - translation filenames have to be changed
# The name of your application
TARGET = harbour-wordbook
CONFIG += sailfishapp
# Path to installation of CURLPP
CONFIG(debug,debug|release){ CURLPP_PATH = lib/curlpp-inst-arm }
CONFIG(release,debug|release){ CURLPP_PATH = lib/curlpp-inst-i486 }
# Add curlpp include files
INCLUDEPATH += $$CURLPP_PATH/include
# Tell linker to link libcurl first, then libcurlpp
LIBS += -lcurl\
-L$$PWD/$$CURLPP_PATH/lib\
-lcurlpp
# Install file on system
lib.files += $$CURLPP_PATH/lib/libcurlpp.so\
$$CURLPP_PATH/lib/libcurlpp.so.1\
$$CURLPP_PATH/lib/libcurlpp.so.1.0.0
lib.path = /usr/share/$$TARGET/lib
INSTALLS += lib
SOURCES += src/harbour-wordbook.cpp \
src/dict_model.cpp \
dictcc/dict/dict_imp.cc \
dictcc/dict/desv.cc \
dictcc/dict/deen.cc
DISTFILES += qml/harbour-wordbook.qml \
qml/cover/CoverPage.qml \
rpm/harbour-wordbook.changes.in \
rpm/harbour-wordbook.changes.run.in \
rpm/harbour-wordbook.spec \
rpm/harbour-wordbook.yaml \
translations/*.ts \
harbour-wordbook.desktop \
qml/pages/About.qml \
qml/pages/FirstPage.qml
SAILFISHAPP_ICONS = 86x86 108x108 128x128 172x172
# to disable building translations every time, comment out the
# following CONFIG line
# CONFIG += sailfishapp_i18n
# German translation is enabled as an example. If you aren't
# planning to localize your app, remember to comment out the
# following TRANSLATIONS line. And also do not forget to
# modify the localized app name in the the .desktop file.
# TRANSLATIONS += translations/harbour-wordbook-de.ts
HEADERS += \
src/dict_model.h \
dictcc/dict.h \
dictcc/dict/types.h \
dictcc/dict/exceptions.h \
dictcc/dict/dict_int.h \
dictcc/dict/desv.h \
dictcc/dict/deen.h \
dictcc/dict/creator.h

671
harbour-wordbook.pro.user

@ -0,0 +1,671 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.4.1, 2018-04-20T18:10:16. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{80bcf696-971a-458e-b870-5250a3256889}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{a1ccde5b-c399-4de9-847c-fecf9ec99eb2}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/maximilian/build-harbour-wordbook-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/maximilian/build-harbour-wordbook-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">/home/maximilian/harbour-wordbook</value>
<value type="bool" key="MerRunConfiguration.QmlLiveEnabled">false</value>
<value type="int" key="MerRunConfiguration.QmlLiveIpcPort">10234</value>
<value type="int" key="MerRunConfiguration.QmlLiveOptions">3</value>
<value type="QString" key="MerRunConfiguration.QmlLiveTargetWorkspace"></value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">harbour-wordbook</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/maximilian/harbour-wordbook/harbour-wordbook.pro</value>
<value type="bool" key="QmakeProjectManager.QmakeRunConfiguration.UseLibrarySearchPath">true</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">harbour-wordbook.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">/home/maximilian/build-harbour-wordbook-SailfishOS_2_1_4_13_armv7hl_in_Sailfish_OS_Build_Engine-Debug</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.1</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">SailfishOS-2.1.4.13-armv7hl (in Sailfish OS Build Engine)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">SailfishOS-2.1.4.13-armv7hl (in Sailfish OS Build Engine)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{78ef6d63-a499-4e0c-a2c9-319195055963}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">2</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/maximilian/build-harbour-wordbook-SailfishOS_2_1_4_13_armv7hl_in_Sailfish_OS_Build_Engine-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/maximilian/build-harbour-wordbook-SailfishOS_2_1_4_13_armv7hl_in_Sailfish_OS_Build_Engine-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/maximilian/build-harbour-wordbook-SailfishOS_2_1_4_13_armv7hl_in_Sailfish_OS_Build_Engine-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">true</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Start Build Engine</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Mer.MerSdkStartStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">RPM</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRpmBuildStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">RPM Validation</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRpmValidationStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy By Building An RPM Package</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerMb2RpmBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Prepare Target</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerPrepareTargetStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Rsync</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRsyncDeployStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy By Copying Binaries</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRSyncDeployConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.2">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Prepare Target</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerPrepareTargetStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">RPM</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRpmDeployStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy As RPM Package</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRpmDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="MerRunConfiguration.QmlLiveBenchWorkspace">/home/maximilian/harbour-wordbook</value>
<value type="bool" key="MerRunConfiguration.QmlLiveEnabled">false</value>
<value type="int" key="MerRunConfiguration.QmlLiveIpcPort">10234</value>
<value type="int" key="MerRunConfiguration.QmlLiveOptions">3</value>
<value type="QString" key="MerRunConfiguration.QmlLiveTargetWorkspace"></value>
<value type="int" key="PE.EnvironmentAspect.Base">1</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">harbour-wordbook (on Remote Device)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QmakeProjectManager.MerRunConfiguration:harbour-wordbook</value>
<value type="QString" key="Qt4ProjectManager.MaemoRunConfiguration.Arguments"></value>
<value type="QString" key="Qt4ProjectManager.MaemoRunConfiguration.TargetName">harbour-wordbook</value>
<value type="int" key="RemoteLinux.EnvironmentAspect.Version">1</value>
<value type="QString" key="RemoteLinux.RunConfig.AlternateRemoteExecutable"></value>
<value type="bool" key="RemoteLinux.RunConfig.UseAlternateRemoteExecutable">false</value>
<value type="QString" key="RemoteLinux.RunConfig.WorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">2</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

BIN
icons/108x108/harbour-wordbook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
icons/128x128/harbour-wordbook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

BIN
icons/172x172/harbour-wordbook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/86x86/harbour-wordbook.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

91
lib/curlpp-inst-arm/bin/curlpp-config

@ -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=/home/mersdk/curlpp/curlpp-inst-arm
includedir=include
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 /usr/bin/cc
;;
--prefix)
echo $prefix
;;
--feature)
curl-config --feature
;;
--version)
echo libcurlpp 0.8.1
exit 0
;;
--vernum)
echo 000801
exit 0
;;
--help)
usage 0
;;
--cflags)
echo -Iinclude `curl-config --cflags`
;;
--libs)
echo -Llib `curl-config --libs` -lcurlpp
;;
--static-libs)
echo lib/libcurlpp.a `curl-config --static-libs`
;;
*)
echo "unknown option: $1"
usage
exit 1
;;
esac
shift
done
exit 0

170
lib/curlpp-inst-arm/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 retreive 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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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 retreive 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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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 retreive
* 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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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 retreive 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, retreived 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
* retreive 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 retreive 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 retreive 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
lib/curlpp-inst-arm/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 retreive 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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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
lib/curlpp-inst-arm/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

BIN
lib/curlpp-inst-arm/lib/libcurlpp.a

Binary file not shown.

BIN
lib/curlpp-inst-arm/lib/libcurlpp.so

Binary file not shown.

BIN
lib/curlpp-inst-arm/lib/libcurlpp.so.1

Binary file not shown.

BIN
lib/curlpp-inst-arm/lib/libcurlpp.so.1.0.0

Binary file not shown.

13
lib/curlpp-inst-arm/lib/pkgconfig/curlpp.pc

@ -0,0 +1,13 @@
# This is a comment
prefix=/home/mersdk/curlpp/curlpp-inst-arm
exec_prefix=/home/mersdk/curlpp/curlpp-inst-arm
includedir=include
Name: curlpp
Description: cURLpp is a libcurl C++ wrapper
Version:
Libs: -Llib -lcurlpp
Cflags: -Iinclude
# libcurl is required as non-private because CurlHandle.inl uses curl_easy_setopt.
Requires: libcurl

91
lib/curlpp-inst-i486/bin/curlpp-config

@ -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=/home/mersdk/curlpp/curlpp-inst-i486
includedir=include
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 /usr/bin/cc
;;
--prefix)
echo $prefix
;;
--feature)
curl-config --feature
;;
--version)
echo libcurlpp 0.8.1
exit 0
;;
--vernum)
echo 000801
exit 0
;;
--help)
usage 0
;;
--cflags)
echo -Iinclude `curl-config --cflags`
;;
--libs)
echo -Llib `curl-config --libs` -lcurlpp
;;
--static-libs)
echo lib/libcurlpp.a `curl-config --static-libs`
;;
*)
echo "unknown option: $1"
usage
exit 1
;;
esac
shift
done
exit 0

170
lib/curlpp-inst-i486/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 retreive 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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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 retreive 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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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 retreive
* 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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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 retreive 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, retreived 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
* retreive 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 retreive 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 retreive 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
lib/curlpp-inst-i486/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 retreive 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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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
lib/curlpp-inst-i486/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

BIN
lib/curlpp-inst-i486/lib/libcurlpp.a

Binary file not shown.

BIN
lib/curlpp-inst-i486/lib/libcurlpp.so

Binary file not shown.

BIN
lib/curlpp-inst-i486/lib/libcurlpp.so.1

Binary file not shown.

BIN
lib/curlpp-inst-i486/lib/libcurlpp.so.1.0.0

Binary file not shown.

13
lib/curlpp-inst-i486/lib/pkgconfig/curlpp.pc

@ -0,0 +1,13 @@
# This is a comment
prefix=/home/mersdk/curlpp/curlpp-inst-i486
exec_prefix=/home/mersdk/curlpp/curlpp-inst-i486
includedir=include
Name: curlpp
Description: cURLpp is a libcurl C++ wrapper
Version:
Libs: -Llib -lcurlpp
Cflags: -Iinclude
# libcurl is required as non-private because CurlHandle.inl uses curl_easy_setopt.
Requires: libcurl

22
qml/cover/CoverPage.qml

@ -0,0 +1,22 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
CoverBackground {
Label {
id: label
anchors.centerIn: parent
text: qsTr("Hej Sailors :)")
}
CoverActionList {
id: coverAction
CoverAction {
iconSource: "image://theme/icon-cover-next"
}
CoverAction {
iconSource: "image://theme/icon-cover-pause"
}
}
}

10
qml/harbour-wordbook.qml

@ -0,0 +1,10 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import "pages"
ApplicationWindow
{
initialPage: Component { FirstPage { } }
cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: defaultAllowedOrientations
}

61
qml/pages/About.qml

@ -0,0 +1,61 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
property string mail_addr: "stiefel.maximilian@online.de"
id: page
Column {
id: col
spacing: Theme.paddingLarge
width: parent.width
PageHeader {
title: "About"
}
SectionHeader {
text: "Powered By"
}
Label {
text: "www.dict.cc"
anchors.horizontalCenter: parent.horizontalCenter
}
SectionHeader {
text: "Author"
}
Label {
text: "Maximilian Stiefel"
anchors.horizontalCenter: parent.horizontalCenter
}
GlassItem {
id: seperator
height: Theme.paddingLarge
width: page.width
color: Theme.highlightColor
cache: false
}
Label {
id: body
text: "If you have feedback, bug reports or feature requests, just klick on the mail address below."
font.pixelSize: Theme.fontSizeExtraSmall
wrapMode: Text.WordWrap
maximumLineCount: 3
truncationMode: TruncationMode.Fade
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
Label {
text: mail_addr
font.pixelSize: Theme.fontSizeExtraSmall
color: Theme.highlightColor
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
id : buttonMouseArea
anchors.fill : parent
onClicked: Qt.openUrlExternally("mailto:" + mail_addr + "?subject=About Your Dictcc Sailfish OS App")
}
}
}
}

99
qml/pages/FirstPage.qml

@ -0,0 +1,99 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import com.dictcc 1.0
Page {
id: page
SilicaFlickable {
anchors.fill: parent
contentWidth: parent.width
contentHeight: parent.height
SilicaListView {
anchors.fill: parent
spacing: Theme.paddingLarge
model: DictModel {
id: dict_model
}
header: Column {
PullDownMenu {
MenuItem {
text: "DEEN"
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
}
MenuItem {
text: "DESV"
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
}
MenuItem {
text: "About"
onClicked: pageStack.push(Qt.resolvedUrl("About.qml"))
}
}
PageHeader {
title: "Dictcc"
}
width: page.width
SearchField {
width: page.width
id: user_input
placeholderText: qsTr("Enter word or phrase")
EnterKey.onClicked: {
dict_model.search(user_input.text)
}
}
GlassItem {
id: effect
height: Theme.paddingLarge
width: page.width
color: Theme.highlightColor
cache: false
}
}
delegate: Column {
width: page.width
Label {
text: "This is a test with a longer text.jjjjj jjj jjjjjj jjj jjjjjjjj jjjj jjjjjjjjjj jjjjjj"
color: Theme.primaryColor
font.family: Theme.fontFamilyHeading
font.pixelSize: Theme.fontSizeLarge
wrapMode: Text.WordWrap
maximumLineCount: 10
anchors {
horizontalCenter: parent.horizontalCenter
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
Label {
wrapMode: Text.WordWrap
text: lang1
color: Theme.highlightColor
font.family: Theme.fontFamilyHeading
font.pixelSize: Theme.fontSizeLarge
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
Label {
wrapMode: Text.WordWrap
text: lang2
color: Theme.primaryColor
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeSmall
anchors {
left: parent.left
right: parent.right
leftMargin: Theme.paddingMedium
rightMargin: Theme.paddingMedium
}
}
}
}
}
}

18
rpm/harbour-wordbook.changes.in

@ -0,0 +1,18 @@
# Rename this file as harbour-wordbook.changes to include changelog
# entries in your RPM file.
#
# Add new changelog entries following the format below.
# Add newest entries to the top of the list.
# Separate entries from eachother with a blank line.
#
# Alternatively, if your changelog is automatically generated (e.g. with
# the git-change-log command provided with Sailfish OS SDK), create a
# harbour-wordbook.changes.run script to let mb2 run the required commands for you.
# * date Author's Name <author's email> version-release
# - Summary of changes
* Sun Apr 13 2014 Jack Tar <jack.tar@example.com> 0.0.1-1
- Scrubbed the deck
- Hoisted the sails

25
rpm/harbour-wordbook.changes.run.in

@ -0,0 +1,25 @@
#!/bin/bash
#
# Rename this file as harbour-wordbook.changes.run to let mb2 automatically
# generate changelog from well formatted Git commit messages and tag
# annotations.
git-change-log
# Here are some basic examples how to change from the default behavior. Run
# git-change-log --help inside the Sailfish OS SDK chroot or build engine to
# learn all the options git-change-log accepts.
# Use a subset of tags
#git-change-log --tags refs/tags/my-prefix/*
# Group entries by minor revision, suppress headlines for patch-level revisions
#git-change-log --dense '/[0-9]\+\.[0-9\+$'
# Trim very old changes
#git-change-log --since 2014-04-01
#echo '[ Some changelog entries trimmed for brevity ]'
# Use the subjects (first lines) of tag annotations when no entry would be
# included for a revision otherwise
#git-change-log --auto-add-annotations

71
rpm/harbour-wordbook.spec

@ -0,0 +1,71 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.27
#
Name: harbour-wordbook
# >> macros
# << macros
%{!?qtc_qmake:%define qtc_qmake %qmake}
%{!?qtc_qmake5:%define qtc_qmake5 %qmake5}
%{!?qtc_make:%define qtc_make make}
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: A flexible and easy to use wordbook for many languages.
Version: 0.1
Release: 1
Group: Qt/Qt
License: LICENSE
URL: http://example.org/
Source0: %{name}-%{version}.tar.bz2
Source100: harbour-wordbook.yaml
Requires: sailfishsilica-qt5 >= 0.10.9
BuildRequires: pkgconfig(sailfishapp) >= 1.0.2
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: desktop-file-utils
%description
Short description of my Sailfish OS Application
%prep
%setup -q -n %{name}-%{version}
# >> setup
# << setup
%build
# >> build pre
# << build pre
%qtc_qmake5
%qtc_make %{?_smp_mflags}
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%qmake5_install
# >> install post
# << install post
desktop-file-install --delete-original \
--dir %{buildroot}%{_datadir}/applications \
%{buildroot}%{_datadir}/applications/*.desktop
%files
%defattr(-,root,root,-)
%{_bindir}
%{_datadir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png
# >> files
# << files

45
rpm/harbour-wordbook.yaml

@ -0,0 +1,45 @@
Name: harbour-wordbook
Summary: A flexible and easy to use wordbook for many languages.
Version: 0.1
Release: 1
# The contents of the Group field should be one of the groups listed here:
# https://github.com/mer-tools/spectacle/blob/master/data/GROUPS
Group: Qt/Qt
URL: http://example.org/
License: LICENSE
# This must be generated before uploading a package to a remote build service.
# Usually this line does not need to be modified.
Sources:
- '%{name}-%{version}.tar.bz2'
Description: |
Short description of my Sailfish OS Application
Configure: none
# The qtc5 builder inserts macros to allow QtCreator to have fine
# control over qmake/make execution
Builder: qtc5
# This section specifies build dependencies that are resolved using pkgconfig.
# This is the preferred way of specifying build dependencies for your package.
PkgConfigBR:
- sailfishapp >= 1.0.2
- Qt5Core
- Qt5Qml
- Qt5Quick
# Build dependencies without a pkgconfig setup can be listed here
# PkgBR:
# - package-needed-to-build
# Runtime dependencies which are not automatically detected
Requires:
- sailfishsilica-qt5 >= 0.10.9
# All installed files
Files:
- '%{_bindir}'
- '%{_datadir}/%{name}'
- '%{_datadir}/applications/%{name}.desktop'
- '%{_datadir}/icons/hicolor/*/apps/%{name}.png'
# For more information about yaml and what's supported in Sailfish OS
# build system, please see https://wiki.merproject.org/wiki/Spectacle

104
src/dict_model.cpp

@ -0,0 +1,104 @@
/*
Copyright (C) 2015 Jolla Ltd.
Contact: Jussi Pakkanen <jussi.pakkanen@jollamobile.com>
All rights reserved.
You may use this file under the terms of BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Jolla Ltd nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "dict_model.h"
DictModel::DictModel(QObject *parent) :
QAbstractListModel(parent)
{
d_msg = "";
// Create dictionary
d_wordbook = dictcc::creator::create("DESV");
d_result = d_wordbook->get_translations();
}
int DictModel::rowCount(const QModelIndex &) const
{
if(d_result == nullptr) {
return 0;
} else {
return d_result->first.size();
}
}
QHash<int, QByteArray> DictModel::roleNames() const {
QHash<int, QByteArray> roles;
roles[Lang1Role] = "lang1";
roles[Lang2Role] = "lang2";
roles[Msg2Usr] = "msg2usr";
return roles;
}
QVariant DictModel::data(const QModelIndex &index, int role) const {
// TODO: Maybe have to check for if results is empty
if(!index.isValid()) {
return QVariant();
}
switch(role) {
case Lang1Role:
return QVariant(QString(d_result->first[index.row()].c_str()));
case Lang2Role:
return QVariant(QString(d_result->second[index.row()].c_str()));
case Msg2Usr:
return QVariant(d_msg);
}
return QVariant();
}
/*void DemoModel::activate(const int i) {
if(i < 0 || i >= backing.size()) {
return;
}
QString value = backing[i];
// Remove the value from the old location.
beginRemoveRows(QModelIndex(), i, i);
backing.erase(backing.begin() + i);
endRemoveRows();
// Add it to the top.
beginInsertRows(QModelIndex(), 0, 0);
backing.insert(0, value);
endInsertRows();
}*/
void DictModel::search(QString word)
{
beginResetModel();
// Perform search
try {
d_result = d_wordbook->search(word.toStdString());
} catch (const dictcc::dict_exception& e) {
d_result = d_wordbook->reset_search();
d_msg = e.what();
}
endResetModel();
}

63
src/dict_model.h

@ -0,0 +1,63 @@
/*
Copyright (C) 2015 Jolla Ltd.
Contact: Jussi Pakkanen <jussi.pakkanen@jollamobile.com>
All rights reserved.
You may use this file under the terms of BSD license as follows:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Jolla Ltd nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DICTMODEL_H
#define DICTMODEL_H
#include <QAbstractListModel>
#include "../dict/dict.h"
class DictModel : public QAbstractListModel
{
Q_OBJECT
public:
enum DemoRoles {
Lang1Role = Qt::UserRole,
Lang2Role,
Msg2Usr
};
explicit DictModel(QObject *parent = 0);
virtual int rowCount(const QModelIndex&) const;
virtual QVariant data(const QModelIndex &index, int role) const;
QHash<int, QByteArray> roleNames() const;
//Q_INVOKABLE void activate(const int i);
Q_INVOKABLE void search(QString word);
private:
std::shared_ptr<dictcc::dict> d_wordbook = nullptr;
dictcc::search_ptr_t d_result = nullptr;
QString d_msg = "";
};
#endif // DICTMODEL_H

24
src/harbour-wordbook.cpp

@ -0,0 +1,24 @@
#ifdef QT_QML_DEBUG
#include <QtQuick>
#endif
#include <sailfishapp.h>
#include <QQmlEngine>
#include <QScopedPointer>
#include "dict_model.h"
int main(int argc, char *argv[])
{
// Set up qml engine.
QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv));
QScopedPointer<QQuickView> v(SailfishApp::createView());
// If you wish to publish your app on the Jolla harbour, follow
// https://harbour.jolla.com/faq#5.3.0 about naming own QML modules.
qmlRegisterType<DictModel>("com.dictcc", 1, 0, "DictModel");
// Start the application.
v->setSource(SailfishApp::pathTo("qml/harbour-wordbook.qml"));
v->show();
return app->exec();
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save