#pragma once #include #include #include #include #include "GnsProject.hpp" namespace gns { /** * Represent a GNS3 server * Wrapper around the GNS3 API (https://gns3-server.readthedocs.io/en/latest/endpoints.html) */ class GnsServer { public: GnsServer(const std::string& host, std::uint16_t port); /** * Get the base prefix for an API request * @return the base prefix for an API request */ [[nodiscard]] std::string getApiBase() const; /** * Get all the projects in the server * @return all the projects in the server */ [[nodiscard]] std::vector> getProjects() const; /** * Get all the nodes in the server * @return all the nodes in the server */ [[nodiscard]] std::vector> getNodes() const; private: std::string host; std::uint16_t port; }; }