28 lines
		
	
	
		
			512 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			512 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#pragma once
 | 
						|
 | 
						|
#include <string>
 | 
						|
#include <map>
 | 
						|
#include <cstdint>
 | 
						|
 | 
						|
#include "vfs.h"
 | 
						|
 | 
						|
 | 
						|
class Machine {
 | 
						|
public:
 | 
						|
  Machine(uint32_t id, std::string hostname) :
 | 
						|
      id(id),
 | 
						|
      hostname(std::move(hostname)),
 | 
						|
      vfs_root(nullptr),
 | 
						|
      is_vfs_a_copy(false) {}
 | 
						|
 | 
						|
  ~Machine(void); /* Clean up VFS tree. */
 | 
						|
 | 
						|
  uint32_t id;
 | 
						|
  std::string hostname;
 | 
						|
  vfs_node* vfs_root;
 | 
						|
  std::map<int, std::string> services;
 | 
						|
  bool is_vfs_a_copy; /* Flag for CoW mechanism. */
 | 
						|
 | 
						|
  /* TODO: We'll add hardware and sh.t here. */
 | 
						|
};
 |