summaryrefslogtreecommitdiff
path: root/server/src/queryhandler.h
diff options
context:
space:
mode:
authordeva <deva>2008-05-15 14:19:02 +0000
committerdeva <deva>2008-05-15 14:19:02 +0000
commit63d7e433f104dd13d015df3a048697fad6d43a55 (patch)
tree4dedec10891f4e9866ba5b3f9bfcd136cc0c7e16 /server/src/queryhandler.h
parentdd744c562f2f755a9fcd9ee5341c8c8702a9ee32 (diff)
Added a lot of testcode... and fixed a lot of minor error (-Wall -Werror)
Diffstat (limited to 'server/src/queryhandler.h')
-rw-r--r--server/src/queryhandler.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/server/src/queryhandler.h b/server/src/queryhandler.h
index 2de62ae..14e97c2 100644
--- a/server/src/queryhandler.h
+++ b/server/src/queryhandler.h
@@ -27,20 +27,41 @@
#ifndef __PRACRO_QUERYHANDLER_H__
#define __PRACRO_QUERYHANDLER_H__
-class Query {};
+#include "tcpsocket.h"
+
+#include <vector>
+#include <string>
+
+/**
+ * Query specific values. This is the in-memory representation of a query transaction.
+ */
+class Query {
+public:
+ Query(std::string id, std::string type) :
+ device_id(id), device_type(type) {}
+ std::string device_id;
+ std::string device_type;
+};
+
/**
* This class handles the query of external data.
*/
class QueryHandler {
public:
- QueryHandler();
+ QueryHandler(TCPSocket *socket, std::string cpr);
// Add a query to the query queue
- void addQuery(Query &query) {}
+ void addQuery(Query &query);
+
+ // Execute all queries.
+ std::string exec();
+
+private:
+ TCPSocket *socket;
+ std::string cpr;
- // Execute all queries in parallel, for speed improv.
- void exec() {}
+ std::vector< Query > queries;
};
#endif/*__PRACRO_QUERYHANDLER_H__*/