44 #ifdef EXV_HAVE_UNISTD_H 53 #if defined(__CYGWIN__) || defined(__MINGW__) 56 #include <sys/select.h> 60 #if defined(_WIN32) || defined(__CYGWIN__) || defined(__MINGW__) || defined(_MSC_VER) 70 enum CmdId { invalidCmdId, add,
set, del, reg };
76 , iptc = Exiv2::mdIptc
77 , exif = Exiv2::mdExif
148 typedef std::vector<std::string>
Files;
154 typedef std::vector<std::string>
Keys;
211 enum Yod { yodYear, yodMonth, yodDay };
260 static const YodAdjust emptyYodAdjust_[];
269 Params() : optstring_(
":hVvqfbuktTFa:Y:O:D:r:p:P:d:e:i:c:m:M:l:S:g:K:n:Q:"),
285 target_(ctExif|ctIptc|ctComment|ctXmp),
291 yodAdjust_[yodYear] = emptyYodAdjust_[yodYear];
292 yodAdjust_[yodMonth] = emptyYodAdjust_[yodMonth];
307 int evalRename(
int opt,
const std::string& optarg);
315 int evalModify(
int opt,
const std::string& optarg);
329 int getopt(
int argc,
char*
const argv[]);
338 void usage(std::ostream& os =std::cout)
const;
341 void help(std::ostream& os =std::cout)
const;
344 void version(
bool verbose =
false, std::ostream& os =std::cout)
const;
358 #endif // #ifndef EXIV2APP_HPP_ bool formatSet_
Whether the format is set with -r.
Definition: exiv2app.hpp:241
bool preserve_
Preserve timestamps flag.
Definition: exiv2app.hpp:226
void help(std::ostream &os=std::cout) const
Print further usage explanations to an output stream.
Definition: exiv2.cpp:269
unsigned long printItems_
Print items.
Definition: exiv2app.hpp:232
PrintItem
Individual items to print, bitmap.
Definition: exiv2app.hpp:177
long adjustment_
Adjustment value.
Definition: exiv2app.hpp:217
virtual int nonoption(const std::string &argv)
Handle non-option parameters.
std::set< int > PreviewNumbers
Container for preview image numbers.
Definition: exiv2app.hpp:150
Keys keys_
List of keys to match from the metadata.
Definition: exiv2app.hpp:251
bool adjust_
Adjustment flag.
Definition: exiv2app.hpp:230
Utility class containing a character array. All it does is to take care of memory allocation and dele...
Definition: types.hpp:204
CmdId
Command identifiers.
Definition: exiv2app.hpp:70
std::string charset_
Charset to use for UNICODE Exif user comment.
Definition: exiv2app.hpp:252
YodAdjust yodAdjust_[3]
Year, month and day adjustment info.
Definition: exiv2app.hpp:239
Exiv2::TypeId typeId_
Exiv2 type identifier Flag to indicate if the type was explicitly specified (true) ...
Definition: exiv2app.hpp:90
TypeId
Exiv2 value type identifiers.
Definition: types.hpp:130
bool help_
Help option flag.
Definition: exiv2app.hpp:220
Structure for one parsed modification command.
Definition: exiv2app.hpp:82
Files files_
List of non-option arguments.
Definition: exiv2app.hpp:248
unsigned long printTags_
Print tags (bitmap of MetadataId flags). Action (integer rather than TaskType to avoid dependency)...
Definition: exiv2app.hpp:233
Structure for year, month and day adjustment command line arguments.
Definition: exiv2app.hpp:214
std::vector< Exiv2_grep_key_t > exv_grep_keys_t
exv_grep_keys_t is a vector of keys to match to strings
Definition: version.hpp:67
std::string directory_
Location for files to extract/insert.
Definition: exiv2app.hpp:246
void getStdin(Exiv2::DataBuf &buf)
getStdin binary data read from stdin to DataBuf
A collection of utility functions.
std::vector< ModifyCmd > ModifyCmds
Container for modification commands.
Definition: exiv2app.hpp:96
std::string suffix_
File extension of the file to insert.
Definition: exiv2app.hpp:247
bool force_
Force overwrites flag.
Definition: exiv2app.hpp:223
Invalid type id.
Definition: types.hpp:157
Yod
Enumerates year, month and day adjustments.
Definition: exiv2app.hpp:211
const char * option_
Adjustment option string.
Definition: exiv2app.hpp:216
Type definitions for Exiv2 and related functionality.
std::string jpegComment_
Jpeg comment to set in the image.
Definition: exiv2app.hpp:245
MetadataId
Metadata identifiers.
Definition: exiv2app.hpp:75
static Params & instance()
Controls all access to the global Params instance.
Definition: exiv2.cpp:197
MetadataId metadataId_
Metadata identifier.
Definition: exiv2app.hpp:89
ModifyCmd()
C'tor.
Definition: exiv2app.hpp:84
std::string cmdString_
Command string.
Definition: exiv2app.hpp:100
bool verbose_
Verbose (talkative) option flag.
Definition: exiv2app.hpp:222
int target_
What common target to process.
Definition: exiv2app.hpp:236
CmdId cmdId_
Command identifier.
Definition: exiv2app.hpp:87
Exiv2::DataBuf stdinBuf
DataBuf with the binary bytes from stdin.
Definition: exiv2app.hpp:254
Greps greps_
List of keys to 'grep' from the metadata.
Definition: exiv2app.hpp:250
PrintMode printMode_
Print mode.
Definition: exiv2app.hpp:231
FileExistsPolicy fileExistsPolicy_
What to do if file to rename exists.
Definition: exiv2app.hpp:229
bool binary_
Suppress long binary values.
Definition: exiv2app.hpp:224
std::string format_
Filename format (-r option arg).
Definition: exiv2app.hpp:240
std::string key_
Exiv2 key string.
Definition: exiv2app.hpp:88
Implements the command line handling for the program.
Definition: exiv2app.hpp:138
std::vector< std::string > Keys
Container for keys.
Definition: exiv2app.hpp:154
IPTC string type.
Definition: types.hpp:147
virtual int option(int opt, const std::string &optarg, int optopt)
Handle options and their arguments.
CmdId cmdId_
Commands identifier.
Definition: exiv2app.hpp:99
std::vector< std::string > Files
Container to store filenames.
Definition: exiv2app.hpp:148
PrintMode
Enumerates print modes.
Definition: exiv2app.hpp:165
exv_grep_keys_t Greps
Container for greps.
Definition: exiv2app.hpp:152
Provides classes and functions to encode and decode Exif and Iptc data. The libexiv2 API consists of ...
Definition: asfvideo.hpp:36
std::string value_
Data.
Definition: exiv2app.hpp:93
bool unknown_
Suppress unknown tags.
Definition: exiv2app.hpp:225
void cleanup()
Destructor.
Definition: exiv2.cpp:213
void usage(std::ostream &os=std::cout) const
Print a minimal usage note to an output stream.
Definition: exiv2.cpp:243
bool version_
Version option flag.
Definition: exiv2app.hpp:221
bool timestampOnly_
Rename only sets the file timestamp.
Definition: exiv2app.hpp:228
void version(bool verbose=false, std::ostream &os=std::cout) const
Print version information to an output stream.
Definition: exiv2.cpp:219
static std::string printTarget(const std::string &before, int target, bool bPrint=false, std::ostream &os=std::cout)
Print target_.
Definition: exiv2.cpp:250
CommonTarget
Enumerates common targets, bitmap.
Definition: exiv2app.hpp:193
bool timestamp_
Rename also sets the file timestamp.
Definition: exiv2app.hpp:227
bool flag_
Adjustment flag.
Definition: exiv2app.hpp:215
CmdLines cmdLines_
Commands from the command line.
Definition: exiv2app.hpp:243
Structure to link command identifiers to strings.
Definition: exiv2app.hpp:98
PreviewNumbers previewNumbers_
List of preview numbers.
Definition: exiv2app.hpp:249
ModifyCmds modifyCmds_
Parsed modification commands.
Definition: exiv2app.hpp:244
long adjustment_
Adjustment in seconds.
Definition: exiv2app.hpp:238
Include all Exiv2 header files.
int getopt(int argc, char *const argv[])
Call Getopt::getopt() with optstring, to inititate command line argument parsing, perform consistency...
CmdFiles cmdFiles_
Names of the modification command files.
Definition: exiv2app.hpp:242
std::vector< std::string > CmdLines
Container for commands from the command line.
Definition: exiv2app.hpp:146
std::vector< std::string > CmdFiles
Container for command files.
Definition: exiv2app.hpp:144
FileExistsPolicy
Enumerates the policies to handle existing files in rename action.
Definition: exiv2app.hpp:208