1
0

<refactor>(src): rename the gpg directory to core

This commit is contained in:
Saturneric 2022-02-05 00:47:18 +08:00
parent dff5473e52
commit 830fe612c6
99 changed files with 178 additions and 179 deletions

View File

@ -27,7 +27,7 @@
if (GPG_CORE)
message(STATUS "Build Gpg Core")
add_subdirectory(gpg)
add_subdirectory(core)
endif ()
if (UI_CORE)

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
#include <gpg-error.h>

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include <gpg-error.h>
#include <gpgme.h>

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/GpgGenKeyInfo.h"
#include "core/GpgGenKeyInfo.h"
#include <boost/date_time/gregorian/greg_date.hpp>
#include <boost/date_time/gregorian/greg_duration.hpp>

View File

@ -26,4 +26,4 @@
*
*/
#include "gpg/GpgInfo.h"
#include "core/GpgInfo.h"

View File

@ -33,9 +33,9 @@
#include <utility>
#include "GpgConstants.h"
#include "gpg/model/GpgData.h"
#include "gpg/model/GpgKey.h"
#include "gpg/model/GpgSignature.h"
#include "core/model/GpgData.h"
#include "core/model/GpgKey.h"
#include "core/model/GpgSignature.h"
namespace GpgFrontend {

View File

@ -26,11 +26,11 @@
*
*/
#include "gpg/function/GpgBasicOperator.h"
#include "core/function/GpgBasicOperator.h"
#include <vector>
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
GpgFrontend::GpgError GpgFrontend::GpgBasicOperator::Encrypt(
KeyListPtr keys, GpgFrontend::BypeArrayRef in_buffer,

View File

@ -29,10 +29,10 @@
#ifndef GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
#define GPGFRONTEND_ZH_CN_TS_BASICOPERATOR_H
#include "gpg/GpgConstants.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
#include "gpg/GpgModel.h"
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
#include "core/GpgModel.h"
namespace GpgFrontend {

View File

@ -25,7 +25,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#include "gpg/function/GpgCommandExecutor.h"
#include "core/function/GpgCommandExecutor.h"
#ifndef WINDOWS
#include <boost/asio.hpp>
#endif

View File

@ -33,8 +33,8 @@
#include <boost/process.hpp>
#endif
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
namespace GpgFrontend {

View File

@ -25,13 +25,13 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#include "gpg/function/GpgFileOpera.h"
#include "core/function/GpgFileOpera.h"
#include <memory>
#include <string>
#include "GpgConstants.h"
#include "gpg/function/GpgBasicOperator.h"
#include "core/function/GpgBasicOperator.h"
GpgFrontend::GpgError GpgFrontend::GpgFileOpera::EncryptFile(
KeyListPtr keys, const std::string& in_path, const std::string& out_path,

View File

@ -29,9 +29,9 @@
#ifndef GPGFRONTEND_GPGFILEOPERA_H
#define GPGFRONTEND_GPGFILEOPERA_H
#include "gpg/GpgConstants.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgModel.h"
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgModel.h"
namespace GpgFrontend {

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
#include <gpg-error.h>

View File

@ -29,9 +29,9 @@
#ifndef GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H
#define GPGFRONTEND_ZH_CN_TS_GPGKEYGETTER_H
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
#include "gpg/GpgModel.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
#include "core/GpgModel.h"
namespace GpgFrontend {

View File

@ -26,10 +26,10 @@
*
*/
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "GpgConstants.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
/**
* Import key pair

View File

@ -31,10 +31,10 @@
#include <string>
#include "gpg/GpgConstants.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
#include "gpg/GpgModel.h"
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
#include "core/GpgModel.h"
namespace GpgFrontend {

View File

@ -26,13 +26,13 @@
*
*/
#include "gpg/function/GpgKeyManager.h"
#include "core/function/GpgKeyManager.h"
#include <boost/date_time/posix_time/conversion.hpp>
#include <string>
#include "gpg/function/GpgBasicOperator.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgBasicOperator.h"
#include "core/function/GpgKeyGetter.h"
bool GpgFrontend::GpgKeyManager::SignKey(
const GpgFrontend::GpgKey& target, GpgFrontend::KeyArgsList& keys,

View File

@ -29,9 +29,9 @@
#ifndef GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H
#define GPGFRONTEND_ZH_CN_TS_GPGKEYMANAGER_H
#include "gpg/GpgContext.h"
#include "gpg/GpgFunctionObject.h"
#include "gpg/GpgModel.h"
#include "core/GpgContext.h"
#include "core/GpgFunctionObject.h"
#include "core/GpgModel.h"
namespace GpgFrontend {

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyOpera.h"
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
@ -36,10 +36,10 @@
#include <string>
#include <vector>
#include "gpg/GpgConstants.h"
#include "gpg/GpgGenKeyInfo.h"
#include "gpg/function/GpgCommandExecutor.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/GpgConstants.h"
#include "core/GpgGenKeyInfo.h"
#include "core/function/GpgCommandExecutor.h"
#include "core/function/GpgKeyGetter.h"
/**
* Delete keys

View File

@ -29,9 +29,9 @@
#ifndef _GPGKEYOPERA_H
#define _GPGKEYOPERA_H
#include "gpg/GpgConstants.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgModel.h"
#include "core/GpgConstants.h"
#include "core/GpgContext.h"
#include "core/GpgModel.h"
namespace GpgFrontend {
/**

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/function/GpgUIDOperator.h"
#include "core/function/GpgUIDOperator.h"
#include "boost/format.hpp"

View File

@ -29,8 +29,8 @@
#ifndef GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
#define GPGFRONTEND_ZH_CN_TS_UIDOPERATOR_H
#include "gpg/GpgContext.h"
#include "gpg/GpgModel.h"
#include "core/GpgContext.h"
#include "core/GpgModel.h"
namespace GpgFrontend {
/**

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/model/GpgData.h"
#include "core/model/GpgData.h"
GpgFrontend::GpgData::GpgData() {
gpgme_data_t data;

View File

@ -29,7 +29,7 @@
#ifndef _GPGDATA_H
#define _GPGDATA_H
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {
/**

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/model/GpgKey.h"
#include "core/model/GpgKey.h"
GpgFrontend::GpgKey::GpgKey(gpgme_key_t &&key) : key_ref_(std::move(key)) {}

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/model/GpgKeySignature.h"
#include "core/model/GpgKeySignature.h"
GpgFrontend::GpgKeySignature::GpgKeySignature(gpgme_key_sig_t sig)
: signature_ref_(sig, [&](gpgme_key_sig_t signature) {}) {}

View File

@ -32,7 +32,7 @@
#include <boost/date_time.hpp>
#include <string>
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
/**
* @brief

View File

@ -32,7 +32,7 @@
#include <boost/date_time/gregorian/greg_date.hpp>
#include <boost/date_time/posix_time/conversion.hpp>
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {

View File

@ -25,7 +25,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#include "gpg/model/GpgSubKey.h"
#include "core/model/GpgSubKey.h"
GpgFrontend::GpgSubKey::GpgSubKey(gpgme_subkey_t subkey)
: _subkey_ref(subkey, [&](gpgme_subkey_t subkey) {}) {}

View File

@ -32,7 +32,7 @@
#include <boost/date_time.hpp>
#include <string>
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {

View File

@ -29,7 +29,7 @@
#ifndef GPGFRONTEND_GPGTOFU_H
#define GPGFRONTEND_GPGTOFU_H
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {
/**

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/model/GpgUID.h"
#include "core/model/GpgUID.h"
GpgFrontend::GpgUID::GpgUID(gpgme_user_id_t uid)
: uid_ref_(uid, [&](gpgme_user_id_t uid) {}) {}

View File

@ -26,9 +26,9 @@
*
*/
#include "gpg/result_analyse/GpgDecryptResultAnalyse.h"
#include "core/result_analyse/GpgDecryptResultAnalyse.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
GpgFrontend::GpgDecryptResultAnalyse::GpgDecryptResultAnalyse(GpgError m_error,
GpgDecrResult m_result)

View File

@ -30,7 +30,7 @@
#define GPGFRONTEND_GPGDECRYPTRESULTANALYSE_H
#include "GpgResultAnalyse.h"
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/result_analyse/GpgEncryptResultAnalyse.h"
#include "core/result_analyse/GpgEncryptResultAnalyse.h"
GpgFrontend::GpgEncryptResultAnalyse::GpgEncryptResultAnalyse(GpgError error,
GpgEncrResult result)

View File

@ -30,7 +30,7 @@
#define GPGFRONTEND_GPGENCRYPTRESULTANALYSE_H
#include "GpgResultAnalyse.h"
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {
/**

View File

@ -26,7 +26,7 @@
*
*/
#include "gpg/result_analyse/GpgResultAnalyse.h"
#include "core/result_analyse/GpgResultAnalyse.h"
const std::string GpgFrontend::GpgResultAnalyse::GetResultReport() const {
return stream_.str();

View File

@ -31,7 +31,7 @@
#include <sstream>
#include <string>
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
namespace GpgFrontend {
class GpgResultAnalyse {

View File

@ -26,9 +26,9 @@
*
*/
#include "gpg/result_analyse/GpgSignResultAnalyse.h"
#include "core/result_analyse/GpgSignResultAnalyse.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
GpgFrontend::GpgSignResultAnalyse::GpgSignResultAnalyse(GpgError error,
GpgSignResult result)

View File

@ -26,13 +26,13 @@
*
*/
#include "gpg/result_analyse/GpgVerifyResultAnalyse.h"
#include "core/result_analyse/GpgVerifyResultAnalyse.h"
#include <boost/format.hpp>
#include "GpgFrontend.h"
#include "gpg/GpgConstants.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/GpgConstants.h"
#include "core/function/GpgKeyGetter.h"
GpgFrontend::GpgVerifyResultAnalyse::GpgVerifyResultAnalyse(GpgError error,
GpgVerifyResult result)

View File

@ -30,7 +30,7 @@
#define GPGFRONTEND_GPGVERIFYRESULTANALYSE_H
#include "GpgResultAnalyse.h"
#include "gpg/model/GpgKeySignature.h"
#include "core/model/GpgKeySignature.h"
namespace GpgFrontend {
/**

View File

@ -35,7 +35,7 @@
#include <cstdlib>
#include "GpgFrontendBuildInfo.h"
#include "gpg/GpgFunctionObject.h"
#include "core/GpgFunctionObject.h"
#include "ui/main_window/MainWindow.h"
#include "ui/thread/CtxCheckThread.h"

View File

@ -42,8 +42,8 @@
* Project internal dependencies
*/
#include "GpgFrontend.h"
#include "gpg/GpgConstants.h"
#include "gpg/GpgModel.h"
#include "core/GpgConstants.h"
#include "core/GpgModel.h"
/**
* 3rd party dependencies

View File

@ -30,9 +30,9 @@
#include <utility>
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyOpera.h"
#include "ui/import_export/ExportKeyPackageDialog.h"
#include "ui/SignalStation.h"
#include "ui/UserInterfaceUtils.h"

View File

@ -31,7 +31,7 @@
#include <utility>
#include "dialog/WaitingDialog.h"
#include "gpg/result_analyse/GpgResultAnalyse.h"
#include "core/result_analyse/GpgResultAnalyse.h"
#include "ui/SignalStation.h"
#include "ui/mail/SendMailDialog.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -29,8 +29,8 @@
#ifndef GPGFRONTEND_USER_INTERFACE_UTILS_H
#define GPGFRONTEND_USER_INTERFACE_UTILS_H
#include "gpg/GpgModel.h"
#include "gpg/result_analyse/GpgVerifyResultAnalyse.h"
#include "core/GpgModel.h"
#include "core/result_analyse/GpgVerifyResultAnalyse.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend {

View File

@ -29,7 +29,7 @@
#ifndef WIZARD_H
#define WIZARD_H
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
#include "ui/GpgFrontendUI.h"
#include "ui/KeyMgmt.h"
#include "ui/key_generate/KeygenDialog.h"

View File

@ -29,7 +29,7 @@
#ifndef __ABOUTDIALOG_H__
#define __ABOUTDIALOG_H__
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/struct/SoftwareVersion.h"

View File

@ -30,8 +30,8 @@
#include <boost/format.hpp>
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui_ExportKeyPackageDialog.h"
GpgFrontend::UI::ExportKeyPackageDialog::ExportKeyPackageDialog(

View File

@ -28,7 +28,7 @@
#include "KeyImportDetailDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
namespace GpgFrontend::UI {
KeyImportDetailDialog::KeyImportDetailDialog(GpgImportInformation result,

View File

@ -29,8 +29,8 @@
#ifndef __KEYIMPORTDETAILSDIALOG_H__
#define __KEYIMPORTDETAILSDIALOG_H__
#include "gpg/GpgContext.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/GpgContext.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -30,7 +30,7 @@
#include <utility>
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui/SignalStation.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -30,7 +30,7 @@
#define __KEY_SERVER_IMPORT_DIALOG_H__
#include "KeyImportDetailDialog.h"
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/widgets/KeyList.h"

View File

@ -30,8 +30,8 @@
#include <algorithm>
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui/settings/GlobalSettingStation.h"
namespace GpgFrontend::UI {

View File

@ -29,7 +29,7 @@
#ifndef GPGFRONTEND_KEYUPLOADWIDGET_H
#define GPGFRONTEND_KEYUPLOADWIDGET_H
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -29,7 +29,7 @@
#include "ui/key_generate/KeygenDialog.h"
#include "dialog/WaitingDialog.h"
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyOpera.h"
#include "ui/SignalStation.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -27,8 +27,8 @@
#ifndef __KEYGENDIALOG_H__
#define __KEYGENDIALOG_H__
#include "gpg/GpgContext.h"
#include "gpg/GpgGenKeyInfo.h"
#include "core/GpgContext.h"
#include "core/GpgGenKeyInfo.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -27,8 +27,8 @@
#include "ui/key_generate/SubkeyGenerateDialog.h"
#include "dialog/WaitingDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyOpera.h"
#include "ui/SignalStation.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -27,8 +27,8 @@
#ifndef GPGFRONTEND_SUBKEYGENERATEDIALOG_H
#define GPGFRONTEND_SUBKEYGENERATEDIALOG_H
#include "gpg/GpgContext.h"
#include "gpg/GpgGenKeyInfo.h"
#include "core/GpgContext.h"
#include "core/GpgGenKeyInfo.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -29,7 +29,7 @@
#ifndef __KEYDETAILSDIALOG_H__
#define __KEYDETAILSDIALOG_H__
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -26,8 +26,8 @@
#include "ui/keypair_details/KeyNewUIDDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgUIDOperator.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgUIDOperator.h"
#include "ui/SignalStation.h"
namespace GpgFrontend::UI {

View File

@ -27,7 +27,7 @@
#ifndef GPGFRONTEND_KEYNEWUIDDIALOG_H
#define GPGFRONTEND_KEYNEWUIDDIALOG_H
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -27,8 +27,8 @@
#include "ui/keypair_details/KeyPairDetailTab.h"
#include "dialog/WaitingDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui/SignalStation.h"
namespace GpgFrontend::UI {

View File

@ -28,7 +28,7 @@
#define GPGFRONTEND_KEYPAIRDETAILTAB_H
#include "KeySetExpireDateDialog.h"
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "import_export/KeyServerImportDialog.h"
#include "import_export/KeyUploadDialog.h"
#include "ui/GpgFrontendUI.h"

View File

@ -26,8 +26,8 @@
#include "KeyPairOperaTab.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyImportExporter.h"
#include "core/function/GpgKeyOpera.h"
#include "import_export/KeyUploadDialog.h"
#include "ui/SignalStation.h"
#include "ui/UserInterfaceUtils.h"

View File

@ -27,7 +27,7 @@
#ifndef GPGFRONTEND_KEYPAIROPERATAB_H
#define GPGFRONTEND_KEYPAIROPERATAB_H
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -28,7 +28,7 @@
#include "ui/keypair_details/KeyPairSubkeyTab.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/SignalStation.h"
namespace GpgFrontend::UI {

View File

@ -30,7 +30,7 @@
#define GPGFRONTEND_KEYPAIRSUBKEYTAB_H
#include "KeySetExpireDateDialog.h"
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/key_generate/SubkeyGenerateDialog.h"

View File

@ -26,9 +26,9 @@
#include "ui/keypair_details/KeyPairUIDTab.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyManager.h"
#include "gpg/function/GpgUIDOperator.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyManager.h"
#include "core/function/GpgUIDOperator.h"
#include "ui/SignalStation.h"
#include "ui/widgets/TOFUInfoPage.h"

View File

@ -31,7 +31,7 @@
#include "KeyNewUIDDialog.h"
#include "KeyUIDSignDialog.h"
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -30,8 +30,8 @@
#include <utility>
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyOpera.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyOpera.h"
#include "ui/SignalStation.h"
#include "ui/settings/GlobalSettingStation.h"
#include "ui_ModifiedExpirationDateTime.h"

View File

@ -29,9 +29,9 @@
#ifndef GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H
#define GPGFRONTEND_KEYSETEXPIREDATEDIALOG_H
#include "gpg/GpgContext.h"
#include "gpg/model/GpgKey.h"
#include "gpg/model/GpgSubKey.h"
#include "core/GpgContext.h"
#include "core/model/GpgKey.h"
#include "core/model/GpgSubKey.h"
#include "ui/GpgFrontendUI.h"
class Ui_ModifiedExpirationDateTime;

View File

@ -26,8 +26,8 @@
#include "ui/keypair_details/KeyUIDSignDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyManager.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyManager.h"
#include "ui/SignalStation.h"
namespace GpgFrontend::UI {

View File

@ -27,7 +27,7 @@
#ifndef GPGFRONTEND_KEYUIDSIGNDIALOG_H
#define GPGFRONTEND_KEYUIDSIGNDIALOG_H
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/GpgFrontendUI.h"
#include "ui/widgets/KeyList.h"

View File

@ -28,7 +28,7 @@
#include "SendMailDialog.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/mail/EmailListEditor.h"
#include "ui/mail/RecipientsPicker.h"
#include "ui/mail/SenderPicker.h"

View File

@ -29,10 +29,10 @@
#ifndef __GPGWIN_H__
#define __GPGWIN_H__
#include "gpg/GpgConstants.h"
#include "gpg/result_analyse/GpgDecryptResultAnalyse.h"
#include "gpg/result_analyse/GpgEncryptResultAnalyse.h"
#include "gpg/result_analyse/GpgSignResultAnalyse.h"
#include "core/GpgConstants.h"
#include "core/result_analyse/GpgDecryptResultAnalyse.h"
#include "core/result_analyse/GpgEncryptResultAnalyse.h"
#include "core/result_analyse/GpgSignResultAnalyse.h"
#include "ui/GpgFrontendUI.h"
#include "ui/KeyMgmt.h"
#include "ui/dialog/WaitingDialog.h"

View File

@ -27,8 +27,8 @@
*/
#include "MainWindow.h"
#include "gpg/function/GpgFileOpera.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgFileOpera.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/UserInterfaceUtils.h"
#include "ui/settings/GlobalSettingStation.h"
#include "ui/widgets/SignersPicker.h"

View File

@ -39,9 +39,9 @@
#include "ui/mail/SendMailDialog.h"
#endif
#include "gpg/function/GpgBasicOperator.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgBasicOperator.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
#include "ui/UserInterfaceUtils.h"
#include "ui/help/AboutDialog.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -41,7 +41,7 @@
namespace vmime::security::cert {
class defaultCertificateVerifier;
class X509Certificate;
} // namespace vmime::security::cert
} // namespace vmime::security::cert
namespace GpgFrontend::UI {
@ -51,13 +51,13 @@ namespace GpgFrontend::UI {
*/
class GlobalSettingStation : public QObject {
Q_OBJECT
public:
public:
/**
* @brief Get the Instance object
*
* @return GlobalSettingStation&
*/
static GlobalSettingStation& GetInstance();
static GlobalSettingStation &GetInstance();
/**
* @brief Construct a new Global Setting Station object
@ -76,7 +76,7 @@ class GlobalSettingStation : public QObject {
*
* @return libconfig::Setting&
*/
libconfig::Setting& GetUISettings() noexcept { return ui_cfg_.getRoot(); }
libconfig::Setting &GetUISettings() noexcept { return ui_cfg_.getRoot(); }
/**
* @brief Get the App Dir object
@ -158,14 +158,14 @@ class GlobalSettingStation : public QObject {
*
* @param path
*/
void AddRootCert(const boost::filesystem::path& path);
void AddRootCert(const boost::filesystem::path &path);
/**
* @brief Get the Root Certs object
*
* @return const std::vector<std::shared_ptr<X509>>&
*/
const std::vector<std::shared_ptr<X509>>& GetRootCerts();
const std::vector<std::shared_ptr<X509>> &GetRootCerts();
/**
* @brief
@ -187,7 +187,7 @@ class GlobalSettingStation : public QObject {
* @return std::string
*/
std::string SaveDataObj(const std::string& _key, const nlohmann::json& value);
std::string SaveDataObj(const std::string &_key, const nlohmann::json &value);
/**
* @brief Get the Data Object object
@ -195,7 +195,7 @@ class GlobalSettingStation : public QObject {
* @param _key
* @return std::optional<nlohmann::json>
*/
std::optional<nlohmann::json> GetDataObject(const std::string& _key);
std::optional<nlohmann::json> GetDataObject(const std::string &_key);
/**
* @brief Get the Data Object By Ref object
@ -203,57 +203,56 @@ class GlobalSettingStation : public QObject {
* @param _ref
* @return std::optional<nlohmann::json>
*/
std::optional<nlohmann::json> GetDataObjectByRef(const std::string& _ref);
std::optional<nlohmann::json> GetDataObjectByRef(const std::string &_ref);
private:
private:
boost::filesystem::path app_path_ =
qApp->applicationDirPath().toStdString(); ///< Program Location
qApp->applicationDirPath().toStdString(); ///< Program Location
boost::filesystem::path app_data_path_ =
QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation)
.toStdString(); ///< Program Data Location
.toStdString(); ///< Program Data Location
boost::filesystem::path app_log_path_ =
app_data_path_ / "logs"; ///< Program Data Location
app_data_path_ / "logs"; ///< Program Data Location
boost::filesystem::path app_data_objs_path_ =
app_data_path_ / "objs"; ///< Object storage path
app_data_path_ / "objs"; ///< Object storage path
#ifdef LINUX_INSTALL_BUILD
boost::filesystem::path app_resource_path_ =
boost::filesystem::path(APP_LOCALSTATE_PATH) /
"gpgfrontend"; ///< Program Data Location
"gpgfrontend"; ///< Program Data Location
#else
boost::filesystem::path app_resource_path_ =
RESOURCE_DIR_BOOST_PATH(app_path_); ///< Program Data Location
RESOURCE_DIR_BOOST_PATH(app_path_); ///< Program Data Location
#endif
#ifdef LINUX_INSTALL_BUILD
boost::filesystem::path app_locale_path_ =
std::string(APP_LOCALE_PATH); ///< Program Data Location
std::string(APP_LOCALE_PATH); ///< Program Data Location
#else
boost::filesystem::path app_locale_path_ =
app_resource_path_ / "locales"; ///< Program Data Location
app_resource_path_ / "locales"; ///< Program Data Location
#endif
boost::filesystem::path app_configure_path_ =
QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)
.toStdString(); ///< Program Configure Location
.toStdString(); ///< Program Configure Location
boost::filesystem::path app_secure_path_ =
app_configure_path_ /
"secure"; ///< Where sensitive information is stored
app_configure_path_ / "secure"; ///< Where sensitive information is stored
boost::filesystem::path app_secure_key_path_ =
app_secure_path_ / "app.key"; ///<
app_secure_path_ / "app.key"; ///<
boost::filesystem::path ui_config_dir_path_ =
app_configure_path_ /
"UserInterface"; ///< Configure File Directory Location
"UserInterface"; ///< Configure File Directory Location
boost::filesystem::path ui_config_path_ =
ui_config_dir_path_ / "ui.cfg"; ///< UI Configure File Location
ui_config_dir_path_ / "ui.cfg"; ///< UI Configure File Location
libconfig::Config ui_cfg_; ///<
std::vector<std::shared_ptr<X509>> root_certs_; ///<
std::random_device rd_; ///<
std::mt19937 mt_; ///<
QByteArray hash_key_; ///<
libconfig::Config ui_cfg_; ///<
std::vector<std::shared_ptr<X509>> root_certs_; ///<
std::random_device rd_; ///<
std::mt19937 mt_; ///<
QByteArray hash_key_; ///<
static std::unique_ptr<GlobalSettingStation> instance_; ///<
static std::unique_ptr<GlobalSettingStation> instance_; ///<
/**
* @brief
@ -269,6 +268,6 @@ class GlobalSettingStation : public QObject {
*/
std::string generate_passphrase(int len);
};
} // namespace GpgFrontend::UI
} // namespace GpgFrontend::UI
#endif // GPGFRONTEND_GLOBALSETTINGSTATION_H
#endif // GPGFRONTEND_GLOBALSETTINGSTATION_H

View File

@ -26,9 +26,9 @@
#include "CtxCheckThread.h"
#include "gpg/GpgContext.h"
#include "gpg/GpgCoreInit.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/GpgContext.h"
#include "core/GpgCoreInit.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/UserInterfaceUtils.h"
GpgFrontend::UI::CtxCheckThread::CtxCheckThread() : QThread(nullptr) {

View File

@ -28,9 +28,9 @@
#include <boost/format.hpp>
#include "gpg/function/GpgBasicOperator.h"
#include "gpg/function/GpgKeyGetter.h"
#include "gpg/function/GpgKeyImportExporter.h"
#include "core/function/GpgBasicOperator.h"
#include "core/function/GpgKeyGetter.h"
#include "core/function/GpgKeyImportExporter.h"
namespace GpgFrontend::UI {

View File

@ -30,7 +30,7 @@
#define __VERIFYNOTIFICATION_H__
#include "PlainTextEditorPage.h"
#include "gpg/result_analyse/GpgVerifyResultAnalyse.h"
#include "core/result_analyse/GpgVerifyResultAnalyse.h"
#include "ui/details/VerifyDetailsDialog.h"
class Ui_InfoBoard;

View File

@ -31,8 +31,8 @@
#include <boost/format.hpp>
#include <utility>
#include "gpg/GpgCoreInit.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/GpgCoreInit.h"
#include "core/function/GpgKeyGetter.h"
#include "ui/SignalStation.h"
#include "ui/UserInterfaceUtils.h"
#include "ui/settings/GlobalSettingStation.h"

View File

@ -31,7 +31,7 @@
#include <utility>
#include "gpg/GpgContext.h"
#include "core/GpgContext.h"
#include "ui/import_export/KeyImportDetailDialog.h"
class Ui_KeyList;

View File

@ -29,7 +29,7 @@
#ifndef __EDITORPAGE_H__
#define __EDITORPAGE_H__
#include "gpg/GpgConstants.h"
#include "core/GpgConstants.h"
#include "ui/GpgFrontendUI.h"
class Ui_PlainTextEditor;

View File

@ -27,7 +27,7 @@
#ifndef GPGFRONTEND_TOFUINFOPAGE_H
#define GPGFRONTEND_TOFUINFOPAGE_H
#include "gpg/GpgModel.h"
#include "core/GpgModel.h"
#include "ui/GpgFrontendUI.h"
namespace GpgFrontend::UI {

View File

@ -28,7 +28,7 @@
#include "ui/widgets/VerifyKeyDetailBox.h"
#include "gpg/function/GpgKeyGetter.h"
#include "core/function/GpgKeyGetter.h"
namespace GpgFrontend::UI {