xmp_toolkit_ruby 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. checksums.yaml +7 -0
  2. data/.idea/.gitignore +8 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +88 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/AGENTS.md +72 -0
  8. data/CHANGELOG.md +45 -0
  9. data/LICENSE.txt +21 -0
  10. data/README.md +287 -0
  11. data/Rakefile +25 -0
  12. data/cliff.toml +138 -0
  13. data/docker/Dockerfile +87 -0
  14. data/docker/ProductConfig.cmake.patch +11 -0
  15. data/docker/ToolchainGCC.cmake.patch +11 -0
  16. data/exe/xmp_toolkit_ruby +8 -0
  17. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/LICENSE +31 -0
  18. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/build/XMP_BuildInfo.h +17 -0
  19. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPFiles.hpp +853 -0
  20. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPIterator.hpp +234 -0
  21. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPMeta.hpp +1753 -0
  22. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPUtils.hpp +967 -0
  23. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP.hpp +98 -0
  24. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP.incl_cpp +69 -0
  25. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IConfigurable.h +225 -0
  26. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/ISharedObject.h +71 -0
  27. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IThreadSafe.h +76 -0
  28. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IVersionable.h +71 -0
  29. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IConfigurationManager.h +167 -0
  30. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IError.h +377 -0
  31. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IErrorNotifier.h +52 -0
  32. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IMemoryAllocator.h +65 -0
  33. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IObjectFactory.h +90 -0
  34. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IUTF8String.h +504 -0
  35. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Utilities/TWrapperFunctions.h +252 -0
  36. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Utilities/TWrapperFunctions2.h +564 -0
  37. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonDefines.h +194 -0
  38. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonErrorCodes.h +114 -0
  39. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonFwdDeclarations.h +158 -0
  40. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonLatestInterfaceVersions.h +51 -0
  41. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IConfigurable.cpp +204 -0
  42. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IConfigurationManager.cpp +92 -0
  43. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IError.cpp +207 -0
  44. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IErrorNotifier.cpp +26 -0
  45. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IUTF8String.cpp +299 -0
  46. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IArrayNode.h +303 -0
  47. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IClientDOMParser.h +88 -0
  48. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IClientDOMSerializer.h +94 -0
  49. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICompositeNode.h +331 -0
  50. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICoreConfigurationManager.h +107 -0
  51. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICoreObjectFactory.h +279 -0
  52. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMImplementationRegistry.h +150 -0
  53. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMParser.h +181 -0
  54. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMSerializer.h +120 -0
  55. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IMetadata.h +145 -0
  56. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IMetadataConverterUtils.h +116 -0
  57. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INameSpacePrefixMap.h +236 -0
  58. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INode.h +582 -0
  59. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INodeIterator.h +193 -0
  60. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IPath.h +212 -0
  61. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IPathSegment.h +225 -0
  62. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ISimpleNode.h +150 -0
  63. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IStructureNode.h +306 -0
  64. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreDefines.h +94 -0
  65. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreErrorCodes.h +116 -0
  66. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreFwdDeclarations.h +325 -0
  67. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreLatestInterfaceVersions.h +97 -0
  68. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IArrayNode.cpp +163 -0
  69. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IClientDOMParser.cpp +76 -0
  70. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IClientDOMSerializer.cpp +73 -0
  71. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICompositeNode.cpp +121 -0
  72. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICoreConfigurationManager.cpp +88 -0
  73. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICoreObjectFactory.cpp +83 -0
  74. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMImplementationRegistry.cpp +122 -0
  75. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMParser.cpp +116 -0
  76. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMSerializer.cpp +109 -0
  77. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IMetadata.cpp +113 -0
  78. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IMetadataConverterUtils.cpp +92 -0
  79. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INameSpacePrefixMap.cpp +187 -0
  80. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INode.cpp +377 -0
  81. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INodeIterator.cpp +105 -0
  82. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IPath.cpp +157 -0
  83. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IPathSegment.cpp +146 -0
  84. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ISimpleNode.cpp +111 -0
  85. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IStructureNode.cpp +104 -0
  86. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Const.h +1590 -0
  87. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Environment.h +223 -0
  88. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_IO.hpp +169 -0
  89. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Version.h +52 -0
  90. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPFiles.incl_cpp +484 -0
  91. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPIterator.incl_cpp +223 -0
  92. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPMeta.incl_cpp +917 -0
  93. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPUtils.incl_cpp +445 -0
  94. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPFiles.hpp +281 -0
  95. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPIterator.hpp +74 -0
  96. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPMeta.hpp +635 -0
  97. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPUtils.hpp +314 -0
  98. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMP_Common.hpp +132 -0
  99. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPCore.so +0 -0
  100. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPCoreStatic.a +0 -0
  101. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPFiles.so +0 -0
  102. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPFilesStatic.a +0 -0
  103. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/macintosh/universal/Debug/libXMPCoreStatic.a +0 -0
  104. data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/macintosh/universal/Debug/libXMPFilesStatic.a +0 -0
  105. data/ext/xmp_toolkit_ruby/extconf.rb +101 -0
  106. data/ext/xmp_toolkit_ruby/xmp_toolkit.cpp +321 -0
  107. data/ext/xmp_toolkit_ruby/xmp_toolkit.hpp +69 -0
  108. data/ext/xmp_toolkit_ruby/xmp_toolkit_ruby.cpp +44 -0
  109. data/lib/xmp_toolkit_ruby/cli.rb +95 -0
  110. data/lib/xmp_toolkit_ruby/namespaces.rb +77 -0
  111. data/lib/xmp_toolkit_ruby/plugins/LICENSE +31 -0
  112. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.resources/MODULE_IDENTIFIER.txt +1 -0
  113. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.resources/XMPPLUGINUIDS.txt +31 -0
  114. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.xpi +0 -0
  115. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/libMiniPDFL.so +0 -0
  116. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.resources/MODULE_IDENTIFIER.txt +1 -0
  117. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.resources/XMPPLUGINUIDS.txt +31 -0
  118. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.xpi +0 -0
  119. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/libMiniPDFL.so +0 -0
  120. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/PDF_Handler +0 -0
  121. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/Info.plist +52 -0
  122. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MODULE_IDENTIFIER.txt +1 -0
  123. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/MiniPDFL +0 -0
  124. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Resources/English.lproj/InfoPlist.strings +0 -0
  125. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
  126. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
  127. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings +0 -0
  128. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/Resources/Info.plist +35 -0
  129. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
  130. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
  131. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings +0 -0
  132. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/Resources/Info.plist +35 -0
  133. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
  134. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/XMPPLUGINUIDS.txt +31 -0
  135. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/PDF_Handler +0 -0
  136. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/Info.plist +52 -0
  137. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MODULE_IDENTIFIER.txt +1 -0
  138. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/MiniPDFL +0 -0
  139. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Resources/English.lproj/InfoPlist.strings +0 -0
  140. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
  141. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
  142. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings +0 -0
  143. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/Resources/Info.plist +35 -0
  144. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
  145. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
  146. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings +0 -0
  147. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/Resources/Info.plist +35 -0
  148. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
  149. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/XMPPLUGINUIDS.txt +31 -0
  150. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/_CodeSignature/CodeResources +216 -0
  151. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/PDF_Handler +0 -0
  152. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/Info.plist +52 -0
  153. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MODULE_IDENTIFIER.txt +1 -0
  154. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/MiniPDFL +0 -0
  155. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Resources/English.lproj/InfoPlist.strings +0 -0
  156. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
  157. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
  158. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings +0 -0
  159. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/Resources/Info.plist +35 -0
  160. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
  161. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
  162. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/Resources/English.lproj/InfoPlist.strings +0 -0
  163. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/Resources/Info.plist +35 -0
  164. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
  165. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/XMPPLUGINUIDS.txt +31 -0
  166. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/_CodeSignature/CodeResources +216 -0
  167. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/linux/PDF_Handler.exp +11 -0
  168. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_Handler.exp +2 -0
  169. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_Handler.plist +28 -0
  170. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_HandlerPList.h +12 -0
  171. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/CopyPDFL.bat +14 -0
  172. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler-32.rc +8 -0
  173. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler-64.rc +8 -0
  174. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler.def +9 -0
  175. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/windows/windows_x64/MiniPDFL.dll +0 -0
  176. data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/windows/windows_x64/PDF_Handler.xpi +0 -0
  177. data/lib/xmp_toolkit_ruby/version.rb +5 -0
  178. data/lib/xmp_toolkit_ruby/xmp_file_format.rb +87 -0
  179. data/lib/xmp_toolkit_ruby/xmp_file_handler_flags.rb +49 -0
  180. data/lib/xmp_toolkit_ruby.rb +237 -0
  181. data/sig/xmp_toolkit_ruby.rbs +4 -0
  182. data/tasks/changelog.rake +29 -0
  183. metadata +357 -0
