summaryrefslogtreecommitdiff
path: root/samples/source/xmpcommand/Actions.h
blob: f820f7003889ffd6716a84c93a6de7dc229898b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// =================================================================================================
// Copyright 2006 Adobe
// All Rights Reserved.
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it. If you have received this file from a source other 
// than Adobe, then your use, modification, or distribution of it requires the prior written permission
// of Adobe.
// =================================================================================================

#ifndef __ACTIONS_h__
#define __ACTIONS_h__ 1

class Actions {
	public:
		enum ACTION_TYPE { NONE, VERSION, INFO, PUT, GET, DUMP };

		//the params to be set:
		bool switch_safe;	//asking for closing file with kXMPFiles_UpdateSafely (safe+rename that is)

		//these two mututally exclusive:
		bool switch_smart;	/* Require the use of a smart handler. (kXMPFiles_OpenUseSmartHandler) */
		bool switch_scan; /* Force packet scanning, don't use a smart handler. kXMPFiles_OpenUsePacketScanning */

		bool switch_nocheck; /* no "sanity checks" on xmp-side i.e. for read/writeability, only usefull for testing "proper failure" */
		bool switch_compact; /* ask extract to extract xmp in the compact (non-pretty) RDF-style (attributes rather than content of tags) */

		std::string outfile;//output goes (besides stdout) to an output file...
		std::string mediafile;		//relative path to XMP snippet (null if none)

		ACTION_TYPE actiontype;			//inits with NONE

		std::string xmpsnippet;		//relative path to XMP snippet (null if none)

		//distributes the actions to the different routines...
		void doAction();

private:
		void version(void);
		void info(void);
		void put();
		void get(void);
		void dump(void);

		XMP_OptionBits generalOpenFlags;
		XMP_OptionBits generalCloseFlags;

};

#endif