#include "python.h" #include "config.h" #include "common.h" #include "db.h" #include "epgservice.h" cDbTable* eventsDb = 0; cDbConnection* connection = 0; const char* logPrefix = ""; //*************************************************************************** // Init / Exit //*************************************************************************** void initConnection() { cDbConnection::init(); cDbConnection::setEncoding("utf8"); cDbConnection::setHost("localhost"); cDbConnection::setPort(3306); cDbConnection::setName("epg2vdr"); cDbConnection::setUser("epg2vdr"); cDbConnection::setPass("epg"); cDbConnection::setConfPath("/etc/epgd/"); connection = new cDbConnection(); } void exitConnection() { cDbConnection::exit(); if (connection) delete connection; } int init() { eventsDb = new cDbTable(connection, "useevents"); if (eventsDb->open() != success) return fail; return success; } int exit() { delete eventsDb; return done; } //*************************************************************************** // Main //*************************************************************************** int main(int argc, char** argv) { cEpgConfig::logstdout = yes; cEpgConfig::loglevel = 0; int namingmode = tnmAuto; const char* tmplExpression = ""; if (argc < 4) { tell(0, "Usage: pytst [] [