summaryrefslogtreecommitdiff
path: root/src/vm.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2024-03-28 16:18:36 -0400
committerYour Name <you@example.com>2024-03-28 16:18:36 -0400
commitc644379e79262a7478a7fb9ea8001f315fdb6eaf (patch)
treed71b15e396ebca28b76f0b5fd1971dd352877e4e /src/vm.h
downloadnerdhack-c644379e79262a7478a7fb9ea8001f315fdb6eaf.tar.gz
nerdhack-c644379e79262a7478a7fb9ea8001f315fdb6eaf.tar.bz2
nerdhack-c644379e79262a7478a7fb9ea8001f315fdb6eaf.zip
Initial commitHEADmaster
Diffstat (limited to 'src/vm.h')
-rw-r--r--src/vm.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/vm.h b/src/vm.h
new file mode 100644
index 0000000..a959511
--- /dev/null
+++ b/src/vm.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <libvirt/libvirt.h>
+#include <memory>
+#include <functional>
+
+namespace vm {
+ struct vmImpl;
+
+ void clearAllVMs();
+
+ class VM {
+ public:
+ VM();
+ ~VM();
+
+ int start(std::string config);
+ void stop();
+
+ void connect(std::function<int(const char*,size_t)> receiver, std::function<int(char*,size_t)> sender);
+
+ private:
+ std::shared_ptr<vmImpl> data;
+ };
+
+}