summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c7f952b)
Conflicts:
stglibs/srvconf.lib/parsers/chg_tariff.cpp
stglibs/srvconf.lib/parsers/get_tariff.cpp
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
td.dirPrice[0].noDiscount = 0;
TARIFF_IMPL tariff(td);
td.dirPrice[0].noDiscount = 0;
TARIFF_IMPL tariff(td);
- ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TRAFF_UP);
+ ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TARIFF::TRAFF_UP);
ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for UP", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for UP", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for UP", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for UP", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(1, 5) = 1 for UP", tariff.GetTraffByType(1, 5), 1);
ensure_equals("traffByType(0, 6) = 0 for UP", tariff.GetTraffByType(0, 6), 0);
ensure_equals("traffByType(1, 5) = 1 for UP", tariff.GetTraffByType(1, 5), 1);
ensure_equals("traffByType(0, 6) = 0 for UP", tariff.GetTraffByType(0, 6), 0);
- td.tariffConf.traffType = TRAFF_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_DOWN;
- ensure("traffType = TRAFF_DOWN", tariff.GetTraffType() == TRAFF_DOWN);
+ ensure("traffType = TRAFF_DOWN", tariff.GetTraffType() == TARIFF::TRAFF_DOWN);
ensure_equals("traffByType(6, 0) = 0 for DOWN", tariff.GetTraffByType(6, 0), 0);
ensure_equals("traffByType(5, 1) = 1 for DOWN", tariff.GetTraffByType(5, 1), 1);
ensure_equals("traffByType(4, 2) = 2 for DOWN", tariff.GetTraffByType(4, 2), 2);
ensure_equals("traffByType(6, 0) = 0 for DOWN", tariff.GetTraffByType(6, 0), 0);
ensure_equals("traffByType(5, 1) = 1 for DOWN", tariff.GetTraffByType(5, 1), 1);
ensure_equals("traffByType(4, 2) = 2 for DOWN", tariff.GetTraffByType(4, 2), 2);
ensure_equals("traffByType(1, 5) = 5 for DOWN", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for DOWN", tariff.GetTraffByType(0, 6), 6);
ensure_equals("traffByType(1, 5) = 5 for DOWN", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for DOWN", tariff.GetTraffByType(0, 6), 6);
- td.tariffConf.traffType = TRAFF_MAX;
+ td.tariffConf.traffType = TARIFF::TRAFF_MAX;
- ensure("traffType = TRAFF_MAX", tariff.GetTraffType() == TRAFF_MAX);
+ ensure("traffType = TRAFF_MAX", tariff.GetTraffType() == TARIFF::TRAFF_MAX);
ensure_equals("traffByType(6, 0) = 6 for MAX", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for MAX", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for MAX", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(6, 0) = 6 for MAX", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for MAX", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for MAX", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(1, 5) = 5 for MAX", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for MAX", tariff.GetTraffByType(0, 6), 6);
ensure_equals("traffByType(1, 5) = 5 for MAX", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for MAX", tariff.GetTraffByType(0, 6), 6);
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
- ensure("traffType = TRAFF_UP_DOWN", tariff.GetTraffType() == TRAFF_UP_DOWN);
+ ensure("traffType = TRAFF_UP_DOWN", tariff.GetTraffType() == TARIFF::TRAFF_UP_DOWN);
ensure_equals("traffByType(6, 0) = 6 for UP_DOWN", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 6 for UP_DOWN", tariff.GetTraffByType(5, 1), 6);
ensure_equals("traffByType(4, 2) = 6 for UP_DOWN", tariff.GetTraffByType(4, 2), 6);
ensure_equals("traffByType(6, 0) = 6 for UP_DOWN", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 6 for UP_DOWN", tariff.GetTraffByType(5, 1), 6);
ensure_equals("traffByType(4, 2) = 6 for UP_DOWN", tariff.GetTraffByType(4, 2), 6);
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 9;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
td.dirPrice[0].noDiscount = 0;
TARIFF_IMPL tariff(td);
td.dirPrice[0].noDiscount = 0;
TARIFF_IMPL tariff(td);
- ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TRAFF_UP);
+ ensure("traffType = TRAFF_UP", tariff.GetTraffType() == TARIFF::TRAFF_UP);
ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for UP", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for UP", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(6, 0) = 6 for UP", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for UP", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for UP", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(1, 5) = 1 for UP", tariff.GetTraffByType(1, 5), 1);
ensure_equals("traffByType(0, 6) = 0 for UP", tariff.GetTraffByType(0, 6), 0);
ensure_equals("traffByType(1, 5) = 1 for UP", tariff.GetTraffByType(1, 5), 1);
ensure_equals("traffByType(0, 6) = 0 for UP", tariff.GetTraffByType(0, 6), 0);
- td.tariffConf.traffType = TRAFF_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_DOWN;
- ensure("traffType = TRAFF_DOWN", tariff.GetTraffType() == TRAFF_DOWN);
+ ensure("traffType = TRAFF_DOWN", tariff.GetTraffType() == TARIFF::TRAFF_DOWN);
ensure_equals("traffByType(6, 0) = 0 for DOWN", tariff.GetTraffByType(6, 0), 0);
ensure_equals("traffByType(5, 1) = 1 for DOWN", tariff.GetTraffByType(5, 1), 1);
ensure_equals("traffByType(4, 2) = 2 for DOWN", tariff.GetTraffByType(4, 2), 2);
ensure_equals("traffByType(6, 0) = 0 for DOWN", tariff.GetTraffByType(6, 0), 0);
ensure_equals("traffByType(5, 1) = 1 for DOWN", tariff.GetTraffByType(5, 1), 1);
ensure_equals("traffByType(4, 2) = 2 for DOWN", tariff.GetTraffByType(4, 2), 2);
ensure_equals("traffByType(1, 5) = 5 for DOWN", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for DOWN", tariff.GetTraffByType(0, 6), 6);
ensure_equals("traffByType(1, 5) = 5 for DOWN", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for DOWN", tariff.GetTraffByType(0, 6), 6);
- td.tariffConf.traffType = TRAFF_MAX;
+ td.tariffConf.traffType = TARIFF::TRAFF_MAX;
- ensure("traffType = TRAFF_MAX", tariff.GetTraffType() == TRAFF_MAX);
+ ensure("traffType = TRAFF_MAX", tariff.GetTraffType() == TARIFF::TRAFF_MAX);
ensure_equals("traffByType(6, 0) = 6 for MAX", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for MAX", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for MAX", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(6, 0) = 6 for MAX", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 5 for MAX", tariff.GetTraffByType(5, 1), 5);
ensure_equals("traffByType(4, 2) = 4 for MAX", tariff.GetTraffByType(4, 2), 4);
ensure_equals("traffByType(1, 5) = 5 for MAX", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for MAX", tariff.GetTraffByType(0, 6), 6);
ensure_equals("traffByType(1, 5) = 5 for MAX", tariff.GetTraffByType(1, 5), 5);
ensure_equals("traffByType(0, 6) = 6 for MAX", tariff.GetTraffByType(0, 6), 6);
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
- ensure("traffType = TRAFF_UP_DOWN", tariff.GetTraffType() == TRAFF_UP_DOWN);
+ ensure("traffType = TRAFF_UP_DOWN", tariff.GetTraffType() == TARIFF::TRAFF_UP_DOWN);
ensure_equals("traffByType(6, 0) = 6 for UP_DOWN", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 6 for UP_DOWN", tariff.GetTraffByType(5, 1), 6);
ensure_equals("traffByType(4, 2) = 6 for UP_DOWN", tariff.GetTraffByType(4, 2), 6);
ensure_equals("traffByType(6, 0) = 6 for UP_DOWN", tariff.GetTraffByType(6, 0), 6);
ensure_equals("traffByType(5, 1) = 6 for UP_DOWN", tariff.GetTraffByType(5, 1), 6);
ensure_equals("traffByType(4, 2) = 6 for UP_DOWN", tariff.GetTraffByType(4, 2), 6);
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
TARIFF_DATA td("test");
td.tariffConf.fee = 1;
td.tariffConf.free = 2;
- td.tariffConf.traffType = TRAFF_UP_DOWN;
+ td.tariffConf.traffType = TARIFF::TRAFF_UP_DOWN;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
td.tariffConf.passiveCost = 4;
td.dirPrice[0].mDay = 30;
td.dirPrice[0].hDay = 21;
void AddNotifierDel(NOTIFIER_BASE<TARIFF_DATA> *) {}
void DelNotifierDel(NOTIFIER_BASE<TARIFF_DATA> *) {}
void AddNotifierDel(NOTIFIER_BASE<TARIFF_DATA> *) {}
void DelNotifierDel(NOTIFIER_BASE<TARIFF_DATA> *) {}
- void GetTariffsData(std::list<TARIFF_DATA> * /*tdl*/) {}
+ void GetTariffsData(std::list<TARIFF_DATA> * /*tdl*/) const {}
size_t Count() const { return 0; }
size_t Count() const { return 0; }
{ return -1; }
bool IsIPInIndex(uint32_t /*ip*/) const { return false; }
bool IsIPInUse(uint32_t, const std::string &, CONST_USER_PTR *) const { return false; }
{ return -1; }
bool IsIPInIndex(uint32_t /*ip*/) const { return false; }
bool IsIPInUse(uint32_t, const std::string &, CONST_USER_PTR *) const { return false; }
+ bool Exists(const std::string &) const { return false; }
int OpenSearch() { return 0; }
int SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }
int OpenSearch() { return 0; }
int SearchNext(int /*handle*/, USER_PTR * /*u*/) { return -1; }