You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ubl-settings-diskquota/source/system_quotas.h

35 lines
1.3 KiB

#ifndef SYSTEM_CMD_QUOTAS
#define SYSTEM_CMD_QUOTAS
#include "project_lib.h"
#include "my_type.h"
#include "my_process.h"
#include "util.h"
namespace Quotas_sys {
class Quotas_sys {
public:
map_str_str map_hw_or_sw;
map_str_str* map_device;
map_str_str* map_gui_cfg;
map<string, bool> disk_mount;
My_Process::My_Process_system obj_process_system = My_Process::My_Process_system();
My_Process::My_Process_call obj_process_call = My_Process::My_Process_call();
public:
Quotas_sys();
void set_map_gui(map_str_str &map_gui);
void check_partition_mount();
void format_cmd_quotas_system(struct struct_quotas& _struct_quota);
bool off_quota(string partition, string quota_hw, string quota_sw);
bool check_on_quotas_system(string cmd);
struct status_quotas check_on_quotas_system_2_hw(string params);
bool on_quota_hw(string partition, string cmd_hw, string cmd_sw);
bool on_quota_sw(string partition, int mode);
vector<data_all_quotas> pars_data(string cmd);
void set_map_device(map_str_str &map_device);
string wrapper_hw_sw(string partition);
bool wrapper_on_quotas(string partition, string flag_mode);
protected:
struct data_all_quotas part_quotas_line(string line);
};
}
#endif