File: Actions.h

package info (click to toggle)
exempi 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 9,276 kB
  • sloc: cpp: 49,877; sh: 10,986; makefile: 272; ansic: 93
file content (53 lines) | stat: -rw-r--r-- 1,787 bytes parent folder | download | duplicates (5)
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
51
52
53
// =================================================================================================
// Copyright 2006 Adobe Systems Incorporated
// 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.
// =================================================================================================

#ifndef __ACTIONS_h__
#define __ACTIONS_h__ 1

// Hack because of the defines.
#ifdef VERSION
#undef VERSION
#endif

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