gdpm/include/package_manager.hpp
David J. Allen 02a4e879a8 Recfactored and simplified more code
- Added function to convert color string to ansi color string
- Added `trim` and `join` utility functions
- Added initial plugin test case
- Implemented `config get` command to see config properties
- Improved logging functionality and removed duplicate logging functions
- Removed unused functions
- Fixed more styling issues
- Fixed some CLI commands not working correctly
- Fixed CLI documentation format
- Fixed some error handling issues
2023-06-18 10:47:05 -06:00

50 lines
No EOL
940 B
C++

#pragma once
#include "config.hpp"
#include "package.hpp"
#include "package_manager.hpp"
#include "remote.hpp"
#include "result.hpp"
#include <cstdio>
#include <cxxopts.hpp>
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include <rapidjson/document.h>
#include <curl/curl.h>
namespace gdpm::package_manager {
extern CURL *curl;
extern CURLcode res;
extern config::context config;
enum class action_e{
install,
add,
remove,
update,
search,
p_export, /* reserved keyword */
list,
link,
clone,
clean,
config_get,
config_set,
fetch,
sync,
remote_add,
remote_remove,
remote_list,
ui,
help,
none
};
GDPM_DLL_EXPORT error initialize(int argc, char **argv);
GDPM_DLL_EXPORT error parse_arguments(int argc, char **argv);
GDPM_DLL_EXPORT error finalize();
GDPM_DLL_EXPORT void run_command(action_e command, const var_args& args, const var_opts& opts);
}