diff options
Diffstat (limited to 'src/core/function/gpg/GpgAdvancedOperator.cpp')
-rw-r--r-- | src/core/function/gpg/GpgAdvancedOperator.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/core/function/gpg/GpgAdvancedOperator.cpp b/src/core/function/gpg/GpgAdvancedOperator.cpp index c9af8b59..d6323901 100644 --- a/src/core/function/gpg/GpgAdvancedOperator.cpp +++ b/src/core/function/gpg/GpgAdvancedOperator.cpp @@ -36,33 +36,27 @@ namespace GpgFrontend { auto GpgAdvancedOperator::ClearGpgPasswordCache() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--reload", "gpg-agent"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::ReloadAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--reload", "all"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::KillAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--kill", "all"}}); - return ret == 0; + return ctx_.RestartGpgAgent(); } auto GpgAdvancedOperator::ResetConfigures() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--apply-defaults"}}); - return ret == 0; + return info_.ReloadGpgAgent(); } auto GpgAdvancedOperator::LaunchAllGpgComponents() -> bool { - auto [ret, out] = exec_.GpgConfExecuteSync({{"--launch", "all"}}); - return ret == 0; + return ctx_.RestartGpgAgent(); } auto GpgAdvancedOperator::RestartGpgComponents() -> bool { - if (!KillAllGpgComponents()) return false; - return LaunchAllGpgComponents(); + return ctx_.RestartGpgAgent(); } GpgAdvancedOperator::GpgAdvancedOperator(int channel) |