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.
- checksums.yaml +7 -0
- data/.idea/.gitignore +8 -0
- data/.rspec +3 -0
- data/.rubocop.yml +88 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/AGENTS.md +72 -0
- data/CHANGELOG.md +45 -0
- data/LICENSE.txt +21 -0
- data/README.md +287 -0
- data/Rakefile +25 -0
- data/cliff.toml +138 -0
- data/docker/Dockerfile +87 -0
- data/docker/ProductConfig.cmake.patch +11 -0
- data/docker/ToolchainGCC.cmake.patch +11 -0
- data/exe/xmp_toolkit_ruby +8 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/LICENSE +31 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/build/XMP_BuildInfo.h +17 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPFiles.hpp +853 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPIterator.hpp +234 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPMeta.hpp +1753 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/TXMPUtils.hpp +967 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP.hpp +98 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP.incl_cpp +69 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IConfigurable.h +225 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/ISharedObject.h +71 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IThreadSafe.h +76 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/BaseInterfaces/IVersionable.h +71 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IConfigurationManager.h +167 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IError.h +377 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IErrorNotifier.h +52 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IMemoryAllocator.h +65 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IObjectFactory.h +90 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Interfaces/IUTF8String.h +504 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Utilities/TWrapperFunctions.h +252 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/Utilities/TWrapperFunctions2.h +564 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonDefines.h +194 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonErrorCodes.h +114 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonFwdDeclarations.h +158 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/XMPCommonLatestInterfaceVersions.h +51 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IConfigurable.cpp +204 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IConfigurationManager.cpp +92 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IError.cpp +207 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IErrorNotifier.cpp +26 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCommon/source/IUTF8String.cpp +299 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IArrayNode.h +303 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IClientDOMParser.h +88 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IClientDOMSerializer.h +94 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICompositeNode.h +331 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICoreConfigurationManager.h +107 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ICoreObjectFactory.h +279 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMImplementationRegistry.h +150 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMParser.h +181 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IDOMSerializer.h +120 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IMetadata.h +145 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IMetadataConverterUtils.h +116 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INameSpacePrefixMap.h +236 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INode.h +582 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/INodeIterator.h +193 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IPath.h +212 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IPathSegment.h +225 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/ISimpleNode.h +150 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/Interfaces/IStructureNode.h +306 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreDefines.h +94 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreErrorCodes.h +116 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreFwdDeclarations.h +325 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/XMPCoreLatestInterfaceVersions.h +97 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IArrayNode.cpp +163 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IClientDOMParser.cpp +76 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IClientDOMSerializer.cpp +73 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICompositeNode.cpp +121 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICoreConfigurationManager.cpp +88 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ICoreObjectFactory.cpp +83 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMImplementationRegistry.cpp +122 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMParser.cpp +116 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IDOMSerializer.cpp +109 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IMetadata.cpp +113 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IMetadataConverterUtils.cpp +92 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INameSpacePrefixMap.cpp +187 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INode.cpp +377 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/INodeIterator.cpp +105 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IPath.cpp +157 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IPathSegment.cpp +146 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/ISimpleNode.cpp +111 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMPCore/source/IStructureNode.cpp +104 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Const.h +1590 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Environment.h +223 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_IO.hpp +169 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/XMP_Version.h +52 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPFiles.incl_cpp +484 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPIterator.incl_cpp +223 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPMeta.incl_cpp +917 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/TXMPUtils.incl_cpp +445 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPFiles.hpp +281 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPIterator.hpp +74 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPMeta.hpp +635 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMPUtils.hpp +314 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/include/client-glue/WXMP_Common.hpp +132 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPCore.so +0 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPCoreStatic.a +0 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPFiles.so +0 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/i80386linux_x64/debug/libXMPFilesStatic.a +0 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/macintosh/universal/Debug/libXMPCoreStatic.a +0 -0
- data/ext/xmp_toolkit_ruby/XMP-Toolkit-SDK/public/libraries/macintosh/universal/Debug/libXMPFilesStatic.a +0 -0
- data/ext/xmp_toolkit_ruby/extconf.rb +101 -0
- data/ext/xmp_toolkit_ruby/xmp_toolkit.cpp +321 -0
- data/ext/xmp_toolkit_ruby/xmp_toolkit.hpp +69 -0
- data/ext/xmp_toolkit_ruby/xmp_toolkit_ruby.cpp +44 -0
- data/lib/xmp_toolkit_ruby/cli.rb +95 -0
- data/lib/xmp_toolkit_ruby/namespaces.rb +77 -0
- data/lib/xmp_toolkit_ruby/plugins/LICENSE +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.resources/MODULE_IDENTIFIER.txt +1 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.resources/XMPPLUGINUIDS.txt +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/PDF_Handler.xpi +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux/libMiniPDFL.so +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.resources/MODULE_IDENTIFIER.txt +1 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.resources/XMPPLUGINUIDS.txt +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/PDF_Handler.xpi +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/i80386linux/i80386linux_x64/libMiniPDFL.so +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/PDF_Handler +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/Info.plist +52 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MODULE_IDENTIFIER.txt +1 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/MiniPDFL +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Resources/English.lproj/InfoPlist.strings +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/Resources/Info.plist +35 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/Resources/Info.plist +35 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Resources/XMPPLUGINUIDS.txt +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/PDF_Handler +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/Info.plist +52 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MODULE_IDENTIFIER.txt +1 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/MiniPDFL +0 -0
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
- 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
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
- 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
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/Resources/XMPPLUGINUIDS.txt +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/A/_CodeSignature/CodeResources +216 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/PDF_Handler +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/Info.plist +52 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MODULE_IDENTIFIER.txt +1 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/MiniPDFL +0 -0
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Resources/Info.plist +35 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/MiniPDFL +0 -0
- 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
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/A/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/MiniPDFL +0 -0
- 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
- 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
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/MiniPDFL.framework/Versions/Current/_CodeSignature/CodeResources +146 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/Resources/XMPPLUGINUIDS.txt +31 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/macintosh/universal/PDF_Handler.xpi/Versions/Current/_CodeSignature/CodeResources +216 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/linux/PDF_Handler.exp +11 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_Handler.exp +2 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_Handler.plist +28 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/mac/PDF_HandlerPList.h +12 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/CopyPDFL.bat +14 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler-32.rc +8 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler-64.rc +8 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/resource/win/PDF_Handler.def +9 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/windows/windows_x64/MiniPDFL.dll +0 -0
- data/lib/xmp_toolkit_ruby/plugins/PDF_Handler/windows/windows_x64/PDF_Handler.xpi +0 -0
- data/lib/xmp_toolkit_ruby/version.rb +5 -0
- data/lib/xmp_toolkit_ruby/xmp_file_format.rb +87 -0
- data/lib/xmp_toolkit_ruby/xmp_file_handler_flags.rb +49 -0
- data/lib/xmp_toolkit_ruby.rb +237 -0
- data/sig/xmp_toolkit_ruby.rbs +4 -0
- data/tasks/changelog.rake +29 -0
- metadata +357 -0
@@ -0,0 +1,1753 @@
|
|
1
|
+
#ifndef __TXMPMeta_hpp__
|
2
|
+
#define __TXMPMeta_hpp__ 1
|
3
|
+
|
4
|
+
#if ( ! __XMP_hpp__ )
|
5
|
+
#error "Do not directly include, use XMP.hpp"
|
6
|
+
#endif
|
7
|
+
|
8
|
+
#include "XMPCore/XMPCoreDefines.h"
|
9
|
+
#if ENABLE_CPP_DOM_MODEL
|
10
|
+
#include "XMPCore/XMPCoreFwdDeclarations.h"
|
11
|
+
#endif
|
12
|
+
|
13
|
+
// =================================================================================================
|
14
|
+
// Copyright Adobe
|
15
|
+
// Copyright 2002 Adobe
|
16
|
+
// All Rights Reserved
|
17
|
+
//
|
18
|
+
// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
|
19
|
+
// of the Adobe license agreement accompanying it.
|
20
|
+
// =================================================================================================
|
21
|
+
|
22
|
+
// =================================================================================================
|
23
|
+
/// \file TXMPMeta.hpp
|
24
|
+
/// \brief API for access to the XMP Toolkit core services.
|
25
|
+
///
|
26
|
+
/// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It must be
|
27
|
+
/// instantiated with a string class such as \c std::string. Read the Toolkit Overview for
|
28
|
+
/// information about the overall architecture of the XMP API, and the documentation for \c XMP.hpp
|
29
|
+
/// for specific instantiation instructions. Please that you MUST NOT derive a class from this class,
|
30
|
+
/// consider this class FINAL, use it directly. [1279031]
|
31
|
+
///
|
32
|
+
/// Access these functions through the concrete class, \c SXMPMeta.
|
33
|
+
// =================================================================================================
|
34
|
+
|
35
|
+
// =================================================================================================
|
36
|
+
/// \class TXMPMeta TXMPMeta.hpp
|
37
|
+
/// \brief API for access to the XMP Toolkit core services.
|
38
|
+
///
|
39
|
+
/// \c TXMPMeta is the template class providing the core services of the XMP Toolkit. It should be
|
40
|
+
/// instantiated with a string class such as \c std::string. Read the Toolkit Overview for
|
41
|
+
/// information about the overall architecture of the XMP API, and the documentation for \c XMP.hpp
|
42
|
+
/// for specific instantiation instructions.
|
43
|
+
///
|
44
|
+
/// Access these functions through the concrete class, \c SXMPMeta.
|
45
|
+
///
|
46
|
+
/// You can create \c TXMPMeta objects (also called XMP objects) from metadata that you construct,
|
47
|
+
/// or that you obtain from files using the XMP Toolkit's XMPFiles component; see \c TXMPFiles.hpp.
|
48
|
+
// =================================================================================================
|
49
|
+
|
50
|
+
template <class tStringObj> class TXMPIterator;
|
51
|
+
template <class tStringObj> class TXMPUtils;
|
52
|
+
|
53
|
+
// -------------------------------------------------------------------------------------------------
|
54
|
+
|
55
|
+
template <class tStringObj> class TXMPMeta {
|
56
|
+
|
57
|
+
public:
|
58
|
+
|
59
|
+
// =============================================================================================
|
60
|
+
// Initialization and termination
|
61
|
+
// ==============================
|
62
|
+
|
63
|
+
// ---------------------------------------------------------------------------------------------
|
64
|
+
/// \name Initialization and termination
|
65
|
+
///
|
66
|
+
/// @{
|
67
|
+
|
68
|
+
// ---------------------------------------------------------------------------------------------
|
69
|
+
/// @brief \c GetVersionInfo() retrieves runtime version information.
|
70
|
+
///
|
71
|
+
/// The header \c XMPVersion.hpp defines a static version number for the XMP Toolkit, which
|
72
|
+
/// describes the version of the API used at client compile time. It is not necessarily the same
|
73
|
+
/// as the runtime version. Do not base runtime decisions on the static version alone; you can,
|
74
|
+
/// however, compare the runtime and static versions.
|
75
|
+
///
|
76
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta). The
|
77
|
+
/// function can be called before calling \c TXMPMeta::Initialize().
|
78
|
+
///
|
79
|
+
/// @param info [out] A buffer in which to return the version information.
|
80
|
+
|
81
|
+
static void GetVersionInfo ( XMP_VersionInfo * info );
|
82
|
+
|
83
|
+
// ---------------------------------------------------------------------------------------------
|
84
|
+
/// @brief \c Initialize() explicitly initializes the XMP Toolkit before use. */
|
85
|
+
|
86
|
+
/// Initializes the XMP Toolkit.
|
87
|
+
///
|
88
|
+
/// Call this function before making any other calls to the \c TXMPMeta functions, except
|
89
|
+
/// \c TXMPMeta::GetVersionInfo().
|
90
|
+
///
|
91
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
92
|
+
///
|
93
|
+
/// @return True on success. */
|
94
|
+
static bool Initialize();
|
95
|
+
// ---------------------------------------------------------------------------------------------
|
96
|
+
/// @brief \c Terminate() explicitly terminates usage of the XMP Toolkit.
|
97
|
+
///
|
98
|
+
/// Frees structures created on initialization.
|
99
|
+
///
|
100
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
101
|
+
|
102
|
+
static void Terminate();
|
103
|
+
|
104
|
+
/// @}
|
105
|
+
|
106
|
+
// =============================================================================================
|
107
|
+
// Constuctors and destructor
|
108
|
+
// ==========================
|
109
|
+
|
110
|
+
// ---------------------------------------------------------------------------------------------
|
111
|
+
/// \name Constructors and destructor
|
112
|
+
/// @{
|
113
|
+
|
114
|
+
// ---------------------------------------------------------------------------------------------
|
115
|
+
/// @brief Default constructor, creates an empty object.
|
116
|
+
///
|
117
|
+
/// The default constructor creates a new empty \c TXMPMeta object.
|
118
|
+
TXMPMeta();
|
119
|
+
|
120
|
+
// ---------------------------------------------------------------------------------------------
|
121
|
+
/// @brief Copy constructor, creates a client object refering to the same internal object.
|
122
|
+
///
|
123
|
+
/// The copy constructor creates a new \c TXMPMeta object that refers to the same internal XMP
|
124
|
+
/// object. as an existing \c TXMPMeta object.
|
125
|
+
///
|
126
|
+
/// @param original The object to copy. new object is returned via Original only.
|
127
|
+
///
|
128
|
+
|
129
|
+
TXMPMeta ( const TXMPMeta<tStringObj> & original );
|
130
|
+
|
131
|
+
// ---------------------------------------------------------------------------------------------
|
132
|
+
/// @brief Assignment operator, assigns the internal reference and increments the reference count.
|
133
|
+
///
|
134
|
+
/// The assignment operator assigns the internal ref from the rhs object and increments the
|
135
|
+
/// reference count on the underlying internal XMP object.
|
136
|
+
|
137
|
+
void operator= ( const TXMPMeta<tStringObj> & rhs );
|
138
|
+
|
139
|
+
// ---------------------------------------------------------------------------------------------
|
140
|
+
/// @brief Reconstructs an XMP object from an internal reference.
|
141
|
+
///
|
142
|
+
/// This constructor creates a new \c TXMPMeta object that refers to the underlying reference object
|
143
|
+
/// of an existing \c TXMPMeta object. Use to safely pass XMP objects across DLL boundaries.
|
144
|
+
///
|
145
|
+
/// @param xmpRef The underlying reference object, obtained from some other XMP object with
|
146
|
+
/// \c TXMPMeta::GetInternalRef().returns The new object.
|
147
|
+
///
|
148
|
+
///
|
149
|
+
|
150
|
+
TXMPMeta ( XMPMetaRef xmpRef );
|
151
|
+
|
152
|
+
// ---------------------------------------------------------------------------------------------
|
153
|
+
/// @brief Constructs an object and parse one buffer of RDF into it.
|
154
|
+
///
|
155
|
+
/// This constructor creates a new \c TXMPMeta object and populates it with metadata from a
|
156
|
+
/// buffer containing serialized RDF. This buffer must be a complete RDF parse stream.
|
157
|
+
///
|
158
|
+
/// The result of passing serialized data to this function is identical to creating an empty
|
159
|
+
/// object then calling \c TXMPMeta::ParseFromBuffer(). To use the constructor, however, the RDF
|
160
|
+
/// must be complete. If you need to parse data from multiple buffers, create an empty object
|
161
|
+
/// and use \c TXMPMeta::ParseFromBuffer().
|
162
|
+
///
|
163
|
+
/// @param buffer A pointer to the buffer of RDF to be parsed. Can be null if the length is 0;
|
164
|
+
/// in this case, the function creates an empty object.
|
165
|
+
///
|
166
|
+
/// @param xmpSize The length in bytes of the buffer.
|
167
|
+
///
|
168
|
+
|
169
|
+
|
170
|
+
TXMPMeta ( XMP_StringPtr buffer,
|
171
|
+
XMP_StringLen xmpSize );
|
172
|
+
|
173
|
+
// ---------------------------------------------------------------------------------------------
|
174
|
+
/// @brief Destructor, typical virtual destructor. */
|
175
|
+
virtual ~TXMPMeta() throw();
|
176
|
+
|
177
|
+
/// @}
|
178
|
+
|
179
|
+
// =============================================================================================
|
180
|
+
// Global state functions
|
181
|
+
// ======================
|
182
|
+
|
183
|
+
// ---------------------------------------------------------------------------------------------
|
184
|
+
/// \name Global option flags
|
185
|
+
/// @{
|
186
|
+
/// Global option flags affect the overall behavior of the XMP Toolkit. The available options
|
187
|
+
/// will be declared in \c XMP_Const.h. There are none in this version of the Toolkit.
|
188
|
+
|
189
|
+
// ---------------------------------------------------------------------------------------------
|
190
|
+
/// @brief \c GetGlobalOptions() retrieves the set of global option flags. There are none in
|
191
|
+
/// this version of the Toolkit.
|
192
|
+
///
|
193
|
+
/// This function is static; you can make the call from the class without instantiating it.
|
194
|
+
///
|
195
|
+
/// @return A logical OR of global option bit-flag constants.
|
196
|
+
|
197
|
+
static XMP_OptionBits GetGlobalOptions();
|
198
|
+
|
199
|
+
// ---------------------------------------------------------------------------------------------
|
200
|
+
/// @brief \c SetGlobalOptions() updates the set of global option flags. There are none in this
|
201
|
+
/// version of the Toolkit.
|
202
|
+
///
|
203
|
+
/// The entire set is replaced with the new values. If only one flag is to be modified, use
|
204
|
+
/// \c TXMPMeta::GetGlobalOptions() to obtain the current set, modify the desired flag, then use
|
205
|
+
/// this function to reset the value.
|
206
|
+
///
|
207
|
+
/// This function is static; you can make the call from the class without instantiating it.
|
208
|
+
///
|
209
|
+
/// @param options A logical OR of global option bit-flag constants.
|
210
|
+
|
211
|
+
static void SetGlobalOptions ( XMP_OptionBits options );
|
212
|
+
|
213
|
+
/// @}
|
214
|
+
|
215
|
+
// ---------------------------------------------------------------------------------------------
|
216
|
+
/// \name Internal data structure dump utilities
|
217
|
+
/// @{
|
218
|
+
///
|
219
|
+
/// These are debugging utilities that dump internal data structures, to be handled by
|
220
|
+
/// client-defined callback described in \c XMP_Const.h.
|
221
|
+
///
|
222
|
+
/// @see Member function \c TXMPMeta::DumpObject()
|
223
|
+
|
224
|
+
// ---------------------------------------------------------------------------------------------
|
225
|
+
/// @brief \c DumpNamespaces() sends the list of registered namespace URIs and prefixes to a handler.
|
226
|
+
///
|
227
|
+
/// For debugging. Invokes a client-defined callback for each line of output.
|
228
|
+
///
|
229
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
230
|
+
///
|
231
|
+
/// @param outProc The client-defined procedure to handle each line of output.
|
232
|
+
///
|
233
|
+
/// @param clientData A pointer to client-defined data to pass to the handler.
|
234
|
+
///
|
235
|
+
/// @return A success-fail status value, returned from the handler. Zero is success, failure
|
236
|
+
/// values are client-defined.
|
237
|
+
|
238
|
+
static XMP_Status DumpNamespaces ( XMP_TextOutputProc outProc,
|
239
|
+
void * clientData );
|
240
|
+
|
241
|
+
/// @}
|
242
|
+
|
243
|
+
// ---------------------------------------------------------------------------------------------
|
244
|
+
/// \name Namespace Functions
|
245
|
+
/// @{
|
246
|
+
///
|
247
|
+
/// Namespaces must be registered before use in namespace URI parameters or path expressions.
|
248
|
+
/// Within the XMP Toolkit the registered namespace URIs and prefixes must be unique. Additional
|
249
|
+
/// namespaces encountered when parsing RDF are automatically registered.
|
250
|
+
///
|
251
|
+
/// The namespace URI should always end in an XML name separator such as '/' or '#'. This is
|
252
|
+
/// because some forms of RDF shorthand catenate a namespace URI with an element name to form a
|
253
|
+
/// new URI.
|
254
|
+
|
255
|
+
// ---------------------------------------------------------------------------------------------
|
256
|
+
/// @brief \c RegisterNamespace() registers a namespace URI with a suggested prefix.
|
257
|
+
///
|
258
|
+
/// If the URI is not registered but the suggested prefix is in use, a unique prefix is created
|
259
|
+
/// from the suggested one. The actual registered prefix is returned. The function result tells
|
260
|
+
/// if the registered prefix is the suggested one. It is not an error if the URI is already
|
261
|
+
/// registered, regardless of the prefix.
|
262
|
+
///
|
263
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
264
|
+
///
|
265
|
+
/// @param namespaceURI The URI for the namespace. Must be a valid XML URI.
|
266
|
+
///
|
267
|
+
/// @param suggestedPrefix The suggested prefix to be used if the URI is not yet registered.
|
268
|
+
/// Must be a valid XML name.
|
269
|
+
///
|
270
|
+
/// @param registeredPrefix [out] A string object in which to return the prefix actually
|
271
|
+
/// registered for this URI.
|
272
|
+
///
|
273
|
+
/// @return True if the registered prefix matches the suggested prefix.
|
274
|
+
///
|
275
|
+
/// @note No checking is done on either the URI or the prefix. */
|
276
|
+
|
277
|
+
static bool RegisterNamespace ( XMP_StringPtr namespaceURI,
|
278
|
+
XMP_StringPtr suggestedPrefix,
|
279
|
+
tStringObj * registeredPrefix );
|
280
|
+
|
281
|
+
// ---------------------------------------------------------------------------------------------
|
282
|
+
/// @brief \c GetNamespacePrefix() obtains the prefix for a registered namespace URI, and
|
283
|
+
/// reports whether the URI is registered.
|
284
|
+
///
|
285
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
286
|
+
///
|
287
|
+
/// @param namespaceURI The URI for the namespace. Must not be null or the empty string. It is
|
288
|
+
/// not an error if the namespace URI is not registered.
|
289
|
+
///
|
290
|
+
/// @param namespacePrefix [out] A string object in which to return the prefix registered for
|
291
|
+
/// this URI, with a terminating colon character, ':'. If the namespace is not registered, this
|
292
|
+
/// string is not modified.
|
293
|
+
///
|
294
|
+
/// @return True if the namespace URI is registered.
|
295
|
+
|
296
|
+
static bool GetNamespacePrefix ( XMP_StringPtr namespaceURI,
|
297
|
+
tStringObj * namespacePrefix );
|
298
|
+
|
299
|
+
// ---------------------------------------------------------------------------------------------
|
300
|
+
/// @brief \c GetNamespaceURI() obtains the URI for a registered namespace prefix, and reports
|
301
|
+
/// whether the prefix is registered.
|
302
|
+
///
|
303
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
304
|
+
///
|
305
|
+
/// @param namespacePrefix The prefix for the namespace. Must not be null or the empty string.
|
306
|
+
/// It is not an error if the namespace prefix is not registered.
|
307
|
+
///
|
308
|
+
/// @param namespaceURI [out] A string object in which to return the URI registered for this
|
309
|
+
/// prefix. If the prefix is not registered, this string is not modified.
|
310
|
+
///
|
311
|
+
/// @return True if the namespace prefix is registered.
|
312
|
+
|
313
|
+
static bool GetNamespaceURI ( XMP_StringPtr namespacePrefix,
|
314
|
+
tStringObj * namespaceURI );
|
315
|
+
|
316
|
+
// ---------------------------------------------------------------------------------------------
|
317
|
+
/// @brief Not implemented.
|
318
|
+
///
|
319
|
+
/// Deletes a namespace from the registry. Does nothing if the URI is not registered, or if the
|
320
|
+
/// parameter is null or the empty string.
|
321
|
+
///
|
322
|
+
/// This function is static; make the call directly from the concrete class (\c SXMPMeta).
|
323
|
+
///
|
324
|
+
/// @param namespaceURI The URI for the namespace.
|
325
|
+
|
326
|
+
static void DeleteNamespace ( XMP_StringPtr namespaceURI );
|
327
|
+
|
328
|
+
/// @}
|
329
|
+
|
330
|
+
// =============================================================================================
|
331
|
+
// Basic property manipulation functions
|
332
|
+
// =====================================
|
333
|
+
|
334
|
+
// *** Should add discussion of schemaNS and propName prefix usage.
|
335
|
+
|
336
|
+
// ---------------------------------------------------------------------------------------------
|
337
|
+
/// \name Accessing property values
|
338
|
+
/// @{
|
339
|
+
///
|
340
|
+
/// The property value accessors all take a property specification; the top level namespace URI
|
341
|
+
/// (the "schema" namespace) and the basic name of the property being referenced. See the
|
342
|
+
/// introductory discussion of path expression usage for more information.
|
343
|
+
///
|
344
|
+
/// The accessor functions return true if the specified property exists. If it does, output
|
345
|
+
/// parameters return the value (if any) and option flags describing the property. The option
|
346
|
+
/// bit-flag constants that describe properties are \c kXMP_PropXx and
|
347
|
+
/// \c kXMP_ArrayIsXx. See \c #kXMP_PropValueIsURI and following, and macros \c #XMP_PropIsSimple
|
348
|
+
/// and following in \c XMP_Const.h. If the property exists and has a value, it is returned as a
|
349
|
+
/// Unicode string in UTF-8 encoding. Arrays and the non-leaf levels of structs do not have
|
350
|
+
/// values.
|
351
|
+
|
352
|
+
// ---------------------------------------------------------------------------------------------
|
353
|
+
/// @brief \c GetProperty() reports whether a property exists, and retrieves its value.
|
354
|
+
///
|
355
|
+
/// This is the simplest property accessor. Use this to retrieve the values of top-level simple
|
356
|
+
/// properties, or after using the path composition functions in \c TXMPUtils.
|
357
|
+
///
|
358
|
+
/// When specifying a namespace and path (in this and all other accessors):
|
359
|
+
/// \li If a namespace URI is specified, it must be for a registered namespace.
|
360
|
+
/// \li If the namespace is specified only by a prefix in the property name path,
|
361
|
+
/// it must be a registered prefix.
|
362
|
+
/// \li If both a URI and path prefix are present, they must be corresponding
|
363
|
+
/// parts of a registered namespace.
|
364
|
+
///
|
365
|
+
/// @param schemaNS The namespace URI for the property. The URI must be for a registered
|
366
|
+
/// namespace. Must not be null or the empty string.
|
367
|
+
///
|
368
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
369
|
+
/// or the empty string. The first component can be a namespace prefix; if present without a
|
370
|
+
/// \c schemaNS value, the prefix specifies the namespace. The prefix must be for a registered
|
371
|
+
/// namespace, and if a namespace URI is specified, must match the registered prefix for that
|
372
|
+
/// namespace.
|
373
|
+
///
|
374
|
+
/// @param propValue [out] A string object in which to return the value of the property, if the
|
375
|
+
/// property exists and has a value. Arrays and non-leaf levels of structs do not have values.
|
376
|
+
/// Can be null if the value is not wanted.
|
377
|
+
///
|
378
|
+
/// @param options A buffer in which to return option flags describing the property. Can be null
|
379
|
+
/// if the flags are not wanted.
|
380
|
+
///
|
381
|
+
/// @return True if the property exists.
|
382
|
+
|
383
|
+
bool GetProperty ( XMP_StringPtr schemaNS,
|
384
|
+
XMP_StringPtr propName,
|
385
|
+
tStringObj * propValue,
|
386
|
+
XMP_OptionBits * options ) const;
|
387
|
+
|
388
|
+
// ---------------------------------------------------------------------------------------------
|
389
|
+
/// @brief \c GetArrayItem() provides access to items within an array.
|
390
|
+
///
|
391
|
+
/// Reports whether the item exists; if it does, and if it has a value, the function retrieves
|
392
|
+
/// the value. Items are accessed by an integer index, where the first item has index 1.
|
393
|
+
///
|
394
|
+
/// @param schemaNS The namespace URI for the array; see \c GetProperty().
|
395
|
+
///
|
396
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
397
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
398
|
+
///
|
399
|
+
/// @param itemIndex The 1-based index of the desired item. Use the macro \c #kXMP_ArrayLastItem
|
400
|
+
/// to specify the last existing array item.
|
401
|
+
///
|
402
|
+
/// @param itemValue [out] A string object in which to return the value of the array item, if it
|
403
|
+
/// has a value. Arrays and non-leaf levels of structs do not have values. Can be null if the
|
404
|
+
/// value is not wanted.
|
405
|
+
///
|
406
|
+
/// @param options [out] A buffer in which to return the option flags describing the array item.
|
407
|
+
/// Can be null if the flags are not wanted.
|
408
|
+
///
|
409
|
+
/// @return True if the array item exists.
|
410
|
+
|
411
|
+
bool GetArrayItem ( XMP_StringPtr schemaNS,
|
412
|
+
XMP_StringPtr arrayName,
|
413
|
+
XMP_Index itemIndex,
|
414
|
+
tStringObj * itemValue,
|
415
|
+
XMP_OptionBits * options ) const;
|
416
|
+
|
417
|
+
// ---------------------------------------------------------------------------------------------
|
418
|
+
/// @brief \c GetStructField() provides access to fields within a nested structure.
|
419
|
+
///
|
420
|
+
/// Reports whether the field exists; if it does, and if it has a value, the function retrieves
|
421
|
+
/// the value.
|
422
|
+
///
|
423
|
+
/// @param schemaNS The namespace URI for the struct; see \c GetProperty().
|
424
|
+
///
|
425
|
+
/// @param structName The name of the struct. Can be a general path expression, must not be null
|
426
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
427
|
+
///
|
428
|
+
/// @param fieldNS The namespace URI for the field. Same URI and prefix usage as the \c schemaNS
|
429
|
+
/// and \c structName parameters.
|
430
|
+
///
|
431
|
+
/// @param fieldName The name of the field. Must be a single XML name, must not be null or the
|
432
|
+
/// empty string. Same URI and prefix usage as the \c schemaNS and \c structName parameters.
|
433
|
+
///
|
434
|
+
/// @param fieldValue [out] A string object in which to return the value of the field, if the
|
435
|
+
/// field has a value. Arrays and non-leaf levels of structs do not have values. Can be null if
|
436
|
+
/// the value is not wanted.
|
437
|
+
///
|
438
|
+
/// @param options [out] A buffer in which to return the option flags describing the field. Can
|
439
|
+
/// be null if the flags are not wanted.
|
440
|
+
///
|
441
|
+
/// @return True if the field exists.
|
442
|
+
|
443
|
+
bool GetStructField ( XMP_StringPtr schemaNS,
|
444
|
+
XMP_StringPtr structName,
|
445
|
+
XMP_StringPtr fieldNS,
|
446
|
+
XMP_StringPtr fieldName,
|
447
|
+
tStringObj * fieldValue,
|
448
|
+
XMP_OptionBits * options ) const;
|
449
|
+
|
450
|
+
// ---------------------------------------------------------------------------------------------
|
451
|
+
/// @brief \c GetQualifier() provides access to a qualifier attached to a property.
|
452
|
+
///
|
453
|
+
/// @note In this version of the Toolkit, qualifiers are supported only for simple leaf properties.
|
454
|
+
///
|
455
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
456
|
+
///
|
457
|
+
/// @param propName The name of the property to which the qualifier is attached. Can be a
|
458
|
+
/// general path expression, must not be null or the empty string; see \c GetProperty() for
|
459
|
+
/// namespace prefix usage.
|
460
|
+
///
|
461
|
+
/// @param qualNS The namespace URI for the qualifier. Same URI and prefix usage as the
|
462
|
+
/// \c schemaNS and \c propName parameters.
|
463
|
+
///
|
464
|
+
/// @param qualName The name of the qualifier. Must be a single XML name, must not be null or
|
465
|
+
/// the empty string. Same URI and prefix usage as the \c schemaNS and \c propName parameters.
|
466
|
+
///
|
467
|
+
/// @param qualValue [out] A string object in which to return the value of the qualifier, if the
|
468
|
+
/// qualifier has a value. Arrays and non-leaf levels of structs do not have values. Can be null
|
469
|
+
/// if the value is not wanted.
|
470
|
+
///
|
471
|
+
/// @param options [out] A buffer in which to return the option flags describing the qualifier.
|
472
|
+
/// Can be null if the flags are not wanted.
|
473
|
+
///
|
474
|
+
/// @return True if the qualifier exists.
|
475
|
+
|
476
|
+
bool GetQualifier ( XMP_StringPtr schemaNS,
|
477
|
+
XMP_StringPtr propName,
|
478
|
+
XMP_StringPtr qualNS,
|
479
|
+
XMP_StringPtr qualName,
|
480
|
+
tStringObj * qualValue,
|
481
|
+
XMP_OptionBits * options ) const;
|
482
|
+
|
483
|
+
/// @}
|
484
|
+
|
485
|
+
// =============================================================================================
|
486
|
+
|
487
|
+
// ---------------------------------------------------------------------------------------------
|
488
|
+
/// \name Creating properties and setting their values
|
489
|
+
/// @{
|
490
|
+
///
|
491
|
+
/// These functions all take a property specification; the top level namespace URI (the "schema"
|
492
|
+
/// namespace) and the basic name of the property being referenced. See the introductory
|
493
|
+
/// discussion of path expression usage for more information.
|
494
|
+
///
|
495
|
+
/// All of the functions take a UTF-8 encoded Unicode string for the property value. Arrays and
|
496
|
+
/// non-leaf levels of structs do not have values. The value can be passed as an
|
497
|
+
/// \c #XMP_StringPtr (a pointer to a null-terminated string), or as a string object
|
498
|
+
/// (\c tStringObj).
|
499
|
+
|
500
|
+
/// Each function takes an options flag that describes the property. You can use these functions
|
501
|
+
/// to create empty arrays and structs by setting appropriate option flags. When you assign a
|
502
|
+
/// value, all levels of a struct that are implicit in the assignment are created if necessary.
|
503
|
+
/// \c TXMPMeta::AppendArrayItem() implicitly creates the named array if necessary.
|
504
|
+
///
|
505
|
+
/// The allowed option bit-flags include:
|
506
|
+
/// \li \c #kXMP_PropValueIsStruct - Can be used to create an empty struct.
|
507
|
+
/// A struct is implicitly created when the first field is set.
|
508
|
+
/// \li \c #kXMP_PropValueIsArray - By default, a general unordered array (bag).
|
509
|
+
/// \li \c #kXMP_PropArrayIsOrdered - An ordered array.
|
510
|
+
/// \li \c #kXMP_PropArrayIsAlternate - An alternative array.
|
511
|
+
/// \li \c #kXMP_PropArrayIsAltText - An alt-text array. Each array element must
|
512
|
+
/// be a simple property with an \c xml:lang attribute.
|
513
|
+
|
514
|
+
// ---------------------------------------------------------------------------------------------
|
515
|
+
/// @brief \c SetProperty() creates or sets a property value.
|
516
|
+
///
|
517
|
+
/// This is the simplest property setter. Use it for top-level simple properties, or after using
|
518
|
+
/// the path composition functions in \c TXMPUtils.
|
519
|
+
///
|
520
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
521
|
+
///
|
522
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
523
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
524
|
+
///
|
525
|
+
/// @param propValue The new value, a pointer to a null terminated UTF-8 string. Must be null
|
526
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
527
|
+
///
|
528
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
529
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
530
|
+
/// that already exists.
|
531
|
+
|
532
|
+
void SetProperty ( XMP_StringPtr schemaNS,
|
533
|
+
XMP_StringPtr propName,
|
534
|
+
XMP_StringPtr propValue,
|
535
|
+
XMP_OptionBits options = 0 );
|
536
|
+
|
537
|
+
// ---------------------------------------------------------------------------------------------
|
538
|
+
/// @brief \c SetProperty() creates or sets a property value using a string object.
|
539
|
+
///
|
540
|
+
/// Overloads the basic form of the function, allowing you to pass a string object
|
541
|
+
/// for the item value. It is otherwise identical; see details in the canonical form.
|
542
|
+
|
543
|
+
void SetProperty ( XMP_StringPtr schemaNS,
|
544
|
+
XMP_StringPtr propName,
|
545
|
+
const tStringObj & propValue,
|
546
|
+
XMP_OptionBits options = 0 );
|
547
|
+
|
548
|
+
// ---------------------------------------------------------------------------------------------
|
549
|
+
/// @brief \c SetArrayItem() creates or sets the value of an item within an array.
|
550
|
+
///
|
551
|
+
/// Items are accessed by an integer index, where the first item has index 1. This function
|
552
|
+
/// creates the item if necessary, but the array itself must already exist Use
|
553
|
+
/// \c AppendArrayItem() to create arrays. A new item is automatically appended if the index is the
|
554
|
+
/// array size plus 1. To insert a new item before or after an existing item, use option flags.
|
555
|
+
///
|
556
|
+
/// Use \c TXMPUtils::ComposeArrayItemPath() to create a complex path.
|
557
|
+
///
|
558
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
559
|
+
///
|
560
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
561
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
562
|
+
///
|
563
|
+
/// @param itemIndex The 1-based index of the desired item. Use the macro \c #kXMP_ArrayLastItem
|
564
|
+
/// to specify the last existing array item.
|
565
|
+
///
|
566
|
+
/// @param itemValue The new item value, a null-terminated UTF-8 string, if the array item has a
|
567
|
+
/// value.
|
568
|
+
///
|
569
|
+
/// @param options Option flags describing the array type and insertion location for a new item;
|
570
|
+
/// a logical OR of allowed bit-flag constants. The type, if specified, must match the existing
|
571
|
+
/// array type, \c #kXMP_PropArrayIsOrdered, \c #kXMP_PropArrayIsAlternate, or
|
572
|
+
/// \c #kXMP_PropArrayIsAltText. Default (0 or \c #kXMP_NoOptions) matches the existing array type.
|
573
|
+
///
|
574
|
+
/// To insert a new item before or after the specified index, set flag \c #kXMP_InsertBeforeItem
|
575
|
+
/// or \c #kXMP_InsertAfterItem.
|
576
|
+
|
577
|
+
void SetArrayItem ( XMP_StringPtr schemaNS,
|
578
|
+
XMP_StringPtr arrayName,
|
579
|
+
XMP_Index itemIndex,
|
580
|
+
XMP_StringPtr itemValue,
|
581
|
+
XMP_OptionBits options = 0 );
|
582
|
+
|
583
|
+
// ---------------------------------------------------------------------------------------------
|
584
|
+
/// @brief \c SetArrayItem() creates or sets the value of an item within an array using a string object.
|
585
|
+
///
|
586
|
+
/// Overloads the basic form of the function, allowing you to pass a string object in which to
|
587
|
+
/// return the item value. It is otherwise identical; see details in the canonical form.
|
588
|
+
|
589
|
+
void SetArrayItem ( XMP_StringPtr schemaNS,
|
590
|
+
XMP_StringPtr arrayName,
|
591
|
+
XMP_Index itemIndex,
|
592
|
+
const tStringObj & itemValue,
|
593
|
+
XMP_OptionBits options = 0 );
|
594
|
+
|
595
|
+
// ---------------------------------------------------------------------------------------------
|
596
|
+
/// @brief \c AppendArrayItem() adds an item to an array, creating the array if necessary.
|
597
|
+
///
|
598
|
+
/// This function simplifies construction of an array by not requiring that you pre-create an
|
599
|
+
/// empty array. The array that is assigned is created automatically if it does not yet exist.
|
600
|
+
/// If the array exists, it must have the form specified by the options. Each call appends a new
|
601
|
+
/// item to the array.
|
602
|
+
///
|
603
|
+
/// Use \c TXMPUtils::ComposeArrayItemPath() to create a complex path.
|
604
|
+
///
|
605
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
606
|
+
///
|
607
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
608
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
609
|
+
///
|
610
|
+
/// @param arrayOptions Option flags describing the array type to create; a logical OR of
|
611
|
+
/// allowed bit-flag constants, \c #kXMP_PropArrayIsOrdered, \c #kXMP_PropArrayIsAlternate, or
|
612
|
+
/// \c #kXMP_PropArrayIsAltText. If the array exists, must match the existing array type or be
|
613
|
+
/// null (0 or \c #kXMP_NoOptions).
|
614
|
+
///
|
615
|
+
/// @param itemValue The new item value, a null-terminated UTF-8 string, if the array item has a
|
616
|
+
/// value.
|
617
|
+
///
|
618
|
+
/// @param itemOptions Option flags describing the item type to create; one of the bit-flag
|
619
|
+
/// constants \c #kXMP_PropValueIsArray or \c #kXMP_PropValueIsStruct to create a complex array
|
620
|
+
/// item.
|
621
|
+
|
622
|
+
void AppendArrayItem ( XMP_StringPtr schemaNS,
|
623
|
+
XMP_StringPtr arrayName,
|
624
|
+
XMP_OptionBits arrayOptions,
|
625
|
+
XMP_StringPtr itemValue,
|
626
|
+
XMP_OptionBits itemOptions = 0 );
|
627
|
+
|
628
|
+
// ---------------------------------------------------------------------------------------------
|
629
|
+
/// @brief \c AppendArrayItem() adds an item to an array using a string object value, creating
|
630
|
+
/// the array if necessary.
|
631
|
+
///
|
632
|
+
/// Overloads the basic form of the function, allowing you to pass a string object in which to
|
633
|
+
/// return the item value. It is otherwise identical; see details in the canonical form.
|
634
|
+
|
635
|
+
void AppendArrayItem ( XMP_StringPtr schemaNS,
|
636
|
+
XMP_StringPtr arrayName,
|
637
|
+
XMP_OptionBits arrayOptions,
|
638
|
+
const tStringObj & itemValue,
|
639
|
+
XMP_OptionBits itemOptions = 0 );
|
640
|
+
|
641
|
+
// ---------------------------------------------------------------------------------------------
|
642
|
+
/// @brief \c SetStructField() creates or sets the value of a field within a nested structure.
|
643
|
+
///
|
644
|
+
/// Use this to set a value within an existing structure, create a new field within an existing
|
645
|
+
/// structure, or create an empty structure of any depth. If you set a field in a structure that
|
646
|
+
/// does not exist, the structure is automatically created.
|
647
|
+
///
|
648
|
+
/// Use \c TXMPUtils::ComposeStructFieldPath() to create a complex path.
|
649
|
+
///
|
650
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
651
|
+
///
|
652
|
+
/// @param structName The name of the struct. Can be a general path expression, must not be null
|
653
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
654
|
+
///
|
655
|
+
/// @param fieldNS The namespace URI for the field. Same namespace and prefix usage as
|
656
|
+
/// \c GetProperty().
|
657
|
+
///
|
658
|
+
/// @param fieldName The name of the field. Must be a single XML name, must not be null or the
|
659
|
+
/// empty string. Same namespace and prefix usage as \c GetProperty().
|
660
|
+
///
|
661
|
+
/// @param fieldValue The new value, a null-terminated UTF-8 string, if the field has a value.
|
662
|
+
/// Null to create a new, empty struct or empty field in an existing struct.
|
663
|
+
///
|
664
|
+
/// @param options Option flags describing the property, in which the bit-flag
|
665
|
+
/// \c #kXMP_PropValueIsStruct must be set to create a struct.
|
666
|
+
|
667
|
+
void SetStructField ( XMP_StringPtr schemaNS,
|
668
|
+
XMP_StringPtr structName,
|
669
|
+
XMP_StringPtr fieldNS,
|
670
|
+
XMP_StringPtr fieldName,
|
671
|
+
XMP_StringPtr fieldValue,
|
672
|
+
XMP_OptionBits options = 0 );
|
673
|
+
|
674
|
+
// ---------------------------------------------------------------------------------------------
|
675
|
+
/// @brief \c SetStructField() creates or sets the value of a field within a nested structure,
|
676
|
+
/// using a string object.
|
677
|
+
///
|
678
|
+
/// Overloads the basic form of the function, allowing you to pass a string object in which to
|
679
|
+
/// return the field value. It is otherwise identical; see details in the canonical form.
|
680
|
+
|
681
|
+
void SetStructField ( XMP_StringPtr schemaNS,
|
682
|
+
XMP_StringPtr structName,
|
683
|
+
XMP_StringPtr fieldNS,
|
684
|
+
XMP_StringPtr fieldName,
|
685
|
+
const tStringObj & fieldValue,
|
686
|
+
XMP_OptionBits options = 0 );
|
687
|
+
|
688
|
+
// ---------------------------------------------------------------------------------------------
|
689
|
+
/// @brief \c SetQualifier() creates or sets a qualifier attached to a property.
|
690
|
+
///
|
691
|
+
/// Use this to set a value for an existing qualifier, or create a new qualifier. <<how do
|
692
|
+
/// options work? macro vs bit-flag? interaction w/XMP_PropHasQualifier?>> Use
|
693
|
+
/// \c TXMPUtils::ComposeQualifierPath() to create a complex path.
|
694
|
+
///
|
695
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
696
|
+
///
|
697
|
+
/// @param propName The name of the property to which the qualifier is attached. Can be a
|
698
|
+
/// general path expression, must not be null or the empty string; see \c GetProperty() for
|
699
|
+
/// namespace prefix usage.
|
700
|
+
///
|
701
|
+
/// @param qualNS The namespace URI for the qualifier. Same namespace and prefix usage as
|
702
|
+
/// \c GetProperty().
|
703
|
+
///
|
704
|
+
/// @param qualName The name of the qualifier. Must be a single XML name, must not be null or
|
705
|
+
/// the empty string. Same namespace and prefix usage as \c GetProperty().
|
706
|
+
///
|
707
|
+
/// @param qualValue The new value, a null-terminated UTF-8 string, if the qualifier has a
|
708
|
+
/// value. Null to create a new, empty qualifier.
|
709
|
+
///
|
710
|
+
/// @param options Option flags describing the <<qualified property? qualifier?>>, a logical OR
|
711
|
+
/// of property-type bit-flag constants. Use the macro \c #XMP_PropIsQualifier to create a
|
712
|
+
/// qualifier. <<??>>
|
713
|
+
|
714
|
+
void SetQualifier ( XMP_StringPtr schemaNS,
|
715
|
+
XMP_StringPtr propName,
|
716
|
+
XMP_StringPtr qualNS,
|
717
|
+
XMP_StringPtr qualName,
|
718
|
+
XMP_StringPtr qualValue,
|
719
|
+
XMP_OptionBits options = 0 );
|
720
|
+
|
721
|
+
// ---------------------------------------------------------------------------------------------
|
722
|
+
/// @brief \c SetQualifier() creates or sets a qualifier attached to a property using a string object.
|
723
|
+
///
|
724
|
+
/// Overloads the basic form of the function, allowing you to pass a string object
|
725
|
+
/// for the qualifier value. It is otherwise identical; see details in the canonical form.
|
726
|
+
|
727
|
+
void SetQualifier ( XMP_StringPtr schemaNS,
|
728
|
+
XMP_StringPtr propName,
|
729
|
+
XMP_StringPtr qualNS,
|
730
|
+
XMP_StringPtr qualName,
|
731
|
+
const tStringObj & qualValue,
|
732
|
+
XMP_OptionBits options = 0 );
|
733
|
+
|
734
|
+
/// @}
|
735
|
+
|
736
|
+
// =============================================================================================
|
737
|
+
|
738
|
+
// ---------------------------------------------------------------------------------------------
|
739
|
+
/// \name Detecting and deleting properties.
|
740
|
+
/// @{
|
741
|
+
///
|
742
|
+
/// The namespace URI and prefix usage for property specifiers in these functions is the same as
|
743
|
+
/// for \c TXMPMeta::GetProperty().
|
744
|
+
|
745
|
+
// ---------------------------------------------------------------------------------------------
|
746
|
+
/// @brief \c DeleteProperty() deletes an XMP subtree rooted at a given property.
|
747
|
+
///
|
748
|
+
/// It is not an error if the property does not exist.
|
749
|
+
///
|
750
|
+
/// @param schemaNS The namespace URI for the property; see \c GetProperty().
|
751
|
+
///
|
752
|
+
/// @param propName The name of the property; see \c GetProperty().
|
753
|
+
|
754
|
+
void DeleteProperty ( XMP_StringPtr schemaNS,
|
755
|
+
XMP_StringPtr propName );
|
756
|
+
|
757
|
+
// ---------------------------------------------------------------------------------------------
|
758
|
+
/// @brief \c DeleteArrayItem() deletes an XMP subtree rooted at a given array item.
|
759
|
+
///
|
760
|
+
/// It is not an error if the array item does not exist. Use
|
761
|
+
/// \c TXMPUtils::ComposeArrayItemPath() to create a complex path.
|
762
|
+
///
|
763
|
+
/// @param schemaNS The namespace URI for the array; see \c GetProperty().
|
764
|
+
///
|
765
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
766
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
767
|
+
///
|
768
|
+
/// @param itemIndex The 1-based index of the desired item. Use the macro \c #kXMP_ArrayLastItem
|
769
|
+
/// to specify the last existing array item.
|
770
|
+
|
771
|
+
void DeleteArrayItem ( XMP_StringPtr schemaNS,
|
772
|
+
XMP_StringPtr arrayName,
|
773
|
+
XMP_Index itemIndex );
|
774
|
+
|
775
|
+
// ---------------------------------------------------------------------------------------------
|
776
|
+
/// @brief \c DeleteStructField() deletes an XMP subtree rooted at a given struct field.
|
777
|
+
///
|
778
|
+
/// It is not an error if the field does not exist.
|
779
|
+
///
|
780
|
+
/// @param schemaNS The namespace URI for the struct; see \c GetProperty().
|
781
|
+
///
|
782
|
+
/// @param structName The name of the struct. Can be a general path expression, must not be null
|
783
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
784
|
+
///
|
785
|
+
/// @param fieldNS The namespace URI for the field. Same namespace and prefix usage as
|
786
|
+
/// \c GetProperty().
|
787
|
+
///
|
788
|
+
/// @param fieldName The name of the field. Must be a single XML name, must not be null or the
|
789
|
+
/// empty string. Same namespace and prefix usage as \c GetProperty().
|
790
|
+
|
791
|
+
void DeleteStructField ( XMP_StringPtr schemaNS,
|
792
|
+
XMP_StringPtr structName,
|
793
|
+
XMP_StringPtr fieldNS,
|
794
|
+
XMP_StringPtr fieldName );
|
795
|
+
|
796
|
+
// ---------------------------------------------------------------------------------------------
|
797
|
+
/// @brief \c DeleteQualifier() deletes an XMP subtree rooted at a given qualifier.
|
798
|
+
///
|
799
|
+
/// It is not an error if the qualifier does not exist.
|
800
|
+
///
|
801
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
802
|
+
///
|
803
|
+
/// @param propName The name of the property to which the qualifier is attached. Can be a
|
804
|
+
/// general path expression, must not be null or the empty string; see \c GetProperty() for
|
805
|
+
/// namespace prefix usage.
|
806
|
+
///
|
807
|
+
/// @param qualNS The namespace URI for the qualifier. Same namespace and prefix usage as
|
808
|
+
/// \c GetProperty().
|
809
|
+
///
|
810
|
+
/// @param qualName The name of the qualifier. Must be a single XML name, must not be null or
|
811
|
+
/// the empty string. Same namespace and prefix usage as \c GetProperty().
|
812
|
+
|
813
|
+
void DeleteQualifier ( XMP_StringPtr schemaNS,
|
814
|
+
XMP_StringPtr propName,
|
815
|
+
XMP_StringPtr qualNS,
|
816
|
+
XMP_StringPtr qualName );
|
817
|
+
|
818
|
+
// ---------------------------------------------------------------------------------------------
|
819
|
+
/// @brief \c DoesPropertyExist() reports whether a property currently exists.
|
820
|
+
///
|
821
|
+
/// @param schemaNS The namespace URI for the property; see \c GetProperty().
|
822
|
+
///
|
823
|
+
/// @param propName The name of the property; see \c GetProperty().
|
824
|
+
///
|
825
|
+
/// @return True if the property exists.
|
826
|
+
|
827
|
+
bool DoesPropertyExist ( XMP_StringPtr schemaNS,
|
828
|
+
XMP_StringPtr propName ) const;
|
829
|
+
|
830
|
+
// ---------------------------------------------------------------------------------------------
|
831
|
+
/// @brief \c DoesArrayItemExist() reports whether an array item currently exists.
|
832
|
+
///
|
833
|
+
/// Use \c TXMPUtils::ComposeArrayItemPath() to create a complex path.
|
834
|
+
///
|
835
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
836
|
+
///
|
837
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
838
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
839
|
+
///
|
840
|
+
/// @param itemIndex The 1-based index of the desired item. Use the macro \c #kXMP_ArrayLastItem
|
841
|
+
/// to specify the last existing array item.
|
842
|
+
///
|
843
|
+
/// @return True if the array item exists.
|
844
|
+
|
845
|
+
bool DoesArrayItemExist ( XMP_StringPtr schemaNS,
|
846
|
+
XMP_StringPtr arrayName,
|
847
|
+
XMP_Index itemIndex ) const;
|
848
|
+
|
849
|
+
// ---------------------------------------------------------------------------------------------
|
850
|
+
/// @brief \c DoesStructFieldExist() reports whether a struct field currently exists.
|
851
|
+
///
|
852
|
+
/// Use \c TXMPUtils::ComposeStructFieldPath() to create a complex path.
|
853
|
+
///
|
854
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
855
|
+
///
|
856
|
+
/// @param structName The name of the struct. Can be a general path expression, must not be null
|
857
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
858
|
+
///
|
859
|
+
/// @param fieldNS The namespace URI for the field. Same namespace and prefix usage as
|
860
|
+
/// \c GetProperty().
|
861
|
+
///
|
862
|
+
/// @param fieldName The name of the field. Must be a single XML name, must not be null or the
|
863
|
+
/// empty string. Same namespace and prefix usage as \c GetProperty().
|
864
|
+
///
|
865
|
+
/// @return True if the field exists.
|
866
|
+
|
867
|
+
bool DoesStructFieldExist ( XMP_StringPtr schemaNS,
|
868
|
+
XMP_StringPtr structName,
|
869
|
+
XMP_StringPtr fieldNS,
|
870
|
+
XMP_StringPtr fieldName ) const;
|
871
|
+
|
872
|
+
// ---------------------------------------------------------------------------------------------
|
873
|
+
/// @brief \c DoesQualifierExist() reports whether a qualifier currently exists.
|
874
|
+
///
|
875
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
876
|
+
///
|
877
|
+
/// @param propName The name of the property to which the qualifier is attached. Can be a
|
878
|
+
/// general path expression, must not be null or the empty string; see \c GetProperty() for
|
879
|
+
/// namespace prefix usage.
|
880
|
+
///
|
881
|
+
/// @param qualNS The namespace URI for the qualifier. Same namespace and prefix usage as
|
882
|
+
/// \c GetProperty().
|
883
|
+
///
|
884
|
+
/// @param qualName The name of the qualifier. Must be a single XML name, must not be null or
|
885
|
+
/// the empty string. Same namespace and prefix usage as \c GetProperty().
|
886
|
+
///
|
887
|
+
/// @return True if the qualifier exists.
|
888
|
+
|
889
|
+
bool DoesQualifierExist ( XMP_StringPtr schemaNS,
|
890
|
+
XMP_StringPtr propName,
|
891
|
+
XMP_StringPtr qualNS,
|
892
|
+
XMP_StringPtr qualName ) const;
|
893
|
+
|
894
|
+
/// @}
|
895
|
+
|
896
|
+
// =============================================================================================
|
897
|
+
// Specialized Get and Set functions
|
898
|
+
// =============================================================================================
|
899
|
+
|
900
|
+
// ---------------------------------------------------------------------------------------------
|
901
|
+
/// \name Accessing properties as binary values.
|
902
|
+
/// @{
|
903
|
+
///
|
904
|
+
/// These are very similar to \c TXMPMeta::GetProperty() and \c TXMPMeta::SetProperty(), except
|
905
|
+
/// that the value is returned or provided in binary form instead of as a UTF-8 string.
|
906
|
+
/// \c TXMPUtils provides functions for converting between binary and string values.
|
907
|
+
/// Use the path composition functions in \c TXMPUtils to compose complex path expressions
|
908
|
+
/// for fields or items in nested structures or arrays, or for qualifiers.
|
909
|
+
|
910
|
+
// ---------------------------------------------------------------------------------------------
|
911
|
+
/// @brief \c GetProperty_Bool() retrieves the value of a Boolean property as a C++ bool.
|
912
|
+
///
|
913
|
+
/// Reports whether a property exists, and retrieves its binary value and property type information.
|
914
|
+
///
|
915
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
916
|
+
///
|
917
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
918
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
919
|
+
///
|
920
|
+
/// @param propValue [out] A buffer in which to return the binary value. Can be null if the
|
921
|
+
/// value is not wanted. Must be null for arrays and non-leaf levels of structs that do not have
|
922
|
+
/// values.
|
923
|
+
///
|
924
|
+
/// @param options [out] A buffer in which to return the option flags describing the property, a
|
925
|
+
/// logical OR of allowed bit-flag constants; see \c #kXMP_PropValueIsStruct and following. Can
|
926
|
+
/// be null if flags are not wanted.
|
927
|
+
///
|
928
|
+
/// @return True if the property exists.
|
929
|
+
|
930
|
+
bool GetProperty_Bool ( XMP_StringPtr schemaNS,
|
931
|
+
XMP_StringPtr propName,
|
932
|
+
bool * propValue,
|
933
|
+
XMP_OptionBits * options ) const;
|
934
|
+
|
935
|
+
// ---------------------------------------------------------------------------------------------
|
936
|
+
/// @brief \c GetProperty_Int() retrieves the value of an integer property as a C long integer.
|
937
|
+
///
|
938
|
+
/// Reports whether a property exists, and retrieves its binary value and property type information.
|
939
|
+
///
|
940
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
941
|
+
///
|
942
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
943
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
944
|
+
///
|
945
|
+
/// @param propValue [out] A buffer in which to return the binary value. Can be null if the
|
946
|
+
/// value is not wanted. Must be null for arrays and non-leaf levels of structs that do not have
|
947
|
+
/// values.
|
948
|
+
///
|
949
|
+
/// @param options [out] A buffer in which to return the option flags describing the property, a
|
950
|
+
/// logical OR of allowed bit-flag constants; see \c #kXMP_PropValueIsStruct and following. Can
|
951
|
+
/// be null if flags are not wanted.
|
952
|
+
///
|
953
|
+
/// @return True if the property exists.
|
954
|
+
|
955
|
+
bool GetProperty_Int ( XMP_StringPtr schemaNS,
|
956
|
+
XMP_StringPtr propName,
|
957
|
+
XMP_Int32 * propValue,
|
958
|
+
XMP_OptionBits * options ) const;
|
959
|
+
|
960
|
+
// ---------------------------------------------------------------------------------------------
|
961
|
+
/// @brief \c GetProperty_Int64() retrieves the value of an integer property as a C long long integer.
|
962
|
+
///
|
963
|
+
/// Reports whether a property exists, and retrieves its binary value and property type information.
|
964
|
+
///
|
965
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
966
|
+
///
|
967
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
968
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
969
|
+
///
|
970
|
+
/// @param propValue [out] A buffer in which to return the binary value. Can be null if the
|
971
|
+
/// value is not wanted. Must be null for arrays and non-leaf levels of structs that do not have
|
972
|
+
/// values.
|
973
|
+
///
|
974
|
+
/// @param options [out] A buffer in which to return the option flags describing the property, a
|
975
|
+
/// logical OR of allowed bit-flag constants; see \c #kXMP_PropValueIsStruct and following. Can
|
976
|
+
/// be null if flags are not wanted.
|
977
|
+
///
|
978
|
+
/// @return True if the property exists.
|
979
|
+
|
980
|
+
bool GetProperty_Int64 ( XMP_StringPtr schemaNS,
|
981
|
+
XMP_StringPtr propName,
|
982
|
+
XMP_Int64 * propValue,
|
983
|
+
XMP_OptionBits * options ) const;
|
984
|
+
|
985
|
+
// ---------------------------------------------------------------------------------------------
|
986
|
+
/// @brief \c GetProperty_Float() retrieves the value of a floating-point property as a C double float.
|
987
|
+
///
|
988
|
+
/// Reports whether a property exists, and retrieves its binary value and property type information.
|
989
|
+
///
|
990
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
991
|
+
///
|
992
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
993
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
994
|
+
///
|
995
|
+
/// @param propValue [out] A buffer in which to return the binary value. Can be null if the
|
996
|
+
/// value is not wanted. Must be null for arrays and non-leaf levels of structs that do not have
|
997
|
+
/// values.
|
998
|
+
///
|
999
|
+
/// @param options [out] A buffer in which to return the option flags describing the property, a
|
1000
|
+
/// logical OR of allowed bit-flag constants; see \c #kXMP_PropValueIsStruct and following. Can
|
1001
|
+
/// be null if flags are not wanted.
|
1002
|
+
///
|
1003
|
+
/// @return True if the property exists.
|
1004
|
+
|
1005
|
+
bool GetProperty_Float ( XMP_StringPtr schemaNS,
|
1006
|
+
XMP_StringPtr propName,
|
1007
|
+
double * propValue,
|
1008
|
+
XMP_OptionBits * options ) const;
|
1009
|
+
|
1010
|
+
// ---------------------------------------------------------------------------------------------
|
1011
|
+
/// @brief \c GetProperty_Date() retrieves the value of a date-time property as an \c #XMP_DateTime structure.
|
1012
|
+
///
|
1013
|
+
/// Reports whether a property exists, and retrieves its binary value and property type information.
|
1014
|
+
///
|
1015
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1016
|
+
///
|
1017
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1018
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1019
|
+
///
|
1020
|
+
/// @param propValue [out] A buffer in which to return the binary value. Can be null if the
|
1021
|
+
/// value is not wanted. Must be null for arrays and non-leaf levels of structs that do not have
|
1022
|
+
/// values.
|
1023
|
+
///
|
1024
|
+
/// @param options [out] A buffer in which to return the option flags describing the property, a
|
1025
|
+
/// logical OR of allowed bit-flag constants; see \c #kXMP_PropValueIsStruct and following. Can
|
1026
|
+
/// be null if flags are not wanted.
|
1027
|
+
///
|
1028
|
+
/// @return True if the property exists.
|
1029
|
+
|
1030
|
+
bool GetProperty_Date ( XMP_StringPtr schemaNS,
|
1031
|
+
XMP_StringPtr propName,
|
1032
|
+
XMP_DateTime * propValue,
|
1033
|
+
XMP_OptionBits * options ) const;
|
1034
|
+
|
1035
|
+
// ---------------------------------------------------------------------------------------------
|
1036
|
+
/// @brief \c SetProperty_Bool() sets the value of a Boolean property using a C++ bool.
|
1037
|
+
///
|
1038
|
+
/// Sets a property with a binary value, creating it if necessary.
|
1039
|
+
///
|
1040
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1041
|
+
///
|
1042
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1043
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1044
|
+
///
|
1045
|
+
/// @param propValue The new binary value. Can be null if creating the property. Must be null
|
1046
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
1047
|
+
///
|
1048
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
1049
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
1050
|
+
/// that already exists.
|
1051
|
+
|
1052
|
+
void SetProperty_Bool ( XMP_StringPtr schemaNS,
|
1053
|
+
XMP_StringPtr propName,
|
1054
|
+
bool propValue,
|
1055
|
+
XMP_OptionBits options = 0 );
|
1056
|
+
|
1057
|
+
// ---------------------------------------------------------------------------------------------
|
1058
|
+
/// @brief \c SetProperty_Int() sets the value of an integer property using a C long integer.
|
1059
|
+
///
|
1060
|
+
/// Sets a property with a binary value, creating it if necessary.
|
1061
|
+
///
|
1062
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1063
|
+
///
|
1064
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1065
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1066
|
+
///
|
1067
|
+
/// @param propValue The new binary value. Can be null if creating the property. Must be null
|
1068
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
1069
|
+
///
|
1070
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
1071
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
1072
|
+
/// that already exists.
|
1073
|
+
|
1074
|
+
void SetProperty_Int ( XMP_StringPtr schemaNS,
|
1075
|
+
XMP_StringPtr propName,
|
1076
|
+
XMP_Int32 propValue,
|
1077
|
+
XMP_OptionBits options = 0 );
|
1078
|
+
|
1079
|
+
// ---------------------------------------------------------------------------------------------
|
1080
|
+
/// @brief \c SetProperty_Int64() sets the value of an integer property using a C long long integer.
|
1081
|
+
///
|
1082
|
+
/// Sets a property with a binary value, creating it if necessary.
|
1083
|
+
///
|
1084
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1085
|
+
///
|
1086
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1087
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1088
|
+
///
|
1089
|
+
/// @param propValue The new binary value. Can be null if creating the property. Must be null
|
1090
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
1091
|
+
///
|
1092
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
1093
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
1094
|
+
/// that already exists.
|
1095
|
+
|
1096
|
+
void SetProperty_Int64 ( XMP_StringPtr schemaNS,
|
1097
|
+
XMP_StringPtr propName,
|
1098
|
+
XMP_Int64 propValue,
|
1099
|
+
XMP_OptionBits options = 0 );
|
1100
|
+
|
1101
|
+
// ---------------------------------------------------------------------------------------------
|
1102
|
+
/// @brief \c SetProperty_Float() sets the value of a floating-point property using a C double float.
|
1103
|
+
///
|
1104
|
+
/// Sets a property with a binary value, creating it if necessary.
|
1105
|
+
///
|
1106
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1107
|
+
///
|
1108
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1109
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1110
|
+
///
|
1111
|
+
/// @param propValue The new binary value. Can be null if creating the property. Must be null
|
1112
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
1113
|
+
///
|
1114
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
1115
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
1116
|
+
/// that already exists.
|
1117
|
+
|
1118
|
+
void SetProperty_Float ( XMP_StringPtr schemaNS,
|
1119
|
+
XMP_StringPtr propName,
|
1120
|
+
double propValue,
|
1121
|
+
XMP_OptionBits options = 0 );
|
1122
|
+
|
1123
|
+
// ---------------------------------------------------------------------------------------------
|
1124
|
+
/// @brief \c SetProperty_Date() sets the value of a date/time property using an \c #XMP_DateTime structure.
|
1125
|
+
///
|
1126
|
+
/// Sets a property with a binary value, creating it if necessary.
|
1127
|
+
///
|
1128
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1129
|
+
///
|
1130
|
+
/// @param propName The name of the property. Can be a general path expression, must not be null
|
1131
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1132
|
+
///
|
1133
|
+
/// @param propValue The new binary value. Can be null if creating the property. Must be null
|
1134
|
+
/// for arrays and non-leaf levels of structs that do not have values.
|
1135
|
+
///
|
1136
|
+
/// @param options Option flags describing the property; a logical OR of allowed bit-flag
|
1137
|
+
/// constants; see \c #kXMP_PropValueIsStruct and following. Must match the type of a property
|
1138
|
+
/// that already exists.
|
1139
|
+
|
1140
|
+
void SetProperty_Date ( XMP_StringPtr schemaNS,
|
1141
|
+
XMP_StringPtr propName,
|
1142
|
+
const XMP_DateTime & propValue,
|
1143
|
+
XMP_OptionBits options = 0 );
|
1144
|
+
|
1145
|
+
/// @}
|
1146
|
+
// =============================================================================================
|
1147
|
+
/// \name Accessing localized text (alt-text) properties.
|
1148
|
+
/// @{
|
1149
|
+
///
|
1150
|
+
/// Localized text properties are stored in alt-text arrays. They allow multiple concurrent
|
1151
|
+
/// localizations of a property value, for example a document title or copyright in several
|
1152
|
+
/// languages.
|
1153
|
+
///
|
1154
|
+
/// These functions provide convenient support for localized text properties, including a
|
1155
|
+
/// number of special and obscure aspects. The most important aspect of these functions is that
|
1156
|
+
/// they select an appropriate array item based on one or two RFC 3066 language tags. One of
|
1157
|
+
/// these languages, the "specific" language, is preferred and selected if there is an exact
|
1158
|
+
/// match. For many languages it is also possible to define a "generic" language that can be
|
1159
|
+
/// used if there is no specific language match. The generic language must be a valid RFC 3066
|
1160
|
+
/// primary subtag, or the empty string.
|
1161
|
+
///
|
1162
|
+
/// For example, a specific language of "en-US" should be used in the US, and a specific
|
1163
|
+
/// language of "en-UK" should be used in England. It is also appropriate to use "en" as the
|
1164
|
+
/// generic language in each case. If a US document goes to England, the "en-US" title is
|
1165
|
+
/// selected by using the "en" generic language and the "en-UK" specific language.
|
1166
|
+
///
|
1167
|
+
/// It is considered poor practice, but allowed, to pass a specific language that is just an
|
1168
|
+
/// RFC 3066 primary tag. For example "en" is not a good specific language, it should only be
|
1169
|
+
/// used as a generic language. Passing "i" or "x" as the generic language is also considered
|
1170
|
+
/// poor practice but allowed.
|
1171
|
+
///
|
1172
|
+
/// Advice from the W3C about the use of RFC 3066 language tags can be found at:
|
1173
|
+
/// \li http://www.w3.org/International/articles/language-tags/
|
1174
|
+
///
|
1175
|
+
/// \note RFC 3066 language tags must be treated in a case insensitive manner. The XMP toolkit
|
1176
|
+
/// does this by normalizing their capitalization:
|
1177
|
+
/// \li The primary subtag is lower case, the suggested practice of ISO 639.
|
1178
|
+
/// \li All 2 letter secondary subtags are upper case, the suggested practice of ISO 3166.
|
1179
|
+
/// \li All other subtags are lower case.
|
1180
|
+
///
|
1181
|
+
/// The XMP specification defines an artificial language, "x-default", that is used to
|
1182
|
+
/// explicitly denote a default item in an alt-text array. The XMP toolkit normalizes alt-text
|
1183
|
+
/// arrays such that the x-default item is the first item. The \c SetLocalizedText() function
|
1184
|
+
/// has several special features related to the x-default item, see its description for details.
|
1185
|
+
|
1186
|
+
// ---------------------------------------------------------------------------------------------
|
1187
|
+
/// @brief \c GetLocalizedText() retrieves information about a selected item in an alt-text array.
|
1188
|
+
///
|
1189
|
+
/// The array item is selected according to these rules:
|
1190
|
+
/// \li Look for an exact match with the specific language.
|
1191
|
+
/// \li If a generic language is given, look for a partial match.
|
1192
|
+
/// \li Look for an x-default item.
|
1193
|
+
/// \li Choose the first item.
|
1194
|
+
///
|
1195
|
+
/// A partial match with the generic language is where the start of the item's language matches
|
1196
|
+
/// the generic string and the next character is '-'. An exact match is also recognized as a
|
1197
|
+
/// degenerate case.
|
1198
|
+
///
|
1199
|
+
/// You can pass "x-default" as the specific language. In this case, selection of an
|
1200
|
+
/// \c x-default item is an exact match by the first rule, not a selection by the 3rd rule. The
|
1201
|
+
/// last 2 rules are fallbacks used when the specific and generic languages fail to produce a
|
1202
|
+
/// match.
|
1203
|
+
///
|
1204
|
+
/// The return value reports whether a match was successfully made.
|
1205
|
+
///
|
1206
|
+
/// @param schemaNS The namespace URI for the alt-text array; see \c GetProperty().
|
1207
|
+
///
|
1208
|
+
/// @param altTextName The name of the alt-text array. Can be a general path expression, must
|
1209
|
+
/// not be null or the empty string; see \c GetProperty() for namespace prefix usage.
|
1210
|
+
///
|
1211
|
+
/// @param genericLang The name of the generic language as an RFC 3066 primary subtag. Can be
|
1212
|
+
/// null or the empty string if no generic language is wanted.
|
1213
|
+
///
|
1214
|
+
/// @param specificLang The name of the specific language as an RFC 3066 tag, or "x-default".
|
1215
|
+
/// Must not be null or the empty string.
|
1216
|
+
///
|
1217
|
+
/// @param actualLang [out] A string object in which to return the language of the selected
|
1218
|
+
/// array item, if an appropriate array item is found. Can be null if the language is not wanted.
|
1219
|
+
///
|
1220
|
+
/// @param itemValue [out] A string object in which to return the value of the array item, if an
|
1221
|
+
/// appropriate array item is found. Can be null if the value is not wanted.
|
1222
|
+
///
|
1223
|
+
/// @param options A buffer in which to return the option flags that describe the array item, if
|
1224
|
+
/// an appropriate array item is found. Can be null if the flags are not wanted.
|
1225
|
+
///
|
1226
|
+
/// @return True if an appropriate array item exists.
|
1227
|
+
|
1228
|
+
bool GetLocalizedText ( XMP_StringPtr schemaNS,
|
1229
|
+
XMP_StringPtr altTextName,
|
1230
|
+
XMP_StringPtr genericLang,
|
1231
|
+
XMP_StringPtr specificLang,
|
1232
|
+
tStringObj * actualLang,
|
1233
|
+
tStringObj * itemValue,
|
1234
|
+
XMP_OptionBits * options ) const;
|
1235
|
+
|
1236
|
+
// ---------------------------------------------------------------------------------------------
|
1237
|
+
/// @brief \c SetLocalizedText() modifies the value of a selected item in an alt-text array.
|
1238
|
+
///
|
1239
|
+
/// Creates an appropriate array item if necessary, and handles special cases for the x-default
|
1240
|
+
/// item.
|
1241
|
+
///
|
1242
|
+
/// The array item is selected according to these rules:
|
1243
|
+
/// \li Look for an exact match with the specific language.
|
1244
|
+
/// \li If a generic language is given, look for a partial match.
|
1245
|
+
/// \li Look for an x-default item.
|
1246
|
+
/// \li Choose the first item.
|
1247
|
+
///
|
1248
|
+
/// A partial match with the generic language is where the start of the item's language matches
|
1249
|
+
/// the generic string and the next character is '-'. An exact match is also recognized as a
|
1250
|
+
/// degenerate case.
|
1251
|
+
///
|
1252
|
+
/// You can pass "x-default" as the specific language. In this case, selection of an
|
1253
|
+
/// \c x-default item is an exact match by the first rule, not a selection by the 3rd rule. The
|
1254
|
+
/// last 2 rules are fallbacks used when the specific and generic languages fail to produce a
|
1255
|
+
/// match.
|
1256
|
+
///
|
1257
|
+
/// Item values are modified according to these rules:
|
1258
|
+
///
|
1259
|
+
/// \li If the selected item is from a match with the specific language, the value of that
|
1260
|
+
/// item is modified. If the existing value of that item matches the existing value of the
|
1261
|
+
/// x-default item, the x-default item is also modified. If the array only has 1 existing item
|
1262
|
+
/// (which is not x-default), an x-default item is added with the given value.
|
1263
|
+
///
|
1264
|
+
/// \li If the selected item is from a match with the generic language and there are no other
|
1265
|
+
/// generic matches, the value of that item is modified. If the existing value of that item
|
1266
|
+
/// matches the existing value of the x-default item, the x-default item is also modified. If
|
1267
|
+
/// the array only has 1 existing item (which is not x-default), an x-default item is added
|
1268
|
+
/// with the given value.
|
1269
|
+
///
|
1270
|
+
/// \li If the selected item is from a partial match with the generic language and there are
|
1271
|
+
/// other partial matches, a new item is created for the specific language. The x-default item
|
1272
|
+
/// is not modified.
|
1273
|
+
///
|
1274
|
+
/// \li If the selected item is from the last 2 rules then a new item is created for the
|
1275
|
+
/// specific language. If the array only had an x-default item, the x-default item is also
|
1276
|
+
/// modified. If the array was empty, items are created for the specific language and
|
1277
|
+
/// x-default.
|
1278
|
+
///
|
1279
|
+
/// @param schemaNS The namespace URI for the alt-text array; see \c GetProperty().
|
1280
|
+
///
|
1281
|
+
/// @param altTextName The name of the alt-text array. Can be a general path expression, must
|
1282
|
+
/// not be null or the empty string; see \c GetProperty() for namespace prefix usage.
|
1283
|
+
///
|
1284
|
+
/// @param genericLang The name of the generic language as an RFC 3066 primary subtag. Can be
|
1285
|
+
/// null or the empty string if no generic language is wanted.
|
1286
|
+
///
|
1287
|
+
/// @param specificLang The name of the specific language as an RFC 3066 tag, or "x-default".
|
1288
|
+
/// Must not be null or the empty string.
|
1289
|
+
///
|
1290
|
+
/// @param itemValue The new value for the matching array item, specified as a null-terminated
|
1291
|
+
/// UTF-8 string.
|
1292
|
+
///
|
1293
|
+
/// @param options Option flags, none currently defined.
|
1294
|
+
|
1295
|
+
void SetLocalizedText ( XMP_StringPtr schemaNS,
|
1296
|
+
XMP_StringPtr altTextName,
|
1297
|
+
XMP_StringPtr genericLang,
|
1298
|
+
XMP_StringPtr specificLang,
|
1299
|
+
XMP_StringPtr itemValue,
|
1300
|
+
XMP_OptionBits options = 0 );
|
1301
|
+
|
1302
|
+
// ---------------------------------------------------------------------------------------------
|
1303
|
+
/// @brief \c SetLocalizedText() modifies the value of a selected item in an alt-text array using
|
1304
|
+
/// a string object.
|
1305
|
+
///
|
1306
|
+
/// Creates an appropriate array item if necessary, and handles special cases for the x-default
|
1307
|
+
/// item.
|
1308
|
+
///
|
1309
|
+
/// The array item is selected according to these rules:
|
1310
|
+
/// \li Look for an exact match with the specific language.
|
1311
|
+
/// \li If a generic language is given, look for a partial match.
|
1312
|
+
/// \li Look for an x-default item.
|
1313
|
+
/// \li Choose the first item.
|
1314
|
+
///
|
1315
|
+
/// A partial match with the generic language is where the start of the item's language matches
|
1316
|
+
/// the generic string and the next character is '-'. An exact match is also recognized as a
|
1317
|
+
/// degenerate case.
|
1318
|
+
///
|
1319
|
+
/// You can pass "x-default" as the specific language. In this case, selection of an \c x-default
|
1320
|
+
/// item is an exact match by the first rule, not a selection by the 3rd rule. The last 2 rules
|
1321
|
+
/// are fallbacks used when the specific and generic languages fail to produce a match.
|
1322
|
+
///
|
1323
|
+
/// Item values are modified according to these rules:
|
1324
|
+
///
|
1325
|
+
/// \li If the selected item is from a match with the specific language, the value of that
|
1326
|
+
/// item is modified. If the existing value of that item matches the existing value of the
|
1327
|
+
/// x-default item, the x-default item is also modified. If the array only has 1 existing item
|
1328
|
+
/// (which is not x-default), an x-default item is added with the given value.
|
1329
|
+
///
|
1330
|
+
/// \li If the selected item is from a match with the generic language and there are no other
|
1331
|
+
/// generic matches, the value of that item is modified. If the existing value of that item
|
1332
|
+
/// matches the existing value of the x-default item, the x-default item is also modified. If
|
1333
|
+
/// the array only has 1 existing item (which is not x-default), an x-default item is added
|
1334
|
+
/// with the given value.
|
1335
|
+
///
|
1336
|
+
/// \li If the selected item is from a partial match with the generic language and there are
|
1337
|
+
/// other partial matches, a new item is created for the specific language. The x-default item
|
1338
|
+
/// is not modified.
|
1339
|
+
///
|
1340
|
+
/// \li If the selected item is from the last 2 rules then a new item is created for the
|
1341
|
+
/// specific language. If the array only had an x-default item, the x-default item is also
|
1342
|
+
/// modified. If the array was empty, items are created for the specific language and
|
1343
|
+
/// x-default.
|
1344
|
+
///
|
1345
|
+
/// @param schemaNS The namespace URI for the alt-text array; see \c GetProperty().
|
1346
|
+
///
|
1347
|
+
/// @param altTextName The name of the alt-text array. Can be a general path expression, must
|
1348
|
+
/// not be null or the empty string; see \c GetProperty() for namespace prefix usage.
|
1349
|
+
///
|
1350
|
+
/// @param genericLang The name of the generic language as an RFC 3066 primary subtag. Can be
|
1351
|
+
/// null or the empty string if no generic language is wanted.
|
1352
|
+
///
|
1353
|
+
/// @param specificLang The name of the specific language as an RFC 3066 tag, or "x-default".
|
1354
|
+
/// Must not be null or the empty string.
|
1355
|
+
///
|
1356
|
+
/// @param itemValue The new value for the matching array item, specified as a string object.
|
1357
|
+
///
|
1358
|
+
/// @param options Option flags, none currently defined.
|
1359
|
+
|
1360
|
+
void SetLocalizedText ( XMP_StringPtr schemaNS,
|
1361
|
+
XMP_StringPtr altTextName,
|
1362
|
+
XMP_StringPtr genericLang,
|
1363
|
+
XMP_StringPtr specificLang,
|
1364
|
+
const tStringObj & itemValue,
|
1365
|
+
XMP_OptionBits options = 0 );
|
1366
|
+
|
1367
|
+
// ---------------------------------------------------------------------------------------------
|
1368
|
+
/// @brief \c DeleteLocalizedText() deletes specific language alternatives from an alt-text array.
|
1369
|
+
///
|
1370
|
+
/// The rules for finding the language value to delete are similar to those for \c #SetLocalizedText().
|
1371
|
+
///
|
1372
|
+
/// @param schemaNS The namespace URI for the alt-text array; see \c #GetProperty().
|
1373
|
+
///
|
1374
|
+
/// @param altTextName The name of the alt-text array. Can be a general path expression, must
|
1375
|
+
/// not be null or the empty string; see \c #GetProperty() for namespace prefix usage.
|
1376
|
+
///
|
1377
|
+
/// @param genericLang The name of the generic language as an RFC 3066 primary subtag. Can be
|
1378
|
+
/// null or the empty string if no generic language is wanted.
|
1379
|
+
///
|
1380
|
+
/// @param specificLang The name of the specific language as an RFC 3066 tag, or "x-default".
|
1381
|
+
/// Must not be null or the empty string.
|
1382
|
+
///
|
1383
|
+
void
|
1384
|
+
DeleteLocalizedText ( XMP_StringPtr schemaNS,
|
1385
|
+
XMP_StringPtr altTextName,
|
1386
|
+
XMP_StringPtr genericLang,
|
1387
|
+
XMP_StringPtr specificLang );
|
1388
|
+
|
1389
|
+
/// @}
|
1390
|
+
|
1391
|
+
// =============================================================================================
|
1392
|
+
/// \name Creating and reading serialized RDF.
|
1393
|
+
/// @{
|
1394
|
+
///
|
1395
|
+
/// The metadata contained in an XMP object must be serialized as RDF for storage in an XMP
|
1396
|
+
/// packet and output to a file. Similarly, metadata in the form of serialized RDF (such as
|
1397
|
+
/// metadata read from a file using \c TXMPFiles) must be parsed into an XMP object for
|
1398
|
+
/// manipulation with the XMP Toolkit.
|
1399
|
+
///
|
1400
|
+
/// These functions support parsing serialized RDF into an XMP object, and serializing an XMP
|
1401
|
+
/// object into RDF. The input for parsing can be any valid Unicode encoding. ISO Latin-1 is
|
1402
|
+
/// also recognized, but its use is strongly discouraged. Serialization is always as UTF-8.
|
1403
|
+
|
1404
|
+
// ---------------------------------------------------------------------------------------------
|
1405
|
+
/// @brief \c ParseFromBuffer() parses RDF from a series of input buffers into this XMP object.
|
1406
|
+
///
|
1407
|
+
/// Use this to convert metadata from serialized RDF form (as, for example, read from an XMP
|
1408
|
+
/// packet embedded in a file) into an XMP object that you can manipulate with the XMP Toolkit.
|
1409
|
+
/// If this XMP object is empty and the input buffer contains a complete XMP packet, this is the
|
1410
|
+
/// same as creating a new XMP object from that buffer with the constructor.
|
1411
|
+
///
|
1412
|
+
/// You can use this function to combine multiple buffers into a single metadata tree. To
|
1413
|
+
/// terminate an input loop conveniently, pass the option \c #kXMP_ParseMoreBuffers for all
|
1414
|
+
/// real input, then make a final call with a zero length and \c #kXMP_NoOptions. The buffers
|
1415
|
+
/// can be any length. The buffer boundaries need not respect XML tokens or even Unicode
|
1416
|
+
/// characters.
|
1417
|
+
///
|
1418
|
+
/// @param buffer A pointer to a buffer of input. Can be null if \c bufferSize is 0.
|
1419
|
+
///
|
1420
|
+
/// @param bufferSize The length of the input buffer in bytes. Zero is a valid value.
|
1421
|
+
///
|
1422
|
+
/// @param options An options flag that controls how the parse operation is performed. A logical
|
1423
|
+
/// OR of these bit-flag constants:
|
1424
|
+
/// \li \c #kXMP_ParseMoreBuffers - This is not the last buffer of input, more calls follow.
|
1425
|
+
/// \li \c #kXMP_RequireXMPMeta - The \c x:xmpmeta XML element is required around \c rdf:RDF.
|
1426
|
+
///
|
1427
|
+
/// @see \c TXMPFiles::GetXMP()
|
1428
|
+
|
1429
|
+
void ParseFromBuffer ( XMP_StringPtr buffer,
|
1430
|
+
XMP_StringLen bufferSize,
|
1431
|
+
XMP_OptionBits options = 0 );
|
1432
|
+
|
1433
|
+
// ---------------------------------------------------------------------------------------------
|
1434
|
+
/// @brief \c SerializeToBuffer() serializes metadata in this XMP object into a string as RDF.
|
1435
|
+
///
|
1436
|
+
/// Use this to prepare metadata for storage as an XMP packet embedded in a file. See \c TXMPFiles::PutXMP().
|
1437
|
+
///
|
1438
|
+
/// @param rdfString [out] A string object in which to return the serialized RDF. Must not be null.
|
1439
|
+
///
|
1440
|
+
/// @param options An options flag that controls how the serialization operation is performed.
|
1441
|
+
/// The specified options must be logically consistent; an exception is thrown if they are not.
|
1442
|
+
/// A logical OR of these bit-flag constants:
|
1443
|
+
/// \li \c kXMP_OmitPacketWrapper - Do not include an XML packet wrapper. This cannot be
|
1444
|
+
/// specified together with \c #kXMP_ReadOnlyPacket, \c #kXMP_IncludeThumbnailPad, or
|
1445
|
+
/// \c #kXMP_ExactPacketLength.
|
1446
|
+
/// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified
|
1447
|
+
/// together with \c kXMP_OmitPacketWrapper.
|
1448
|
+
/// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout.
|
1449
|
+
/// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the
|
1450
|
+
/// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with
|
1451
|
+
/// \c kXMP_OmitPacketWrapper.
|
1452
|
+
/// \li \c kXMP_ExactPacketLength - The padding parameter provides the overall packet length.
|
1453
|
+
/// The actual amount of padding is computed. An exception is thrown if the packet exceeds
|
1454
|
+
/// this length with no padding. Cannot be specified together with
|
1455
|
+
/// \c kXMP_OmitPacketWrapper.
|
1456
|
+
///
|
1457
|
+
/// In addition to the above options, you can include one of the following encoding options:
|
1458
|
+
/// \li \c #kXMP_EncodeUTF8 - Encode as UTF-8, the default.
|
1459
|
+
/// \li \c #kXMP_EncodeUTF16Big - Encode as big-endian UTF-16.
|
1460
|
+
/// \li \c #kXMP_EncodeUTF16Little - Encode as little-endian UTF-16.
|
1461
|
+
/// \li \c #kXMP_EncodeUTF32Big - Encode as big-endian UTF-32.
|
1462
|
+
/// \li \c #kXMP_EncodeUTF32Little - Encode as little-endian UTF-32.
|
1463
|
+
///
|
1464
|
+
/// @param padding The amount of padding to be added if a writeable XML packet is created. If
|
1465
|
+
/// zero (the default) an appropriate amount of padding is computed.
|
1466
|
+
///
|
1467
|
+
/// @param newline The string to be used as a line terminator. If empty, defaults to linefeed,
|
1468
|
+
/// U+000A, the standard XML newline.
|
1469
|
+
///
|
1470
|
+
/// @param indent The string to be used for each level of indentation in the serialized RDF. If
|
1471
|
+
/// empty, defaults to two ASCII spaces, U+0020.
|
1472
|
+
///
|
1473
|
+
/// @param baseIndent The number of levels of indentation to be used for the outermost XML
|
1474
|
+
/// element in the serialized RDF. This is convenient when embedding the RDF in other text.
|
1475
|
+
|
1476
|
+
void SerializeToBuffer ( tStringObj * rdfString,
|
1477
|
+
XMP_OptionBits options,
|
1478
|
+
XMP_StringLen padding,
|
1479
|
+
XMP_StringPtr newline,
|
1480
|
+
XMP_StringPtr indent = "",
|
1481
|
+
XMP_Index baseIndent = 0 ) const;
|
1482
|
+
|
1483
|
+
// ---------------------------------------------------------------------------------------------
|
1484
|
+
/// @brief \c SerializeToBuffer() serializes metadata in this XMP object into a string as RDF.
|
1485
|
+
///
|
1486
|
+
/// This simpler form of the function uses default values for the \c newline, \c indent, and
|
1487
|
+
/// \c baseIndent parameters.
|
1488
|
+
///
|
1489
|
+
/// @param rdfString [out] A string object in which to return the serialized RDF. Must not be null.
|
1490
|
+
///
|
1491
|
+
/// @param options An options flag that controls how the serialization operation is performed.
|
1492
|
+
/// The specified options must be logically consistent; an exception is thrown if they are not.
|
1493
|
+
/// A logical OR of these bit-flag constants:
|
1494
|
+
/// \li \c kXMP_OmitPacketWrapper - Do not include an XML packet wrapper. This cannot be
|
1495
|
+
/// specified together with \c #kXMP_ReadOnlyPacket, \c #kXMP_IncludeThumbnailPad, or
|
1496
|
+
/// \c #kXMP_ExactPacketLength.
|
1497
|
+
/// \li \c kXMP_ReadOnlyPacket - Create a read-only XML packet wapper. Cannot be specified
|
1498
|
+
/// together with \c kXMP_OmitPacketWrapper.
|
1499
|
+
/// \li \c kXMP_UseCompactFormat - Use a highly compact RDF syntax and layout.
|
1500
|
+
/// \li \c kXMP_IncludeThumbnailPad - Include typical space for a JPEG thumbnail in the
|
1501
|
+
/// padding if no \c xmp:Thumbnails property is present. Cannot be specified together with
|
1502
|
+
/// \c kXMP_OmitPacketWrapper.
|
1503
|
+
/// \li \c kXMP_ExactPacketLength - The padding parameter provides the overall packet length.
|
1504
|
+
/// The actual amount of padding is computed. An exception is thrown if the packet exceeds
|
1505
|
+
/// this length with no padding. Cannot be specified together with
|
1506
|
+
/// \c kXMP_OmitPacketWrapper.
|
1507
|
+
///
|
1508
|
+
/// In addition to the above options, you can include one of the following encoding options:
|
1509
|
+
/// \li \c #kXMP_EncodeUTF8 - Encode as UTF-8, the default.
|
1510
|
+
/// \li \c #kXMP_EncodeUTF16Big - Encode as big-endian UTF-16.
|
1511
|
+
/// \li \c #kXMP_EncodeUTF16Little - Encode as little-endian UTF-16.
|
1512
|
+
/// \li \c #kXMP_EncodeUTF32Big - Encode as big-endian UTF-32.
|
1513
|
+
/// \li \c #kXMP_EncodeUTF32Little - Encode as little-endian UTF-32.
|
1514
|
+
///
|
1515
|
+
/// @param padding The amount of padding to be added if a writeable XML packet is created.
|
1516
|
+
/// If zero (the default) an appropriate amount of padding is computed.
|
1517
|
+
|
1518
|
+
void SerializeToBuffer ( tStringObj * rdfString,
|
1519
|
+
XMP_OptionBits options = 0,
|
1520
|
+
XMP_StringLen padding = 0 ) const;
|
1521
|
+
|
1522
|
+
/// @}
|
1523
|
+
// =============================================================================================
|
1524
|
+
// Miscellaneous Member Functions
|
1525
|
+
// ==============================
|
1526
|
+
|
1527
|
+
// ---------------------------------------------------------------------------------------------
|
1528
|
+
/// \name Helper functions.
|
1529
|
+
/// @{
|
1530
|
+
|
1531
|
+
// ---------------------------------------------------------------------------------------------
|
1532
|
+
/// @brief Retrieves an internal reference that can be safely passed across DLL boundaries and
|
1533
|
+
/// reconstructed.
|
1534
|
+
///
|
1535
|
+
/// The \c TXMPMeta class is a normal C++ template, it is instantiated and local to each client
|
1536
|
+
/// executable, as are the other \c TXMP* classes. Different clients might not use the same
|
1537
|
+
/// string type to instantiate \c TXMPMeta.
|
1538
|
+
///
|
1539
|
+
/// Because of this you should not pass \c SXMPMeta objects, or pointers to \c SXMPMeta objects,
|
1540
|
+
/// across DLL boundaries. Use this function to obtain a safe internal reference that you can
|
1541
|
+
/// pass, then construct a local object on the callee side. This construction does not create a
|
1542
|
+
/// cloned XMP tree, it is the same underlying XMP object safely wrapped in each client's
|
1543
|
+
/// \c SXMPMeta object.
|
1544
|
+
///
|
1545
|
+
/// Use this function and the associated constructor like this:
|
1546
|
+
/// \li The callee's header contains:
|
1547
|
+
/// <pre>
|
1548
|
+
/// CalleeMethod ( XMPMetaRef xmpRef );
|
1549
|
+
/// </pre>
|
1550
|
+
///
|
1551
|
+
/// \li The caller's code contains:
|
1552
|
+
/// <pre>
|
1553
|
+
/// SXMPMeta callerXMP;
|
1554
|
+
/// CalleeMethod ( callerXMP.GetInternalRef() );
|
1555
|
+
/// </pre>
|
1556
|
+
///
|
1557
|
+
/// \li The callee's code contains:
|
1558
|
+
/// <pre>
|
1559
|
+
/// SXMPMeta calleeXMP ( xmpRef );
|
1560
|
+
/// </pre>
|
1561
|
+
///
|
1562
|
+
/// @return The reference object.
|
1563
|
+
|
1564
|
+
XMPMetaRef GetInternalRef() const;
|
1565
|
+
|
1566
|
+
// ---------------------------------------------------------------------------------------------
|
1567
|
+
/// @brief \c GetObjectName() retrieves the client-assigned name of this XMP object.
|
1568
|
+
///
|
1569
|
+
/// Assign this name with \c SetObjectName().
|
1570
|
+
///
|
1571
|
+
/// @param name [out] A string object in which to return the name.
|
1572
|
+
|
1573
|
+
void GetObjectName ( tStringObj * name ) const;
|
1574
|
+
|
1575
|
+
// ---------------------------------------------------------------------------------------------
|
1576
|
+
/// @brief \c SetObjectName() assigns a name to this XMP object.
|
1577
|
+
///
|
1578
|
+
/// Retrieve this client-assigned name with \c GetObjectName().
|
1579
|
+
///
|
1580
|
+
/// @param name The name as a null-terminated UTF-8 string.
|
1581
|
+
|
1582
|
+
void SetObjectName ( XMP_StringPtr name );
|
1583
|
+
|
1584
|
+
// ---------------------------------------------------------------------------------------------
|
1585
|
+
/// @brief \c SetObjectName() assigns a name to this XMP object.
|
1586
|
+
///
|
1587
|
+
/// Retrieve this client-assigned name with \c GetObjectName().
|
1588
|
+
///
|
1589
|
+
/// @param name The name as a string object.
|
1590
|
+
|
1591
|
+
void SetObjectName ( tStringObj name );
|
1592
|
+
|
1593
|
+
// ---------------------------------------------------------------------------------------------
|
1594
|
+
/// @brief \c Sort() sorts the data model tree of an XMP object.
|
1595
|
+
///
|
1596
|
+
/// Use this function to sort the data model of an XMP object into a canonical order. This can
|
1597
|
+
/// be convenient when comparing data models, (e.g. by text comparison of DumpObject output).
|
1598
|
+
///
|
1599
|
+
/// At the top level the namespaces are sorted by their prefixes. Within a namespace, the top
|
1600
|
+
/// level properties are sorted by name. Within a struct, the fields are sorted by their
|
1601
|
+
/// qualified name, i.e. their XML prefix:local form. Unordered arrays of simple items are
|
1602
|
+
/// sorted by value. Language Alternative arrays are sorted by the xml:lang qualifiers, with
|
1603
|
+
/// the "x-default" item placed first.
|
1604
|
+
|
1605
|
+
void Sort();
|
1606
|
+
|
1607
|
+
// ---------------------------------------------------------------------------------------------
|
1608
|
+
/// @brief \c Erase() restores the object to a "just constructed" state.
|
1609
|
+
|
1610
|
+
void Erase();
|
1611
|
+
|
1612
|
+
// ---------------------------------------------------------------------------------------------
|
1613
|
+
/// @brief \c Clone() creates a deep copy of an XMP object.
|
1614
|
+
///
|
1615
|
+
/// Use this function to copy an entire XMP metadata tree. Assignment and copy constructors only
|
1616
|
+
/// increment a reference count, they do not do a deep copy. This function returns an object,
|
1617
|
+
/// not a pointer. The following shows correct usage:
|
1618
|
+
///
|
1619
|
+
/// <pre>
|
1620
|
+
/// SXMPMeta * clone1 = new SXMPMeta ( sourceXMP.Clone() ); // This works.
|
1621
|
+
/// SXMPMeta clone2 ( sourceXMP.Clone ); // This works also. (Not a pointer.)
|
1622
|
+
/// </pre>
|
1623
|
+
/// The \c clone2 example does not use an explicit pointer.
|
1624
|
+
/// This is good for local usage, protecting against memory leaks.
|
1625
|
+
///
|
1626
|
+
/// This is an example of incorrect usage:
|
1627
|
+
/// <pre>
|
1628
|
+
/// SXMPMeta * clone3 = &sourceXMP.Clone(); // ! This does not work!
|
1629
|
+
/// </pre>
|
1630
|
+
/// The assignment to \c clone3 creates a temporary object, initializes it with the clone,
|
1631
|
+
/// assigns the address of the temporary to \c clone3, then deletes the temporary.
|
1632
|
+
///
|
1633
|
+
/// @param options Option flags, not currently defined..
|
1634
|
+
///
|
1635
|
+
/// @return An XMP object cloned from the original.
|
1636
|
+
|
1637
|
+
TXMPMeta Clone ( XMP_OptionBits options = 0 ) const;
|
1638
|
+
|
1639
|
+
// ---------------------------------------------------------------------------------------------
|
1640
|
+
/// @brief \c CountArrayItems() reports the number of items currently defined in an array.
|
1641
|
+
///
|
1642
|
+
/// @param schemaNS The namespace URI; see \c GetProperty().
|
1643
|
+
///
|
1644
|
+
/// @param arrayName The name of the array. Can be a general path expression, must not be null
|
1645
|
+
/// or the empty string; see \c GetProperty() for namespace prefix usage.
|
1646
|
+
///
|
1647
|
+
/// @return The number of items.
|
1648
|
+
|
1649
|
+
XMP_Index CountArrayItems ( XMP_StringPtr schemaNS,
|
1650
|
+
XMP_StringPtr arrayName ) const;
|
1651
|
+
|
1652
|
+
// ---------------------------------------------------------------------------------------------
|
1653
|
+
/// @brief \c DumpObject() outputs the content of an XMP object to a callback handler for debugging.
|
1654
|
+
///
|
1655
|
+
/// Invokes a client-defined callback for each line of output.
|
1656
|
+
///
|
1657
|
+
/// @param outProc The client-defined procedure to handle each line of output.
|
1658
|
+
///
|
1659
|
+
/// @param clientData A pointer to client-defined data to pass to the handler.
|
1660
|
+
///
|
1661
|
+
/// @return A success-fail status value, returned from the handler. Zero is success, failure
|
1662
|
+
/// values are client-defined.
|
1663
|
+
///
|
1664
|
+
/// @see Static function \c DumpNamespaces()
|
1665
|
+
|
1666
|
+
XMP_Status DumpObject ( XMP_TextOutputProc outProc,
|
1667
|
+
void * clientData ) const;
|
1668
|
+
|
1669
|
+
// ---------------------------------------------------------------------------------------------
|
1670
|
+
/// @brief Not implemented
|
1671
|
+
XMP_OptionBits GetObjectOptions() const;
|
1672
|
+
|
1673
|
+
// ---------------------------------------------------------------------------------------------
|
1674
|
+
/// \brief Not implemented
|
1675
|
+
void SetObjectOptions ( XMP_OptionBits options );
|
1676
|
+
|
1677
|
+
/// @}
|
1678
|
+
|
1679
|
+
// =============================================================================================
|
1680
|
+
// Error notifications
|
1681
|
+
// ===================
|
1682
|
+
|
1683
|
+
// ---------------------------------------------------------------------------------------------
|
1684
|
+
/// \name Error notifications
|
1685
|
+
/// @{
|
1686
|
+
///
|
1687
|
+
/// From the beginning through version 5.5, XMP Tookit errors result in throwing an \c XMP_Error
|
1688
|
+
/// exception. For the most part exceptions were thrown early and thus API calls aborted as soon
|
1689
|
+
/// as an error was detected. Starting in version 5.5, support has been added for notifications
|
1690
|
+
/// of errors arising in calls to \c TXMPMeta functions.
|
1691
|
+
///
|
1692
|
+
/// A client can register an error notification callback function for a \c TXMPMeta object. This
|
1693
|
+
/// can be done as a global default or individually to each object. The global default applies
|
1694
|
+
/// to all objects created after it is registered. Within the object there is no difference
|
1695
|
+
/// between the global default or explicitly registered callback. The callback function returns
|
1696
|
+
/// a \c bool value indicating if recovery should be attempted (true) or an exception thrown
|
1697
|
+
/// (false). If no callback is registered, a best effort at recovery and continuation will be
|
1698
|
+
/// made with an exception thrown if recovery is not possible.
|
1699
|
+
///
|
1700
|
+
/// The number of notifications delivered for a given TXMPMeta object can be limited. This is
|
1701
|
+
/// intended to reduce chatter from multiple or cascading errors. The limit is set when the
|
1702
|
+
/// callback function is registered. This limits the number of notifications of the highest
|
1703
|
+
/// severity delivered or less. If a higher severity error occurs, the counting starts again.
|
1704
|
+
/// The limit and counting can be reset at any time, see \c ResetErrorCallbackLimit.
|
1705
|
+
|
1706
|
+
// --------------------------------------------------------------------------------------------
|
1707
|
+
/// @brief SetDefaultErrorCallback() registers a global default error notification callback.
|
1708
|
+
///
|
1709
|
+
/// @param proc The client's callback function.
|
1710
|
+
///
|
1711
|
+
/// @param context Client-provided context for the callback.
|
1712
|
+
///
|
1713
|
+
/// @param limit A limit on the number of notifications to be delivered.
|
1714
|
+
|
1715
|
+
static void SetDefaultErrorCallback ( XMPMeta_ErrorCallbackProc proc, void* context = 0, XMP_Uns32 limit = 1 );
|
1716
|
+
|
1717
|
+
// --------------------------------------------------------------------------------------------
|
1718
|
+
/// @brief SetErrorCallback() registers an error notification callback.
|
1719
|
+
///
|
1720
|
+
/// @param proc The client's callback function.
|
1721
|
+
///
|
1722
|
+
/// @param context Client-provided context for the callback.
|
1723
|
+
///
|
1724
|
+
/// @param limit A limit on the number of notifications to be delivered.
|
1725
|
+
|
1726
|
+
void SetErrorCallback ( XMPMeta_ErrorCallbackProc proc, void* context = 0, XMP_Uns32 limit = 1 );
|
1727
|
+
|
1728
|
+
// --------------------------------------------------------------------------------------------
|
1729
|
+
/// @brief ResetErrorCallbackLimit() resets the error notification limit and counting. It has no
|
1730
|
+
/// effect if an error notification callback function is not registered.
|
1731
|
+
///
|
1732
|
+
/// @param limit A limit on the number of notifications to be delivered.
|
1733
|
+
|
1734
|
+
void ResetErrorCallbackLimit ( XMP_Uns32 limit = 1 );
|
1735
|
+
|
1736
|
+
/// @}
|
1737
|
+
|
1738
|
+
// =============================================================================================
|
1739
|
+
|
1740
|
+
XMPMetaRef xmpRef; // *** Should be private, see below.
|
1741
|
+
|
1742
|
+
private:
|
1743
|
+
|
1744
|
+
#if 0 // *** VS.Net and gcc seem to not handle the friend declarations properly.
|
1745
|
+
friend class TXMPIterator <class tStringObj>;
|
1746
|
+
friend class TXMPUtils <class tStringObj>;
|
1747
|
+
#endif
|
1748
|
+
|
1749
|
+
static void SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueLen );
|
1750
|
+
|
1751
|
+
}; // class TXMPMeta
|
1752
|
+
|
1753
|
+
#endif // __TXMPMeta_hpp__
|