diff options
author | Saturn&Eric <[email protected]> | 2024-01-23 07:21:28 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-23 07:21:28 +0000 |
commit | 56acf161d439ce73eceaa145c40fe703bb2c3f02 (patch) | |
tree | a5d4790a6b2efc8786a3c0f74a07f5a8032d4e94 /src/core/function/gpg/GpgAdvancedOperator.h | |
parent | fix: use more secure cdn links (diff) | |
parent | fix: solve issues on detected gnupg path function and fix linking errors on w... (diff) | |
download | GpgFrontend-56acf161d439ce73eceaa145c40fe703bb2c3f02.tar.gz GpgFrontend-56acf161d439ce73eceaa145c40fe703bb2c3f02.zip |
Merge pull request #126 from saturneric/dev/2.1.1/main
Develop 2.1.2.1
Diffstat (limited to 'src/core/function/gpg/GpgAdvancedOperator.h')
-rw-r--r-- | src/core/function/gpg/GpgAdvancedOperator.h | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/src/core/function/gpg/GpgAdvancedOperator.h b/src/core/function/gpg/GpgAdvancedOperator.h index 5325020a..d6b57095 100644 --- a/src/core/function/gpg/GpgAdvancedOperator.h +++ b/src/core/function/gpg/GpgAdvancedOperator.h @@ -1,7 +1,7 @@ -/* - * Copyright (c) 2023. Saturneric +/** + * Copyright (C) 2021 Saturneric <[email protected]> * - * This file is part of GpgFrontend. + * 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 @@ -20,42 +20,31 @@ * the gpg4usb project, which is under GPL-3.0-or-later. * * All the source code of GpgFrontend was modified and released by - * Saturneric<[email protected]> starting on May 12, 2021. + * Saturneric <[email protected]> starting on May 12, 2021. * * SPDX-License-Identifier: GPL-3.0-or-later + * */ // // Created by eric on 07.01.2023. // -#ifndef GPGFRONTEND_GPGADVANCEDOPERATOR_H -#define GPGFRONTEND_GPGADVANCEDOPERATOR_H +#pragma once -#include "core/GpgConstants.h" -#include "core/GpgContext.h" -#include "core/GpgFunctionObject.h" +#include "core/typedef/CoreTypedef.h" namespace GpgFrontend { -class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator - : public SingletonFunctionObject<GpgAdvancedOperator> { +class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator { public: /** - * @brief Construct a new Basic Operator object - * - * @param channel Channel corresponding to the context - */ - explicit GpgAdvancedOperator( - int channel = SingletonFunctionObject::GetDefaultChannel()); - - /** * @brief * * @return true * @return false */ - bool ClearGpgPasswordCache(); + static void ClearGpgPasswordCache(OperationCallback); /** * @brief @@ -63,7 +52,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool ReloadGpgComponents(); + static void ReloadGpgComponents(OperationCallback); /** * @brief @@ -71,7 +60,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool RestartGpgComponents(); + static void RestartGpgComponents(); /** * @brief @@ -79,7 +68,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool ResetConfigures(); + static void ResetConfigures(OperationCallback); /** * @brief @@ -87,7 +76,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool StartGpgAgent(); + static void StartGpgAgent(OperationCallback); /** * @brief @@ -95,7 +84,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool StartDirmngr(); + static void StartDirmngr(OperationCallback); /** * @brief @@ -103,13 +92,7 @@ class GPGFRONTEND_CORE_EXPORT GpgAdvancedOperator * @return true * @return false */ - bool StartKeyBoxd(); - - private: - GpgContext& ctx_ = GpgContext::GetInstance( - SingletonFunctionObject::GetChannel()); ///< Corresponding context + static void StartKeyBoxd(OperationCallback); }; } // namespace GpgFrontend - -#endif // GPGFRONTEND_GPGADVANCEDOPERATOR_H |