GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgPassphraseContext.h
1 
2 
31 #pragma once
32 
33 #include "core/GpgFrontendCoreExport.h"
34 
35 namespace GpgFrontend {
36 
37 class GPGFRONTEND_CORE_EXPORT GpgPassphraseContext : public QObject {
38  Q_OBJECT
39  public:
40  GpgPassphraseContext(const QString& uids_info, const QString& passphrase_info,
41  bool prev_was_bad, bool ask_for_new);
42 
44 
45  void SetPassphrase(const QString& passphrase);
46 
47  [[nodiscard]] auto GetPassphrase() const -> QString;
48 
49  [[nodiscard]] auto GetUidsInfo() const -> QString;
50 
51  [[nodiscard]] auto GetPassphraseInfo() const -> QString;
52 
53  [[nodiscard]] auto IsPreWasBad() const -> bool;
54 
55  [[nodiscard]] auto IsAskForNew() const -> bool;
56 
57  private:
58  QString passphrase_info_;
59  QString uids_info_;
60  QString passphrase_;
61  bool prev_was_bad_;
62  bool ask_for_new_;
63 };
64 
65 } // namespace GpgFrontend
Definition: GpgPassphraseContext.h:37
Definition: app.cpp:39