53 lines
1.8 KiB
C++
53 lines
1.8 KiB
C++
#ifndef ARG_FUNC_HPP
|
|
#define ARG_FUNC_HPP
|
|
|
|
struct LoginInfoPointer;
|
|
class Buffer;
|
|
#include <string>
|
|
#include <optional>
|
|
|
|
enum class Arg
|
|
{
|
|
Get, // get password for label
|
|
Generate, // generate password for label
|
|
List, // list all labels
|
|
Delete, // delete password for label
|
|
Print_all_p, // print all passwords
|
|
Input, // input password for label
|
|
Change, // change main password
|
|
Show, // show password for label
|
|
Error, // error
|
|
Username, // update username
|
|
Name, // update label name
|
|
File, // select save file
|
|
Size, // show size of file
|
|
Editor // open editor, password as note
|
|
};
|
|
|
|
Arg get_args(int argc, char **argv, char **label);
|
|
|
|
std::optional<LoginInfoPointer> arg_get(Buffer &decrypted_buffer, const char *label);
|
|
|
|
std::optional<LoginInfoPointer> arg_new_password(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key, bool generate);
|
|
|
|
void arg_username(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
|
|
|
void arg_label_name(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
|
|
|
void arg_list(Buffer &decrypted_buffer, const char *label_filter);
|
|
|
|
void arg_delete(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
|
|
|
void arg_print_all_p(Buffer &decrypted_buffer, std::string &user_pass);
|
|
|
|
void arg_change(Buffer &decrypted_buffer, Buffer &encrypted_buffer, std::string &user_pass);
|
|
|
|
void arg_show(Buffer &decrypted_buffer, const char *label);
|
|
|
|
void arg_file(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key, std::string &save_location_path);
|
|
|
|
void arg_size(Buffer &encrypted_buffer);
|
|
|
|
void arg_editor(Buffer &decrypted_buffer, Buffer &encrypted_buffer, const char *label, std::string &key);
|
|
|
|
#endif |