aboutsummaryrefslogtreecommitdiffstats
path: root/include/gpg/result_analyse/SignResultAnalyse.h
blob: 933089bf296ed1b479df19a9fff1e8558761b73a (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
//
// Created by eric on 2021/6/8.
//

#ifndef GPGFRONTEND_SIGNRESULTANALYSE_H
#define GPGFRONTEND_SIGNRESULTANALYSE_H

#include "GpgFrontend.h"

class SignResultAnalyse {
public:
    SignResultAnalyse(gpgme_sign_result_t result);

    [[nodiscard]] const QString &getResultReport() const;

    [[nodiscard]] int getStatus() const;

private:
    QString resultText;
    QTextStream stream{&resultText};

    int status = 1;

    void setStatus(int mStatus) {
        if(mStatus < status) status = mStatus;
    }


};

#endif //GPGFRONTEND_SIGNRESULTANALYSE_H