summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f3c345c)
structVal["changePolicyTimeout"] element added in GetTariffInfo().
data.tariffConf.changePolicyTimeout getting added in SetTariffInfo().
#include <ostream> // xmlrpc-c devs have missed something :)
#include "tariff_helper.h"
#include <ostream> // xmlrpc-c devs have missed something :)
#include "tariff_helper.h"
void TARIFF_HELPER::GetTariffInfo(xmlrpc_c::value * info) const
{
void TARIFF_HELPER::GetTariffInfo(xmlrpc_c::value * info) const
{
structVal["traffType"] = xmlrpc_c::value_int(data.tariffConf.traffType);
structVal["period"] = xmlrpc_c::value_string(TARIFF::PeriodToString(data.tariffConf.period));
structVal["changePolicy"] = xmlrpc_c::value_string(TARIFF::ChangePolicyToString(data.tariffConf.changePolicy));
structVal["traffType"] = xmlrpc_c::value_int(data.tariffConf.traffType);
structVal["period"] = xmlrpc_c::value_string(TARIFF::PeriodToString(data.tariffConf.period));
structVal["changePolicy"] = xmlrpc_c::value_string(TARIFF::ChangePolicyToString(data.tariffConf.changePolicy));
+structVal["changePolicyTimeout"] = xmlrpc_c::value_string(formatTime(data.tariffConf.changePolicyTimeout));
std::vector<xmlrpc_c::value> prices(DIR_NUM);
std::vector<xmlrpc_c::value> prices(DIR_NUM);
data.tariffConf.changePolicy = TARIFF::StringToChangePolicy(xmlrpc_c::value_string(it->second));
}
data.tariffConf.changePolicy = TARIFF::StringToChangePolicy(xmlrpc_c::value_string(it->second));
}
+if ((it = structVal.find("changePolicyTimeout")) != structVal.end())
+ {
+ data.tariffConf.changePolicyTimeout = readTime(xmlrpc_c::value_string(it->second));
+ }
+
if ((it = structVal.find("dirprices")) != structVal.end())
{
std::vector<xmlrpc_c::value> prices(
if ((it = structVal.find("dirprices")) != structVal.end())
{
std::vector<xmlrpc_c::value> prices(