aboutsummaryrefslogtreecommitdiffstats
path: root/src/module/sdk
diff options
context:
space:
mode:
Diffstat (limited to 'src/module/sdk')
-rw-r--r--src/module/sdk/GFSDK.h44
-rw-r--r--src/module/sdk/GFSDKBasic.cpp106
-rw-r--r--src/module/sdk/GFSDKBasic.h107
-rw-r--r--src/module/sdk/GFSDKBuildInfo.h36
-rw-r--r--src/module/sdk/GFSDKBuildInfo.h.in36
-rw-r--r--src/module/sdk/GFSDKExport.h42
-rw-r--r--src/module/sdk/GFSDKExtra.cpp42
-rw-r--r--src/module/sdk/GFSDKExtra.h39
-rw-r--r--src/module/sdk/GFSDKGpg.cpp27
-rw-r--r--src/module/sdk/GFSDKGpg.h33
-rw-r--r--src/module/sdk/GFSDKLog.cpp47
-rw-r--r--src/module/sdk/GFSDKLog.h44
-rw-r--r--src/module/sdk/GFSDKModule.cpp98
-rw-r--r--src/module/sdk/GFSDKModule.h94
-rw-r--r--src/module/sdk/GFSDKUI.cpp27
-rw-r--r--src/module/sdk/GFSDKUI.h29
-rw-r--r--src/module/sdk/GFSDKUtils.cpp29
-rw-r--r--src/module/sdk/GFSDKUtils.h34
18 files changed, 0 insertions, 914 deletions
diff --git a/src/module/sdk/GFSDK.h b/src/module/sdk/GFSDK.h
deleted file mode 100644
index 77e019af..00000000
--- a/src/module/sdk/GFSDK.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#include "GFSDKExport.h"
-
-extern "C" {
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogTrace(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogDebug(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogInfo(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogWarn(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogError(const char*);
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKBasic.cpp b/src/module/sdk/GFSDKBasic.cpp
deleted file mode 100644
index 4d8af6c8..00000000
--- a/src/module/sdk/GFSDKBasic.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#include "GFSDKBasic.h"
-
-#include "core/function/SecureMemoryAllocator.h"
-#include "core/function/gpg/GpgCommandExecutor.h"
-#include "core/utils/BuildInfoUtils.h"
-#include "core/utils/CommonUtils.h"
-
-auto GFAllocateMemory(uint32_t size) -> void* {
- return GpgFrontend::SecureMemoryAllocator::Allocate(size);
-}
-
-void GFFreeMemory(void* ptr) {
- return GpgFrontend::SecureMemoryAllocator::Deallocate(ptr);
-}
-
-auto GFProjectVersion() -> const char* {
- return GpgFrontend::GFStrDup(GpgFrontend::GetProjectVersion());
-}
-
-auto GFQtEnvVersion() -> const char* {
- return GpgFrontend::GFStrDup(QT_VERSION_STR);
-}
-
-void GFExecuteCommandSync(const char* cmd, int32_t argc, const char** argv,
- GFCommandExeucteCallback cb, void* data) {
- QStringList args;
- for (int i = 0; i < argc; i++) {
- args.append(GpgFrontend::GFUnStrDup(argv[i]));
- }
-
- GpgFrontend::GpgCommandExecutor::ExecuteContext const context{
- cmd, args, [=](int exit_code, const QString& out, const QString& err) {
- cb(data, exit_code, out.toUtf8(), err.toUtf8());
- }};
-
- GpgFrontend::GpgCommandExecutor::ExecuteSync(context);
-}
-
-void GFExecuteCommandBatchSync(int32_t context_size,
- const GFCommandExecuteContext* context) {
- QList<GpgFrontend::GpgCommandExecutor::ExecuteContext> contexts;
-
- for (int i = 0; i < context_size; i++) {
- const auto& exec_context = context[i];
-
- QStringList args;
- const char** argv = exec_context.argv;
- for (int j = 0; j < exec_context.argc; j++) {
- args.append(GpgFrontend::GFUnStrDup(argv[j]));
- }
-
- contexts.append(
- {exec_context.cmd, args,
- [data = exec_context.data, cb = exec_context.cb](
- int exit_code, const QString& out, const QString& err) {
- cb(data, exit_code, out.toUtf8(), err.toUtf8());
- }});
- }
-
- GpgFrontend::GpgCommandExecutor::ExecuteConcurrentlySync(contexts);
-}
-
-auto StrlenSafe(const char* str, size_t max_len) -> size_t {
- const char* end = static_cast<const char*>(memchr(str, '\0', max_len));
- if (end == nullptr) return max_len;
- return end - str;
-}
-
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFModuleStrDup(const char* src) -> char* {
- auto len = StrlenSafe(src, kGfStrlenMax);
- if (len > kGfStrlenMax) return nullptr;
-
- char* dst = static_cast<char*>(GFAllocateMemory((len + 1) * sizeof(char)));
- memcpy(dst, src, len);
- dst[len] = '\0';
-
- return dst;
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKBasic.h b/src/module/sdk/GFSDKBasic.h
deleted file mode 100644
index 07ff6ed7..00000000
--- a/src/module/sdk/GFSDKBasic.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#include <cstddef>
-#include <cstdint>
-
-#include "GFSDKExport.h"
-
-extern "C" {
-
-constexpr int32_t kGfStrlenMax = static_cast<const int32_t>(1024 * 8);
-
-using GFCommandExeucteCallback = void (*)(void* data, int errcode,
- const char* out, const char* err);
-
-using GFCommandExecuteContext = struct {
- const char* cmd;
- int32_t argc;
- const char** argv;
- GFCommandExeucteCallback cb;
- void* data;
-};
-
-/**
- * @brief
- *
- * @param size
- * @return void*
- */
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFAllocateMemory(uint32_t size) -> void*;
-
-/**
- * @brief
- *
- * @return const char*
- */
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFProjectVersion() -> const char*;
-
-/**
- * @brief
- *
- * @return const char*
- */
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFQtEnvVersion() -> const char*;
-
-/**
- * @brief
- *
- */
-void GPGFRONTEND_MODULE_SDK_EXPORT GFFreeMemory(void*);
-
-/**
- * @brief
- *
- * @param cmd
- * @param argc
- * @param argv
- * @param cb
- * @param data
- */
-void GPGFRONTEND_MODULE_SDK_EXPORT
-GFExecuteCommandSync(const char* cmd, int32_t argc, const char** argv,
- GFCommandExeucteCallback cb, void* data);
-
-/**
- * @brief
- *
- * @param context_size
- * @param context
- */
-void GPGFRONTEND_MODULE_SDK_EXPORT GFExecuteCommandBatchSync(
- int32_t context_size, const GFCommandExecuteContext* context);
-
-/**
- * @brief
- *
- * @return char*
- */
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFModuleStrDup(const char*) -> char*;
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKBuildInfo.h b/src/module/sdk/GFSDKBuildInfo.h
deleted file mode 100644
index a64d95c5..00000000
--- a/src/module/sdk/GFSDKBuildInfo.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#define GF_SDK_VERSION_MAJOR "2"
-#define GF_SDK_VERSION_MINOR "1"
-#define GF_SDK_VERSION_PATCH "3"
-
-#define GF_SDK_VERSION_STR \
- GF_SDK_VERSION_MAJOR "." GF_SDK_VERSION_MINOR "." GF_SDK_VERSION_PATCH
diff --git a/src/module/sdk/GFSDKBuildInfo.h.in b/src/module/sdk/GFSDKBuildInfo.h.in
deleted file mode 100644
index 508c35d4..00000000
--- a/src/module/sdk/GFSDKBuildInfo.h.in
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#define GF_SDK_VERSION_MAJOR "@CMAKE_PROJECT_VERSION_MAJOR@"
-#define GF_SDK_VERSION_MINOR "@CMAKE_PROJECT_VERSION_MINOR@"
-#define GF_SDK_VERSION_PATCH "@CMAKE_PROJECT_VERSION_PATCH@"
-
-#define GF_SDK_VERSION_STR \
- GF_SDK_VERSION_MAJOR "." GF_SDK_VERSION_MINOR "." GF_SDK_VERSION_PATCH \ No newline at end of file
diff --git a/src/module/sdk/GFSDKExport.h b/src/module/sdk/GFSDKExport.h
deleted file mode 100644
index a62168bc..00000000
--- a/src/module/sdk/GFSDKExport.h
+++ /dev/null
@@ -1,42 +0,0 @@
-
-#ifndef GPGFRONTEND_MODULE_SDK_EXPORT_H
-#define GPGFRONTEND_MODULE_SDK_EXPORT_H
-
-#ifdef GPGFRONTEND_MODULE_SDK_STATIC_DEFINE
-# define GPGFRONTEND_MODULE_SDK_EXPORT
-# define GPGFRONTEND_MODULE_SDK_NO_EXPORT
-#else
-# ifndef GPGFRONTEND_MODULE_SDK_EXPORT
-# ifdef gpgfrontend_module_sdk_EXPORTS
- /* We are building this library */
-# define GPGFRONTEND_MODULE_SDK_EXPORT __attribute__((visibility("default")))
-# else
- /* We are using this library */
-# define GPGFRONTEND_MODULE_SDK_EXPORT __attribute__((visibility("default")))
-# endif
-# endif
-
-# ifndef GPGFRONTEND_MODULE_SDK_NO_EXPORT
-# define GPGFRONTEND_MODULE_SDK_NO_EXPORT __attribute__((visibility("hidden")))
-# endif
-#endif
-
-#ifndef GPGFRONTEND_MODULE_SDK_DEPRECATED
-# define GPGFRONTEND_MODULE_SDK_DEPRECATED __attribute__ ((__deprecated__))
-#endif
-
-#ifndef GPGFRONTEND_MODULE_SDK_DEPRECATED_EXPORT
-# define GPGFRONTEND_MODULE_SDK_DEPRECATED_EXPORT GPGFRONTEND_MODULE_SDK_EXPORT GPGFRONTEND_MODULE_SDK_DEPRECATED
-#endif
-
-#ifndef GPGFRONTEND_MODULE_SDK_DEPRECATED_NO_EXPORT
-# define GPGFRONTEND_MODULE_SDK_DEPRECATED_NO_EXPORT GPGFRONTEND_MODULE_SDK_NO_EXPORT GPGFRONTEND_MODULE_SDK_DEPRECATED
-#endif
-
-#if 0 /* DEFINE_NO_DEPRECATED */
-# ifndef GPGFRONTEND_MODULE_SDK_NO_DEPRECATED
-# define GPGFRONTEND_MODULE_SDK_NO_DEPRECATED
-# endif
-#endif
-
-#endif /* GPGFRONTEND_MODULE_SDK_EXPORT_H */
diff --git a/src/module/sdk/GFSDKExtra.cpp b/src/module/sdk/GFSDKExtra.cpp
deleted file mode 100644
index bbfa8575..00000000
--- a/src/module/sdk/GFSDKExtra.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#include "GFSDKExtra.h"
-
-#include "core/utils/BuildInfoUtils.h"
-#include "core/utils/CommonUtils.h"
-
-auto GFCompareSoftwareVersion(const char *current_version,
- const char *latest_version) -> int {
- return GpgFrontend::GFCompareSoftwareVersion(
- GpgFrontend::GFUnStrDup(current_version),
- GpgFrontend::GFUnStrDup(latest_version));
-}
-auto GFHttpRequestUserAgent() -> const char * {
- return GpgFrontend::GFStrDup(GpgFrontend::GetHttpRequestUserAgent());
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKExtra.h b/src/module/sdk/GFSDKExtra.h
deleted file mode 100644
index 3d7f4226..00000000
--- a/src/module/sdk/GFSDKExtra.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#include "GFSDKExport.h"
-
-extern "C" {
-
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFCompareSoftwareVersion(
- const char *current_version, const char *latest_version) -> int;
-
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFHttpRequestUserAgent() -> const char *;
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKGpg.cpp b/src/module/sdk/GFSDKGpg.cpp
deleted file mode 100644
index 63859763..00000000
--- a/src/module/sdk/GFSDKGpg.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */ \ No newline at end of file
diff --git a/src/module/sdk/GFSDKGpg.h b/src/module/sdk/GFSDKGpg.h
deleted file mode 100644
index 8823bfc5..00000000
--- a/src/module/sdk/GFSDKGpg.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-extern "C" {
-
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKLog.cpp b/src/module/sdk/GFSDKLog.cpp
deleted file mode 100644
index 603cc325..00000000
--- a/src/module/sdk/GFSDKLog.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#include "GFSDKLog.h"
-
-#include "core/utils/LogUtils.h"
-
-#define MODULE_LOG_TRACE(...) GF_LOG_TRACE("module", __VA_ARGS__)
-#define MODULE_LOG_DEBUG(...) GF_LOG_DEBUG("module", __VA_ARGS__)
-#define MODULE_LOG_INFO(...) GF_LOG_INFO("module", __VA_ARGS__)
-#define MODULE_LOG_WARN(...) GF_LOG_WARN("module", __VA_ARGS__)
-#define MODULE_LOG_ERROR(...) GF_LOG_ERROR("module", __VA_ARGS__)
-
-void GFModuleLogTrace(const char* l) { MODULE_LOG_TRACE(l); }
-
-void GFModuleLogDebug(const char* l) { MODULE_LOG_DEBUG(l); }
-
-void GFModuleLogInfo(const char* l) { MODULE_LOG_INFO(l); }
-
-void GFModuleLogWarn(const char* l) { MODULE_LOG_WARN(l); }
-
-void GFModuleLogError(const char* l) { MODULE_LOG_ERROR(l); }
diff --git a/src/module/sdk/GFSDKLog.h b/src/module/sdk/GFSDKLog.h
deleted file mode 100644
index 77e019af..00000000
--- a/src/module/sdk/GFSDKLog.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#include "GFSDKExport.h"
-
-extern "C" {
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogTrace(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogDebug(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogInfo(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogWarn(const char*);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleLogError(const char*);
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKModule.cpp b/src/module/sdk/GFSDKModule.cpp
deleted file mode 100644
index 00594488..00000000
--- a/src/module/sdk/GFSDKModule.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#include "GFSDKModule.h"
-
-#include <core/module/ModuleManager.h>
-#include <core/utils/CommonUtils.h>
-
-#include "GFSDKBasic.h"
-
-void GFModuleListenEvent(const char *module_id, const char *event_id) {
- return GpgFrontend::Module::ModuleManager::GetInstance().ListenEvent(
- GpgFrontend::GFUnStrDup(module_id).toLower(),
- GpgFrontend::GFUnStrDup(event_id).toUpper());
-}
-
-auto GFModuleRetrieveRTValueOrDefault(const char *namespace_, const char *key,
- const char *default_value) -> const
- char * {
- return GpgFrontend::GFStrDup(
- GpgFrontend::Module::RetrieveRTValueTypedOrDefault(
- GpgFrontend::GFUnStrDup(namespace_), GpgFrontend::GFUnStrDup(key),
- GpgFrontend::GFUnStrDup(default_value)));
-}
-
-void GFModuleUpsertRTValue(const char *namespace_, const char *key,
- const char *vaule) {
- GpgFrontend::Module::UpsertRTValue(
- GpgFrontend::GFUnStrDup(namespace_).toLower(),
- GpgFrontend::GFUnStrDup(key).toLower(), GpgFrontend::GFUnStrDup(vaule));
-}
-
-void GFModuleUpsertRTValueBool(const char *namespace_, const char *key,
- int value) {
- GpgFrontend::Module::UpsertRTValue(
- GpgFrontend::GFUnStrDup(namespace_).toLower(),
- GpgFrontend::GFUnStrDup(key).toLower(), value != 0);
-}
-
-auto GFModuleListRTChildKeys(const char *namespace_, const char *key,
- char ***child_keys) -> int32_t {
- *child_keys = nullptr;
- auto keys = GpgFrontend::Module::ListRTChildKeys(
- GpgFrontend::GFUnStrDup(namespace_).toLower(),
- GpgFrontend::GFUnStrDup(key).toLower());
-
- if (keys.empty()) return 0;
-
- *child_keys =
- static_cast<char **>(GFAllocateMemory(sizeof(char **) * keys.size()));
-
- for (int i = 0; i < keys.size(); i++) {
- (*child_keys)[i] = GpgFrontend::GFStrDup(keys[i]);
- }
-
- return static_cast<int32_t>(keys.size());
-}
-
-void GFModuleTriggerModuleEventCallback(GFModuleEvent *module_event,
- const char *module_id, int argc,
- char **argv) {
- auto data_object = GpgFrontend::TransferParams();
- for (int i = 0; i < argc; i++) {
- data_object->AppendObject(GpgFrontend::GFUnStrDup(argv[i]));
- }
-
- auto event = GpgFrontend::Module::ModuleManager::GetInstance().SearchEvent(
- GpgFrontend::GFUnStrDup(module_event->trigger_id).toLower());
- if (!event) return;
-
- event.value()->ExecuteCallback(GpgFrontend::GFUnStrDup(module_id),
- data_object);
-} \ No newline at end of file
diff --git a/src/module/sdk/GFSDKModule.h b/src/module/sdk/GFSDKModule.h
deleted file mode 100644
index 67c1f492..00000000
--- a/src/module/sdk/GFSDKModule.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-#include "GFSDKExport.h"
-
-extern "C" {
-
-#include <stdint.h>
-
-struct GFModuleMetaData {
- const char *key;
- const char *value;
- GFModuleMetaData *next;
-};
-
-struct GFModuleEventParam {
- const char *name;
- const char *value;
- GFModuleEventParam *next;
-};
-
-struct GFModuleEvent {
- const char *id;
- const char *trigger_id;
- GFModuleEventParam *params;
-};
-
-using GFModuleAPIGetModuleGFSDKVersion = auto (*)() -> const char *;
-
-using GFModuleAPIGetModuleQtEnvVersion = auto (*)() -> const char *;
-
-using GFModuleAPIGetModuleID = auto (*)() -> const char *;
-
-using GFModuleAPIGetModuleVersion = auto (*)() -> const char *;
-
-using GFModuleAPIGetModuleMetaData = auto (*)() -> GFModuleMetaData *;
-
-using GFModuleAPIRegisterModule = auto (*)() -> int;
-
-using GFModuleAPIActivateModule = auto (*)() -> int;
-
-using GFModuleAPIExecuteModule = auto (*)(GFModuleEvent *) -> int;
-
-using GFModuleAPIDeactivateModule = auto (*)() -> int;
-
-using GFModuleAPIUnregisterModule = auto (*)() -> int;
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleListenEvent(const char *module_id,
- const char *event_id);
-
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFModuleRetrieveRTValueOrDefault(
- const char *namespace_, const char *key, const char *default_value) -> const
- char *;
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleUpsertRTValue(const char *namespace_,
- const char *key,
- const char *vaule);
-
-void GPGFRONTEND_MODULE_SDK_EXPORT
-GFModuleUpsertRTValueBool(const char *namespace_, const char *key, int value);
-
-auto GPGFRONTEND_MODULE_SDK_EXPORT GFModuleListRTChildKeys(
- const char *namespace_, const char *key, char ***child_keys) -> int32_t;
-
-void GPGFRONTEND_MODULE_SDK_EXPORT GFModuleTriggerModuleEventCallback(
- GFModuleEvent *event, const char *module_id, int argc, char **argv);
-}; \ No newline at end of file
diff --git a/src/module/sdk/GFSDKUI.cpp b/src/module/sdk/GFSDKUI.cpp
deleted file mode 100644
index 63859763..00000000
--- a/src/module/sdk/GFSDKUI.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */ \ No newline at end of file
diff --git a/src/module/sdk/GFSDKUI.h b/src/module/sdk/GFSDKUI.h
deleted file mode 100644
index 0702632a..00000000
--- a/src/module/sdk/GFSDKUI.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once \ No newline at end of file
diff --git a/src/module/sdk/GFSDKUtils.cpp b/src/module/sdk/GFSDKUtils.cpp
deleted file mode 100644
index fcb510e3..00000000
--- a/src/module/sdk/GFSDKUtils.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#include "GFSDKUtils.h" \ No newline at end of file
diff --git a/src/module/sdk/GFSDKUtils.h b/src/module/sdk/GFSDKUtils.h
deleted file mode 100644
index 7d72e9ee..00000000
--- a/src/module/sdk/GFSDKUtils.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (C) 2021 Saturneric <[email protected]>
- *
- * 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 <[email protected]> starting on May 12, 2021.
- *
- * SPDX-License-Identifier: GPL-3.0-or-later
- *
- */
-
-#pragma once
-
-extern "C" {
-
-
-} \ No newline at end of file