]> git.sesse.net Git - ccbs/blobdiff - bigscreen/fetch_current_tournament.h
Move Tournament and FetchCurrentTournament into its own file.
[ccbs] / bigscreen / fetch_current_tournament.h
diff --git a/bigscreen/fetch_current_tournament.h b/bigscreen/fetch_current_tournament.h
new file mode 100644 (file)
index 0000000..4700871
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef _FETCH_CURRENT_TOURNAMENT_H
+#define _FETCH_CURRENT_TOURNAMENT_H 1
+
+#include <pqxx/transactor>
+#include "widestring.h"
+
+class Tournament {
+public:
+       int id;
+       widestring name;
+};
+
+/* A transactor that fetches the current tournament and some information about it. */
+class FetchCurrentTournament : public pqxx::transactor<> {
+private:
+       Tournament *tourn;
+
+public:
+       FetchCurrentTournament(Tournament *tourn);
+       void operator() (pqxx::transaction<> &t);
+};
+
+#endif /* !defined(_FETCH_CURRENT_TOURNAMENT_H) */