@@ -0,0 +1,967 @@
1
+ #ifndef __TXMPUtils_hpp__
2
+ #define __TXMPUtils_hpp__ 1
3
+
4
+ #if ( ! __XMP_hpp__ )
5
+ #error "Do not directly include, use XMP.hpp"
6
+ #endif
7
+
8
+ // =================================================================================================
9
+ // Copyright Adobe
10
+ // Copyright 2002 Adobe
11
+ // All Rights Reserved
12
+ //
13
+ // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
14
+ // of the Adobe license agreement accompanying it.
15
+ // =================================================================================================
16
+
17
+ // =================================================================================================
18
+ /// \file TXMPUtils.hpp
19
+ /// \brief API for access to the XMP Toolkit utility services.
20
+ ///
21
+ /// \c TXMPUtils is the template class providing utility services for the XMP Toolkit. It must be
22
+ /// instantiated with a string class such as \c std::string. See the instructions in XMP.hpp, and
23
+ /// the Overview for a discussion of the overall architecture of the XMP API.
24
+ // =================================================================================================
25
+
26
+ // =================================================================================================
27
+ /// \class TXMPUtils TXMPUtils.hpp
28
+ /// @brief API for access to the XMP Toolkit utility services.
29
+ ///
30
+ /// \c TXMPUtils is a template class which must be instantiated with a string class such as
31
+ /// \c std::string. See the instructions in XMP.hpp, and the Overview for a discussion of the overall
32
+ /// architecture of the XMP API.
33
+ ///
34
+ /// This class defines helper functions that support the basic metadata manipulation provided by
35
+ /// \c TXMPMeta. All of the functions are static; that is, you call them directly from the concrete
36
+ /// class (\c SXMPUtils), which is never itself instantiated.
37
+ ///
38
+ /// General categories of utilities include:
39
+ ///
40
+ /// \li Composing complex path expressions, which you can then pass to the property access
41
+ /// functions in \c TXMPMeta
42
+ /// \li Converting between binary and string forms of property values
43
+ /// \li Manipulating date/time values
44
+ /// \li Encoding and decoding base-64 strings
45
+ /// \li JPEG file handling
46
+ /// \li Editing aids for creating a user interface for the XMP Toolkit
47
+ // =================================================================================================
48
+
49
+ template <class tStringObj> class TXMPUtils {
50
+
51
+ public:
52
+
53
+ // =============================================================================================
54
+ // No constructors or destructor declared or needed
55
+ // ================================================
56
+
57
+ // ============================================================================================
58
+ /// \name Path composition
59
+ /// @{
60
+ ///
61
+ /// These functions provide support for composing path expressions to deeply nested properties.
62
+ /// The functions in \c TXMPMeta such as \c TXMPMeta::GetProperty(),
63
+ /// \c TXMPMeta::GetArrayItem(), and \c TXMPMeta::GetStructField() provide easy access to top level
64
+ /// simple properties, items in top level arrays, and fields of top level structs. They are
65
+ /// not as convenient for more complex things, such as fields several levels deep in a complex
66
+ /// struct, or fields within an array of structs, or items of an array that is a field of a
67
+ /// struct. You can use these utility functions to compose these paths, which you can then pass
68
+ /// to the property access functions. You can also compose paths to top-level array items or
69
+ /// struct fields so that you can use the binary accessors such as
70
+ /// \c TXMPMeta::GetProperty_Int().
71
+ ///
72
+ /// You can use these functions is to compose a complete path expression, or all but the last
73
+ /// component. For example, suppose you have a property that is an array of integers within a
74
+ /// struct. You can access one of the array items like this:
75
+ ///
76
+ /// <pre>
77
+ /// SXMPUtils::ComposeStructFieldPath ( schemaNS, "Struct", fieldNS, "Array", &path );
78
+ /// SXMPUtils::ComposeArrayItemPath ( schemaNS, path, index, &path );
79
+ /// exists = xmpObj.GetProperty_Int ( schemaNS, path, &value, &options );
80
+ /// </pre>
81
+ ///
82
+ /// You could also use this code if you want the string form of the integer:
83
+ ///
84
+ /// <pre>
85
+ /// SXMPUtils::ComposeStructFieldPath ( schemaNS, "Struct", fieldNS, "Array", &path );
86
+ /// xmpObj.GetArrayItem ( schemaNS, path, index, &value, &options );
87
+ /// </pre>
88
+ ///
89
+ /// \note It might look confusing that the \c schemaNS is passed in all of the calls above. This
90
+ /// is because the XMP Toolkit keeps the top-level "schema" namespace separate from the rest of
91
+ /// the path expression.
92
+
93
+ // ---------------------------------------------------------------------------------------------
94
+ /// @brief \c ComposeArrayItemPath() composes the path expression for an item in an array.
95
+ ///
96
+ /// The returned string is in the form <tt>ns:arrayName[i]</tt>, where "ns" is the prefix for
97
+ /// the specified namespace, and "i" is the decimal representation of specified item index.
98
+ /// If the last item was specified, the path is <tt>ns:arrayName[last()]</tt>.
99
+ ///
100
+ /// @param schemaNS The namespace URI for the array; see \c GetProperty().
101
+ ///
102
+ /// @param arrayName The name of the array. Can be a general path expression, must not be null
103
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
104
+ ///
105
+ /// @param itemIndex The 1-based index of the desired item. Use the macro
106
+ /// \c #kXMP_ArrayLastItem to specify the last existing array item.
107
+ ///
108
+ /// @param fullPath [out] A string in which to return the composed path.
109
+
110
+ static void ComposeArrayItemPath ( XMP_StringPtr schemaNS,
111
+ XMP_StringPtr arrayName,
112
+ XMP_Index itemIndex,
113
+ tStringObj * fullPath );
114
+
115
+ // ---------------------------------------------------------------------------------------------
116
+ /// @brief \c ComposeStructFieldPath() composes the path expression for a field in a struct.
117
+ ///
118
+ /// The returned string is in the form <tt>ns:structName/fNS:fieldName</tt>, where "ns" is the
119
+ /// prefix for the schema namespace, and "fNS" is the prefix for field namespace.
120
+ ///
121
+ /// @param schemaNS The namespace URI for the struct; see \c GetProperty().
122
+ ///
123
+ /// @param structName The name of the struct. Can be a general path expression, must not be null
124
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
125
+ ///
126
+ /// @param fieldNS The namespace URI for the field. Same URI and prefix usage as the
127
+ /// \c schemaNS and \c structName parameters.
128
+ ///
129
+ /// @param fieldName The name of the field. Must be a single XML name, must not be null or the
130
+ /// empty string. Same URI and prefix usage as the \c schemaNS and \c structName parameters.
131
+ ///
132
+ /// @param fullPath [out] A string in which to return the composed path.
133
+
134
+ static void ComposeStructFieldPath ( XMP_StringPtr schemaNS,
135
+ XMP_StringPtr structName,
136
+ XMP_StringPtr fieldNS,
137
+ XMP_StringPtr fieldName,
138
+ tStringObj * fullPath );
139
+
140
+ // ---------------------------------------------------------------------------------------------
141
+ /// @brief \c ComposeQualifierPath() composes the path expression for a qualifier.
142
+ ///
143
+ /// The returned string is in the form <tt>ns:propName/?qNS:qualName</tt>, where "ns" is the
144
+ /// prefix for the schema namespace, and "qNS" is the prefix for the qualifier namespace.
145
+ ///
146
+ /// @param schemaNS The namespace URI; see \c GetProperty().
147
+ ///
148
+ /// @param propName The name of the property to which the qualifier is attached. Can be a
149
+ /// general path expression, must not be null or the empty string; see \c GetProperty() for
150
+ /// namespace prefix usage.
151
+ ///
152
+ /// @param qualNS The namespace URI for the qualifier. Same URI and prefix usage as the
153
+ /// \c schemaNS and \c propName parameters.
154
+ ///
155
+ /// @param qualName The name of the qualifier. Must be a single XML name, must not be null or the
156
+ /// empty string. Same URI and prefix usage as the \c schemaNS and \c propName parameters.
157
+ ///
158
+ /// @param fullPath [out] A string in which to return the composed path.
159
+
160
+ static void ComposeQualifierPath ( XMP_StringPtr schemaNS,
161
+ XMP_StringPtr propName,
162
+ XMP_StringPtr qualNS,
163
+ XMP_StringPtr qualName,
164
+ tStringObj * fullPath );
165
+
166
+ // ---------------------------------------------------------------------------------------------
167
+ /// @brief \c ComposeLangSelector() composes the path expression to select an alternate item by language.
168
+ ///
169
+ /// Path syntax allows two forms of "content addressing" to select an item in an array of
170
+ /// alternatives. The form used in this function lets you select an item in an alt-text array
171
+ /// based on the value of its \c xml:lang qualifier. The other form of content addressing is
172
+ /// shown in \c ComposeFieldSelector().
173
+ ///
174
+ /// The returned string is in the form <tt>ns:arrayName[\@xml:lang='langName']</tt>, where
175
+ /// "ns" is the prefix for the schema namespace
176
+ ///
177
+ /// This function provides a path expression that is explicitly and only for a specific
178
+ /// language. In most cases, \c TXMPMeta::SetLocalizedText() and \c TXMPMeta::GetLocalizedText()
179
+ /// are preferred, because they provide extra logic to choose the appropriate language and
180
+ /// maintain consistency with the 'x-default' value.
181
+ ///
182
+ /// @param schemaNS The namespace URI for the array; see \c GetProperty().
183
+ ///
184
+ /// @param arrayName The name of the array. Can be a general path expression, must not be null
185
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
186
+ ///
187
+ /// @param langName The RFC 3066 code for the desired language, as a null-terminated UTF-8 string.
188
+ ///
189
+ /// @param fullPath [out] A string in which to return the composed path.
190
+
191
+ static void ComposeLangSelector ( XMP_StringPtr schemaNS,
192
+ XMP_StringPtr arrayName,
193
+ XMP_StringPtr langName,
194
+ tStringObj * fullPath );
195
+
196
+ // ---------------------------------------------------------------------------------------------
197
+ /// @brief \c ComposeLangSelector() composes a path expression to select an alternate item by language.
198
+ ///
199
+ /// Path syntax allows two forms of "content addressing" to select an item in an array of
200
+ /// alternatives. The form used in this function lets you select an item in an alt-text array
201
+ /// based on the value of its \c xml:lang qualifier. The other form of content addressing is
202
+ /// shown in \c ComposeFieldSelector().
203
+ ///
204
+ /// The returned string is in the form <tt>ns:arrayName[\@xml:lang='langName']</tt>, where
205
+ /// "ns" is the prefix for the schema namespace
206
+ ///
207
+ /// This function provides a path expression that is explicitly and only for a specific
208
+ /// language. In most cases, \c TXMPMeta::SetLocalizedText() and \c TXMPMeta::GetLocalizedText()
209
+ /// are preferred, because they provide extra logic to choose the appropriate language and
210
+ /// maintain consistency with the 'x-default' value.
211
+ ///
212
+ /// @param schemaNS The namespace URI for the array; see \c GetProperty().
213
+ ///
214
+ /// @param arrayName The name of the array. Can be a general path expression, must not be null
215
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
216
+ ///
217
+ /// @param langName The RFC 3066 code for the desired language, as a string object.
218
+ ///
219
+ /// @param fullPath [out] A string in which to return the composed path.
220
+
221
+ static void ComposeLangSelector ( XMP_StringPtr schemaNS,
222
+ XMP_StringPtr arrayName,
223
+ const tStringObj & langName,
224
+ tStringObj * fullPath );
225
+
226
+ // ---------------------------------------------------------------------------------------------
227
+ /// @brief \c ComposeFieldSelector() composes a path expression to select an alternate item by a field's value.
228
+ ///
229
+ /// Path syntax allows two forms of "content addressing" to select an item in an array of
230
+ /// alternatives. The form used in this function lets you select an item in an array of structs
231
+ /// based on the value of one of the fields in the structs. The other form of content addressing
232
+ /// is shown in \c ComposeLangSelector().
233
+ ///
234
+ /// For example, consider a simple struct that has two fields, the name of a city and the URI of
235
+ /// an FTP site in that city. Use this to create an array of download alternatives. You can show
236
+ /// the user a popup built from the values of the city fields, then get the corresponding URI as
237
+ /// follows:
238
+ /// <pre>
239
+ /// ComposeFieldSelector ( schemaNS, "Downloads", fieldNS, "City", chosenCity, &path );
240
+ /// exists = GetStructField ( schemaNS, path, fieldNS, "URI", &uri );
241
+ /// </pre>
242
+ ///
243
+ /// The returned string is in the form <tt>ns:arrayName[fNS:fieldName='fieldValue']</tt>, where
244
+ /// "ns" is the prefix for the schema namespace and "fNS" is the prefix for the field namespace.
245
+ ///
246
+ /// @param schemaNS The namespace URI for the array; see \c GetProperty().
247
+ ///
248
+ /// @param arrayName The name of the array. Can be a general path expression, must not be null
249
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
250
+ ///
251
+ /// @param fieldNS The namespace URI for the field used as the selector. Same URI and prefix
252
+ /// usage as the \c schemaNS and \c arrayName parameters.
253
+ ///
254
+ /// @param fieldName The name of the field used as the selector. Must be a single XML name, must
255
+ /// not be null or the empty string. It must be the name of a field that is itself simple.
256
+ ///
257
+ /// @param fieldValue The desired value of the field, specified as a null-terminated UTF-8 string.
258
+ ///
259
+ /// @param fullPath [out] A string in which to return the composed path.
260
+
261
+ static void ComposeFieldSelector ( XMP_StringPtr schemaNS,
262
+ XMP_StringPtr arrayName,
263
+ XMP_StringPtr fieldNS,
264
+ XMP_StringPtr fieldName,
265
+ XMP_StringPtr fieldValue,
266
+ tStringObj * fullPath );
267
+
268
+ // ---------------------------------------------------------------------------------------------
269
+ /// @brief \c ComposeFieldSelector() composes a path expression to select an alternate item by a field's value.
270
+ ///
271
+ /// Path syntax allows two forms of "content addressing" to select an item in an array of
272
+ /// alternatives. The form used in this function lets you select an item in an array of structs
273
+ /// based on the value of one of the fields in the structs. The other form of content addressing
274
+ /// is shown in \c ComposeLangSelector().
275
+ ///
276
+ /// For example, consider a simple struct that has two fields, the name of a city and the URI of
277
+ /// an FTP site in that city. Use this to create an array of download alternatives. You can show
278
+ /// the user a popup built from the values of the city fields, then get the corresponding URI as
279
+ /// follows:
280
+ /// <pre>
281
+ /// ComposeFieldSelector ( schemaNS, "Downloads", fieldNS, "City", chosenCity, &path );
282
+ /// exists = GetStructField ( schemaNS, path, fieldNS, "URI", &uri );
283
+ /// </pre>
284
+ ///
285
+ /// The returned string is in the form <tt>ns:arrayName[fNS:fieldName='fieldValue']</tt>, where
286
+ /// "ns" is the prefix for the schema namespace and "fNS" is the prefix for the field namespace.
287
+ ///
288
+ /// @param schemaNS The namespace URI for the array; see \c GetProperty().
289
+ ///
290
+ /// @param arrayName The name of the array. Can be a general path expression, must not be null
291
+ /// or the empty string; see \c GetProperty() for namespace prefix usage.
292
+ ///
293
+ /// @param fieldNS The namespace URI for the field used as the selector. Same URI and prefix
294
+ /// usage as the \c schemaNS and \c arrayName parameters.
295
+ ///
296
+ /// @param fieldName The name of the field used as the selector. Must be a single XML name, must
297
+ /// not be null or the empty string. It must be the name of a field that is itself simple.
298
+ ///
299
+ /// @param fieldValue The desired value of the field, specified as a string object.
300
+ ///
301
+ /// @param fullPath [out] A string in which to return the composed path.
302
+
303
+ static void ComposeFieldSelector ( XMP_StringPtr schemaNS,
304
+ XMP_StringPtr arrayName,
305
+ XMP_StringPtr fieldNS,
306
+ XMP_StringPtr fieldName,
307
+ const tStringObj & fieldValue,
308
+ tStringObj * fullPath );
309
+
310
+ /// @}
311
+
312
+ // =============================================================================================
313
+ /// \name Conversion between binary types and strings
314
+ /// @{
315
+ ///
316
+ /// The main accessors in \c TXMPMeta set and retrieve property values as strings. additional
317
+ /// functions, such as \c TXMPMeta::SetPropertyInt(), set and retrieve property values as
318
+ /// explicit binary data types. Use these functions to convert between binary and string
319
+ /// values.
320
+ ///
321
+ /// Strings can be specified as null-terminated UTF-8 (\c #XMP_StringPtr), or as string
322
+ /// objects (\c tStringObj) of the type declared when instantiating the XMP classes; see
323
+ /// \c XMP.hpp. Alternate forms of each conversion function allow either type of string.
324
+
325
+ // ---------------------------------------------------------------------------------------------
326
+ /// @brief \c ConvertFromBool() converts a Boolean value to a string.
327
+ ///
328
+ /// The string values of Booleans are returned by the macros \c #kXMP_TrueStr and
329
+ /// \c #kXMP_FalseStr in \c XMP_Const.h.
330
+ ///
331
+ /// @param binValue The Boolean value to be converted.
332
+ ///
333
+ /// @param strValue [out] A buffer in which to return the string representation of the value.
334
+
335
+ static void ConvertFromBool ( bool binValue,
336
+ tStringObj * strValue );
337
+
338
+ // ---------------------------------------------------------------------------------------------
339
+ /// @brief \c ConvertFromInt() converts a 32-bit integer value to a string.
340
+ ///
341
+ /// @param binValue The integer value to be converted.
342
+ ///
343
+ /// @param format Optional. A C \c sprintf format for the conversion. Default is "%d".
344
+ ///
345
+ /// @param strValue [out] A buffer in which to return the string representation of the value.
346
+
347
+ static void ConvertFromInt ( long binValue,
348
+ XMP_StringPtr format,
349
+ tStringObj * strValue );
350
+ // ---------------------------------------------------------------------------------------------
351
+ /// @brief \c ConvertFromInt64() converts a 64-bit integer value to a string.
352
+ ///
353
+ /// @param binValue The integer value to be converted.
354
+ ///
355
+ /// @param format Optional. A C \c sprintf format for the conversion. Default is "%d".
356
+ ///
357
+ /// @param strValue [out] A buffer in which to return the string representation of the value.
358
+
359
+ static void ConvertFromInt64 ( long long binValue,
360
+ XMP_StringPtr format,
361
+ tStringObj * strValue );
362
+
363
+ // ---------------------------------------------------------------------------------------------
364
+ /// @brief \c ConvertFromFloat() converts a floating-point value to a string.
365
+ ///
366
+ /// @param binValue The floating-point value to be converted.
367
+ ///
368
+ /// @param format Optional. A C \c sprintf format for the conversion. Default is "%d".
369
+ ///
370
+ /// @param strValue [out] A buffer in which to return the string representation of the value.
371
+
372
+ static void ConvertFromFloat ( double binValue,
373
+ XMP_StringPtr format,
374
+ tStringObj * strValue );
375
+
376
+ // ---------------------------------------------------------------------------------------------
377
+ /// @brief \c ConvertFromDate() converts a date/time value to a string.
378
+ ///
379
+ /// Formats a date according to the ISO 8601 profile in http://www.w3.org/TR/NOTE-datetime:
380
+ /// <pre>
381
+ /// YYYY
382
+ /// YYYY-MM
383
+ /// YYYY-MM-DD
384
+ /// YYYY-MM-DDThh:mmTZD
385
+ /// YYYY-MM-DDThh:mm:ssTZD
386
+ /// YYYY-MM-DDThh:mm:ss.sTZD
387
+ /// </pre>
388
+ ///
389
+ /// \c YYYY = four-digit year, formatted as "%.4d" <br>
390
+ /// \c MM = two-digit month (01=January) <br>
391
+ /// \c DD = two-digit day of month (01 through 31) <br>
392
+ /// \c hh = two digits of hour (00 through 23) <br>
393
+ /// \c mm = two digits of minute (00 through 59) <br>
394
+ /// \c ss = two digits of second (00 through 59) <br>
395
+ /// \c s = one or more digits representing a decimal fraction of a second <br>
396
+ /// \c TZD = time zone designator (Z or +hh:mm or -hh:mm)
397
+ ///
398
+ /// Time-only input is allowed where the year, month, and day are all zero. This is output as
399
+ /// "0000-00-00...".
400
+ ///
401
+ /// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows
402
+ /// any year, even negative ones. The W3C profile also requires a time zone designator if a time
403
+ /// is present, this API treats the time zone designator as optional. The XMP_DateTime type has
404
+ /// an explicit notion of zone-less time.
405
+ ///
406
+ /// @param binValue The date/time value to be converted.
407
+ ///
408
+ /// @param strValue [out] A buffer in which to return the ISO 8601 string representation of the date/time.
409
+
410
+ static void ConvertFromDate ( const XMP_DateTime & binValue,
411
+ tStringObj * strValue );
412
+
413
+ // ---------------------------------------------------------------------------------------------
414
+ /// @brief \c ConvertToBool() converts a string to a Boolean value.
415
+ ///
416
+ /// The preferred strings are those returned by the macros \c #kXMP_TrueStr and \c #kXMP_FalseStr.
417
+ /// If these do not match, the function does a case insensitive comparison, then simply 't' or 'f',
418
+ /// and finally non-zero and zero integer representations.
419
+ ///
420
+ /// @param strValue The string representation of the value, specified as a null-terminated UTF-8 string.
421
+ ///
422
+ /// @return The appropriate C++ bool value for the string.
423
+
424
+ static bool ConvertToBool ( XMP_StringPtr strValue );
425
+
426
+ // ---------------------------------------------------------------------------------------------
427
+ /// @brief \c ConvertToBool() converts a string to a Boolean value.
428
+ ///
429
+ /// Overloads the basic form of the function, allowing you to pass a string object,
430
+ /// rather than a <tt>const * char</tt>. It is otherwise identical; see details in the canonical form.
431
+ ///
432
+ /// @param strValue The string representation of the value, specified as a string object.
433
+ ///
434
+ /// @return The appropriate C++ bool value for the string.
435
+
436
+ static bool ConvertToBool ( const tStringObj & strValue );
437
+
438
+ // ---------------------------------------------------------------------------------------------
439
+ /// @brief \c ConvertToInt() converts a string to a 32-bit integer value.
440
+ ///
441
+ /// @param strValue The string representation of the value, specified as a null-terminated UTF-8 string.
442
+ ///
443
+ /// @return The 32-bit integer value.
444
+
445
+ static long ConvertToInt ( XMP_StringPtr strValue );
446
+
447
+ // ---------------------------------------------------------------------------------------------
448
+ /// @brief \c ConvertToInt() converts a string to a 32-bit integer value.
449
+ ///
450
+ /// Overloads the basic form of the function, allowing you to pass a string object,
451
+ /// rather than a <tt>const * char</tt>. It is otherwise identical.
452
+ ///
453
+ /// @param strValue The string representation of the value, specified as a string object.
454
+ ///
455
+ /// @return The 32-bit integer value.
456
+
457
+ static long ConvertToInt ( const tStringObj & strValue );
458
+
459
+ // ---------------------------------------------------------------------------------------------
460
+ /// @brief \c ConvertToInt64() converts a string to a 64-bit integer value.
461
+ ///
462
+ /// @param strValue The string representation of the value, specified as a null-terminated UTF-8 string.
463
+ ///
464
+ /// @return The 64-bit integer value.
465
+
466
+ static long long ConvertToInt64 ( XMP_StringPtr strValue );
467
+
468
+ // ---------------------------------------------------------------------------------------------
469
+ /// @brief \c ConvertToInt64() converts a string to a 64-bit integer value.
470
+ ///
471
+ /// Overloads the basic form of the function, allowing you to pass a string object,
472
+ /// rather than a <tt>const * char</tt>. It is otherwise identical.
473
+ ///
474
+ /// @param strValue The string representation of the value, specified as a string object.
475
+ ///
476
+ /// @return The 64-bit integer value.
477
+
478
+ static long long ConvertToInt64 ( const tStringObj & strValue );
479
+
480
+ // ---------------------------------------------------------------------------------------------
481
+ /// @brief \c ConvertToFloat() converts a string to a floating-point value.
482
+ ///
483
+ /// @param strValue The string representation of the value, specified as a null-terminated UTF-8 string.
484
+ ///
485
+ /// @return The floating-point value.
486
+
487
+ static double ConvertToFloat ( XMP_StringPtr strValue );
488
+
489
+ // ---------------------------------------------------------------------------------------------
490
+ /// @brief \c ConvertToFloat() converts a string to a floating-point value.
491
+ ///
492
+ /// Overloads the basic form of the function, allowing you to pass a string object,
493
+ /// rather than a <tt>const * char</tt>. It is otherwise identical.
494
+ ///
495
+ /// @param strValue The string representation of the value, specified as a string object.
496
+ ///
497
+ /// @return The floating-point value.
498
+
499
+ static double ConvertToFloat ( const tStringObj & strValue );
500
+
501
+ // ---------------------------------------------------------------------------------------------
502
+ /// @brief \c ConvertToDate() converts a string to a date/time value.
503
+ ///
504
+ /// Parses a date according to the ISO 8601 profile in http://www.w3.org/TR/NOTE-datetime:
505
+ /// <pre>
506
+ /// YYYY
507
+ /// YYYY-MM
508
+ /// YYYY-MM-DD
509
+ /// YYYY-MM-DDThh:mmTZD
510
+ /// YYYY-MM-DDThh:mm:ssTZD
511
+ /// YYYY-MM-DDThh:mm:ss.sTZD
512
+ /// </pre>
513
+ ///
514
+ /// \c YYYY = four-digit year, formatted as "%.4d" <br>
515
+ /// \c MM = two-digit month (01=January) <br>
516
+ /// \c DD = two-digit day of month (01 through 31) <br>
517
+ /// \c hh = two digits of hour (00 through 23) <br>
518
+ /// \c mm = two digits of minute (00 through 59) <br>
519
+ /// \c ss = two digits of second (00 through 59) <br>
520
+ /// \c s = one or more digits representing a decimal fraction of a second <br>
521
+ /// \c TZD = time zone designator (Z or +hh:mm or -hh:mm)
522
+ ///
523
+ /// A missing date portion or missing TZD are tolerated. A missing date value can begin with
524
+ /// "Thh:" or "hh:"; the year, month, and day are all set to zero in the \c #XMP_DateTime value.
525
+ /// A missing TZD is assumed to be UTC.
526
+ ///
527
+ /// @note ISO 8601 does not allow years less than 1000 or greater than 9999. This API allows
528
+ /// any year, even negative ones. The W3C profile also requires a time zone designator if a time
529
+ /// is present, this API treats the time zone designator as optional. The XMP_DateTime type has
530
+ /// an explicit notion of zone-less time.
531
+ ///
532
+ /// @param strValue The ISO 8601 string representation of the date/time, specified as a
533
+ /// null-terminated UTF-8 string.
534
+ ///
535
+ /// @param binValue [out] A buffer in which to return the binary date/time value.
536
+
537
+ static void ConvertToDate ( XMP_StringPtr strValue,
538
+ XMP_DateTime * binValue );
539
+
540
+ // ---------------------------------------------------------------------------------------------
541
+ /// @brief \c ConvertToDate() converts a string to a date/time value.
542
+ ///
543
+ /// Overloads the basic form of the function, allowing you to pass a string object,
544
+ /// rather than a <tt>const * char</tt>. It is otherwise identical.
545
+ /// See details for the canonical form.
546
+ ///
547
+ ///
548
+ /// @param strValue The ISO 8601 string representation of the date/time, specified as a string
549
+ /// object.
550
+ ///
551
+ /// @param binValue [out] A buffer in which to return the binary date/time value.
552
+
553
+ static void ConvertToDate ( const tStringObj & strValue,
554
+ XMP_DateTime * binValue );
555
+
556
+ /// @}
557
+
558
+ // =============================================================================================
559
+ /// \name Date-time manipulation
560
+ /// @{
561
+ ///
562
+ /// In addition to the type-conversion functions that convert between strings and binary
563
+ /// date-time values, these functions create, manipulate, and compare date-time values.
564
+
565
+ // ---------------------------------------------------------------------------------------------
566
+ /// @brief \c CurrentDateTime() obtains the current date and time.
567
+ ///
568
+ /// Creates and returns a binary \c #XMP_DateTime value. The returned time is UTC, properly
569
+ /// adjusted for the local time zone. The resolution of the time is not guaranteed to be finer
570
+ /// than seconds.
571
+ ///
572
+ /// @param time [out] A buffer in which to return the date/time value.
573
+
574
+ static void CurrentDateTime ( XMP_DateTime * time );
575
+
576
+ // ---------------------------------------------------------------------------------------------
577
+ /// @brief \c SetTimeZone() sets the time zone in a date/time value to the local time zone.
578
+ ///
579
+ /// Any existing time zone value is replaced. The other date/time fields are not adjusted in any way.
580
+ ///
581
+ /// @param time A pointer to the date-time value, which is modified in place.
582
+
583
+ static void SetTimeZone ( XMP_DateTime * time );
584
+
585
+ // ---------------------------------------------------------------------------------------------
586
+ /// @brief \c ConvertToUTCTime() ensures that a time is UTC.
587
+ ///
588
+ /// If the time zone is not UTC, the time is adjusted and the time zone set to be UTC. The value
589
+ /// is not modified if the time zone is already UTC or if the value has no time zone.
590
+ ///
591
+ /// @param time A pointer to the date-time value, which is modified in place.
592
+
593
+ static void ConvertToUTCTime ( XMP_DateTime * time );
594
+
595
+ // ---------------------------------------------------------------------------------------------
596
+ /// @brief \c ConvertToLocalTime() ensures that a time is local.
597
+ ///
598
+ /// If the time zone is not the local zone, the time is adjusted and the time zone set to be local.
599
+ /// The value is not modified if the time zone is already the local zone or if the value has no
600
+ /// time zone.
601
+ ///
602
+ /// @param time A pointer to the date-time value, which is modified in place.
603
+
604
+ static void ConvertToLocalTime ( XMP_DateTime * time );
605
+
606
+ // ---------------------------------------------------------------------------------------------
607
+ /// @brief \c CompareDateTime() compares the order of two date/time values.
608
+ ///
609
+ /// Both values are treated as in the same time zone if either has no time zone.
610
+ ///
611
+ /// @param left The left-side date/time value.
612
+ ///
613
+ /// @param right The right-side date/time value.
614
+ ///
615
+ /// @return An integer indicating the order:
616
+ /// \li -1 if left is earlier than right
617
+ /// \li 0 if left matches right
618
+ /// \li +1 if left is later than right
619
+
620
+ static int CompareDateTime ( const XMP_DateTime & left,
621
+ const XMP_DateTime & right );
622
+
623
+ /// @}
624
+
625
+ // =============================================================================================
626
+ /// \name Base64 encoding and decoding
627
+ /// @{
628
+ ///
629
+ /// These functions convert between raw data values and Base64-encoded strings.
630
+
631
+ // ---------------------------------------------------------------------------------------------
632
+ /// @brief \c EncodeToBase64() converts a raw data value to a Base64-encoded string.
633
+ ///
634
+ /// @param rawStr An \c #XMP_StringPtr (char *) string containing the raw data to be converted.
635
+ ///
636
+ /// @param rawLen The number of characters of raw data to be converted.
637
+ ///
638
+ /// @param encodedStr [out] A string object in which to return the encoded string.
639
+
640
+ static void EncodeToBase64 ( XMP_StringPtr rawStr,
641
+ XMP_StringLen rawLen,
642
+ tStringObj * encodedStr );
643
+
644
+ // ---------------------------------------------------------------------------------------------
645
+ /// @brief \c EncodeToBase64() converts a raw data value passed in a string object to a Base64-encoded string.
646
+ ///
647
+ /// Overloads the basic form of the function, allowing you to pass a string object as input.
648
+ /// It is otherwise identical.
649
+ ///
650
+ /// @param rawStr A string object containing the raw data to be converted.
651
+ ///
652
+ /// @param encodedStr [out] A string object in which to return the encoded string.
653
+
654
+ static void EncodeToBase64 ( const tStringObj & rawStr,
655
+ tStringObj * encodedStr );
656
+
657
+ // ---------------------------------------------------------------------------------------------
658
+ /// @brief \c DecodeFromBase64() Decodes a Base64-encoded string to raw data.
659
+ ///
660
+ /// @param encodedStr An \c #XMP_StringPtr (char *) string containing the encoded data to be converted.
661
+ ///
662
+ /// @param encodedLen The number of characters of raw data to be converted.
663
+ ///
664
+ /// @param rawStr [out] A string object in which to return the decoded data.
665
+
666
+ static void DecodeFromBase64 ( XMP_StringPtr encodedStr,
667
+ XMP_StringLen encodedLen,
668
+ tStringObj * rawStr );
669
+
670
+ // ---------------------------------------------------------------------------------------------
671
+ /// @brief \c DecodeFromBase64() Decodes a Base64-encoded string, passed as a string object, to raw data.
672
+ ///
673
+ /// Overloads the basic form of the function, allowing you to pass a string object as input.
674
+ /// It is otherwise identical.
675
+ ///
676
+ /// @param encodedStr An string object containing the encoded data to be converted.
677
+ ///
678
+ /// @param rawStr [out] A string object in which to return the decoded data.
679
+
680
+ static void DecodeFromBase64 ( const tStringObj & encodedStr,
681
+ tStringObj * rawStr );
682
+
683
+ /// @}
684
+
685
+ // =============================================================================================
686
+ // =============================================================================================
687
+ /// \name JPEG file handling
688
+ /// @{
689
+ ///
690
+ /// These functions support the partitioning of XMP in JPEG files into standard and extended
691
+ /// portions in order to work around the 64KB size limit of JPEG marker segments.
692
+ ///
693
+ /// @note (Doc note) Add detail about how to write out and read back extended data
694
+
695
+ // ---------------------------------------------------------------------------------------------
696
+ /// @brief \c PackageForJPEG() creates XMP serializations appropriate for a JPEG file.
697
+ ///
698
+ /// The standard XMP in a JPEG file is limited to 64K bytes. This function serializes the XMP
699
+ /// metadata in an XMP object into a string of RDF (see \c TXMPMeta::SerializeToBuffer()). If
700
+ /// the data does not fit into the 64K byte limit, it creates a second packet string with the
701
+ /// extended data.
702
+ ///
703
+ /// @param xmpObj The XMP object containing the metadata.
704
+ ///
705
+ /// @param standardXMP [out] A string object in which to return the full standard XMP packet.
706
+ ///
707
+ /// @param extendedXMP [out] A string object in which to return the serialized extended XMP,
708
+ /// empty if not needed.
709
+ ///
710
+ /// @param extendedDigest [out] A string object in which to return an MD5 digest of the serialized
711
+ /// extended XMP, empty if not needed.
712
+ ///
713
+ /// @see \c MergeFromJPEG()
714
+
715
+ static void PackageForJPEG ( const TXMPMeta<tStringObj> & xmpObj,
716
+ tStringObj * standardXMP,
717
+ tStringObj * extendedXMP,
718
+ tStringObj * extendedDigest );
719
+
720
+ // ---------------------------------------------------------------------------------------------
721
+ /// @brief \c MergeFromJPEG() merges standard and extended XMP retrieved from a JPEG file.
722
+ ///
723
+ /// When an extended partition stores properties that do not fit into the JPEG file limitation
724
+ /// of 64K bytes, this function integrates those properties back into the same XMP object with
725
+ /// those from the standard XMP packet.
726
+ ///
727
+ /// @param fullXMP [in, out] An XMP object which the caller has initialized from the standard
728
+ /// XMP packet in a JPEG file. The extended XMP is added to this object.
729
+ ///
730
+ /// @param extendedXMP An XMP object which the caller has initialized from the extended XMP
731
+ /// packet in a JPEG file.
732
+ ///
733
+ /// @see \c PackageForJPEG()
734
+
735
+ static void MergeFromJPEG ( TXMPMeta<tStringObj> * fullXMP,
736
+ const TXMPMeta<tStringObj> & extendedXMP );
737
+
738
+ /// @}
739
+
740
+ // =============================================================================================
741
+ /// \name Editing utilities
742
+ /// @{
743
+ ///
744
+ /// These functions are useful in implementing a user interface for editing XMP. They
745
+ /// convert sets of property values to and from displayable and manipulable strings, and perform
746
+ /// operations on sets of metadata, such as those available from the File Info dialog box.
747
+
748
+ // ---------------------------------------------------------------------------------------------
749
+ /// @brief \c CatenateArrayItems() creates a single edit string from a set of array item values.
750
+ ///
751
+ /// Collects the values of all items in an array into a single string, using a specified
752
+ /// separation string. Each item in the specified array must be a simple string value.
753
+ ///
754
+ /// @param xmpObj The XMP object containing the array to be catenated.
755
+ ///
756
+ /// @param schemaNS The schema namespace URI for the array. Must not be null or the empty string.
757
+ ///
758
+ /// @param arrayName The name of the array. May be a general path expression, must not be null
759
+ /// or the empty string.
760
+ ///
761
+ /// @param separator The string with which to separate the items in the catenated string.
762
+ /// Defaults to "; ", ASCII semicolon and space (U+003B, U+0020).
763
+ ///
764
+ /// @param quotes The character or characters to use as quotes around array items that contain a
765
+ /// separator. Defaults to the double-quote character ("), ASCII quote (U+0022).
766
+ ///
767
+ /// @param options Option flags to control the catenation. <<what options?>>
768
+ ///
769
+ /// @param catedStr [out] A string object in which to return the catenated array items.
770
+ ///
771
+ /// @see \c SeparateArrayItems()
772
+
773
+ static void CatenateArrayItems ( const TXMPMeta<tStringObj> & xmpObj,
774
+ XMP_StringPtr schemaNS,
775
+ XMP_StringPtr arrayName,
776
+ XMP_StringPtr separator,
777
+ XMP_StringPtr quotes,
778
+ XMP_OptionBits options,
779
+ tStringObj * catedStr );
780
+
781
+ // ---------------------------------------------------------------------------------------------
782
+ /// @brief \c SeparateArrayItems() updates an array from a concatenated edit string of values.
783
+ ///
784
+ /// This reverses the action of \c CatenateArrayItems(), separating out individual array items
785
+ /// from the edit string and updating the array with the new values. Each item in the array must
786
+ /// be a simple string value.
787
+ ///
788
+ /// @param xmpObj The XMP object containing the array to be updated.
789
+ ///
790
+ /// @param schemaNS The schema namespace URI for the array. Must not be null or the empty string.
791
+ ///
792
+ /// @param arrayName The name of the array. May be a general path expression, must not be null
793
+ /// or the empty string.
794
+ ///
795
+ /// @param options Option flags to control the separation. <<what options?>>
796
+ ///
797
+ /// @param catedStr The concatenated array items, as created by \c CatenateArrayItems(),
798
+ /// specified as a null-terminated UTF-8 string.
799
+
800
+ static void SeparateArrayItems ( TXMPMeta<tStringObj> * xmpObj,
801
+ XMP_StringPtr schemaNS,
802
+ XMP_StringPtr arrayName,
803
+ XMP_OptionBits options,
804
+ XMP_StringPtr catedStr );
805
+
806
+ // ---------------------------------------------------------------------------------------------
807
+ /// @brief \c SeparateArrayItems() updates an array from a concatenated edit string of values.
808
+ ///
809
+ /// Overloads the basic form of the function, allowing you to pass a string object in which
810
+ /// to return the concatenated string. It is otherwise identical; see details for the canonical form.
811
+ ///
812
+
813
+ static void SeparateArrayItems ( TXMPMeta<tStringObj> * xmpObj,
814
+ XMP_StringPtr schemaNS,
815
+ XMP_StringPtr arrayName,
816
+ XMP_OptionBits options,
817
+ const tStringObj & catedStr );
818
+
819
+ /// @brief \c ApplyTemplate() modifies a working XMP object according to a template object.
820
+ ///
821
+ /// The XMP template can be used to add, replace or delete properties from the working XMP object.
822
+ /// This function replaces the previous \c AppendProperties() function, which is no longer available.
823
+ /// The actions that you specify determine how the template is applied. Each action can be applied
824
+ /// individually or combined; if you do not specify any actions, the properties and values in the working
825
+ /// XMP object do not change.
826
+ ///
827
+ /// These actions are available:
828
+ /// \li Clear (\c #kXMPTemplate_ClearUnnamedProperties): Deletes top-level properties.
829
+ /// Any top-level property that is present in the template (even with empty value)
830
+ /// is retained. All other top-level properties in the working object are deleted.
831
+ ///
832
+ /// \li Add (\c #kXMPTemplate_AddNewProperties): Adds new properties to the working object if the
833
+ /// template properties have values. See additional detail below.
834
+ ///
835
+ /// \li Replace (\c #kXMPTemplate_ReplaceExistingProperties): Replaces the values of existing top-level
836
+ /// properties in the working XMP if the value forms match those in the template. Properties
837
+ /// with empty values in the template are ignored. If combined with Clear or Add actions,
838
+ /// those take precedence; values are cleared or added, rather than replaced.
839
+ ///
840
+ /// \li Replace/Delete empty (\c #kXMPTemplate_ReplaceWithDeleteEmpty): Replaces values in the same way
841
+ /// as the simple Replace action, and also deletes properties if the value in the template is empty.
842
+ /// If combined with Clear or Add actions, those take precedence; values are cleared or added,
843
+ /// rather than replaced.
844
+ ///
845
+ /// \li Include internal (\c #kXMPTemplate_IncludeInternalProperties): Performs specified action
846
+ /// on internal properties as well as external properties. By default, internal properties
847
+ /// are ignored for all actions.
848
+ ///
849
+ /// The Add behavior depends on the type of property:
850
+ /// <ul>
851
+ /// <li> If a top-level property is not in the working XMP, and has a value in the template,
852
+ /// the property and value are added. Empty properties are not added. </li>
853
+ /// <li> If a property is in both the working XMP and template, the value forms must match, otherwise
854
+ /// the template is ignored for that property.</li>
855
+ /// <li> If a struct is present in both the working XMP and template, the individual fields of the
856
+ /// template struct are added as appropriate; that is, the logic is recursively applied to the fields.
857
+ /// Struct values are equivalent if they have the same fields with equivalent values. </li>
858
+ /// <li> If an array is present in both the working XMP and template, items from the template are
859
+ /// added if the value forms match. Array values match if they have sets of equivalent items,
860
+ /// regardless of order.</li>
861
+ /// <li> Alt-text arrays use the \c xml:lang qualifier as a key, adding languages that are missing. </li>
862
+ /// </ul>
863
+ /// Array item checking is n-squared; this can be time-intensive if the Replace option is
864
+ /// not specified. Each source item is checked to see if it already exists in the destination,
865
+ /// without regard to order or duplicates. Simple items are compared by value and \c xml:lang
866
+ /// qualifier; other qualifiers are ignored. Structs are recursively compared by field names,
867
+ /// without regard to field order. Arrays are compared by recursively comparing all items.
868
+
869
+ /// @param workingXMP The destination XMP object.
870
+ ///
871
+ /// @param templateXMP The template to apply to the destination XMP object.
872
+ ///
873
+ /// @param actions Option flags to control the copying. If none are specified, the properties and values
874
+ /// in the working XMP do not change. A logical OR of these bit-flag constants:
875
+ /// \li \c #kXMPTemplate_ClearUnnamedProperties -- Delete anything that is not in the template
876
+ /// \li \c #kXMPTemplate_AddNewProperties -- Add properties; see detailed description.
877
+ /// \li \c #kXMPTemplate_ReplaceExistingProperties -- Replace the values of existing properties.
878
+ /// \li \c #kXMPTemplate_ReplaceWithDeleteEmpty -- Replace the values of existing properties
879
+ /// and delete properties if the new value is empty.
880
+ /// \li \c #kXMPTemplate_IncludeInternalProperties -- Operate on internal properties as well as
881
+ /// external properties.
882
+ ///
883
+
884
+ static void ApplyTemplate ( TXMPMeta<tStringObj> * workingXMP,
885
+ const TXMPMeta<tStringObj> & templateXMP,
886
+ XMP_OptionBits actions );
887
+
888
+ // ---------------------------------------------------------------------------------------------
889
+ /// @brief \c RemoveProperties() removes multiple properties from an XMP object.
890
+ ///
891
+ /// The operation depends on how the namespace and property are specified:
892
+ ///
893
+ /// \li Non-empty \c schemaNS and \c propName - The named property is removed if it is an
894
+ /// external property, or if the \c #kXMPUtil_DoAllProperties option flag is set. It does not
895
+ /// matter whether the named property is an actual property or an alias.
896
+ ///
897
+ /// \li Non-empty \c schemaNS and empty \c propName - All external properties in the named
898
+ /// schema are removed. Internal properties are also removed if the
899
+ /// \c #kXMPUtil_DoAllProperties option flag is set. In addition, aliases from the named schema
900
+ /// are removed if the \c #kXMPUtil_IncludeAliases option flag is set.
901
+ ///
902
+ /// \li Empty \c schemaNS and empty \c propName - All external properties in all schemas are
903
+ /// removed. Internal properties are also removed if the \c #kXMPUtil_DoAllProperties option
904
+ /// flag is set. Aliases are handled implicitly, because the associated actuals are removed or
905
+ /// not.
906
+ ///
907
+ /// \li It is an error to pass an empty \c schemaNS and non-empty \c propName.
908
+ ///
909
+ /// @param xmpObj The XMP object containing the properties to be removed.
910
+ ///
911
+ /// @param schemaNS Optional schema namespace URI for the properties to be removed.
912
+ ///
913
+ /// @param propName Optional path expression for the property to be removed.
914
+ ///
915
+ /// @param options Option flags to control the deletion operation. A logical OR of these
916
+ /// bit-flag constants:
917
+ /// \li \c #kXMPUtil_DoAllProperties - Delete internal properties in addition to external properties.
918
+ /// \li \c #kXMPUtil_IncludeAliases - Include aliases if the schema is explicitly specified.
919
+
920
+ static void RemoveProperties ( TXMPMeta<tStringObj> * xmpObj,
921
+ XMP_StringPtr schemaNS = 0,
922
+ XMP_StringPtr propName = 0,
923
+ XMP_OptionBits options = 0 );
924
+
925
+ // ---------------------------------------------------------------------------------------------
926
+ /// @brief \c DuplicateSubtree() replicates a subtree from one XMP object into another.
927
+ ///
928
+ /// The destination can be a different namespace and root location in the same object, or the
929
+ /// same or a different location in another XMP object.
930
+ ///
931
+ /// @param source The source XMP object.
932
+ ///
933
+ /// @param dest The destination XMP object.
934
+ ///
935
+ /// @param sourceNS The schema namespace URI for the source subtree.
936
+ ///
937
+ /// @param sourceRoot The root location for the source subtree. Can be a general path expression,
938
+ /// must not be null or the empty string.
939
+ ///
940
+ /// @param destNS The schema namespace URI for the destination. Defaults to the source namespace.
941
+ ///
942
+ /// @param destRoot The root location for the destination. Can be a general path expression.
943
+ /// Defaults to the source location.
944
+ ///
945
+ /// @param options Option flags to control the operation. <<options?>>
946
+
947
+ static void DuplicateSubtree ( const TXMPMeta<tStringObj> & source,
948
+ TXMPMeta<tStringObj> * dest,
949
+ XMP_StringPtr sourceNS,
950
+ XMP_StringPtr sourceRoot,
951
+ XMP_StringPtr destNS = 0,
952
+ XMP_StringPtr destRoot = 0,
953
+ XMP_OptionBits options = 0 );
954
+
955
+ /// @}
956
+
957
+ // =============================================================================================
958
+
959
+ private:
960
+
961
+ static void SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
962
+
963
+ }; // class TXMPUtils
964
+
965
+ // =================================================================================================
966
+
967
+ #endif // __TXMPUtils_hpp__