Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
271 changes: 271 additions & 0 deletions protocol/cpp/include/solarxr_protocol/generated/all_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,18 @@ struct ModelSettingsBuilder;

} // namespace settings

struct Keybind;
struct KeybindBuilder;

struct KeybindRequest;
struct KeybindRequestBuilder;

struct KeybindResponse;
struct KeybindResponseBuilder;

struct ChangeKeybindRequest;
struct ChangeKeybindRequestBuilder;

struct RpcMessageHeader;
struct RpcMessageHeaderBuilder;

Expand Down Expand Up @@ -1894,6 +1906,45 @@ template<> struct RpcMessageTraits<solarxr_protocol::rpc::InstalledInfoResponse>
bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type);
bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<RpcMessage> *types);

enum class KeybindName : uint8_t {
FULL_RESET = 0,
YAW_RESET = 1,
MOUNTING_RESET = 2,
PAUSE_TRACKING = 3,
FEET_MOUNTING_RESET = 4,
MIN = FULL_RESET,
MAX = FEET_MOUNTING_RESET
};

inline const KeybindName (&EnumValuesKeybindName())[5] {
static const KeybindName values[] = {
KeybindName::FULL_RESET,
KeybindName::YAW_RESET,
KeybindName::MOUNTING_RESET,
KeybindName::PAUSE_TRACKING,
KeybindName::FEET_MOUNTING_RESET
};
return values;
}

inline const char * const *EnumNamesKeybindName() {
static const char * const names[6] = {
"FULL_RESET",
"YAW_RESET",
"MOUNTING_RESET",
"PAUSE_TRACKING",
"FEET_MOUNTING_RESET",
nullptr
};
return names;
}

inline const char *EnumNameKeybindName(KeybindName e) {
if (flatbuffers::IsOutRange(e, KeybindName::FULL_RESET, KeybindName::FEET_MOUNTING_RESET)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesKeybindName()[index];
}

enum class ResetType : uint8_t {
Yaw = 0,
Full = 1,
Expand Down Expand Up @@ -5830,6 +5881,226 @@ inline flatbuffers::Offset<ModelSettings> CreateModelSettings(

} // namespace settings

struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef KeybindBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_KEYBIND_NAME = 4,
VT_KEYBIND_VALUE = 6,
VT_KEYBIND_DELAY = 8
};
solarxr_protocol::rpc::KeybindName keybind_name() const {
return static_cast<solarxr_protocol::rpc::KeybindName>(GetField<uint8_t>(VT_KEYBIND_NAME, 0));
}
const flatbuffers::String *keybind_value() const {
return GetPointer<const flatbuffers::String *>(VT_KEYBIND_VALUE);
}
float keybind_delay() const {
return GetField<float>(VT_KEYBIND_DELAY, 0.0f);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint8_t>(verifier, VT_KEYBIND_NAME, 1) &&
VerifyOffset(verifier, VT_KEYBIND_VALUE) &&
verifier.VerifyString(keybind_value()) &&
VerifyField<float>(verifier, VT_KEYBIND_DELAY, 4) &&
verifier.EndTable();
}
};

struct KeybindBuilder {
typedef Keybind Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_keybind_name(solarxr_protocol::rpc::KeybindName keybind_name) {
fbb_.AddElement<uint8_t>(Keybind::VT_KEYBIND_NAME, static_cast<uint8_t>(keybind_name), 0);
}
void add_keybind_value(flatbuffers::Offset<flatbuffers::String> keybind_value) {
fbb_.AddOffset(Keybind::VT_KEYBIND_VALUE, keybind_value);
}
void add_keybind_delay(float keybind_delay) {
fbb_.AddElement<float>(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0.0f);
}
explicit KeybindBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Keybind> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Keybind>(end);
return o;
}
};

inline flatbuffers::Offset<Keybind> CreateKeybind(
flatbuffers::FlatBufferBuilder &_fbb,
solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET,
flatbuffers::Offset<flatbuffers::String> keybind_value = 0,
float keybind_delay = 0.0f) {
KeybindBuilder builder_(_fbb);
builder_.add_keybind_delay(keybind_delay);
builder_.add_keybind_value(keybind_value);
builder_.add_keybind_name(keybind_name);
return builder_.Finish();
}

