-#include "rpcconfig.h"
+#include <ostream> // xmlrpc-c devs have missed something :)
+
#include "tariffs_methods.h"
+#include "rpcconfig.h"
#include "tariff_helper.h"
-#include "tariffs.h"
-#include "users.h"
-#include "admins.h"
-#include "admin.h"
+#include "stg/tariffs.h"
+#include "stg/users.h"
+#include "stg/admins.h"
+#include "stg/admin.h"
void METHOD_TARIFF_GET::execute(xmlrpc_c::paramList const & paramList,
xmlrpc_c::value * const retvalPtr)
return;
}
-TARIFF_DATA td;
-
-tariff->GetTariffData(&td);
+TARIFF_DATA td(tariff->GetTariffData());
TARIFF_HELPER helper(td);
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
return;
}
-TARIFF_DATA td;
-
-tariff->GetTariffData(&td);
+TARIFF_DATA td(tariff->GetTariffData());
TARIFF_HELPER helper(td);
{
std::string cookie = paramList.getString(0);
std::string tariff = paramList.getString(1);
-std::string enc;
paramList.verifyEnd(2);
ADMIN_INFO adminInfo;
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;
return;
}
-ADMIN admin;
+ADMIN * admin;
-if (admins->FindAdmin(adminInfo.admin, &admin))
+if (admins->Find(adminInfo.admin, &admin))
{
*retvalPtr = xmlrpc_c::value_boolean(false);
return;