GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
SingletonStorage.h
1 
29 #pragma once
30 
31 #include "core/function/SecureMemoryAllocator.h"
32 
33 namespace GpgFrontend {
34 
35 class ChannelObject;
36 
37 using ChannelObjectPtr = SecureUniquePtr<ChannelObject>;
38 
39 class GPGFRONTEND_CORE_EXPORT SingletonStorage {
40  public:
45  SingletonStorage() noexcept;
46 
52 
58  void ReleaseChannel(int channel);
59 
66  auto FindObjectInChannel(int channel) -> ChannelObject*;
67 
73  auto GetAllChannelId() -> std::vector<int>;
74 
82  auto SetObjectInChannel(int channel, ChannelObjectPtr p_obj)
83  -> ChannelObject*;
84 
85  private:
86  class Impl;
87  SecureUniquePtr<Impl> p_;
88 };
89 
90 } // namespace GpgFrontend
object which in channel system is called "channel"
Definition: ChannelObject.h:39
Definition: SingletonStorage.cpp:38
Definition: SingletonStorage.h:39
Definition: app.cpp:39