GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GpgFrontend::Module Namespace Reference

Namespaces

 SDK
 

Classes

class  Event
 
class  GlobalModuleContext
 
class  GlobalRegisterTable
 
class  Module
 
class  ModuleManager
 
struct  ModuleInitArgs
 

Typedefs

using EventRefrernce = std::shared_ptr< Event >
 
using EventIdentifier = QString
 
using Evnets = std::vector< Event >
 
using ModuleIdentifier = QString
 
using ModulePtr = std::shared_ptr< Module >
 
using ModuleRawPtr = Module *
 
using GMCPtr = std::shared_ptr< GlobalModuleContext >
 
using GRTPtr = std::shared_ptr< GlobalRegisterTable >
 
using TaskRunnerPtr = std::shared_ptr< Thread::TaskRunner >
 
using Namespace = QString
 
using Key = QString
 
using LPCallback = std::function< void(Namespace, Key, int, std::any)>
 
using ModuleVersion = QString
 
using ModuleMetaData = std::map< QString, QString >
 
using ModuleMangerPtr = std::shared_ptr< ModuleManager >
 

Functions

template<typename... Args>
auto MakeEvent (const EventIdentifier &event_id, Args &&... args, Event::EventCallback e_cb) -> EventRefrernce
 
auto IsModuleAcivate (ModuleIdentifier id) -> bool
 
auto UpsertRTValue (const QString &namespace_, const QString &key, const std::any &value) -> bool
 
auto ListenRTPublishEvent (QObject *o, Namespace n, Key k, LPCallback c) -> bool
 
auto ListRTChildKeys (const QString &namespace_, const QString &key) -> std::vector< Key >
 
template<typename T , typename... Args>
void RegisterModule (Args &&... args)
 
template<typename T , typename... Args>
void RegisterAndActivateModule (Args &&... args)
 
template<typename... Args>
void TriggerEvent (const EventIdentifier &event_id, Args &&... args, Event::EventCallback e_cb=nullptr)
 
template<typename T >
auto RetrieveRTValueTyped (const QString &namespace_, const QString &key) -> std::optional< T >
 
template<typename T >
auto RetrieveRTValueTypedOrDefault (const QString &namespace_, const QString &key, const T &defaultValue) -> T
 
void LoadGpgFrontendModules (ModuleInitArgs args)
 init the module library
 
void ShutdownGpgFrontendModules ()
 shutdown the module library
 

Detailed Description

Copyright (C) 2021 Saturneric eric@.nosp@m.bktu.nosp@m.s.com

This file is part of GpgFrontend.

GpgFrontend is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

GpgFrontend is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GpgFrontend. If not, see https://www.gnu.org/licenses/.

The initial version of the source code is inherited from the gpg4usb project, which is under GPL-3.0-or-later.

All the source code of GpgFrontend was modified and released by Saturneric eric@.nosp@m.bktu.nosp@m.s.com starting on May 12, 2021.

SPDX-License-Identifier: GPL-3.0-or-later

Function Documentation

◆ IsModuleAcivate()

auto GPGFRONTEND_CORE_EXPORT GpgFrontend::Module::IsModuleAcivate ( ModuleIdentifier  ) -> bool

◆ ListenRTPublishEvent()

auto GPGFRONTEND_CORE_EXPORT GpgFrontend::Module::ListenRTPublishEvent ( QObject *  ,
Namespace  ,
Key  ,
LPCallback   
) -> bool

◆ ListRTChildKeys()

auto GPGFRONTEND_CORE_EXPORT GpgFrontend::Module::ListRTChildKeys ( const QString &  namespace_,
const QString &  key 
) -> std::vector< Key >
Parameters
namespace_
key
Returns
std::vector<Key>

References GpgFrontend::SingletonFunctionObject< ModuleManager >::GetInstance().

◆ UpsertRTValue()

auto GPGFRONTEND_CORE_EXPORT GpgFrontend::Module::UpsertRTValue ( const QString &  namespace_,
const QString &  key,
const std::any &  value 
) -> bool