]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fetch_needs_update.h
GroupScreen now checks the "last updated" information.
[ccbs] / bigscreen / fetch_needs_update.h
diff --git a/bigscreen/fetch_needs_update.h b/bigscreen/fetch_needs_update.h
new file mode 100644 (file)
index 0000000..6f101d8
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef _FETCH_NEEDS_UPDATE_H
+#define _FETCH_NEEDS_UPDATE_H 1
+
+#include <pqxx/transactor>
+#include <time.h>
+#include <sys/time.h>
+
+/* A transactor that fetches when a given round was last updated. */
+class FetchNeedsUpdate : public pqxx::transactor<> {
+private:
+       struct timeval last_updated;
+       unsigned tournament, round, parallel;
+       bool *result;
+
+public:
+       FetchNeedsUpdate(struct timeval last_updated, unsigned tournament, unsigned round, unsigned parallel, bool *result);
+       void operator() (pqxx::transaction<> &t);
+};
+
+#endif /* !defined(_FETCH_NEEDS_UPDATE_H) */