]> git.tdb.fi Git - r2c2.git/blobdiff - source/remote/remote.h
Add networking library and a remote control program
[r2c2.git] / source / remote / remote.h
diff --git a/source/remote/remote.h b/source/remote/remote.h
new file mode 100644 (file)
index 0000000..4599a13
--- /dev/null
@@ -0,0 +1,37 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2009  Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
+#ifndef REMOTE_H_
+#define REMOTE_H_
+
+#include <gtkmm/main.h>
+#include <gtkmm/window.h>
+#include <gtkmm/box.h>
+#include <msp/core/application.h>
+#include "network/client.h"
+
+class Remote: public Msp::Application
+{
+private:
+       Msp::IO::EventDispatcher event_disp;
+       Marklin::Catalogue catalogue;
+       Marklin::Client client;
+       Gtk::Main gtk;
+       Gtk::Window window;
+       Gtk::Box *train_box;
+
+       static Msp::Application::RegApp<Remote> reg;
+
+public:
+       Remote(int argc, char **argv);
+private:
+       void tick();
+
+       void train_added(Marklin::NetTrain &);
+};
+
+#endif