1 // =================================================================================================
2 // ADOBE SYSTEMS INCORPORATED
3 // Copyright 2010 Adobe Systems Incorporated
4 // All Rights Reserved
5 //
6 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
7 // of the Adobe license agreement accompanying it.
8 // =================================================================================================
9 
10 #ifndef _INFOMetadata_h_
11 #define _INFOMetadata_h_
12 
13 #include "public/include/XMP_Environment.h"	// ! XMP_Environment.h must be the first included header.
14 #include "public/include/XMP_Const.h"
15 #include "public/include/XMP_IO.hpp"
16 
17 #include "XMPFiles/source/NativeMetadataSupport/IMetadata.h"
18 
19 namespace IFF_RIFF
20 {
21 
22 /**
23  *	LIST INFO Metadata model.
24  *	Implements the IMetadata interface
25  */
26 class INFOMetadata : public IMetadata
27 {
28 public:
29 	enum
30 	{
31 		kArtist				= 0x49415254,	// 'IART'		std::string
32 		kComments			= 0x49434d54,	// 'ICMT'		std::string
33 		kCopyright			= 0x49434f50,	// 'ICOP'		std::string
34 		kCreationDate		= 0x49435244,	// 'ICRD'		std::string
35 		kEngineer			= 0x49454e47,	// 'IENG'		std::string
36 		kGenre				= 0x49474e52,	// 'IGNR'		std::string
37 		kName				= 0x494e414d,	// 'INAM'		std::string
38 		kSoftware			= 0x49534654,	// 'ISFT'		std::string
39 		kMedium				= 0x494d4544,	// 'IMED'		std::string
40 		kSourceForm			= 0x49535246,	// 'ISRF'		std::string
41 
42 		// new mappings
43 		kArchivalLocation	= 0x4941524C,	// 'IARL'
44 		kCommissioned		= 0x49434D53,	// 'ICMS'
45 		kKeywords			= 0x494B4559,	// 'IKEY'
46 		kProduct			= 0x49505244,	// 'IPRD'
47 		kSubject			= 0x4953424A,	// 'ISBJ'
48 		kSource				= 0x49535243,	// 'ISRC'
49 		kTechnican			= 0x49544348,	// 'ITCH'
50 	};
51 
52 public:
53 	/**
54 	 *ctor/dtor
55 	 */
56 						INFOMetadata();
57 					   ~INFOMetadata();
58 
59 	/**
60 	 * @see IMetadata::parse
61 	 */
62 	void				parse( const XMP_Uns8* input, XMP_Uns64 size );
63 
64 	/**
65 	 * See IMetadata::parse( const LFA_FileRef input )
66 	 */
parse(XMP_IO * input)67 	void				parse( XMP_IO* input ) { IMetadata::parse( input ); }
68 
69 	/**
70 	 * @see IMetadata::serialize
71 	 */
72 	XMP_Uns64			serialize( XMP_Uns8** outBuffer );
73 
74 protected:
75 	/**
76 	 * @see IMetadata::isEmptyValue
77 	 */
78 	virtual	bool		isEmptyValue( XMP_Uns32 id, ValueObject& valueObj );
79 
80 private:
81 	// Operators hidden on purpose
82 	INFOMetadata( const INFOMetadata& );
83 	INFOMetadata& operator=( const INFOMetadata& );
84 };
85 
86 }
87 
88 #endif
89