]> git.tdb.fi Git - r2c2.git/blobdiff - source/libmarklin/command.h
Initial revision
[r2c2.git] / source / libmarklin / command.h
diff --git a/source/libmarklin/command.h b/source/libmarklin/command.h
new file mode 100644 (file)
index 0000000..2106d23
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef COMMAND_H_
+#define COMMAND_H_
+
+#include <string>
+#include <sigc++/sigc++.h>
+#include "constants.h"
+
+namespace Marklin {
+
+class Command
+{
+public:
+       sigc::signal<void, Error, const std::string &> signal_done;
+
+       Command(const std::string &c): cmd(c), sent(false) { }
+       void              set_sent(bool s)     { sent=s; }
+       const std::string &get_command() const { return cmd; }
+       bool              get_sent() const     { return sent; }
+private:
+       std::string cmd;
+       bool        sent;
+};
+
+} // namespace Marklin
+
+#endif