mirror of
https://github.com/davidallendj/gdpm.git
synced 2025-12-20 03:27:02 -07:00
More refactoring and bug fixes
- Added `libhttp` and `librest_api` targets to CMakeLists.txt - Added examples for `libhttp` and `librest_api` in examples directory - Added `cache` and `add` commands - Added documentation for `libhttp` and `librest_api` - Added all available HTTP response codes to REST API - Changed how `bin/compile.sh` works (must supply args to build)
This commit is contained in:
parent
5a73651ad1
commit
8b1f1374d8
23 changed files with 575 additions and 164 deletions
|
|
@ -16,7 +16,7 @@
|
|||
#include <curl/curl.h>
|
||||
|
||||
namespace gdpm::package_manager {
|
||||
extern remote::repository_map repo_sources;
|
||||
extern remote::repository_map remote_sources;
|
||||
extern CURL *curl;
|
||||
extern CURLcode res;
|
||||
extern config::context config;
|
||||
|
|
@ -27,12 +27,13 @@ namespace gdpm::package_manager {
|
|||
};
|
||||
|
||||
struct exec_args{
|
||||
args_t args;
|
||||
opts_t opts;
|
||||
var_args args;
|
||||
var_opts opts;
|
||||
};
|
||||
|
||||
enum class action_e{
|
||||
install,
|
||||
add,
|
||||
remove,
|
||||
update,
|
||||
search,
|
||||
|
|
@ -47,12 +48,12 @@ namespace gdpm::package_manager {
|
|||
none
|
||||
};
|
||||
|
||||
GDPM_DLL_EXPORT result_t<exec_args> initialize(int argc, char **argv);
|
||||
GDPM_DLL_EXPORT int execute(const args_t& args, const opts_t& opts);
|
||||
GDPM_DLL_EXPORT result_t<exec_args> initialize(int argc, char **argv);
|
||||
GDPM_DLL_EXPORT int execute(const exec_args& in);
|
||||
GDPM_DLL_EXPORT void finalize();
|
||||
|
||||
/* Auxiliary Functions */
|
||||
GDPM_DLL_EXPORT cxxargs _parse_arguments(int argc, char **argv);
|
||||
GDPM_DLL_EXPORT result_t<exec_args> _handle_arguments(const cxxargs& args);
|
||||
GDPM_DLL_EXPORT void run_command(action_e command, const package::title_list& package_titles, const opts_t& opts);
|
||||
GDPM_DLL_EXPORT void run_command(action_e command, const var_args& args, const var_opts& opts);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue