示例#1
0
void WXMPFiles_GetXMP_1 ( XMPFilesRef      xmpObjRef,
                          XMPMetaRef       xmpRef,
		                  void *           clientPacket,
		                  XMP_PacketInfo * packetInfo,
		                  SetClientStringProc SetClientString,
                          WXMP_Result *    wResult )
{
	XMP_ENTER_ObjWrite ( XMPFiles, "WXMPFiles_GetXMP_1" )
		StartPerfCheck ( kAPIPerf_GetXMP, "" );

		bool hasXMP = false;
		XMP_StringPtr packetStr;
		XMP_StringLen packetLen;

		if ( xmpRef == 0 ) {
			hasXMP = thiz->GetXMP ( 0, &packetStr, &packetLen, packetInfo );
		} else {
			SXMPMeta xmpObj ( xmpRef );
			hasXMP = thiz->GetXMP ( &xmpObj, &packetStr, &packetLen, packetInfo );
		}
		
		if ( hasXMP && (clientPacket != 0) ) (*SetClientString) ( clientPacket, packetStr, packetLen );
		wResult->int32Result = hasXMP;
	
		EndPerfCheck ( kAPIPerf_GetXMP );
	XMP_EXIT
}
示例#2
0
void WXMPFiles_CloseFile_1 ( XMPFilesRef    xmpObjRef,
                             XMP_OptionBits closeFlags,
                             WXMP_Result *  wResult )
{
	XMP_ENTER_ObjWrite ( XMPFiles, "WXMPFiles_CloseFile_1" )
		StartPerfCheck ( kAPIPerf_CloseFile, "" );
	
		thiz->CloseFile ( closeFlags );
	
		EndPerfCheck ( kAPIPerf_CloseFile );
	XMP_EXIT
}
示例#3
0
void WXMPFiles_CloseFile_1 ( XMPFilesRef    xmpFilesRef,
                             XMP_OptionBits closeFlags,
                             WXMP_Result *  wResult )
{
	XMP_ENTER_WRAPPER ( "WXMPFiles_CloseFile_1" )
		StartPerfCheck ( kAPIPerf_CloseFile, "" );
	
		XMPFiles * thiz = (XMPFiles*)xmpFilesRef;
		thiz->CloseFile ( closeFlags );
	
		EndPerfCheck ( kAPIPerf_CloseFile );
	XMP_EXIT_WRAPPER
}
示例#4
0
void WXMPFiles_GetThumbnail_1 ( XMPFilesRef         xmpFilesRef,
    			                XMP_ThumbnailInfo * tnailInfo,	// ! Can be null.
                                WXMP_Result *       wResult )
{
	XMP_ENTER_WRAPPER ( "WXMPFiles_GetThumbnail_1" )
		StartPerfCheck ( kAPIPerf_GetThumbnail, "" );

		XMPFiles * thiz = (XMPFiles*)xmpFilesRef;
		bool hasTNail = thiz->GetThumbnail ( tnailInfo );
		wResult->int32Result = hasTNail;
	
		EndPerfCheck ( kAPIPerf_GetThumbnail );
	XMP_EXIT_WRAPPER	// ! No need to keep the lock, the tnail info won't change.
}
示例#5
0
void WXMPFiles_OpenFile_1 ( XMPFilesRef    xmpObjRef,
                            XMP_StringPtr  filePath,
			                XMP_FileFormat format,
			                XMP_OptionBits openFlags,
                            WXMP_Result *  wResult )
{
	XMP_ENTER_ObjWrite ( XMPFiles, "WXMPFiles_OpenFile_1" )
		StartPerfCheck ( kAPIPerf_OpenFile, filePath );
	
		bool ok = thiz->OpenFile ( filePath, format, openFlags );
		wResult->int32Result = ok;
	
		EndPerfCheck ( kAPIPerf_OpenFile );
	XMP_EXIT
}
示例#6
0
void WXMPFiles_CanPutXMP_1 ( XMPFilesRef   xmpObjRef,
                             XMPMetaRef    xmpRef,	// ! Only one of the XMP object or packet are passed.
                             XMP_StringPtr xmpPacket,
                             XMP_StringLen xmpPacketLen,
                             WXMP_Result * wResult )
{
	XMP_ENTER_ObjWrite ( XMPFiles, "WXMPFiles_CanPutXMP_1" )
		StartPerfCheck ( kAPIPerf_CanPutXMP, "" );
	
		if ( xmpRef != 0 ) {
			wResult->int32Result = thiz->CanPutXMP ( xmpRef );
		} else {
			wResult->int32Result = thiz->CanPutXMP ( xmpPacket, xmpPacketLen );
		}
	
		EndPerfCheck ( kAPIPerf_CanPutXMP );
	XMP_EXIT
}
示例#7
0
void WXMPFiles_PutXMP_1 ( XMPFilesRef   xmpFilesRef,
                          XMPMetaRef    xmpRef,	// ! Only one of the XMP object or packet are passed.
                          XMP_StringPtr xmpPacket,
                          XMP_StringLen xmpPacketLen,
                          WXMP_Result * wResult )
{
	XMP_ENTER_WRAPPER ( "WXMPFiles_PutXMP_1" )
		StartPerfCheck ( kAPIPerf_PutXMP, "" );
	
		XMPFiles * thiz = (XMPFiles*)xmpFilesRef;
		if ( xmpRef != 0 ) {
			thiz->PutXMP ( xmpRef );
		} else {
			thiz->PutXMP ( xmpPacket, xmpPacketLen );
		}
	
		EndPerfCheck ( kAPIPerf_PutXMP );
	XMP_EXIT_WRAPPER
}
示例#8
0
void WXMPFiles_GetXMP_1 ( XMPFilesRef      xmpFilesRef,
                          XMPMetaRef       xmpRef,
		                  XMP_StringPtr *  xmpPacket,
		                  XMP_StringLen *  xmpPacketLen,
		                  XMP_PacketInfo * packetInfo,
                          WXMP_Result *    wResult )
{
	bool hasXMP = false;
	XMP_ENTER_WRAPPER ( "WXMPFiles_GetXMP_1" )
		StartPerfCheck ( kAPIPerf_GetXMP, "" );

		XMPFiles * thiz = (XMPFiles*)xmpFilesRef;
		if ( xmpRef == 0 ) {
			hasXMP = thiz->GetXMP ( 0, xmpPacket, xmpPacketLen, packetInfo );
		} else {
			SXMPMeta xmpObj ( xmpRef );
			hasXMP = thiz->GetXMP ( &xmpObj, xmpPacket, xmpPacketLen, packetInfo );
		}
		wResult->int32Result = hasXMP;
	
		EndPerfCheck ( kAPIPerf_GetXMP );
	XMP_EXIT_WRAPPER_KEEP_LOCK ( hasXMP )
}