]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fetch_list_of_active_groups.h
Fetch the list of current active rounds and display it.
[ccbs] / bigscreen / fetch_list_of_active_groups.h
diff --git a/bigscreen/fetch_list_of_active_groups.h b/bigscreen/fetch_list_of_active_groups.h
new file mode 100644 (file)
index 0000000..113160d
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef _FETCH_LIST_OF_ACTIVE_GROUPS_H
+#define _FETCH_LIST_OF_ACTIVE_GROUPS_H 1
+
+#include <pqxx/transactor>
+#include <vector>
+
+struct Group {
+       unsigned tournament, round, parallel;
+};
+
+/* A transactor that fetches the current list of active groups. */
+class FetchListOfActiveGroups : public pqxx::transactor<> {
+private:
+       std::vector<Group> *active;
+
+public:
+       FetchListOfActiveGroups(std::vector<Group> *active);
+       void operator() (pqxx::transaction<> &t);
+};
+
+#endif /* !defined(_FETCH_LIST_OF_ACTIVE_GROUPS_H) */