+ std::string param;
+ for (int i = 0; i < DIR_NUM; i++)
+ {
+ strprintf(¶m, "PriceDayA%d", i);
+ cf.WriteDouble(param, td.dirPrice[i].priceDayA * pt_mega);
+
+ strprintf(¶m, "PriceDayB%d", i);
+ cf.WriteDouble(param, td.dirPrice[i].priceDayB * pt_mega);
+
+ strprintf(¶m, "PriceNightA%d", i);
+ cf.WriteDouble(param, td.dirPrice[i].priceNightA * pt_mega);
+
+ strprintf(¶m, "PriceNightB%d", i);
+ cf.WriteDouble(param, td.dirPrice[i].priceNightB * pt_mega);
+
+ strprintf(¶m, "Threshold%d", i);
+ cf.WriteInt(param, td.dirPrice[i].threshold);
+
+ std::string s;
+ strprintf(¶m, "Time%d", i);
+
+ strprintf(&s, "%0d:%0d-%0d:%0d",
+ td.dirPrice[i].hDay,
+ td.dirPrice[i].mDay,
+ td.dirPrice[i].hNight,
+ td.dirPrice[i].mNight);
+
+ cf.WriteString(param, s);
+
+ strprintf(¶m, "NoDiscount%d", i);
+ cf.WriteInt(param, td.dirPrice[i].noDiscount);
+
+ strprintf(¶m, "SinglePrice%d", i);
+ cf.WriteInt(param, td.dirPrice[i].singlePrice);
+ }
+
+ cf.WriteDouble("PassiveCost", td.tariffConf.passiveCost);
+ cf.WriteDouble("Fee", td.tariffConf.fee);
+ cf.WriteDouble("Free", td.tariffConf.free);
+ cf.WriteString("TraffType", TARIFF::TraffTypeToString(td.tariffConf.traffType));
+ cf.WriteString("Period", TARIFF::PeriodToString(td.tariffConf.period));
+ cf.WriteString("ChangePolicy", TARIFF::ChangePolicyToString(td.tariffConf.changePolicy));
+ cf.WriteTime("ChangePolicyTimeout", td.tariffConf.changePolicyTimeout);
+ }
+
+return 0;
+}
+//-----------------------------------------------------------------------------*/
+int FILES_STORE::AddService(const std::string & name) const
+{
+std::string fileName;
+strprintf(&fileName, "%s/%s.serv", storeSettings.GetServicesDir().c_str(), name.c_str());
+
+if (Touch(fileName))