digiKam
exiftoolparser_p.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2020-11-28
7  * Description : ExifTool process stream parser - private container.
8  *
9  * Copyright (C) 2020-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_EXIFTOOL_PARSER_P_H
25 #define DIGIKAM_EXIFTOOL_PARSER_P_H
26 
27 #include "exiftoolparser.h"
28 
29 // Qt includes
30 
31 #include <QDir>
32 #include <QLocale>
33 #include <QStringList>
34 #include <QVariant>
35 #include <QJsonDocument>
36 #include <QJsonArray>
37 #include <QJsonObject>
38 #include <QEventLoop>
39 #include <QFileInfo>
40 #include <QTemporaryFile>
41 #include <QDomDocument>
42 #include <QDomElement>
43 
44 // KDE includes
45 
46 #include <klocalizedstring.h>
47 
48 // Local includes
49 
50 #include "metaenginesettings.h"
51 #include "digikam_config.h"
52 #include "digikam_debug.h"
53 
54 namespace Digikam
55 {
56 
57 class Q_DECL_HIDDEN ExifToolParser::Private
58 {
59 public:
60 
61  explicit Private();
62  ~Private();
63 
64  bool prepareProcess();
65  bool startProcess(const QByteArrayList& cmdArgs, ExifToolProcess::Action cmdAction);
66  QByteArray filePathEncoding(const QFileInfo& fi) const;
67  void manageEventLoop(int cmdAction);
68 
72  QString actionString(int cmdAction) const;
73 
74 public:
75 
78  QString currentPath;
80  QTemporaryFile argsFile;
81 
83 
85 };
86 
87 } // namespace Digikam
88 
89 #endif // DIGIKAM_EXIFTOOL_PARSER_P_H
Definition: exiftoolparser_p.h:58
ExifToolProcess * proc
ExifTool process instance.
Definition: exiftoolparser_p.h:76
int asyncLoading
Definition: exiftoolparser_p.h:82
QList< QEventLoop * > evLoops
Event loops for the ExifTool process actions.
Definition: exiftoolparser_p.h:77
QTemporaryFile argsFile
Temporary file to store Exiftool arg config file.
Definition: exiftoolparser_p.h:80
QList< QMetaObject::Connection > hdls
Handles of signals/slots connections used to control streams with ExifTool process.
Definition: exiftoolparser_p.h:84
ExifToolData exifToolData
Current ExifTool data (input or output depending of the called method.
Definition: exiftoolparser_p.h:79
QString currentPath
Current file path processed by ExifTool.
Definition: exiftoolparser_p.h:78
Definition: exiftoolparser.h:47
QHash< QString, QVariantList > ExifToolData
Definition: exiftoolparser.h:97
Definition: exiftoolprocess.h:45
Action
Definition: exiftoolprocess.h:54
Definition: datefolderview.cpp:43