summaryrefslogtreecommitdiff
path: root/public/include/client-glue/TXMPFiles.incl_cpp
diff options
context:
space:
mode:
Diffstat (limited to 'public/include/client-glue/TXMPFiles.incl_cpp')
-rw-r--r--public/include/client-glue/TXMPFiles.incl_cpp107
1 files changed, 100 insertions, 7 deletions
diff --git a/public/include/client-glue/TXMPFiles.incl_cpp b/public/include/client-glue/TXMPFiles.incl_cpp
index f424f10..eb19887 100644
--- a/public/include/client-glue/TXMPFiles.incl_cpp
+++ b/public/include/client-glue/TXMPFiles.incl_cpp
@@ -55,6 +55,19 @@ SetClientString ( void * clientPtr, XMP_StringPtr valuePtr, XMP_StringLen valueL
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPFiles,void)::
+SetClientStringVector ( void * clientPtr, XMP_StringPtr * arrayPtr, XMP_Uns32 stringCount )
+{
+ std::vector<tStringObj>* clientVec = (std::vector<tStringObj>*) clientPtr;
+ clientVec->clear();
+ for ( XMP_Uns32 i = 0; i < stringCount; ++i ) {
+ tStringObj nextValue ( arrayPtr[i] );
+ clientVec->push_back ( nextValue );
+ }
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,void)::
GetVersionInfo ( XMP_VersionInfo * versionInfo )
{
WrapNoCheckVoid ( zXMPFiles_GetVersionInfo_1 ( versionInfo ) );
@@ -259,9 +272,43 @@ GetFileModDate ( XMP_StringPtr filePath, XMP_DateTime * modDate, XMP_FileFormat
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPFiles,bool)::
+GetAssociatedResources ( XMP_StringPtr filePath,
+ std::vector<tStringObj>* resourceList,
+ XMP_FileFormat format /* = kXMP_UnknownFile */,
+ XMP_OptionBits options /* = 0 */)
+{
+ WrapCheckBool ( ok, zXMPFiles_GetAssociatedResources_1 ( filePath, resourceList, format, options, SetClientStringVector ) );
+ return ok;
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,bool)::
+IsMetadataWritable ( XMP_StringPtr filePath,
+ bool * writable,
+ XMP_FileFormat format /* = kXMP_UnknownFile */,
+ XMP_OptionBits options /* = 0 */)
+{
+ if ( writable)
+ {
+ XMP_Bool internalWritable = ConvertBoolToXMP_Bool( *writable );
+ WrapCheckBool ( ok, zXMPFiles_IsMetadataWritable_1 ( filePath, &internalWritable, format, options ) );
+ *writable = ConvertXMP_BoolToBool( internalWritable );
+ return ok;
+ }
+ else
+ {
+ WrapCheckBool ( ok, zXMPFiles_IsMetadataWritable_1 ( filePath, NULL, format, options ) );
+ return ok;
+ }
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,bool)::
OpenFile ( XMP_StringPtr filePath,
XMP_FileFormat format /* = kXMP_UnknownFile */,
- XMP_OptionBits openFlags /* =0 */ )
+ XMP_OptionBits openFlags /* = 0 */ )
{
WrapCheckBool ( ok, zXMPFiles_OpenFile_1 ( filePath, format, openFlags ) );
return ok;
@@ -272,7 +319,7 @@ OpenFile ( XMP_StringPtr filePath,
XMP_MethodIntro(TXMPFiles,bool)::
OpenFile ( const tStringObj & filePath,
XMP_FileFormat format /* = kXMP_UnknownFile */,
- XMP_OptionBits openFlags /* =0 */ )
+ XMP_OptionBits openFlags /* = 0 */ )
{
return this->OpenFile ( filePath.c_str(), format, openFlags );
}
@@ -283,7 +330,7 @@ OpenFile ( const tStringObj & filePath,
XMP_MethodIntro(TXMPFiles,bool)::
OpenFile ( XMP_IO * clientIO,
XMP_FileFormat format /* = kXMP_UnknownFile */,
- XMP_OptionBits openFlags /* =0 */ )
+ XMP_OptionBits openFlags /* = 0 */ )
{
WrapCheckBool ( ok, zXMPFiles_OpenFile_2 ( clientIO, format, openFlags ) );
return ok;
@@ -293,7 +340,7 @@ OpenFile ( XMP_IO * clientIO,
// -------------------------------------------------------------------------------------------------
XMP_MethodIntro(TXMPFiles,void)::
-CloseFile ( XMP_OptionBits closeFlags /* =0 */ )
+CloseFile ( XMP_OptionBits closeFlags /* = 0 */ )
{
WrapCheckVoid ( zXMPFiles_CloseFile_1 ( closeFlags ) );
}
@@ -302,9 +349,9 @@ CloseFile ( XMP_OptionBits closeFlags /* =0 */ )
XMP_MethodIntro(TXMPFiles,bool)::
GetFileInfo ( tStringObj * filePath /* = 0 */,
- XMP_OptionBits * openFlags /* =0 */,
+ XMP_OptionBits * openFlags /* = 0 */,
XMP_FileFormat * format /* = 0 */,
- XMP_OptionBits * handlerFlags /* =0 */ )
+ XMP_OptionBits * handlerFlags /* = 0 */ )
{
WrapCheckBool ( isOpen, zXMPFiles_GetFileInfo_1 ( filePath, openFlags, format, handlerFlags, SetClientString ) );
return isOpen;
@@ -324,7 +371,7 @@ SetAbortProc ( XMP_AbortProc abortProc,
XMP_MethodIntro(TXMPFiles,bool)::
GetXMP ( SXMPMeta * xmpObj /* = 0 */,
tStringObj * xmpPacket /* = 0 */,
- XMP_PacketInfo * packetInfo /* =0 */ )
+ XMP_PacketInfo * packetInfo /* = 0 */ )
{
XMPMetaRef xmpRef = 0;
if ( xmpObj != 0 ) {
@@ -389,3 +436,49 @@ CanPutXMP ( const tStringObj & xmpPacket )
}
// =================================================================================================
+
+XMP_MethodIntro(TXMPFiles,void)::
+SetDefaultProgressCallback ( XMP_ProgressReportProc proc, void * context /* = 0 */,
+ float interval /* = 1.0 */, bool sendStartStop /* = false */ )
+{
+ XMP_Bool internalsendStartStop = ConvertBoolToXMP_Bool( sendStartStop );
+ WrapCheckVoid ( zXMPFiles_SetDefaultProgressCallback_1 ( proc, context, interval, internalsendStartStop ) );
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,void)::
+SetProgressCallback ( XMP_ProgressReportProc proc, void * context /* = 0 */,
+ float interval /* = 1.0 */, bool sendStartStop /* = false */ )
+{
+ XMP_Bool internalsendStartStop = ConvertBoolToXMP_Bool( sendStartStop );
+ WrapCheckVoid ( zXMPFiles_SetProgressCallback_1 ( proc, context, interval, internalsendStartStop ) );
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,void)::
+SetDefaultErrorCallback ( XMPFiles_ErrorCallbackProc proc,
+ void * context /* = 0 */, XMP_Uns32 limit /*= 1 */ )
+{
+ WrapCheckVoid ( zXMPFiles_SetDefaultErrorCallback_1 ( proc, context, limit ) );
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,void)::
+SetErrorCallback ( XMPFiles_ErrorCallbackProc proc,
+ void * context /* = 0 */, XMP_Uns32 limit /*= 1 */ )
+{
+ WrapCheckVoid ( zXMPFiles_SetErrorCallback_1 ( proc, context, limit ) );
+}
+
+// -------------------------------------------------------------------------------------------------
+
+XMP_MethodIntro(TXMPFiles,void)::
+ResetErrorCallbackLimit ( XMP_Uns32 limit /* = 1 */ )
+{
+ WrapCheckVoid ( zXMPFiles_ResetErrorCallbackLimit_1 ( limit ) );
+}
+
+// =================================================================================================