gdpm/include/package_manager.hpp
David J. Allen 807aa8e5b2 Implemented parallel downloads through CURL multi interface and added purge command
- Update `README.md` file with examples
- Fixed error messages showing no or wrong message
- Changed the prompt message when installing, removing, etc.
- Changed how http::request works
- Added `http::multi` class for parallel downloads
- Removed separate `concepts.hpp` file
TODO: Fix ZIP not extracting after running the `install` command
2023-07-10 20:26:15 -06:00

52 lines
No EOL
960 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,
get,
remove,
update,
search,
p_export, /* reserved keyword */
purge,
list,
link,
clone,
clean,
config_get,
config_set,
fetch,
sync,
remote_add,
remote_remove,
remote_list,
ui,
help,
version,
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);
}