inline flatbuffers::Offset<Keybind> CreateKeybindDirect(
flatbuffers::FlatBufferBuilder &_fbb,
solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET,
const char *keybind_value = nullptr,
float keybind_delay = 0.0f) {
auto keybind_value__ = keybind_value ? _fbb.CreateString(keybind_value) : 0;
return solarxr_protocol::rpc::CreateKeybind(
_fbb,
keybind_name,
keybind_value__,
keybind_delay);
}

struct KeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef KeybindRequestBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_KEYBIND_NAME = 4
};
solarxr_protocol::rpc::KeybindName keybind_name() const {
return static_cast<solarxr_protocol::rpc::KeybindName>(GetField<uint8_t>(VT_KEYBIND_NAME, 0));
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint8_t>(verifier, VT_KEYBIND_NAME, 1) &&
verifier.EndTable();
}
};

struct KeybindRequestBuilder {
typedef KeybindRequest Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_keybind_name(solarxr_protocol::rpc::KeybindName keybind_name) {
fbb_.AddElement<uint8_t>(KeybindRequest::VT_KEYBIND_NAME, static_cast<uint8_t>(keybind_name), 0);
}
explicit KeybindRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<KeybindRequest> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<KeybindRequest>(end);
return o;
}
};

inline flatbuffers::Offset<KeybindRequest> CreateKeybindRequest(
flatbuffers::FlatBufferBuilder &_fbb,
solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET) {
KeybindRequestBuilder builder_(_fbb);
builder_.add_keybind_name(keybind_name);
return builder_.Finish();
}

struct KeybindResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef KeybindResponseBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_KEYBIND = 4
};
const flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *keybind() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *>(VT_KEYBIND);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_KEYBIND) &&
verifier.VerifyVector(keybind()) &&
verifier.VerifyVectorOfTables(keybind()) &&
verifier.EndTable();
}
};

struct KeybindResponseBuilder {
typedef KeybindResponse Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_keybind(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>> keybind) {
fbb_.AddOffset(KeybindResponse::VT_KEYBIND, keybind);
}
explicit KeybindResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<KeybindResponse> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<KeybindResponse>(end);
return o;
}
};

inline flatbuffers::Offset<KeybindResponse> CreateKeybindResponse(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>> keybind = 0) {
KeybindResponseBuilder builder_(_fbb);
builder_.add_keybind(keybind);
return builder_.Finish();
}

inline flatbuffers::Offset<KeybindResponse> CreateKeybindResponseDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *keybind = nullptr) {
auto keybind__ = keybind ? _fbb.CreateVector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>(*keybind) : 0;
return solarxr_protocol::rpc::CreateKeybindResponse(
_fbb,
keybind__);
}

struct ChangeKeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef ChangeKeybindRequestBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_KEYBIND = 4
};
const flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *keybind() const {
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *>(VT_KEYBIND);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyOffset(verifier, VT_KEYBIND) &&
verifier.VerifyVector(keybind()) &&
verifier.VerifyVectorOfTables(keybind()) &&
verifier.EndTable();
}
};

struct ChangeKeybindRequestBuilder {
typedef ChangeKeybindRequest Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_keybind(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>> keybind) {
fbb_.AddOffset(ChangeKeybindRequest::VT_KEYBIND, keybind);
}
explicit ChangeKeybindRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<ChangeKeybindRequest> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<ChangeKeybindRequest>(end);
return o;
}
};

inline flatbuffers::Offset<ChangeKeybindRequest> CreateChangeKeybindRequest(
flatbuffers::FlatBufferBuilder &_fbb,
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>> keybind = 0) {
ChangeKeybindRequestBuilder builder_(_fbb);
builder_.add_keybind(keybind);
return builder_.Finish();
}

