refactor
This commit is contained in:
@@ -88,26 +88,28 @@ static const std::vector<option> option_list = {
|
||||
|
||||
// Prototypes
|
||||
void get_api_authentication_data(std::string &user, std::string &password,
|
||||
std::uint16_t &port, const provider_type &pt,
|
||||
std::uint16_t &port, const provider_type &prov,
|
||||
const std::string &data_directory);
|
||||
|
||||
[[nodiscard]] auto get_provider_type_from_args(int argc, char *argv[])
|
||||
[[nodiscard]] auto get_provider_type_from_args(std::vector<const char *> args)
|
||||
-> provider_type;
|
||||
|
||||
[[nodiscard]] auto has_option(int argc, char *argv[],
|
||||
[[nodiscard]] auto has_option(std::vector<const char *> args,
|
||||
const std::string &option_name) -> bool;
|
||||
|
||||
[[nodiscard]] auto has_option(int argc, char *argv[], const option &opt)
|
||||
[[nodiscard]] auto has_option(std::vector<const char *> args, const option &opt)
|
||||
-> bool;
|
||||
|
||||
[[nodiscard]] auto parse_option(int argc, char *argv[],
|
||||
[[nodiscard]] auto parse_option(std::vector<const char *> args,
|
||||
const std::string &option_name,
|
||||
std::uint8_t count) -> std::vector<std::string>;
|
||||
|
||||
[[nodiscard]] auto parse_string_option(int argc, char **argv, const option &opt,
|
||||
std::string &value) -> exit_code;
|
||||
[[nodiscard]] auto parse_string_option(std::vector<const char *> args,
|
||||
const option &opt, std::string &value)
|
||||
-> exit_code;
|
||||
|
||||
[[nodiscard]] auto parse_drive_options(int argc, char **argv, provider_type &pt,
|
||||
[[nodiscard]] auto parse_drive_options(std::vector<const char *> args,
|
||||
provider_type &prov,
|
||||
std::string &data_directory)
|
||||
-> std::vector<std::string>;
|
||||
} // namespace repertory::utils::cli
|
||||
|
@@ -50,7 +50,7 @@ namespace repertory::utils {
|
||||
|
||||
[[nodiscard]] auto is_process_elevated() -> bool;
|
||||
|
||||
[[nodiscard]] auto run_process_elevated(int argc, char *argv[]) -> int;
|
||||
[[nodiscard]] auto run_process_elevated(std::vector<const char *> args) -> int;
|
||||
|
||||
void set_last_error_code(DWORD errorCode);
|
||||
|
||||
|
Reference in New Issue
Block a user