[Yellowstone] Move yellowstone yunq to namespace "yellowstone"

This commit is contained in:
Drew Galbraith 2023-11-30 08:50:43 -08:00
parent f1e09b2ae6
commit 6212aef336
40 changed files with 141 additions and 16 deletions

View file

@ -1,3 +1,5 @@
package yellowstone;
interface Yellowstone {
method RegisterEndpoint(RegisterEndpointRequest) -> ();
method GetEndpoint(GetEndpointRequest) -> (Endpoint);

View file

@ -7,6 +7,9 @@
#include <zcall.h>
namespace yellowstone {
YellowstoneClient::~YellowstoneClient() {
if (endpoint_ != 0) {
@ -208,3 +211,7 @@ glcr::ErrorCode YellowstoneClient::GetDenali(DenaliInfo& response) {
}
} // namepace yellowstone

View file

@ -8,6 +8,9 @@
#include "yellowstone.yunq.h"
namespace yellowstone {
class YellowstoneClient {
public:
YellowstoneClient(z_cap_t Yellowstone_cap) : endpoint_(Yellowstone_cap) {}
@ -45,3 +48,6 @@ class YellowstoneClient {
uint64_t kCapBufferSize = 0x10;
glcr::CapBuffer cap_buffer_{kCapBufferSize};
};
} // namepace yellowstone

View file

@ -1,6 +1,9 @@
// Generated file -- DO NOT MODIFY.
#include "yellowstone.yunq.h"
namespace yellowstone {
namespace {
const uint64_t header_size = 24; // 4x uint32, 1x uint64
@ -426,4 +429,7 @@ uint64_t DenaliInfo::SerializeToBytes(glcr::ByteBuffer& bytes, uint64_t offset,
WriteHeader(bytes, offset, core_size, next_extension);
return next_extension;
}
}
} // namepace yellowstone

View file

@ -6,6 +6,10 @@
#include <glacier/container/vector.h>
#include <glacier/string/string.h>
#include <ztypes.h>
namespace yellowstone {
class RegisterEndpointRequest {
public:
RegisterEndpointRequest() {}
@ -170,4 +174,7 @@ class DenaliInfo {
// Parses everything except for caps.
void ParseFromBytesInternal(const glcr::ByteBuffer&, uint64_t offset);
};
};
} // namepace yellowstone

View file

@ -4,6 +4,9 @@
#include <mammoth/util/debug.h>
#include <zcall.h>
namespace yellowstone {
namespace {
const uint32_t kSentinel = 0xBEEFDEAD;
@ -193,3 +196,7 @@ glcr::ErrorCode YellowstoneServerBase::HandleRequest(const glcr::ByteBuffer& req
}
return glcr::OK;
}
} // namepace yellowstone

View file

@ -9,6 +9,10 @@
#include "yellowstone.yunq.client.h"
namespace yellowstone {
class YellowstoneServerBase {
public:
@ -55,3 +59,7 @@ class YellowstoneServerBase {
glcr::CapBuffer& resp_caps);
};
} // namepace yellowstone