GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgContext.h
1 
29 #pragma once
30 
31 #include "core/function/SecureMemoryAllocator.h"
32 #include "core/function/basic/GpgFunctionObject.h"
33 
34 namespace GpgFrontend {
35 
41  QString db_path = {};
42 
43  bool test_mode = false;
44  bool offline_mode = false;
45  bool auto_import_missing_key = false;
46 
47  bool custom_gpgconf = false;
48  QString custom_gpgconf_path;
49 
50  bool use_pinentry = false;
51 };
52 
57 class GPGFRONTEND_CORE_EXPORT GpgContext
58  : public SingletonFunctionObject<GpgContext> {
59  public:
60  explicit GpgContext(int channel);
61 
62  explicit GpgContext(GpgContextInitArgs args, int channel);
63 
64  virtual ~GpgContext() override;
65 
66  [[nodiscard]] auto Good() const -> bool;
67 
68  auto BinaryContext() -> gpgme_ctx_t;
69 
70  auto DefaultContext() -> gpgme_ctx_t;
71 
72  private:
73  class Impl;
74  SecureUniquePtr<Impl> p_;
75 };
76 } // namespace GpgFrontend
Definition: GpgContext.cpp:51
Definition: GpgContext.h:58
Definition: GpgFunctionObject.h:58
Definition: app.cpp:38
Definition: GpgContext.h:40