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

Classes

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

Typedefs

using EventReference = std::shared_ptr< Event >
 
using EventIdentifier = QString
 
using EventTriggerIdentifier = 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 = QMap< QString, QString >
 
using ModuleMangerPtr = std::shared_ptr< ModuleManager >
 

Functions

template<typename... Args>
auto MakeEvent (const EventIdentifier &event_id, Args &&... args, Event::EventCallback e_cb) -> EventReference
 
void LoadModuleFromPath (const QString &mods_path, bool integrated)
 
auto LoadIntegratedMods () -> bool
 
auto LoadExternalMods () -> bool
 
void LoadGpgFrontendModules (ModuleInitArgs args)
 init the module library
 
void ShutdownGpgFrontendModules ()
 shutdown the module library
 
auto IsModuleActivate (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
 

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

◆ IsModuleActivate()

◆ 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