diff --git a/r5dev/common/igameserverdata.h b/r5dev/common/igameserverdata.h index 183c21c5..d6b3ba2c 100644 --- a/r5dev/common/igameserverdata.h +++ b/r5dev/common/igameserverdata.h @@ -9,26 +9,20 @@ typedef int SocketHandle_t; enum class ServerDataRequestType_t : int { - SERVERDATA_REQUESTVALUE = 0, - SERVERDATA_SETVALUE, - SERVERDATA_EXECCOMMAND, - SERVERDATA_AUTH, - SERVERDATA_VPROF, - SERVERDATA_REMOVE_VPROF, - SERVERDATA_TAKE_SCREENSHOT, - SERVERDATA_SEND_CONSOLE_LOG, - SERVERDATA_SEND_REMOTEBUG, + SERVERDATA_REQUEST_VALUE = 0, + SERVERDATA_REQUEST_SETVALUE, + SERVERDATA_REQUEST_EXECCOMMAND, + SERVERDATA_REQUEST_AUTH, + SERVERDATA_REQUEST_SEND_CONSOLE_LOG, + SERVERDATA_REQUEST_SEND_REMOTEBUG, }; enum class ServerDataResponseType_t : int { SERVERDATA_RESPONSE_VALUE = 0, - SERVERDATA_UPDATE, - SERVERDATA_AUTH_RESPONSE, - SERVERDATA_VPROF_DATA, - SERVERDATA_VPROF_GROUPS, - SERVERDATA_SCREENSHOT_RESPONSE, - SERVERDATA_CONSOLE_LOG_RESPONSE, + SERVERDATA_RESPONSE_UPDATE, + SERVERDATA_RESPONSE_AUTH, + SERVERDATA_RESPONSE_CONSOLE_LOG, SERVERDATA_RESPONSE_STRING, SERVERDATA_RESPONSE_REMOTEBUG, }; diff --git a/r5dev/protoc/cl_rcon.pb.cc b/r5dev/protoc/cl_rcon.pb.cc new file mode 100644 index 00000000..dacc772a --- /dev/null +++ b/r5dev/protoc/cl_rcon.pb.cc @@ -0,0 +1,477 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cl_rcon.proto + +#include "cl_rcon.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace cl_rcon { +constexpr request::request( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : requestbuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , requestval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , requestid_(0) + , requesttype_(0) +{} +struct requestDefaultTypeInternal { + constexpr requestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~requestDefaultTypeInternal() {} + union { + request _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT requestDefaultTypeInternal _request_default_instance_; +} // namespace cl_rcon +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_cl_5frcon_2eproto[1]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_cl_5frcon_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_cl_5frcon_2eproto = nullptr; + +const uint32_t TableStruct_cl_5frcon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, _has_bits_), + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, requestid_), + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, requesttype_), + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, requestbuf_), + PROTOBUF_FIELD_OFFSET(::cl_rcon::request, requestval_), + 2, + 3, + 0, + 1, +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 10, -1, sizeof(::cl_rcon::request)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::cl_rcon::_request_default_instance_), +}; + +const char descriptor_table_protodef_cl_5frcon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\rcl_rcon.proto\022\007cl_rcon\"m\n\007request\022\021\n\tr" + "equestID\030\001 \001(\005\022\'\n\013requestType\030\002 \001(\0162\022.cl" + "_rcon.request_t\022\022\n\nrequestBuf\030\003 \001(\t\022\022\n\nr" + "equestVal\030\004 \001(\t*\333\001\n\trequest_t\022\034\n\030SERVERD" + "ATA_REQUEST_VALUE\020\000\022\037\n\033SERVERDATA_REQUES" + "T_SETVALUE\020\001\022\"\n\036SERVERDATA_REQUEST_EXECC" + "OMMAND\020\002\022\033\n\027SERVERDATA_REQUEST_AUTH\020\003\022\'\n" + "#SERVERDATA_REQUEST_SEND_CONSOLE_LOG\020\004\022%" + "\n!SERVERDATA_REQUEST_SEND_REMOTEBUG\020\005" + ; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_cl_5frcon_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_cl_5frcon_2eproto = { + false, false, 357, descriptor_table_protodef_cl_5frcon_2eproto, "cl_rcon.proto", + &descriptor_table_cl_5frcon_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_cl_5frcon_2eproto::offsets, + file_level_metadata_cl_5frcon_2eproto, file_level_enum_descriptors_cl_5frcon_2eproto, file_level_service_descriptors_cl_5frcon_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_cl_5frcon_2eproto_getter() { + return &descriptor_table_cl_5frcon_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_cl_5frcon_2eproto(&descriptor_table_cl_5frcon_2eproto); +namespace cl_rcon { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* request_t_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_cl_5frcon_2eproto); + return file_level_enum_descriptors_cl_5frcon_2eproto[0]; +} +bool request_t_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + + +// =================================================================== + +class request::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_requestid(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_requesttype(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_requestbuf(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_requestval(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +request::request(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:cl_rcon.request) +} +request::request(const request& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_requestbuf()) { + requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestbuf(), + GetArenaForAllocation()); + } + requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_requestval()) { + requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_requestval(), + GetArenaForAllocation()); + } + ::memcpy(&requestid_, &from.requestid_, + static_cast(reinterpret_cast(&requesttype_) - + reinterpret_cast(&requestid_)) + sizeof(requesttype_)); + // @@protoc_insertion_point(copy_constructor:cl_rcon.request) +} + +inline void request::SharedCtor() { +requestbuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +requestval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&requestid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&requesttype_) - + reinterpret_cast(&requestid_)) + sizeof(requesttype_)); +} + +request::~request() { + // @@protoc_insertion_point(destructor:cl_rcon.request) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void request::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + requestbuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + requestval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void request::ArenaDtor(void* object) { + request* _this = reinterpret_cast< request* >(object); + (void)_this; +} +void request::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void request::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void request::Clear() { +// @@protoc_insertion_point(message_clear_start:cl_rcon.request) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + requestbuf_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + requestval_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000000cu) { + ::memset(&requestid_, 0, static_cast( + reinterpret_cast(&requesttype_) - + reinterpret_cast(&requestid_)) + sizeof(requesttype_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 requestID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_requestid(&has_bits); + requestid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .cl_rcon.request_t requestType = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::cl_rcon::request_t_IsValid(val))) { + _internal_set_requesttype(static_cast<::cl_rcon::request_t>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string requestBuf = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_requestbuf(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "cl_rcon.request.requestBuf"); + #endif // !NDEBUG + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string requestVal = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_requestval(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "cl_rcon.request.requestVal"); + #endif // !NDEBUG + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* request::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:cl_rcon.request) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 requestID = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_requestid(), target); + } + + // optional .cl_rcon.request_t requestType = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_requesttype(), target); + } + + // optional string requestBuf = 3; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_requestbuf().data(), static_cast(this->_internal_requestbuf().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "cl_rcon.request.requestBuf"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_requestbuf(), target); + } + + // optional string requestVal = 4; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_requestval().data(), static_cast(this->_internal_requestval().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "cl_rcon.request.requestVal"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_requestval(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:cl_rcon.request) + return target; +} + +size_t request::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:cl_rcon.request) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string requestBuf = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_requestbuf()); + } + + // optional string requestVal = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_requestval()); + } + + // optional int32 requestID = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_requestid()); + } + + // optional .cl_rcon.request_t requestType = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_requesttype()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData request::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + request::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*request::GetClassData() const { return &_class_data_; } + +void request::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void request::MergeFrom(const request& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:cl_rcon.request) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_requestbuf(from._internal_requestbuf()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_requestval(from._internal_requestval()); + } + if (cached_has_bits & 0x00000004u) { + requestid_ = from.requestid_; + } + if (cached_has_bits & 0x00000008u) { + requesttype_ = from.requesttype_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void request::CopyFrom(const request& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:cl_rcon.request) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool request::IsInitialized() const { + return true; +} + +void request::InternalSwap(request* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &requestbuf_, lhs_arena, + &other->requestbuf_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &requestval_, lhs_arena, + &other->requestval_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(request, requesttype_) + + sizeof(request::requesttype_) + - PROTOBUF_FIELD_OFFSET(request, requestid_)>( + reinterpret_cast(&requestid_), + reinterpret_cast(&other->requestid_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata request::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_cl_5frcon_2eproto_getter, &descriptor_table_cl_5frcon_2eproto_once, + file_level_metadata_cl_5frcon_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace cl_rcon +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::cl_rcon::request* Arena::CreateMaybeMessage< ::cl_rcon::request >(Arena* arena) { + return Arena::CreateMessageInternal< ::cl_rcon::request >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/r5dev/protoc/cl_rcon.pb.h b/r5dev/protoc/cl_rcon.pb.h new file mode 100644 index 00000000..d0fbda94 --- /dev/null +++ b/r5dev/protoc/cl_rcon.pb.h @@ -0,0 +1,534 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: cl_rcon.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_cl_5frcon_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_cl_5frcon_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_cl_5frcon_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_cl_5frcon_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_cl_5frcon_2eproto; +namespace cl_rcon { +class request; +struct requestDefaultTypeInternal; +extern requestDefaultTypeInternal _request_default_instance_; +} // namespace cl_rcon +PROTOBUF_NAMESPACE_OPEN +template<> ::cl_rcon::request* Arena::CreateMaybeMessage<::cl_rcon::request>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace cl_rcon { + +enum request_t : int { + SERVERDATA_REQUEST_VALUE = 0, + SERVERDATA_REQUEST_SETVALUE = 1, + SERVERDATA_REQUEST_EXECCOMMAND = 2, + SERVERDATA_REQUEST_AUTH = 3, + SERVERDATA_REQUEST_SEND_CONSOLE_LOG = 4, + SERVERDATA_REQUEST_SEND_REMOTEBUG = 5 +}; +bool request_t_IsValid(int value); +constexpr request_t request_t_MIN = SERVERDATA_REQUEST_VALUE; +constexpr request_t request_t_MAX = SERVERDATA_REQUEST_SEND_REMOTEBUG; +constexpr int request_t_ARRAYSIZE = request_t_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* request_t_descriptor(); +template +inline const std::string& request_t_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function request_t_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + request_t_descriptor(), enum_t_value); +} +inline bool request_t_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_t* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + request_t_descriptor(), name, value); +} +// =================================================================== + +class request final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:cl_rcon.request) */ { + public: + inline request() : request(nullptr) {} + ~request() override; + explicit constexpr request(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + request(const request& from); + request(request&& from) noexcept + : request() { + *this = ::std::move(from); + } + + inline request& operator=(const request& from) { + CopyFrom(from); + return *this; + } + inline request& operator=(request&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const request& default_instance() { + return *internal_default_instance(); + } + static inline const request* internal_default_instance() { + return reinterpret_cast( + &_request_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(request& a, request& b) { + a.Swap(&b); + } + inline void Swap(request* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(request* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const request& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const request& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(request* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "cl_rcon.request"; + } + protected: + explicit request(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRequestBufFieldNumber = 3, + kRequestValFieldNumber = 4, + kRequestIDFieldNumber = 1, + kRequestTypeFieldNumber = 2, + }; + // optional string requestBuf = 3; + bool has_requestbuf() const; + private: + bool _internal_has_requestbuf() const; + public: + void clear_requestbuf(); + const std::string& requestbuf() const; + template + void set_requestbuf(ArgT0&& arg0, ArgT... args); + std::string* mutable_requestbuf(); + PROTOBUF_NODISCARD std::string* release_requestbuf(); + void set_allocated_requestbuf(std::string* requestbuf); + private: + const std::string& _internal_requestbuf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestbuf(const std::string& value); + std::string* _internal_mutable_requestbuf(); + public: + + // optional string requestVal = 4; + bool has_requestval() const; + private: + bool _internal_has_requestval() const; + public: + void clear_requestval(); + const std::string& requestval() const; + template + void set_requestval(ArgT0&& arg0, ArgT... args); + std::string* mutable_requestval(); + PROTOBUF_NODISCARD std::string* release_requestval(); + void set_allocated_requestval(std::string* requestval); + private: + const std::string& _internal_requestval() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_requestval(const std::string& value); + std::string* _internal_mutable_requestval(); + public: + + // optional int32 requestID = 1; + bool has_requestid() const; + private: + bool _internal_has_requestid() const; + public: + void clear_requestid(); + int32_t requestid() const; + void set_requestid(int32_t value); + private: + int32_t _internal_requestid() const; + void _internal_set_requestid(int32_t value); + public: + + // optional .cl_rcon.request_t requestType = 2; + bool has_requesttype() const; + private: + bool _internal_has_requesttype() const; + public: + void clear_requesttype(); + ::cl_rcon::request_t requesttype() const; + void set_requesttype(::cl_rcon::request_t value); + private: + ::cl_rcon::request_t _internal_requesttype() const; + void _internal_set_requesttype(::cl_rcon::request_t value); + public: + + // @@protoc_insertion_point(class_scope:cl_rcon.request) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestbuf_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr requestval_; + int32_t requestid_; + int requesttype_; + friend struct ::TableStruct_cl_5frcon_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// request + +// optional int32 requestID = 1; +inline bool request::_internal_has_requestid() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool request::has_requestid() const { + return _internal_has_requestid(); +} +inline void request::clear_requestid() { + requestid_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t request::_internal_requestid() const { + return requestid_; +} +inline int32_t request::requestid() const { + // @@protoc_insertion_point(field_get:cl_rcon.request.requestID) + return _internal_requestid(); +} +inline void request::_internal_set_requestid(int32_t value) { + _has_bits_[0] |= 0x00000004u; + requestid_ = value; +} +inline void request::set_requestid(int32_t value) { + _internal_set_requestid(value); + // @@protoc_insertion_point(field_set:cl_rcon.request.requestID) +} + +// optional .cl_rcon.request_t requestType = 2; +inline bool request::_internal_has_requesttype() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool request::has_requesttype() const { + return _internal_has_requesttype(); +} +inline void request::clear_requesttype() { + requesttype_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::cl_rcon::request_t request::_internal_requesttype() const { + return static_cast< ::cl_rcon::request_t >(requesttype_); +} +inline ::cl_rcon::request_t request::requesttype() const { + // @@protoc_insertion_point(field_get:cl_rcon.request.requestType) + return _internal_requesttype(); +} +inline void request::_internal_set_requesttype(::cl_rcon::request_t value) { + assert(::cl_rcon::request_t_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + requesttype_ = value; +} +inline void request::set_requesttype(::cl_rcon::request_t value) { + _internal_set_requesttype(value); + // @@protoc_insertion_point(field_set:cl_rcon.request.requestType) +} + +// optional string requestBuf = 3; +inline bool request::_internal_has_requestbuf() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool request::has_requestbuf() const { + return _internal_has_requestbuf(); +} +inline void request::clear_requestbuf() { + requestbuf_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& request::requestbuf() const { + // @@protoc_insertion_point(field_get:cl_rcon.request.requestBuf) + return _internal_requestbuf(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void request::set_requestbuf(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:cl_rcon.request.requestBuf) +} +inline std::string* request::mutable_requestbuf() { + std::string* _s = _internal_mutable_requestbuf(); + // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestBuf) + return _s; +} +inline const std::string& request::_internal_requestbuf() const { + return requestbuf_.Get(); +} +inline void request::_internal_set_requestbuf(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + requestbuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* request::_internal_mutable_requestbuf() { + _has_bits_[0] |= 0x00000001u; + return requestbuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* request::release_requestbuf() { + // @@protoc_insertion_point(field_release:cl_rcon.request.requestBuf) + if (!_internal_has_requestbuf()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = requestbuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void request::set_allocated_requestbuf(std::string* requestbuf) { + if (requestbuf != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + requestbuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestbuf, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (requestbuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + requestbuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestBuf) +} + +// optional string requestVal = 4; +inline bool request::_internal_has_requestval() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool request::has_requestval() const { + return _internal_has_requestval(); +} +inline void request::clear_requestval() { + requestval_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& request::requestval() const { + // @@protoc_insertion_point(field_get:cl_rcon.request.requestVal) + return _internal_requestval(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void request::set_requestval(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:cl_rcon.request.requestVal) +} +inline std::string* request::mutable_requestval() { + std::string* _s = _internal_mutable_requestval(); + // @@protoc_insertion_point(field_mutable:cl_rcon.request.requestVal) + return _s; +} +inline const std::string& request::_internal_requestval() const { + return requestval_.Get(); +} +inline void request::_internal_set_requestval(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + requestval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* request::_internal_mutable_requestval() { + _has_bits_[0] |= 0x00000002u; + return requestval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* request::release_requestval() { + // @@protoc_insertion_point(field_release:cl_rcon.request.requestVal) + if (!_internal_has_requestval()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = requestval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void request::set_allocated_requestval(std::string* requestval) { + if (requestval != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + requestval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), requestval, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (requestval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + requestval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:cl_rcon.request.requestVal) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace cl_rcon + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::cl_rcon::request_t> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::cl_rcon::request_t>() { + return ::cl_rcon::request_t_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_cl_5frcon_2eproto diff --git a/r5dev/protoc/sv_rcon.pb.cc b/r5dev/protoc/sv_rcon.pb.cc new file mode 100644 index 00000000..839242af --- /dev/null +++ b/r5dev/protoc/sv_rcon.pb.cc @@ -0,0 +1,477 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: sv_rcon.proto + +#include "sv_rcon.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG +namespace sv_rcon { +constexpr request::request( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized) + : responsebuf_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , responseval_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string) + , responseid_(0) + , responsetype_(0) +{} +struct requestDefaultTypeInternal { + constexpr requestDefaultTypeInternal() + : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {} + ~requestDefaultTypeInternal() {} + union { + request _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT requestDefaultTypeInternal _request_default_instance_; +} // namespace sv_rcon +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_sv_5frcon_2eproto[1]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_sv_5frcon_2eproto[1]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_sv_5frcon_2eproto = nullptr; + +const uint32_t TableStruct_sv_5frcon_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, _has_bits_), + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, responseid_), + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, responsetype_), + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, responsebuf_), + PROTOBUF_FIELD_OFFSET(::sv_rcon::request, responseval_), + 2, + 3, + 0, + 1, +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 10, -1, sizeof(::sv_rcon::request)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::sv_rcon::_request_default_instance_), +}; + +const char descriptor_table_protodef_sv_5frcon_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\rsv_rcon.proto\022\007sv_rcon\"q\n\007request\022\022\n\nr" + "esponseID\030\001 \001(\005\022(\n\014responseType\030\002 \001(\0162\022." + "sv_rcon.request_t\022\023\n\013responseBuf\030\003 \001(\t\022\023" + "\n\013responseVal\030\004 \001(\t*\320\001\n\trequest_t\022\035\n\031SER" + "VERDATA_RESPONSE_VALUE\020\000\022\036\n\032SERVERDATA_R" + "ESPONSE_UPDATE\020\001\022\034\n\030SERVERDATA_RESPONSE_" + "AUTH\020\002\022#\n\037SERVERDATA_RESPONSE_CONSOLE_LO" + "G\020\003\022\036\n\032SERVERDATA_RESPONSE_STRING\020\004\022!\n\035S" + "ERVERDATA_RESPONSE_REMOTEBUG\020\005" + ; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_sv_5frcon_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_sv_5frcon_2eproto = { + false, false, 350, descriptor_table_protodef_sv_5frcon_2eproto, "sv_rcon.proto", + &descriptor_table_sv_5frcon_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_sv_5frcon_2eproto::offsets, + file_level_metadata_sv_5frcon_2eproto, file_level_enum_descriptors_sv_5frcon_2eproto, file_level_service_descriptors_sv_5frcon_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_sv_5frcon_2eproto_getter() { + return &descriptor_table_sv_5frcon_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_sv_5frcon_2eproto(&descriptor_table_sv_5frcon_2eproto); +namespace sv_rcon { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* request_t_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_sv_5frcon_2eproto); + return file_level_enum_descriptors_sv_5frcon_2eproto[0]; +} +bool request_t_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + + +// =================================================================== + +class request::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_responseid(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_responsetype(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_responsebuf(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_responseval(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +request::request(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + if (!is_message_owned) { + RegisterArenaDtor(arena); + } + // @@protoc_insertion_point(arena_constructor:sv_rcon.request) +} +request::request(const request& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_responsebuf()) { + responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responsebuf(), + GetArenaForAllocation()); + } + responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_responseval()) { + responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_responseval(), + GetArenaForAllocation()); + } + ::memcpy(&responseid_, &from.responseid_, + static_cast(reinterpret_cast(&responsetype_) - + reinterpret_cast(&responseid_)) + sizeof(responsetype_)); + // @@protoc_insertion_point(copy_constructor:sv_rcon.request) +} + +inline void request::SharedCtor() { +responsebuf_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +responseval_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&responseid_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&responsetype_) - + reinterpret_cast(&responseid_)) + sizeof(responsetype_)); +} + +request::~request() { + // @@protoc_insertion_point(destructor:sv_rcon.request) + if (GetArenaForAllocation() != nullptr) return; + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +inline void request::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + responsebuf_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + responseval_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void request::ArenaDtor(void* object) { + request* _this = reinterpret_cast< request* >(object); + (void)_this; +} +void request::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void request::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void request::Clear() { +// @@protoc_insertion_point(message_clear_start:sv_rcon.request) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + responsebuf_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + responseval_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000000cu) { + ::memset(&responseid_, 0, static_cast( + reinterpret_cast(&responsetype_) - + reinterpret_cast(&responseid_)) + sizeof(responsetype_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 responseID = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_responseid(&has_bits); + responseid_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .sv_rcon.request_t responseType = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::sv_rcon::request_t_IsValid(val))) { + _internal_set_responsetype(static_cast<::sv_rcon::request_t>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string responseBuf = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_responsebuf(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "sv_rcon.request.responseBuf"); + #endif // !NDEBUG + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string responseVal = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_responseval(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + #ifndef NDEBUG + ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "sv_rcon.request.responseVal"); + #endif // !NDEBUG + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* request::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:sv_rcon.request) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 responseID = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_responseid(), target); + } + + // optional .sv_rcon.request_t responseType = 2; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_responsetype(), target); + } + + // optional string responseBuf = 3; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_responsebuf().data(), static_cast(this->_internal_responsebuf().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "sv_rcon.request.responseBuf"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_responsebuf(), target); + } + + // optional string responseVal = 4; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_responseval().data(), static_cast(this->_internal_responseval().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "sv_rcon.request.responseVal"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_responseval(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:sv_rcon.request) + return target; +} + +size_t request::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:sv_rcon.request) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string responseBuf = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responsebuf()); + } + + // optional string responseVal = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_responseval()); + } + + // optional int32 responseID = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_responseid()); + } + + // optional .sv_rcon.request_t responseType = 2; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_responsetype()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData request::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + request::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*request::GetClassData() const { return &_class_data_; } + +void request::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void request::MergeFrom(const request& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:sv_rcon.request) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_responsebuf(from._internal_responsebuf()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_responseval(from._internal_responseval()); + } + if (cached_has_bits & 0x00000004u) { + responseid_ = from.responseid_; + } + if (cached_has_bits & 0x00000008u) { + responsetype_ = from.responsetype_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void request::CopyFrom(const request& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:sv_rcon.request) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool request::IsInitialized() const { + return true; +} + +void request::InternalSwap(request* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &responsebuf_, lhs_arena, + &other->responsebuf_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + &responseval_, lhs_arena, + &other->responseval_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(request, responsetype_) + + sizeof(request::responsetype_) + - PROTOBUF_FIELD_OFFSET(request, responseid_)>( + reinterpret_cast(&responseid_), + reinterpret_cast(&other->responseid_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata request::GetMetadata() const { + return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors( + &descriptor_table_sv_5frcon_2eproto_getter, &descriptor_table_sv_5frcon_2eproto_once, + file_level_metadata_sv_5frcon_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace sv_rcon +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::sv_rcon::request* Arena::CreateMaybeMessage< ::sv_rcon::request >(Arena* arena) { + return Arena::CreateMessageInternal< ::sv_rcon::request >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/r5dev/protoc/sv_rcon.pb.h b/r5dev/protoc/sv_rcon.pb.h new file mode 100644 index 00000000..df172116 --- /dev/null +++ b/r5dev/protoc/sv_rcon.pb.h @@ -0,0 +1,534 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: sv_rcon.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_sv_5frcon_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_sv_5frcon_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3019000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3019004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_sv_5frcon_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_sv_5frcon_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1] + PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_sv_5frcon_2eproto; +namespace sv_rcon { +class request; +struct requestDefaultTypeInternal; +extern requestDefaultTypeInternal _request_default_instance_; +} // namespace sv_rcon +PROTOBUF_NAMESPACE_OPEN +template<> ::sv_rcon::request* Arena::CreateMaybeMessage<::sv_rcon::request>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace sv_rcon { + +enum request_t : int { + SERVERDATA_RESPONSE_VALUE = 0, + SERVERDATA_RESPONSE_UPDATE = 1, + SERVERDATA_RESPONSE_AUTH = 2, + SERVERDATA_RESPONSE_CONSOLE_LOG = 3, + SERVERDATA_RESPONSE_STRING = 4, + SERVERDATA_RESPONSE_REMOTEBUG = 5 +}; +bool request_t_IsValid(int value); +constexpr request_t request_t_MIN = SERVERDATA_RESPONSE_VALUE; +constexpr request_t request_t_MAX = SERVERDATA_RESPONSE_REMOTEBUG; +constexpr int request_t_ARRAYSIZE = request_t_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* request_t_descriptor(); +template +inline const std::string& request_t_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function request_t_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + request_t_descriptor(), enum_t_value); +} +inline bool request_t_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, request_t* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + request_t_descriptor(), name, value); +} +// =================================================================== + +class request final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:sv_rcon.request) */ { + public: + inline request() : request(nullptr) {} + ~request() override; + explicit constexpr request(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + request(const request& from); + request(request&& from) noexcept + : request() { + *this = ::std::move(from); + } + + inline request& operator=(const request& from) { + CopyFrom(from); + return *this; + } + inline request& operator=(request&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const request& default_instance() { + return *internal_default_instance(); + } + static inline const request* internal_default_instance() { + return reinterpret_cast( + &_request_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(request& a, request& b) { + a.Swap(&b); + } + inline void Swap(request* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(request* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + request* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const request& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const request& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(request* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "sv_rcon.request"; + } + protected: + explicit request(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kResponseBufFieldNumber = 3, + kResponseValFieldNumber = 4, + kResponseIDFieldNumber = 1, + kResponseTypeFieldNumber = 2, + }; + // optional string responseBuf = 3; + bool has_responsebuf() const; + private: + bool _internal_has_responsebuf() const; + public: + void clear_responsebuf(); + const std::string& responsebuf() const; + template + void set_responsebuf(ArgT0&& arg0, ArgT... args); + std::string* mutable_responsebuf(); + PROTOBUF_NODISCARD std::string* release_responsebuf(); + void set_allocated_responsebuf(std::string* responsebuf); + private: + const std::string& _internal_responsebuf() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responsebuf(const std::string& value); + std::string* _internal_mutable_responsebuf(); + public: + + // optional string responseVal = 4; + bool has_responseval() const; + private: + bool _internal_has_responseval() const; + public: + void clear_responseval(); + const std::string& responseval() const; + template + void set_responseval(ArgT0&& arg0, ArgT... args); + std::string* mutable_responseval(); + PROTOBUF_NODISCARD std::string* release_responseval(); + void set_allocated_responseval(std::string* responseval); + private: + const std::string& _internal_responseval() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_responseval(const std::string& value); + std::string* _internal_mutable_responseval(); + public: + + // optional int32 responseID = 1; + bool has_responseid() const; + private: + bool _internal_has_responseid() const; + public: + void clear_responseid(); + int32_t responseid() const; + void set_responseid(int32_t value); + private: + int32_t _internal_responseid() const; + void _internal_set_responseid(int32_t value); + public: + + // optional .sv_rcon.request_t responseType = 2; + bool has_responsetype() const; + private: + bool _internal_has_responsetype() const; + public: + void clear_responsetype(); + ::sv_rcon::request_t responsetype() const; + void set_responsetype(::sv_rcon::request_t value); + private: + ::sv_rcon::request_t _internal_responsetype() const; + void _internal_set_responsetype(::sv_rcon::request_t value); + public: + + // @@protoc_insertion_point(class_scope:sv_rcon.request) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responsebuf_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr responseval_; + int32_t responseid_; + int responsetype_; + friend struct ::TableStruct_sv_5frcon_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// request + +// optional int32 responseID = 1; +inline bool request::_internal_has_responseid() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool request::has_responseid() const { + return _internal_has_responseid(); +} +inline void request::clear_responseid() { + responseid_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t request::_internal_responseid() const { + return responseid_; +} +inline int32_t request::responseid() const { + // @@protoc_insertion_point(field_get:sv_rcon.request.responseID) + return _internal_responseid(); +} +inline void request::_internal_set_responseid(int32_t value) { + _has_bits_[0] |= 0x00000004u; + responseid_ = value; +} +inline void request::set_responseid(int32_t value) { + _internal_set_responseid(value); + // @@protoc_insertion_point(field_set:sv_rcon.request.responseID) +} + +// optional .sv_rcon.request_t responseType = 2; +inline bool request::_internal_has_responsetype() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool request::has_responsetype() const { + return _internal_has_responsetype(); +} +inline void request::clear_responsetype() { + responsetype_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::sv_rcon::request_t request::_internal_responsetype() const { + return static_cast< ::sv_rcon::request_t >(responsetype_); +} +inline ::sv_rcon::request_t request::responsetype() const { + // @@protoc_insertion_point(field_get:sv_rcon.request.responseType) + return _internal_responsetype(); +} +inline void request::_internal_set_responsetype(::sv_rcon::request_t value) { + assert(::sv_rcon::request_t_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + responsetype_ = value; +} +inline void request::set_responsetype(::sv_rcon::request_t value) { + _internal_set_responsetype(value); + // @@protoc_insertion_point(field_set:sv_rcon.request.responseType) +} + +// optional string responseBuf = 3; +inline bool request::_internal_has_responsebuf() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool request::has_responsebuf() const { + return _internal_has_responsebuf(); +} +inline void request::clear_responsebuf() { + responsebuf_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& request::responsebuf() const { + // @@protoc_insertion_point(field_get:sv_rcon.request.responseBuf) + return _internal_responsebuf(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void request::set_responsebuf(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:sv_rcon.request.responseBuf) +} +inline std::string* request::mutable_responsebuf() { + std::string* _s = _internal_mutable_responsebuf(); + // @@protoc_insertion_point(field_mutable:sv_rcon.request.responseBuf) + return _s; +} +inline const std::string& request::_internal_responsebuf() const { + return responsebuf_.Get(); +} +inline void request::_internal_set_responsebuf(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + responsebuf_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* request::_internal_mutable_responsebuf() { + _has_bits_[0] |= 0x00000001u; + return responsebuf_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* request::release_responsebuf() { + // @@protoc_insertion_point(field_release:sv_rcon.request.responseBuf) + if (!_internal_has_responsebuf()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = responsebuf_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void request::set_allocated_responsebuf(std::string* responsebuf) { + if (responsebuf != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + responsebuf_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responsebuf, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (responsebuf_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + responsebuf_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:sv_rcon.request.responseBuf) +} + +// optional string responseVal = 4; +inline bool request::_internal_has_responseval() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool request::has_responseval() const { + return _internal_has_responseval(); +} +inline void request::clear_responseval() { + responseval_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& request::responseval() const { + // @@protoc_insertion_point(field_get:sv_rcon.request.responseVal) + return _internal_responseval(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void request::set_responseval(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:sv_rcon.request.responseVal) +} +inline std::string* request::mutable_responseval() { + std::string* _s = _internal_mutable_responseval(); + // @@protoc_insertion_point(field_mutable:sv_rcon.request.responseVal) + return _s; +} +inline const std::string& request::_internal_responseval() const { + return responseval_.Get(); +} +inline void request::_internal_set_responseval(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + responseval_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation()); +} +inline std::string* request::_internal_mutable_responseval() { + _has_bits_[0] |= 0x00000002u; + return responseval_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation()); +} +inline std::string* request::release_responseval() { + // @@protoc_insertion_point(field_release:sv_rcon.request.responseVal) + if (!_internal_has_responseval()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = responseval_.ReleaseNonDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void request::set_allocated_responseval(std::string* responseval) { + if (responseval != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + responseval_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), responseval, + GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (responseval_.IsDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited())) { + responseval_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:sv_rcon.request.responseVal) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace sv_rcon + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::sv_rcon::request_t> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::sv_rcon::request_t>() { + return ::sv_rcon::request_t_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_sv_5frcon_2eproto diff --git a/r5dev/resource/protobuf/cl_rcon.proto b/r5dev/resource/protobuf/cl_rcon.proto new file mode 100644 index 00000000..35dc019c --- /dev/null +++ b/r5dev/resource/protobuf/cl_rcon.proto @@ -0,0 +1,20 @@ +syntax = "proto2"; +package cl_rcon; + +enum request_t +{ + SERVERDATA_REQUEST_VALUE = 0; + SERVERDATA_REQUEST_SETVALUE = 1; + SERVERDATA_REQUEST_EXECCOMMAND = 2; + SERVERDATA_REQUEST_AUTH = 3; + SERVERDATA_REQUEST_SEND_CONSOLE_LOG = 4; + SERVERDATA_REQUEST_SEND_REMOTEBUG = 5; +} + +message request +{ + optional int32 requestID = 1; + optional request_t requestType = 2; + optional string requestBuf = 3; + optional string requestVal = 4; +} diff --git a/r5dev/resource/protobuf/sv_rcon.proto b/r5dev/resource/protobuf/sv_rcon.proto new file mode 100644 index 00000000..6d433072 --- /dev/null +++ b/r5dev/resource/protobuf/sv_rcon.proto @@ -0,0 +1,20 @@ +syntax = "proto2"; +package sv_rcon; + +enum request_t +{ + SERVERDATA_RESPONSE_VALUE = 0; + SERVERDATA_RESPONSE_UPDATE = 1; + SERVERDATA_RESPONSE_AUTH = 2; + SERVERDATA_RESPONSE_CONSOLE_LOG = 3; + SERVERDATA_RESPONSE_STRING = 4; + SERVERDATA_RESPONSE_REMOTEBUG = 5; +} + +message request +{ + optional int32 responseID = 1; + optional request_t responseType = 2; + optional string responseBuf = 3; + optional string responseVal = 4; +}