2018-08-29 22:45:19 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2017-present, Status Research and Development GmbH.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef REPORTPUBLISHER
|
|
|
|
#define REPORTPUBLISHER
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class ReportPublisher : public QObject {
|
2018-09-06 16:51:49 +00:00
|
|
|
Q_OBJECT
|
2018-08-29 22:45:19 +00:00
|
|
|
|
|
|
|
public:
|
2018-09-06 16:51:49 +00:00
|
|
|
ReportPublisher(QString minidumpFilePath, QString crashedExecutablePath,
|
|
|
|
QString logsPath, QObject *parent = 0);
|
2018-08-29 22:45:19 +00:00
|
|
|
|
2018-09-06 16:51:49 +00:00
|
|
|
Q_INVOKABLE void submit();
|
|
|
|
Q_INVOKABLE void restartAndQuit();
|
|
|
|
Q_INVOKABLE void quit();
|
|
|
|
Q_INVOKABLE void showDirectory();
|
|
|
|
Q_INVOKABLE QString resolveDataStoragePath();
|
2018-08-29 22:45:19 +00:00
|
|
|
|
|
|
|
private:
|
2018-09-06 16:51:49 +00:00
|
|
|
bool prepareReportFiles(QString reportDirPath);
|
|
|
|
bool prepareLogFiles(QString reportDirPath);
|
2018-08-29 22:45:19 +00:00
|
|
|
|
2018-09-06 16:51:49 +00:00
|
|
|
QString m_minidumpFilePath;
|
|
|
|
QString m_crashedExecutablePath;
|
|
|
|
QString m_logsPath;
|
|
|
|
bool m_logFilesPrepared = false;
|
2018-08-29 22:45:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // REPORTPUBLISHER
|