pmt: The basis of the system for adding features was created and improvements were made.

- The basic header contents of the system, designed to easily add features, were written.
 - The [CLI11](https://github.com/CLIUtils/CLI11) project was included to provide a better experience for the project.
 - Improved logging system.
 - Unnecessary code cleaned.
This commit is contained in:
2025-07-24 17:38:31 +03:00
parent 18b5700cbd
commit 9cd97a085e
16 changed files with 11763 additions and 46 deletions

0
src/Lib.cpp Normal file
View File

0
src/Main.cpp Normal file
View File

View File

@@ -0,0 +1,66 @@
/*
Copyright 2025 Yağız Zengin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#define NEED_BASIC_FUNCTION_CLASSES
#include <libpmt/lib.hpp>
namespace PartitionManager {
// Back-up function
class backupFunction : public PartitionManager::FunctionBase {
private:
CLI::App* _cmd = nullptr;
public:
bool init(CLI::App& _app) override;
bool run() override;
const char* name() override;
};
// Image flasher function
class flashFunction : public PartitionManager::FunctionBase {
private:
CLI::App* _cmd = nullptr;
public:
bool init(CLI::App& _app) override;
bool run() override;
const char* name() override;
};
// Eraser function (only the partition content is cleared)
class eraseFunction : public PartitionManager::FunctionBase {
private:
CLI::App* _cmd = nullptr;
public:
bool init(CLI::App& _app) override;
bool run() override;
const char* name() override;
};
// Partition size getter function
class partitionSizeFunction : public PartitionManager::FunctionBase {
private:
CLI::App* _cmd = nullptr;
public:
bool init(CLI::App& _app) override;
bool run() override;
const char* name() override;
};
} // namespace PartitionManager