- std::map<std::string, xmlrpc_c::value> structVal;
- structVal["result"] = xmlrpc_c::value_boolean(true);
- structVal["login"] = xmlrpc_c::value_string(ac.login);
- structVal["password"] = xmlrpc_c::value_string(ac.password);
- structVal["user_stat"] = xmlrpc_c::value_boolean(ac.priv.userStat);
- structVal["user_conf"] = xmlrpc_c::value_boolean(ac.priv.userConf);
- structVal["user_cash"] = xmlrpc_c::value_boolean(ac.priv.userCash);
- structVal["user_passwd"] = xmlrpc_c::value_boolean(ac.priv.userPasswd);
- structVal["user_add_del"] = xmlrpc_c::value_boolean(ac.priv.userAddDel);
- structVal["admin_chg"] = xmlrpc_c::value_boolean(ac.priv.adminChg);
- structVal["tariff_chg"] = xmlrpc_c::value_boolean(ac.priv.tariffChg);
-
- retval.push_back(xmlrpc_c::value_struct(structVal));
- }
+ const std::map<std::string, xmlrpc_c::value> structVal{
+ {"result", xmlrpc_c::value_boolean(true)},
+ {"login", xmlrpc_c::value_string(admin.login())},
+ {"password", xmlrpc_c::value_string(admin.password())},
+ {"user_stat", xmlrpc_c::value_boolean(admin.priv().userStat)},
+ {"user_conf", xmlrpc_c::value_boolean(admin.priv().userConf)},
+ {"user_cash", xmlrpc_c::value_boolean(admin.priv().userCash)},
+ {"user_passwd", xmlrpc_c::value_boolean(admin.priv().userPasswd)},
+ {"user_add_del", xmlrpc_c::value_boolean(admin.priv().userAddDel)},
+ {"admin_chg", xmlrpc_c::value_boolean(admin.priv().adminChg)},
+ {"tariff_chg", xmlrpc_c::value_boolean(admin.priv().tariffChg)}
+ };
+ retval.push_back(xmlrpc_c::value_struct(structVal));
+ });