aboutsummaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/command.h b/include/command.h
new file mode 100644
index 0000000..6a3e8b4
--- /dev/null
+++ b/include/command.h
@@ -0,0 +1,26 @@
+#ifndef COMMAND_H
+#define COMMAND_H
+#include <string>
+#include "command_id.h"
+#include "cxx_semantics.h"
+
+namespace nitrokey {
+namespace proto {
+
+template <CommandID cmd_id>
+class Command : semantics::non_constructible {
+public:
+ constexpr static CommandID command_id() {
+ return cmd_id;
+ }
+
+ template<typename T>
+ static std::string dissect(const T &) {
+ return std::string("Payload dissection is unavailable");
+ }
+};
+
+}
+}
+
+#endif