[Mammoth] Move ipc calls to separate folder mammoth.
This commit is contained in:
parent
19e394ae7b
commit
ad5b55bf37
19 changed files with 21 additions and 27 deletions
24
lib/mammoth/ipc/port_server.h
Normal file
24
lib/mammoth/ipc/port_server.h
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <glacier/status/error_or.h>
|
||||
#include <ztypes.h>
|
||||
|
||||
#include "mammoth/ipc/port_client.h"
|
||||
|
||||
class PortServer {
|
||||
public:
|
||||
static glcr::ErrorOr<PortServer> Create();
|
||||
static PortServer AdoptCap(z_cap_t cap);
|
||||
|
||||
glcr::ErrorOr<PortClient> CreateClient();
|
||||
|
||||
glcr::ErrorCode RecvCap(uint64_t* num_bytes, char* msg, uint64_t* cap);
|
||||
glcr::ErrorCode PollForIntCap(uint64_t* msg, uint64_t* cap);
|
||||
|
||||
z_cap_t cap() { return port_cap_; }
|
||||
|
||||
private:
|
||||
z_cap_t port_cap_;
|
||||
|
||||
PortServer(z_cap_t cap);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue