summaryrefslogtreecommitdiff
path: root/src/vm.h
blob: a959511d450fdf1e73c752d3845787d8ec467c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
    };

}