1 #ifndef __XDCAMFAM_Handler_hpp__
2 #define __XDCAMFAM_Handler_hpp__	1
3 
4 // =================================================================================================
5 // ADOBE SYSTEMS INCORPORATED
6 // Copyright 2015 Adobe Systems Incorporated
7 // All Rights Reserved
8 //
9 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
10 // of the Adobe license agreement accompanying it.
11 // =================================================================================================
12 
13 #include "public/include/XMP_Environment.h"	// ! This must be the first include.
14 #include "XMPFiles/source/FileHandlers/XDCAM_Handler.hpp"
15 
16 
17 extern XMPFileHandler * XDCAMFAM_MetaHandlerCTor ( XMPFiles * parent );
18 
19 extern bool XDCAMFAM_CheckFormat ( XMP_FileFormat format,
20 								const std::string & rootPath,
21 								const std::string & gpName,
22 								const std::string & parentName,
23 								const std::string & leafName,
24 								XMPFiles * parent );
25 
26 static const XMP_OptionBits kXDCAMFAM_HandlerFlags = (kXMPFiles_CanInjectXMP |
27 												   kXMPFiles_CanExpand |
28 												   kXMPFiles_CanRewrite |
29 												   kXMPFiles_PrefersInPlace |
30 												   kXMPFiles_CanReconcile |
31 												   kXMPFiles_AllowsOnlyXMP |
32 												   kXMPFiles_ReturnsRawPacket |
33 												   kXMPFiles_HandlerOwnsFile |
34 												   kXMPFiles_AllowsSafeUpdate |
35 												   kXMPFiles_FolderBasedFormat);
36 
37 
38 class XDCAMFAM_MetaHandler : public XDCAM_MetaHandler
39 {
40 
41 public:
42 
43 	void FillAssociatedResources ( std::vector<std::string> * resourceList );
44 	XDCAMFAM_MetaHandler ( XMPFiles * _parent );
~XDCAMFAM_MetaHandler()45 	virtual ~XDCAMFAM_MetaHandler()	{ };
46 
47 private:
48 
49 	bool isXDStyle;
50 
51 	bool MakeClipFilePath ( std::string * path, XMP_StringPtr suffix, bool checkFile = false );
52 	void SetPathVariables ( const std::string & clientPath );
53 	bool GetMediaProMetadata ( SXMPMeta * xmpObjPtr, const std::string& clipUMID, bool digestFound );
54 	bool GetInfoFiles ( std::vector<std::string> &infoList, std::string pathToFolder) ;
55 	bool GetPlanningFiles ( std::vector<std::string> &planInfoList, std::string pathToFolder) ;
56 	bool IsClipsPlanning ( std::string clipUmid , XMP_StringPtr planPath ) ;
57 	bool GetClipUmid ( std::string &clipUmid );
58 	bool MakeLocalFilePath ( std::string * path, XMP_Uns8 fileType, bool checkFile = false );
59 
XDCAMFAM_MetaHandler()60 	XDCAMFAM_MetaHandler() : XDCAM_MetaHandler() {};	// Hidden on purpose.
61 
62 	enum
63 	{
64 		k_LocalPPNFile,
65 		k_LocalClipInfoFile
66 	};
67 
68 };	// XDCAMFAM_MetaHandler
69 
70 // =================================================================================================
71 #endif /* __XDCAMFAM_Handler_hpp__ */
72