From c96a2e557f0a9322c9369a06041e894cc2f11e93 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 18 Jan 2010 14:27:41 +0000 Subject: Make use of libartefact. Not yet tested... --- server/src/queryhandlerpentominos.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'server/src/queryhandlerpentominos.cc') diff --git a/server/src/queryhandlerpentominos.cc b/server/src/queryhandlerpentominos.cc index 4abf5da..b67f731 100644 --- a/server/src/queryhandlerpentominos.cc +++ b/server/src/queryhandlerpentominos.cc @@ -66,7 +66,7 @@ typedef struct { } UID; #define SIOCGIFCONF 0x8912 // get iface list - +/* static in_addr_t getIP(const char *interface) { in_addr_t ret = 0; @@ -116,6 +116,7 @@ static unsigned short getCounter() return counter++; } + static UID uid = {0,0,0,0}; static std::string getUID(const char *interface) { @@ -133,16 +134,22 @@ static std::string getUID(const char *interface) sprintf(buf, "%08x%08x%04x%04x", uid.ip, (unsigned int)uid.time, uid.pid, uid.count); return std::string(buf); } +*/ - -QueryHandlerPentominos::QueryHandlerPentominos(Artefact &atf, std::string cpr) +QueryHandlerPentominos::QueryHandlerPentominos(Artefact &atf, + std::string patientid, + std::string user) : QueryHandler(), artefact(atf) { - this->cpr = cpr; + this->patientid = patientid; + this->user = user; } QueryResult QueryHandlerPentominos::exec(Query &query) { + return artefact.exec(query, patientid, user); + +#if 0 time_t timestamp = time(NULL); std::string uid = getUID("eth0"); @@ -225,6 +232,8 @@ QueryResult QueryHandlerPentominos::exec(Query &query) result.print(); return result; +#endif + return QueryResult(); } #ifdef TEST_QUERYHANDLERPENTOMINOS -- cgit v1.2.3