#pragma once

#include <string>
#include <nan.h>

#include "handler.h"

class Hypervisor : public Nan::ObjectWrap {
 public:
  static void Init(v8::Local<v8::Object>);

 private:
  explicit Hypervisor();
  ~Hypervisor();

  static Nan::Persistent<v8::Function> constructor;
  static void New(const Nan::FunctionCallbackInfo<v8::Value>& info);

  static void Connect(const Nan::FunctionCallbackInfo<v8::Value>& info);
  static void Disconnect(const Nan::FunctionCallbackInfo<v8::Value>& info);
  static void StartByName(const Nan::FunctionCallbackInfo<v8::Value>& info);
  static void ShutdownByName(const Nan::FunctionCallbackInfo<v8::Value>& info);
  static void DeleteByName(const Nan::FunctionCallbackInfo<v8::Value>& info);

  static void GetAllDomains(const Nan::FunctionCallbackInfo<v8::Value>& info);
  static void GetDomainByName(const Nan::FunctionCallbackInfo<v8::Value>& info);

  Handler _handler;
};
