[mammoth] Update EndpointServer to have move-only semantics.

This commit is contained in:
Drew Galbraith 2023-06-26 11:38:17 -07:00
parent 16c30d12fb
commit 2e89aee5a3
8 changed files with 40 additions and 29 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <glacier/memory/unique_ptr.h>
#include <glacier/status/error_or.h>
#include <ztypes.h>
@ -7,8 +8,12 @@
class EndpointServer {
public:
static glcr::ErrorOr<EndpointServer> Create();
static EndpointServer Adopt(z_cap_t endpoint_cap);
EndpointServer() = delete;
EndpointServer(const EndpointServer&) = delete;
EndpointServer& operator=(const EndpointServer&) = delete;
static glcr::ErrorOr<glcr::UniquePtr<EndpointServer>> Create();
static glcr::UniquePtr<EndpointServer> Adopt(z_cap_t endpoint_cap);
glcr::ErrorOr<EndpointClient> CreateClient();