parent
fd1001e359
commit
66c3eb5a41
@ -1,2 +1,45 @@
|
||||
#include "controler.h"
|
||||
Back_Back::Back_Back() {}
|
||||
void Back_Back::set_mode(string flag_mode) {
|
||||
this->flag_mode = flag_mode;
|
||||
}
|
||||
|
||||
void Back_Back::set_partition(string partition) {
|
||||
this->partition = partition;
|
||||
}
|
||||
|
||||
void Back_Back::set_sys_flag(string sys_flag) {
|
||||
this->sys_flag = sys_flag;
|
||||
}
|
||||
|
||||
bool Back_Back::wrapper_off_quotas(string quotas_type) {
|
||||
bool flag_status = false;
|
||||
quotas_type = this->handler_quotas_type(quotas_type);
|
||||
if (flag_mode == "system") {
|
||||
string cmd_hw = "";
|
||||
string cmd_sw = "";
|
||||
flag_status = obj_quotas_sys.off_quota(partition, cmd_hw, cmd_sw);
|
||||
}
|
||||
else if (flag_mode == "ubconfig") {
|
||||
flag_status = obj_quotas_ubconfig.off_quota(partition, quotas_type);
|
||||
}
|
||||
return flag_status;
|
||||
}
|
||||
bool Back_Back::wrapper_on_quotas(string quotas_type) {
|
||||
bool flag_status = false;
|
||||
quotas_type = this->handler_quotas_type(quotas_type);
|
||||
if (flag_mode == "system") {
|
||||
string cmd_hw = "";
|
||||
string cmd_sw = "";
|
||||
flag_status = obj_quotas_sys.on_quota_hw(partition, cmd_hw, cmd_sw);
|
||||
flag_status = obj_quotas_sys.wrapper_on_quotas(partition, quotas_type);
|
||||
}
|
||||
else if (flag_mode == "ubconfig") {
|
||||
flag_status = obj_quotas_ubconfig.format_cmd_quotas();
|
||||
}
|
||||
return flag_status;
|
||||
}
|
||||
|
||||
string Back_Back::handler_quotas_type(string quotas_type) {
|
||||
return quotas_type;
|
||||
}
|
Loading…
Reference in new issue