inline flatbuffers::Offset<ChangeKeybindRequest> CreateChangeKeybindRequestDirect(
flatbuffers::FlatBufferBuilder &_fbb,
const std::vector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>> *keybind = nullptr) {
auto keybind__ = keybind ? _fbb.CreateVector<flatbuffers::Offset<solarxr_protocol::rpc::Keybind>>(*keybind) : 0;
return solarxr_protocol::rpc::CreateChangeKeybindRequest(
_fbb,
keybind__);
}

struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef RpcMessageHeaderBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
Expand Down
70 changes: 70 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class ChangeKeybindRequest extends Table {
public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); }
public static ChangeKeybindRequest getRootAsChangeKeybindRequest(ByteBuffer _bb) { return getRootAsChangeKeybindRequest(_bb, new ChangeKeybindRequest()); }
public static ChangeKeybindRequest getRootAsChangeKeybindRequest(ByteBuffer _bb, ChangeKeybindRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); }
public ChangeKeybindRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

public solarxr_protocol.rpc.Keybind keybind(int j) { return keybind(new solarxr_protocol.rpc.Keybind(), j); }
public solarxr_protocol.rpc.Keybind keybind(solarxr_protocol.rpc.Keybind obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
public int keybindLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; }
public solarxr_protocol.rpc.Keybind.Vector keybindVector() { return keybindVector(new solarxr_protocol.rpc.Keybind.Vector()); }
public solarxr_protocol.rpc.Keybind.Vector keybindVector(solarxr_protocol.rpc.Keybind.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }

public static int createChangeKeybindRequest(FlatBufferBuilder builder,
int keybindOffset) {
builder.startTable(1);
ChangeKeybindRequest.addKeybind(builder, keybindOffset);
return ChangeKeybindRequest.endChangeKeybindRequest(builder);
}

public static void startChangeKeybindRequest(FlatBufferBuilder builder) { builder.startTable(1); }
public static void addKeybind(FlatBufferBuilder builder, int keybindOffset) { builder.addOffset(0, keybindOffset, 0); }
public static int createKeybindVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); }
public static void startKeybindVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); }
public static int endChangeKeybindRequest(FlatBufferBuilder builder) {
int o = builder.endTable();
return o;
}

public static final class Vector extends BaseVector {
public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; }

public ChangeKeybindRequest get(int j) { return get(new ChangeKeybindRequest(), j); }
public ChangeKeybindRequest get(ChangeKeybindRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); }
}
public ChangeKeybindRequestT unpack() {
ChangeKeybindRequestT _o = new ChangeKeybindRequestT();
unpackTo(_o);
return _o;
}
public void unpackTo(ChangeKeybindRequestT _o) {
solarxr_protocol.rpc.KeybindT[] _oKeybind = new solarxr_protocol.rpc.KeybindT[keybindLength()];
for (int _j = 0; _j < keybindLength(); ++_j) {_oKeybind[_j] = (keybind(_j) != null ? keybind(_j).unpack() : null);}
_o.setKeybind(_oKeybind);
}
public static int pack(FlatBufferBuilder builder, ChangeKeybindRequestT _o) {
if (_o == null) return 0;
int _keybind = 0;
if (_o.getKeybind() != null) {
int[] __keybind = new int[_o.getKeybind().length];
int _j = 0;
for (solarxr_protocol.rpc.KeybindT _e : _o.getKeybind()) { __keybind[_j] = solarxr_protocol.rpc.Keybind.pack(builder, _e); _j++;}
_keybind = createKeybindVector(builder, __keybind);
}
return createChangeKeybindRequest(
builder,
_keybind);
}
}

22 changes: 22 additions & 0 deletions protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// automatically generated by the FlatBuffers compiler, do not modify

package solarxr_protocol.rpc;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

public class ChangeKeybindRequestT {
private solarxr_protocol.rpc.KeybindT[] keybind;

public solarxr_protocol.rpc.KeybindT[] getKeybind() { return keybind; }

public void setKeybind(solarxr_protocol.rpc.KeybindT[] keybind) { this.keybind = keybind; }


public ChangeKeybindRequestT() {
this.keybind = null;
}
}

Loading