From 8f8032b5a8959397e2d03bef9f3a6e0bf6a3560d Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Mon, 26 Jan 2026 09:36:59 +0100 Subject: [PATCH] Implement sceNpMatching2GetSignalingOptParamLocal --- rpcs3/Emu/Cell/Modules/sceNp2.cpp | 24 + rpcs3/Emu/NP/generated/np2_structs.pb.cc | 421 ++++++++++++++- rpcs3/Emu/NP/generated/np2_structs.pb.h | 656 ++++++++++++++++++++--- rpcs3/Emu/NP/generated/np2_structs.proto | 95 +--- rpcs3/Emu/NP/np_cache.cpp | 17 + rpcs3/Emu/NP/np_cache.h | 4 + rpcs3/Emu/NP/np_handler.cpp | 5 + rpcs3/Emu/NP/np_handler.h | 1 + rpcs3/Emu/NP/np_requests.cpp | 55 +- rpcs3/Emu/NP/pb_helpers.cpp | 7 + rpcs3/Emu/NP/pb_helpers.h | 1 + rpcs3/Emu/NP/rpcn_client.cpp | 2 +- 12 files changed, 1096 insertions(+), 192 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sceNp2.cpp b/rpcs3/Emu/Cell/Modules/sceNp2.cpp index 820fbdf1c0..b6ad47b846 100644 --- a/rpcs3/Emu/Cell/Modules/sceNp2.cpp +++ b/rpcs3/Emu/Cell/Modules/sceNp2.cpp @@ -1335,6 +1335,30 @@ error_code sceNpMatching2GetSignalingOptParamLocal(SceNpMatching2ContextId ctxId return SCE_NP_MATCHING2_ERROR_NOT_INITIALIZED; } + if (!ctxId) + { + return SCE_NP_MATCHING2_ERROR_INVALID_CONTEXT_ID; + } + + if (!roomId) + { + return SCE_NP_MATCHING2_ERROR_INVALID_ROOM_ID; + } + + if (!check_match2_context(ctxId)) + { + return SCE_NP_MATCHING2_ERROR_CONTEXT_NOT_FOUND; + } + + const auto [error, signaling_opt_param] = nph.local_get_signaling_opt_param(roomId); + + if (error) + { + return error; + } + + *signalingOptParam = *signaling_opt_param; + return CELL_OK; } diff --git a/rpcs3/Emu/NP/generated/np2_structs.pb.cc b/rpcs3/Emu/NP/generated/np2_structs.pb.cc index 756b12b0dc..6416723f11 100644 --- a/rpcs3/Emu/NP/generated/np2_structs.pb.cc +++ b/rpcs3/Emu/NP/generated/np2_structs.pb.cc @@ -2555,7 +2555,8 @@ inline constexpr JoinRoomResponse::Impl_::Impl_( ::_pbi::ConstantInitialized) noexcept : _cached_size_{0}, signaling_data_{}, - room_data_{nullptr} {} + room_data_{nullptr}, + opt_param_{nullptr} {} template PROTOBUF_CONSTEXPR JoinRoomResponse::JoinRoomResponse(::_pbi::ConstantInitialized) @@ -2576,6 +2577,32 @@ struct JoinRoomResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinRoomResponseDefaultTypeInternal _JoinRoomResponse_default_instance_; + +inline constexpr CreateRoomResponse::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + internal_{nullptr}, + opt_param_{nullptr} {} + +template +PROTOBUF_CONSTEXPR CreateRoomResponse::CreateRoomResponse(::_pbi::ConstantInitialized) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(CreateRoomResponse_class_data_.base()), +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(), +#endif // PROTOBUF_CUSTOM_VTABLE + _impl_(::_pbi::ConstantInitialized()) { +} +struct CreateRoomResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR CreateRoomResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~CreateRoomResponseDefaultTypeInternal() {} + union { + CreateRoomResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CreateRoomResponseDefaultTypeInternal _CreateRoomResponse_default_instance_; } // namespace np2_structs namespace np2_structs { // =================================================================== @@ -11934,6 +11961,324 @@ void CreateJoinRoomRequest::InternalSwap(CreateJoinRoomRequest* PROTOBUF_RESTRIC // =================================================================== +class CreateRoomResponse::_Internal { + public: + using HasBits = + decltype(::std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._has_bits_); +}; + +CreateRoomResponse::CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:np2_structs.CreateRoomResponse) +} +PROTOBUF_NDEBUG_INLINE CreateRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + [[maybe_unused]] const ::np2_structs::CreateRoomResponse& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0} {} + +CreateRoomResponse::CreateRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, + const CreateRoomResponse& from) +#if defined(PROTOBUF_CUSTOM_VTABLE) + : ::google::protobuf::MessageLite(arena, CreateRoomResponse_class_data_.base()) { +#else // PROTOBUF_CUSTOM_VTABLE + : ::google::protobuf::MessageLite(arena) { +#endif // PROTOBUF_CUSTOM_VTABLE + CreateRoomResponse* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.internal_ = (CheckHasBit(cached_has_bits, 0x00000001U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.internal_) + : nullptr; + _impl_.opt_param_ = (CheckHasBit(cached_has_bits, 0x00000002U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:np2_structs.CreateRoomResponse) +} +PROTOBUF_NDEBUG_INLINE CreateRoomResponse::Impl_::Impl_( + [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, + [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) + : _cached_size_{0} {} + +inline void CreateRoomResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, internal_), + 0, + offsetof(Impl_, opt_param_) - + offsetof(Impl_, internal_) + + sizeof(Impl_::opt_param_)); +} +CreateRoomResponse::~CreateRoomResponse() { + // @@protoc_insertion_point(destructor:np2_structs.CreateRoomResponse) + SharedDtor(*this); +} +inline void CreateRoomResponse::SharedDtor(MessageLite& self) { + CreateRoomResponse& this_ = static_cast(self); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + this_._internal_metadata_.Delete<::std::string>(); + ABSL_DCHECK(this_.GetArena() == nullptr); + delete this_._impl_.internal_; + delete this_._impl_.opt_param_; + this_._impl_.~Impl_(); +} + +inline void* PROTOBUF_NONNULL CreateRoomResponse::PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) { + return ::new (mem) CreateRoomResponse(arena); +} +constexpr auto CreateRoomResponse::InternalNewImpl_() { + return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(CreateRoomResponse), + alignof(CreateRoomResponse)); +} +constexpr auto CreateRoomResponse::InternalGenerateClassData_() { + return ::google::protobuf::internal::ClassDataLite<31>{ + { + &_CreateRoomResponse_default_instance_._instance, + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + &CreateRoomResponse::MergeImpl, + ::google::protobuf::MessageLite::GetNewImpl(), +#if defined(PROTOBUF_CUSTOM_VTABLE) + &CreateRoomResponse::SharedDtor, + ::google::protobuf::MessageLite::GetClearImpl(), &CreateRoomResponse::ByteSizeLong, + &CreateRoomResponse::_InternalSerialize, +#endif // PROTOBUF_CUSTOM_VTABLE + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._cached_size_), + true, + }, + "np2_structs.CreateRoomResponse", + }; +} + +PROTOBUF_CONSTINIT +PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_ = + CreateRoomResponse::InternalGenerateClassData_(); + +PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL +CreateRoomResponse::GetClassData() const { + return CreateRoomResponse_class_data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +CreateRoomResponse::_table_ = { + { + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_._has_bits_), + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + CreateRoomResponse_class_data_.base(), + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallbackLite, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::np2_structs::CreateRoomResponse>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // .np2_structs.OptParam opt_param = 2; + {::_pbi::TcParser::FastMtS1, + {18, 1, 1, + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_)}}, + // .np2_structs.RoomDataInternal internal = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .np2_structs.RoomDataInternal internal = 1; + {PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.OptParam opt_param = 2; + {PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, + {{ + {::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>()}, + {::_pbi::TcParser::GetTable<::np2_structs::OptParam>()}, + }}, + {{ + }}, +}; +PROTOBUF_NOINLINE void CreateRoomResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:np2_structs.CreateRoomResponse) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(_impl_.internal_ != nullptr); + _impl_.internal_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(_impl_.opt_param_ != nullptr); + _impl_.opt_param_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::std::string>(); +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::uint8_t* PROTOBUF_NONNULL CreateRoomResponse::_InternalSerialize( + const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) { + const CreateRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::uint8_t* PROTOBUF_NONNULL CreateRoomResponse::_InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + const CreateRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + this_.CheckHasBitConsistency(); + } + // @@protoc_insertion_point(serialize_to_array_start:np2_structs.CreateRoomResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = this_._impl_._has_bits_[0]; + // .np2_structs.RoomDataInternal internal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *this_._impl_.internal_, this_._impl_.internal_->GetCachedSize(), target, + stream); + } + + // .np2_structs.OptParam opt_param = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *this_._impl_.opt_param_, this_._impl_.opt_param_->GetCachedSize(), target, + stream); + } + + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + target = stream->WriteRaw( + this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), + static_cast(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target); + } + // @@protoc_insertion_point(serialize_to_array_end:np2_structs.CreateRoomResponse) + return target; +} + +#if defined(PROTOBUF_CUSTOM_VTABLE) +::size_t CreateRoomResponse::ByteSizeLong(const MessageLite& base) { + const CreateRoomResponse& this_ = static_cast(base); +#else // PROTOBUF_CUSTOM_VTABLE +::size_t CreateRoomResponse::ByteSizeLong() const { + const CreateRoomResponse& this_ = *this; +#endif // PROTOBUF_CUSTOM_VTABLE + // @@protoc_insertion_point(message_byte_size_start:np2_structs.CreateRoomResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(&this_); + cached_has_bits = this_._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + // .np2_structs.RoomDataInternal internal = 1; + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.internal_); + } + // .np2_structs.OptParam opt_param = 2; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.opt_param_); + } + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { + total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); + } + this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size)); + return total_size; +} + +void CreateRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = + static_cast(&to_msg); + auto& from = static_cast(from_msg); + if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) { + from.CheckHasBitConsistency(); + } + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:np2_structs.CreateRoomResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + ABSL_DCHECK(from._impl_.internal_ != nullptr); + if (_this->_impl_.internal_ == nullptr) { + _this->_impl_.internal_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.internal_); + } else { + _this->_impl_.internal_->MergeFrom(*from._impl_.internal_); + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + ABSL_DCHECK(from._impl_.opt_param_ != nullptr); + if (_this->_impl_.opt_param_ == nullptr) { + _this->_impl_.opt_param_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_); + } else { + _this->_impl_.opt_param_->MergeFrom(*from._impl_.opt_param_); + } + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::std::string>( + from._internal_metadata_); +} + +void CreateRoomResponse::CopyFrom(const CreateRoomResponse& from) { + // @@protoc_insertion_point(class_specific_copy_from_start:np2_structs.CreateRoomResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void CreateRoomResponse::InternalSwap(CreateRoomResponse* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) { + using ::std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.opt_param_) + + sizeof(CreateRoomResponse::_impl_.opt_param_) + - PROTOBUF_FIELD_OFFSET(CreateRoomResponse, _impl_.internal_)>( + reinterpret_cast(&_impl_.internal_), + reinterpret_cast(&other->_impl_.internal_)); +} + +// =================================================================== + class JoinRoomRequest::_Internal { public: using HasBits = @@ -12451,6 +12796,9 @@ JoinRoomResponse::JoinRoomResponse( _impl_.room_data_ = (CheckHasBit(cached_has_bits, 0x00000002U)) ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.room_data_) : nullptr; + _impl_.opt_param_ = (CheckHasBit(cached_has_bits, 0x00000004U)) + ? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_) + : nullptr; // @@protoc_insertion_point(copy_constructor:np2_structs.JoinRoomResponse) } @@ -12462,7 +12810,12 @@ PROTOBUF_NDEBUG_INLINE JoinRoomResponse::Impl_::Impl_( inline void JoinRoomResponse::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { new (&_impl_) Impl_(internal_visibility(), arena); - _impl_.room_data_ = {}; + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, room_data_), + 0, + offsetof(Impl_, opt_param_) - + offsetof(Impl_, room_data_) + + sizeof(Impl_::opt_param_)); } JoinRoomResponse::~JoinRoomResponse() { // @@protoc_insertion_point(destructor:np2_structs.JoinRoomResponse) @@ -12476,6 +12829,7 @@ inline void JoinRoomResponse::SharedDtor(MessageLite& self) { this_._internal_metadata_.Delete<::std::string>(); ABSL_DCHECK(this_.GetArena() == nullptr); delete this_._impl_.room_data_; + delete this_._impl_.opt_param_; this_._impl_.~Impl_(); } @@ -12531,17 +12885,17 @@ JoinRoomResponse::GetClassData() const { return JoinRoomResponse_class_data_.base(); } PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<1, 2, 2, 0, 2> +const ::_pbi::TcParseTable<2, 3, 3, 0, 2> JoinRoomResponse::_table_ = { { PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_._has_bits_), 0, // no _extensions_ - 2, 8, // max_field_number, fast_idx_mask + 3, 24, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967292, // skipmap + 4294967288, // skipmap offsetof(decltype(_table_), field_entries), - 2, // num_field_entries - 2, // num_aux_entries + 3, // num_field_entries + 3, // num_aux_entries offsetof(decltype(_table_), aux_entries), JoinRoomResponse_class_data_.base(), nullptr, // post_loop_handler @@ -12550,14 +12904,19 @@ JoinRoomResponse::_table_ = { ::_pbi::TcParser::GetTable<::np2_structs::JoinRoomResponse>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; - {::_pbi::TcParser::FastMtR1, - {18, 0, 1, - PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_)}}, + {::_pbi::TcParser::MiniParse, {}}, // .np2_structs.RoomDataInternal room_data = 1; {::_pbi::TcParser::FastMtS1, {10, 1, 0, PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_)}}, + // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; + {::_pbi::TcParser::FastMtR1, + {18, 0, 1, + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_)}}, + // .np2_structs.OptParam opt_param = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 2, + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_)}}, }}, {{ 65535, 65535 }}, {{ @@ -12565,10 +12924,13 @@ JoinRoomResponse::_table_ = { {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.signaling_data_), _Internal::kHasBitsOffset + 0, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .np2_structs.OptParam opt_param = 3; + {PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ {::_pbi::TcParser::GetTable<::np2_structs::RoomDataInternal>()}, {::_pbi::TcParser::GetTable<::np2_structs::Matching2SignalingInfo>()}, + {::_pbi::TcParser::GetTable<::np2_structs::OptParam>()}, }}, {{ }}, @@ -12581,7 +12943,7 @@ PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { _impl_.signaling_data_.Clear(); } @@ -12589,6 +12951,10 @@ PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { ABSL_DCHECK(_impl_.room_data_ != nullptr); _impl_.room_data_->Clear(); } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(_impl_.opt_param_ != nullptr); + _impl_.opt_param_->Clear(); + } } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::std::string>(); @@ -12633,6 +12999,13 @@ PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { } } + // .np2_structs.OptParam opt_param = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *this_._impl_.opt_param_, this_._impl_.opt_param_->GetCachedSize(), target, + stream); + } + if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { target = stream->WriteRaw( this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(), @@ -12658,7 +13031,7 @@ PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { ::_pbi::Prefetch5LinesFrom7Lines(&this_); cached_has_bits = this_._impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { total_size += 1UL * this_._internal_signaling_data_size(); @@ -12671,6 +13044,11 @@ PROTOBUF_NOINLINE void JoinRoomResponse::Clear() { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.room_data_); } + // .np2_structs.OptParam opt_param = 3; + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.opt_param_); + } } if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) { total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size(); @@ -12694,7 +13072,7 @@ void JoinRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, (void)cached_has_bits; cached_has_bits = from._impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) { + if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) { if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) { _this->_internal_mutable_signaling_data()->InternalMergeFromWithArena( ::google::protobuf::MessageLite::internal_visibility(), arena, @@ -12708,6 +13086,14 @@ void JoinRoomResponse::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.room_data_->MergeFrom(*from._impl_.room_data_); } } + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + ABSL_DCHECK(from._impl_.opt_param_ != nullptr); + if (_this->_impl_.opt_param_ == nullptr) { + _this->_impl_.opt_param_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.opt_param_); + } else { + _this->_impl_.opt_param_->MergeFrom(*from._impl_.opt_param_); + } + } } _this->_impl_._has_bits_[0] |= cached_has_bits; _this->_internal_metadata_.MergeFrom<::std::string>( @@ -12727,7 +13113,12 @@ void JoinRoomResponse::InternalSwap(JoinRoomResponse* PROTOBUF_RESTRICT PROTOBUF _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); _impl_.signaling_data_.InternalSwap(&other->_impl_.signaling_data_); - swap(_impl_.room_data_, other->_impl_.room_data_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.opt_param_) + + sizeof(JoinRoomResponse::_impl_.opt_param_) + - PROTOBUF_FIELD_OFFSET(JoinRoomResponse, _impl_.room_data_)>( + reinterpret_cast(&_impl_.room_data_), + reinterpret_cast(&other->_impl_.room_data_)); } // =================================================================== diff --git a/rpcs3/Emu/NP/generated/np2_structs.pb.h b/rpcs3/Emu/NP/generated/np2_structs.pb.h index f662c0a1a0..0e035973fd 100644 --- a/rpcs3/Emu/NP/generated/np2_structs.pb.h +++ b/rpcs3/Emu/NP/generated/np2_structs.pb.h @@ -71,6 +71,10 @@ class CreateRoomGUIRequest; struct CreateRoomGUIRequestDefaultTypeInternal; extern CreateRoomGUIRequestDefaultTypeInternal _CreateRoomGUIRequest_default_instance_; extern const ::google::protobuf::internal::ClassDataLite<33> CreateRoomGUIRequest_class_data_; +class CreateRoomResponse; +struct CreateRoomResponseDefaultTypeInternal; +extern CreateRoomResponseDefaultTypeInternal _CreateRoomResponse_default_instance_; +extern const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_; class GUIUserInfo; struct GUIUserInfoDefaultTypeInternal; extern GUIUserInfoDefaultTypeInternal _GUIUserInfo_default_instance_; @@ -1031,7 +1035,7 @@ class TusVariable final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusVariable_default_instance_); } - static constexpr int kIndexInFileMessages = 56; + static constexpr int kIndexInFileMessages = 57; friend void swap(TusVariable& a, TusVariable& b) { a.Swap(&b); } inline void Swap(TusVariable* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1279,7 +1283,7 @@ class TusUser final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusUser_default_instance_); } - static constexpr int kIndexInFileMessages = 55; + static constexpr int kIndexInFileMessages = 56; friend void swap(TusUser& a, TusUser& b) { a.Swap(&b); } inline void Swap(TusUser* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1474,7 +1478,7 @@ class TusGetFriendsVariableRequest final : public ::google::protobuf::MessageLit return *reinterpret_cast( &_TusGetFriendsVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 61; + static constexpr int kIndexInFileMessages = 62; friend void swap(TusGetFriendsVariableRequest& a, TusGetFriendsVariableRequest& b) { a.Swap(&b); } inline void Swap(TusGetFriendsVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1688,7 +1692,7 @@ class TusGetFriendsDataStatusRequest final : public ::google::protobuf::MessageL return *reinterpret_cast( &_TusGetFriendsDataStatusRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 72; + static constexpr int kIndexInFileMessages = 73; friend void swap(TusGetFriendsDataStatusRequest& a, TusGetFriendsDataStatusRequest& b) { a.Swap(&b); } inline void Swap(TusGetFriendsDataStatusRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -1902,7 +1906,7 @@ class TusDataStatus final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusDataStatus_default_instance_); } - static constexpr int kIndexInFileMessages = 66; + static constexpr int kIndexInFileMessages = 67; friend void swap(TusDataStatus& a, TusDataStatus& b) { a.Swap(&b); } inline void Swap(TusDataStatus* PROTOBUF_NONNULL other) { if (other == this) return; @@ -2143,7 +2147,7 @@ class SetRoomSearchFlagGUI final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SetRoomSearchFlagGUI_default_instance_); } - static constexpr int kIndexInFileMessages = 84; + static constexpr int kIndexInFileMessages = 85; friend void swap(SetRoomSearchFlagGUI& a, SetRoomSearchFlagGUI& b) { a.Swap(&b); } inline void Swap(SetRoomSearchFlagGUI* PROTOBUF_NONNULL other) { if (other == this) return; @@ -2338,7 +2342,7 @@ class SetPresenceRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SetPresenceRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 74; + static constexpr int kIndexInFileMessages = 75; friend void swap(SetPresenceRequest& a, SetPresenceRequest& b) { a.Swap(&b); } inline void Swap(SetPresenceRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -2572,7 +2576,7 @@ class SendMessageRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SendMessageRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 43; + static constexpr int kIndexInFileMessages = 44; friend void swap(SendMessageRequest& a, SendMessageRequest& b) { a.Swap(&b); } inline void Swap(SendMessageRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -2779,7 +2783,7 @@ class ScoreRankData final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_ScoreRankData_default_instance_); } - static constexpr int kIndexInFileMessages = 50; + static constexpr int kIndexInFileMessages = 51; friend void swap(ScoreRankData& a, ScoreRankData& b) { a.Swap(&b); } inline void Swap(ScoreRankData* PROTOBUF_NONNULL other) { if (other == this) return; @@ -3039,7 +3043,7 @@ class ScoreNpIdPcId final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_ScoreNpIdPcId_default_instance_); } - static constexpr int kIndexInFileMessages = 47; + static constexpr int kIndexInFileMessages = 48; friend void swap(ScoreNpIdPcId& a, ScoreNpIdPcId& b) { a.Swap(&b); } inline void Swap(ScoreNpIdPcId* PROTOBUF_NONNULL other) { if (other == this) return; @@ -3234,7 +3238,7 @@ class ScoreInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_ScoreInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 51; + static constexpr int kIndexInFileMessages = 52; friend void swap(ScoreInfo& a, ScoreInfo& b) { a.Swap(&b); } inline void Swap(ScoreInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -3417,7 +3421,7 @@ class RecordScoreRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RecordScoreRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 45; + static constexpr int kIndexInFileMessages = 46; friend void swap(RecordScoreRequest& a, RecordScoreRequest& b) { a.Swap(&b); } inline void Swap(RecordScoreRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -3653,7 +3657,7 @@ class RecordScoreGameDataRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RecordScoreGameDataRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 53; + static constexpr int kIndexInFileMessages = 54; friend void swap(RecordScoreGameDataRequest& a, RecordScoreGameDataRequest& b) { a.Swap(&b); } inline void Swap(RecordScoreGameDataRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -4050,7 +4054,7 @@ class MatchingSearchCondition final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingSearchCondition_default_instance_); } - static constexpr int kIndexInFileMessages = 75; + static constexpr int kIndexInFileMessages = 76; friend void swap(MatchingSearchCondition& a, MatchingSearchCondition& b) { a.Swap(&b); } inline void Swap(MatchingSearchCondition* PROTOBUF_NONNULL other) { if (other == this) return; @@ -4264,7 +4268,7 @@ class MatchingGuiRoomId final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingGuiRoomId_default_instance_); } - static constexpr int kIndexInFileMessages = 83; + static constexpr int kIndexInFileMessages = 84; friend void swap(MatchingGuiRoomId& a, MatchingGuiRoomId& b) { a.Swap(&b); } inline void Swap(MatchingGuiRoomId* PROTOBUF_NONNULL other) { if (other == this) return; @@ -4447,7 +4451,7 @@ class MatchingAttr final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingAttr_default_instance_); } - static constexpr int kIndexInFileMessages = 76; + static constexpr int kIndexInFileMessages = 77; friend void swap(MatchingAttr& a, MatchingAttr& b) { a.Swap(&b); } inline void Swap(MatchingAttr* PROTOBUF_NONNULL other) { if (other == this) return; @@ -4873,7 +4877,7 @@ class GetScoreRangeRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetScoreRangeRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 46; + static constexpr int kIndexInFileMessages = 47; friend void swap(GetScoreRangeRequest& a, GetScoreRangeRequest& b) { a.Swap(&b); } inline void Swap(GetScoreRangeRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -5099,7 +5103,7 @@ class GetScoreGameDataRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetScoreGameDataRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 54; + static constexpr int kIndexInFileMessages = 55; friend void swap(GetScoreGameDataRequest& a, GetScoreGameDataRequest& b) { a.Swap(&b); } inline void Swap(GetScoreGameDataRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -5306,7 +5310,7 @@ class GetScoreFriendsRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetScoreFriendsRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 49; + static constexpr int kIndexInFileMessages = 50; friend void swap(GetScoreFriendsRequest& a, GetScoreFriendsRequest& b) { a.Swap(&b); } inline void Swap(GetScoreFriendsRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -5532,7 +5536,7 @@ class BoardInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_BoardInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 44; + static constexpr int kIndexInFileMessages = 45; friend void swap(BoardInfo& a, BoardInfo& b) { a.Swap(&b); } inline void Swap(BoardInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -5758,7 +5762,7 @@ class TusVarResponse final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusVarResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 57; + static constexpr int kIndexInFileMessages = 58; friend void swap(TusVarResponse& a, TusVarResponse& b) { a.Swap(&b); } inline void Swap(TusVarResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -5943,7 +5947,7 @@ class TusTryAndSetVariableRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusTryAndSetVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 63; + static constexpr int kIndexInFileMessages = 64; friend void swap(TusTryAndSetVariableRequest& a, TusTryAndSetVariableRequest& b) { a.Swap(&b); } inline void Swap(TusTryAndSetVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -6221,7 +6225,7 @@ class TusSetMultiSlotVariableRequest final : public ::google::protobuf::MessageL return *reinterpret_cast( &_TusSetMultiSlotVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 58; + static constexpr int kIndexInFileMessages = 59; friend void swap(TusSetMultiSlotVariableRequest& a, TusSetMultiSlotVariableRequest& b) { a.Swap(&b); } inline void Swap(TusSetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -6446,7 +6450,7 @@ class TusSetDataRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusSetDataRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 65; + static constexpr int kIndexInFileMessages = 66; friend void swap(TusSetDataRequest& a, TusSetDataRequest& b) { a.Swap(&b); } inline void Swap(TusSetDataRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -6713,7 +6717,7 @@ class TusGetMultiUserVariableRequest final : public ::google::protobuf::MessageL return *reinterpret_cast( &_TusGetMultiUserVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 60; + static constexpr int kIndexInFileMessages = 61; friend void swap(TusGetMultiUserVariableRequest& a, TusGetMultiUserVariableRequest& b) { a.Swap(&b); } inline void Swap(TusGetMultiUserVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -6910,7 +6914,7 @@ class TusGetMultiUserDataStatusRequest final : public ::google::protobuf::Messag return *reinterpret_cast( &_TusGetMultiUserDataStatusRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 71; + static constexpr int kIndexInFileMessages = 72; friend void swap(TusGetMultiUserDataStatusRequest& a, TusGetMultiUserDataStatusRequest& b) { a.Swap(&b); } inline void Swap(TusGetMultiUserDataStatusRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -7107,7 +7111,7 @@ class TusGetMultiSlotVariableRequest final : public ::google::protobuf::MessageL return *reinterpret_cast( &_TusGetMultiSlotVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 59; + static constexpr int kIndexInFileMessages = 60; friend void swap(TusGetMultiSlotVariableRequest& a, TusGetMultiSlotVariableRequest& b) { a.Swap(&b); } inline void Swap(TusGetMultiSlotVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -7311,7 +7315,7 @@ class TusGetMultiSlotDataStatusRequest final : public ::google::protobuf::Messag return *reinterpret_cast( &_TusGetMultiSlotDataStatusRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 70; + static constexpr int kIndexInFileMessages = 71; friend void swap(TusGetMultiSlotDataStatusRequest& a, TusGetMultiSlotDataStatusRequest& b) { a.Swap(&b); } inline void Swap(TusGetMultiSlotDataStatusRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -7515,7 +7519,7 @@ class TusGetDataRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusGetDataRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 69; + static constexpr int kIndexInFileMessages = 70; friend void swap(TusGetDataRequest& a, TusGetDataRequest& b) { a.Swap(&b); } inline void Swap(TusGetDataRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -7710,7 +7714,7 @@ class TusDeleteMultiSlotVariableRequest final : public ::google::protobuf::Messa return *reinterpret_cast( &_TusDeleteMultiSlotVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 64; + static constexpr int kIndexInFileMessages = 65; friend void swap(TusDeleteMultiSlotVariableRequest& a, TusDeleteMultiSlotVariableRequest& b) { a.Swap(&b); } inline void Swap(TusDeleteMultiSlotVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -7914,7 +7918,7 @@ class TusDeleteMultiSlotDataRequest final : public ::google::protobuf::MessageLi return *reinterpret_cast( &_TusDeleteMultiSlotDataRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 73; + static constexpr int kIndexInFileMessages = 74; friend void swap(TusDeleteMultiSlotDataRequest& a, TusDeleteMultiSlotDataRequest& b) { a.Swap(&b); } inline void Swap(TusDeleteMultiSlotDataRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -8118,7 +8122,7 @@ class TusDataStatusResponse final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusDataStatusResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 68; + static constexpr int kIndexInFileMessages = 69; friend void swap(TusDataStatusResponse& a, TusDataStatusResponse& b) { a.Swap(&b); } inline void Swap(TusDataStatusResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -8303,7 +8307,7 @@ class TusData final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusData_default_instance_); } - static constexpr int kIndexInFileMessages = 67; + static constexpr int kIndexInFileMessages = 68; friend void swap(TusData& a, TusData& b) { a.Swap(&b); } inline void Swap(TusData* PROTOBUF_NONNULL other) { if (other == this) return; @@ -8503,7 +8507,7 @@ class TusAddAndGetVariableRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_TusAddAndGetVariableRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 62; + static constexpr int kIndexInFileMessages = 63; friend void swap(TusAddAndGetVariableRequest& a, TusAddAndGetVariableRequest& b) { a.Swap(&b); } inline void Swap(TusAddAndGetVariableRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -8948,7 +8952,7 @@ class SendRoomMessageRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SendRoomMessageRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 40; + static constexpr int kIndexInFileMessages = 41; friend void swap(SendRoomMessageRequest& a, SendRoomMessageRequest& b) { a.Swap(&b); } inline void Swap(SendRoomMessageRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -9196,7 +9200,7 @@ class SearchJoinRoomGUIRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SearchJoinRoomGUIRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 86; + static constexpr int kIndexInFileMessages = 87; friend void swap(SearchJoinRoomGUIRequest& a, SearchJoinRoomGUIRequest& b) { a.Swap(&b); } inline void Swap(SearchJoinRoomGUIRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -9400,7 +9404,7 @@ class RoomUpdateInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RoomUpdateInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 36; + static constexpr int kIndexInFileMessages = 37; friend void swap(RoomUpdateInfo& a, RoomUpdateInfo& b) { a.Swap(&b); } inline void Swap(RoomUpdateInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -9612,7 +9616,7 @@ class RoomMessageInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RoomMessageInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 41; + static constexpr int kIndexInFileMessages = 42; friend void swap(RoomMessageInfo& a, RoomMessageInfo& b) { a.Swap(&b); } inline void Swap(RoomMessageInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -10291,7 +10295,7 @@ class QuickMatchGUIRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_QuickMatchGUIRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 85; + static constexpr int kIndexInFileMessages = 86; friend void swap(QuickMatchGUIRequest& a, QuickMatchGUIRequest& b) { a.Swap(&b); } inline void Swap(QuickMatchGUIRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -10705,7 +10709,7 @@ class MessageDetails final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MessageDetails_default_instance_); } - static constexpr int kIndexInFileMessages = 42; + static constexpr int kIndexInFileMessages = 43; friend void swap(MessageDetails& a, MessageDetails& b) { a.Swap(&b); } inline void Swap(MessageDetails* PROTOBUF_NONNULL other) { if (other == this) return; @@ -10997,7 +11001,7 @@ class MatchingRoom final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingRoom_default_instance_); } - static constexpr int kIndexInFileMessages = 81; + static constexpr int kIndexInFileMessages = 82; friend void swap(MatchingRoom& a, MatchingRoom& b) { a.Swap(&b); } inline void Swap(MatchingRoom* PROTOBUF_NONNULL other) { if (other == this) return; @@ -11199,7 +11203,7 @@ class LeaveRoomRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_LeaveRoomRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 25; + static constexpr int kIndexInFileMessages = 26; friend void swap(LeaveRoomRequest& a, LeaveRoomRequest& b) { a.Swap(&b); } inline void Swap(LeaveRoomRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -11589,7 +11593,7 @@ class GetScoreResponse final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetScoreResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 52; + static constexpr int kIndexInFileMessages = 53; friend void swap(GetScoreResponse& a, GetScoreResponse& b) { a.Swap(&b); } inline void Swap(GetScoreResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -11841,7 +11845,7 @@ class GetScoreNpIdRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetScoreNpIdRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 48; + static constexpr int kIndexInFileMessages = 49; friend void swap(GetScoreNpIdRequest& a, GetScoreNpIdRequest& b) { a.Swap(&b); } inline void Swap(GetScoreNpIdRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -12062,7 +12066,7 @@ class GetRoomMemberDataInternalRequest final : public ::google::protobuf::Messag return *reinterpret_cast( &_GetRoomMemberDataInternalRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 30; + static constexpr int kIndexInFileMessages = 31; friend void swap(GetRoomMemberDataInternalRequest& a, GetRoomMemberDataInternalRequest& b) { a.Swap(&b); } inline void Swap(GetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -12276,7 +12280,7 @@ class GetRoomListGUIRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetRoomListGUIRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 80; + static constexpr int kIndexInFileMessages = 81; friend void swap(GetRoomListGUIRequest& a, GetRoomListGUIRequest& b) { a.Swap(&b); } inline void Swap(GetRoomListGUIRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -12504,7 +12508,7 @@ class GetRoomDataInternalRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetRoomDataInternalRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 33; + static constexpr int kIndexInFileMessages = 34; friend void swap(GetRoomDataInternalRequest& a, GetRoomDataInternalRequest& b) { a.Swap(&b); } inline void Swap(GetRoomDataInternalRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -12701,7 +12705,7 @@ class GetRoomDataExternalListRequest final : public ::google::protobuf::MessageL return *reinterpret_cast( &_GetRoomDataExternalListRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 26; + static constexpr int kIndexInFileMessages = 27; friend void swap(GetRoomDataExternalListRequest& a, GetRoomDataExternalListRequest& b) { a.Swap(&b); } inline void Swap(GetRoomDataExternalListRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -12907,7 +12911,7 @@ class GetPingInfoResponse final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GetPingInfoResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 39; + static constexpr int kIndexInFileMessages = 40; friend void swap(GetPingInfoResponse& a, GetPingInfoResponse& b) { a.Swap(&b); } inline void Swap(GetPingInfoResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -13126,7 +13130,7 @@ class GUIUserInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_GUIUserInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 78; + static constexpr int kIndexInFileMessages = 79; friend void swap(GUIUserInfo& a, GUIUserInfo& b) { a.Swap(&b); } inline void Swap(GUIUserInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -13321,7 +13325,7 @@ class CreateRoomGUIRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_CreateRoomGUIRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 77; + static constexpr int kIndexInFileMessages = 78; friend void swap(CreateRoomGUIRequest& a, CreateRoomGUIRequest& b) { a.Swap(&b); } inline void Swap(CreateRoomGUIRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -13754,7 +13758,7 @@ class SetUserInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SetUserInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 32; + static constexpr int kIndexInFileMessages = 33; friend void swap(SetUserInfo& a, SetUserInfo& b) { a.Swap(&b); } inline void Swap(SetUserInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -13956,7 +13960,7 @@ class SetRoomMemberDataInternalRequest final : public ::google::protobuf::Messag return *reinterpret_cast( &_SetRoomMemberDataInternalRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 31; + static constexpr int kIndexInFileMessages = 32; friend void swap(SetRoomMemberDataInternalRequest& a, SetRoomMemberDataInternalRequest& b) { a.Swap(&b); } inline void Swap(SetRoomMemberDataInternalRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -14187,7 +14191,7 @@ class SetRoomDataInternalRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SetRoomDataInternalRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 29; + static constexpr int kIndexInFileMessages = 30; friend void swap(SetRoomDataInternalRequest& a, SetRoomDataInternalRequest& b) { a.Swap(&b); } inline void Swap(SetRoomDataInternalRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -14467,7 +14471,7 @@ class SetRoomDataExternalRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_SetRoomDataExternalRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 28; + static constexpr int kIndexInFileMessages = 29; friend void swap(SetRoomDataExternalRequest& a, SetRoomDataExternalRequest& b) { a.Swap(&b); } inline void Swap(SetRoomDataExternalRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -15535,7 +15539,7 @@ class MatchingRoomStatus final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingRoomStatus_default_instance_); } - static constexpr int kIndexInFileMessages = 79; + static constexpr int kIndexInFileMessages = 80; friend void swap(MatchingRoomStatus& a, MatchingRoomStatus& b) { a.Swap(&b); } inline void Swap(MatchingRoomStatus* PROTOBUF_NONNULL other) { if (other == this) return; @@ -15771,7 +15775,7 @@ class MatchingRoomList final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingRoomList_default_instance_); } - static constexpr int kIndexInFileMessages = 82; + static constexpr int kIndexInFileMessages = 83; friend void swap(MatchingRoomList& a, MatchingRoomList& b) { a.Swap(&b); } inline void Swap(MatchingRoomList* PROTOBUF_NONNULL other) { if (other == this) return; @@ -16180,7 +16184,7 @@ class JoinRoomRequest final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_JoinRoomRequest_default_instance_); } - static constexpr int kIndexInFileMessages = 23; + static constexpr int kIndexInFileMessages = 24; friend void swap(JoinRoomRequest& a, JoinRoomRequest& b) { a.Swap(&b); } inline void Swap(JoinRoomRequest* PROTOBUF_NONNULL other) { if (other == this) return; @@ -18318,7 +18322,7 @@ class MatchingSearchJoinRoomInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_MatchingSearchJoinRoomInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 87; + static constexpr int kIndexInFileMessages = 88; friend void swap(MatchingSearchJoinRoomInfo& a, MatchingSearchJoinRoomInfo& b) { a.Swap(&b); } inline void Swap(MatchingSearchJoinRoomInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -18520,7 +18524,7 @@ class GetRoomDataExternalListResponse final : public ::google::protobuf::Message return *reinterpret_cast( &_GetRoomDataExternalListResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 27; + static constexpr int kIndexInFileMessages = 28; friend void swap(GetRoomDataExternalListResponse& a, GetRoomDataExternalListResponse& b) { a.Swap(&b); } inline void Swap(GetRoomDataExternalListResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -18705,7 +18709,7 @@ class RoomMemberUpdateInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RoomMemberUpdateInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 34; + static constexpr int kIndexInFileMessages = 35; friend void swap(RoomMemberUpdateInfo& a, RoomMemberUpdateInfo& b) { a.Swap(&b); } inline void Swap(RoomMemberUpdateInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -18922,7 +18926,7 @@ class RoomMemberDataInternalUpdateInfo final : public ::google::protobuf::Messag return *reinterpret_cast( &_RoomMemberDataInternalUpdateInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 38; + static constexpr int kIndexInFileMessages = 39; friend void swap(RoomMemberDataInternalUpdateInfo& a, RoomMemberDataInternalUpdateInfo& b) { a.Swap(&b); } inline void Swap(RoomMemberDataInternalUpdateInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -19482,7 +19486,7 @@ class RoomDataInternalUpdateInfo final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_RoomDataInternalUpdateInfo_default_instance_); } - static constexpr int kIndexInFileMessages = 37; + static constexpr int kIndexInFileMessages = 38; friend void swap(RoomDataInternalUpdateInfo& a, RoomDataInternalUpdateInfo& b) { a.Swap(&b); } inline void Swap(RoomDataInternalUpdateInfo* PROTOBUF_NONNULL other) { if (other == this) return; @@ -19725,7 +19729,7 @@ class NotificationUserJoinedRoom final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_NotificationUserJoinedRoom_default_instance_); } - static constexpr int kIndexInFileMessages = 35; + static constexpr int kIndexInFileMessages = 36; friend void swap(NotificationUserJoinedRoom& a, NotificationUserJoinedRoom& b) { a.Swap(&b); } inline void Swap(NotificationUserJoinedRoom* PROTOBUF_NONNULL other) { if (other == this) return; @@ -19937,7 +19941,7 @@ class JoinRoomResponse final : public ::google::protobuf::MessageLite return *reinterpret_cast( &_JoinRoomResponse_default_instance_); } - static constexpr int kIndexInFileMessages = 24; + static constexpr int kIndexInFileMessages = 25; friend void swap(JoinRoomResponse& a, JoinRoomResponse& b) { a.Swap(&b); } inline void Swap(JoinRoomResponse* PROTOBUF_NONNULL other) { if (other == this) return; @@ -20023,6 +20027,7 @@ class JoinRoomResponse final : public ::google::protobuf::MessageLite enum : int { kSignalingDataFieldNumber = 2, kRoomDataFieldNumber = 1, + kOptParamFieldNumber = 3, }; // repeated .np2_structs.Matching2SignalingInfo signaling_data = 2; int signaling_data_size() const; @@ -20055,13 +20060,28 @@ class JoinRoomResponse final : public ::google::protobuf::MessageLite const ::np2_structs::RoomDataInternal& _internal_room_data() const; ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL _internal_mutable_room_data(); + public: + // .np2_structs.OptParam opt_param = 3; + bool has_opt_param() const; + void clear_opt_param() ; + const ::np2_structs::OptParam& opt_param() const; + [[nodiscard]] ::np2_structs::OptParam* PROTOBUF_NULLABLE release_opt_param(); + ::np2_structs::OptParam* PROTOBUF_NONNULL mutable_opt_param(); + void set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + ::np2_structs::OptParam* PROTOBUF_NULLABLE unsafe_arena_release_opt_param(); + + private: + const ::np2_structs::OptParam& _internal_opt_param() const; + ::np2_structs::OptParam* PROTOBUF_NONNULL _internal_mutable_opt_param(); + public: // @@protoc_insertion_point(class_scope:np2_structs.JoinRoomResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, - 2, 0, + static const ::google::protobuf::internal::TcParseTable<2, 3, + 3, 0, 2> _table_; @@ -20084,6 +20104,7 @@ class JoinRoomResponse final : public ::google::protobuf::MessageLite ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::np2_structs::Matching2SignalingInfo > signaling_data_; ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE room_data_; + ::np2_structs::OptParam* PROTOBUF_NULLABLE opt_param_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; @@ -20091,6 +20112,206 @@ class JoinRoomResponse final : public ::google::protobuf::MessageLite }; extern const ::google::protobuf::internal::ClassDataLite<29> JoinRoomResponse_class_data_; +// ------------------------------------------------------------------- + +class CreateRoomResponse final : public ::google::protobuf::MessageLite +/* @@protoc_insertion_point(class_definition:np2_structs.CreateRoomResponse) */ { + public: + inline CreateRoomResponse() : CreateRoomResponse(nullptr) {} + ~CreateRoomResponse() PROTOBUF_FINAL; + +#if defined(PROTOBUF_CUSTOM_VTABLE) + void operator delete(CreateRoomResponse* PROTOBUF_NONNULL msg, ::std::destroying_delete_t) { + SharedDtor(*msg); + ::google::protobuf::internal::SizedDelete(msg, sizeof(CreateRoomResponse)); + } +#endif + + template + explicit PROTOBUF_CONSTEXPR CreateRoomResponse(::google::protobuf::internal::ConstantInitialized); + + inline CreateRoomResponse(const CreateRoomResponse& from) : CreateRoomResponse(nullptr, from) {} + inline CreateRoomResponse(CreateRoomResponse&& from) noexcept + : CreateRoomResponse(nullptr, ::std::move(from)) {} + inline CreateRoomResponse& operator=(const CreateRoomResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateRoomResponse& operator=(CreateRoomResponse&& from) noexcept { + if (this == &from) return *this; + if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::std::string& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString); + } + inline ::std::string* PROTOBUF_NONNULL mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::std::string>(); + } + + static const CreateRoomResponse& default_instance() { + return *reinterpret_cast( + &_CreateRoomResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = 23; + friend void swap(CreateRoomResponse& a, CreateRoomResponse& b) { a.Swap(&b); } + inline void Swap(CreateRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) { + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateRoomResponse* PROTOBUF_NONNULL other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CreateRoomResponse* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const { + return ::google::protobuf::MessageLite::DefaultConstruct(arena); + } + void CopyFrom(const CreateRoomResponse& from); + void MergeFrom(const CreateRoomResponse& from) { CreateRoomResponse::MergeImpl(*this, from); } + + private: + static void MergeImpl(::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL; + #if defined(PROTOBUF_CUSTOM_VTABLE) + private: + static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg); + static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream); + + public: + ::size_t ByteSizeLong() const { return ByteSizeLong(*this); } + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const { + return _InternalSerialize(*this, target, stream); + } + #else // PROTOBUF_CUSTOM_VTABLE + ::size_t ByteSizeLong() const final; + ::uint8_t* PROTOBUF_NONNULL _InternalSerialize( + ::uint8_t* PROTOBUF_NONNULL target, + ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final; + #endif // PROTOBUF_CUSTOM_VTABLE + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static void SharedDtor(MessageLite& self); + void InternalSwap(CreateRoomResponse* PROTOBUF_NONNULL other); + private: + template + friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)(); + static ::absl::string_view FullMessageName() { return "np2_structs.CreateRoomResponse"; } + + explicit CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + CreateRoomResponse(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CreateRoomResponse& from); + CreateRoomResponse( + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, CreateRoomResponse&& from) noexcept + : CreateRoomResponse(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL; + static void* PROTOBUF_NONNULL PlacementNew_( + const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + static constexpr auto InternalNewImpl_(); + + public: + static constexpr auto InternalGenerateClassData_(); + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kInternalFieldNumber = 1, + kOptParamFieldNumber = 2, + }; + // .np2_structs.RoomDataInternal internal = 1; + bool has_internal() const; + void clear_internal() ; + const ::np2_structs::RoomDataInternal& internal() const; + [[nodiscard]] ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE release_internal(); + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL mutable_internal(); + void set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value); + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE unsafe_arena_release_internal(); + + private: + const ::np2_structs::RoomDataInternal& _internal_internal() const; + ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL _internal_mutable_internal(); + + public: + // .np2_structs.OptParam opt_param = 2; + bool has_opt_param() const; + void clear_opt_param() ; + const ::np2_structs::OptParam& opt_param() const; + [[nodiscard]] ::np2_structs::OptParam* PROTOBUF_NULLABLE release_opt_param(); + ::np2_structs::OptParam* PROTOBUF_NONNULL mutable_opt_param(); + void set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value); + ::np2_structs::OptParam* PROTOBUF_NULLABLE unsafe_arena_release_opt_param(); + + private: + const ::np2_structs::OptParam& _internal_opt_param() const; + ::np2_structs::OptParam* PROTOBUF_NONNULL _internal_mutable_opt_param(); + + public: + // @@protoc_insertion_point(class_scope:np2_structs.CreateRoomResponse) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, + 2, 0, + 2> + _table_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena); + inline explicit Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, + const CreateRoomResponse& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::CachedSize _cached_size_; + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE internal_; + ::np2_structs::OptParam* PROTOBUF_NULLABLE opt_param_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_np2_5fstructs_2eproto; +}; + +extern const ::google::protobuf::internal::ClassDataLite<31> CreateRoomResponse_class_data_; // =================================================================== @@ -26431,6 +26652,208 @@ inline void CreateJoinRoomRequest::set_allocated_sigoptparam(::np2_structs::OptP // ------------------------------------------------------------------- +// CreateRoomResponse + +// .np2_structs.RoomDataInternal internal = 1; +inline bool CreateRoomResponse::has_internal() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000001U); + PROTOBUF_ASSUME(!value || _impl_.internal_ != nullptr); + return value; +} +inline void CreateRoomResponse::clear_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.internal_ != nullptr) _impl_.internal_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000001U); +} +inline const ::np2_structs::RoomDataInternal& CreateRoomResponse::_internal_internal() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::RoomDataInternal* p = _impl_.internal_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_RoomDataInternal_default_instance_); +} +inline const ::np2_structs::RoomDataInternal& CreateRoomResponse::internal() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomResponse.internal) + return _internal_internal(); +} +inline void CreateRoomResponse::unsafe_arena_set_allocated_internal( + ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.internal_); + } + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateRoomResponse.internal) +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE CreateRoomResponse::release_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* released = _impl_.internal_; + _impl_.internal_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE CreateRoomResponse::unsafe_arena_release_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateRoomResponse.internal) + + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* temp = _impl_.internal_; + _impl_.internal_ = nullptr; + return temp; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL CreateRoomResponse::_internal_mutable_internal() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.internal_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::RoomDataInternal>(GetArena()); + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(p); + } + return _impl_.internal_; +} +inline ::np2_structs::RoomDataInternal* PROTOBUF_NONNULL CreateRoomResponse::mutable_internal() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + ::np2_structs::RoomDataInternal* _msg = _internal_mutable_internal(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateRoomResponse.internal) + return _msg; +} +inline void CreateRoomResponse::set_allocated_internal(::np2_structs::RoomDataInternal* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.internal_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000001U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + } + + _impl_.internal_ = reinterpret_cast<::np2_structs::RoomDataInternal*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateRoomResponse.internal) +} + +// .np2_structs.OptParam opt_param = 2; +inline bool CreateRoomResponse::has_opt_param() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000002U); + PROTOBUF_ASSUME(!value || _impl_.opt_param_ != nullptr); + return value; +} +inline void CreateRoomResponse::clear_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ != nullptr) _impl_.opt_param_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000002U); +} +inline const ::np2_structs::OptParam& CreateRoomResponse::_internal_opt_param() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::OptParam* p = _impl_.opt_param_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_OptParam_default_instance_); +} +inline const ::np2_structs::OptParam& CreateRoomResponse::opt_param() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.CreateRoomResponse.opt_param) + return _internal_opt_param(); +} +inline void CreateRoomResponse::unsafe_arena_set_allocated_opt_param( + ::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.CreateRoomResponse.opt_param) +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateRoomResponse::release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* released = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE CreateRoomResponse::unsafe_arena_release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.CreateRoomResponse.opt_param) + + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* temp = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + return temp; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateRoomResponse::_internal_mutable_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::OptParam>(GetArena()); + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(p); + } + return _impl_.opt_param_; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL CreateRoomResponse::mutable_opt_param() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + ::np2_structs::OptParam* _msg = _internal_mutable_opt_param(); + // @@protoc_insertion_point(field_mutable:np2_structs.CreateRoomResponse.opt_param) + return _msg; +} +inline void CreateRoomResponse::set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000002U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + } + + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.CreateRoomResponse.opt_param) +} + +// ------------------------------------------------------------------- + // JoinRoomRequest // uint64 roomId = 1; @@ -27001,6 +27424,105 @@ JoinRoomResponse::_internal_mutable_signaling_data() { return &_impl_.signaling_data_; } +// .np2_structs.OptParam opt_param = 3; +inline bool JoinRoomResponse::has_opt_param() const { + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); + PROTOBUF_ASSUME(!value || _impl_.opt_param_ != nullptr); + return value; +} +inline void JoinRoomResponse::clear_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ != nullptr) _impl_.opt_param_->Clear(); + ClearHasBit(_impl_._has_bits_[0], + 0x00000004U); +} +inline const ::np2_structs::OptParam& JoinRoomResponse::_internal_opt_param() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::np2_structs::OptParam* p = _impl_.opt_param_; + return p != nullptr ? *p : reinterpret_cast(::np2_structs::_OptParam_default_instance_); +} +inline const ::np2_structs::OptParam& JoinRoomResponse::opt_param() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:np2_structs.JoinRoomResponse.opt_param) + return _internal_opt_param(); +} +inline void JoinRoomResponse::unsafe_arena_set_allocated_opt_param( + ::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:np2_structs.JoinRoomResponse.opt_param) +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE JoinRoomResponse::release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* released = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::np2_structs::OptParam* PROTOBUF_NULLABLE JoinRoomResponse::unsafe_arena_release_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:np2_structs.JoinRoomResponse.opt_param) + + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* temp = _impl_.opt_param_; + _impl_.opt_param_ = nullptr; + return temp; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL JoinRoomResponse::_internal_mutable_opt_param() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.opt_param_ == nullptr) { + auto* p = ::google::protobuf::MessageLite::DefaultConstruct<::np2_structs::OptParam>(GetArena()); + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(p); + } + return _impl_.opt_param_; +} +inline ::np2_structs::OptParam* PROTOBUF_NONNULL JoinRoomResponse::mutable_opt_param() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + ::np2_structs::OptParam* _msg = _internal_mutable_opt_param(); + // @@protoc_insertion_point(field_mutable:np2_structs.JoinRoomResponse.opt_param) + return _msg; +} +inline void JoinRoomResponse::set_allocated_opt_param(::np2_structs::OptParam* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.opt_param_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = value->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[0], 0x00000004U); + } else { + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + } + + _impl_.opt_param_ = reinterpret_cast<::np2_structs::OptParam*>(value); + // @@protoc_insertion_point(field_set_allocated:np2_structs.JoinRoomResponse.opt_param) +} + // ------------------------------------------------------------------- // LeaveRoomRequest diff --git a/rpcs3/Emu/NP/generated/np2_structs.proto b/rpcs3/Emu/NP/generated/np2_structs.proto index 34413476e6..46628781fb 100644 --- a/rpcs3/Emu/NP/generated/np2_structs.proto +++ b/rpcs3/Emu/NP/generated/np2_structs.proto @@ -1,4 +1,3 @@ - // Protocol Buffers definition for np2_structs syntax = "proto3"; @@ -16,71 +15,61 @@ message uint16 { uint32 value = 1; } -// SignalingAddr + message SignalingAddr { bytes ip = 1; uint16 port = 2; } -// MatchingSignalingInfo message MatchingSignalingInfo { string npid = 1; SignalingAddr addr = 2; } -// Matching2SignalingInfo message Matching2SignalingInfo { uint16 member_id = 1; SignalingAddr addr = 2; } -// BinAttr message BinAttr { uint16 id = 1; bytes data = 2; } -// IntAttr message IntAttr { uint16 id = 1; uint32 num = 2; } -// RoomMemberBinAttrInternal message RoomMemberBinAttrInternal { uint64 updateDate = 1; BinAttr data = 2; } -// BinAttrInternal message BinAttrInternal { uint64 updateDate = 1; uint16 updateMemberId = 2; BinAttr data = 3; } -// OptParam message OptParam { uint8 type = 1; uint8 flag = 2; uint16 hubMemberId = 3; } -// GroupConfig message GroupConfig { uint32 slotNum = 1; bytes label = 2; bool withPassword = 3; } -// UserInfo message UserInfo { string npId = 1; string onlineName = 2; string avatarUrl = 3; } -// RoomMemberDataInternal message RoomMemberDataInternal { UserInfo userInfo = 1; uint64 joinDate = 2; @@ -92,7 +81,6 @@ message RoomMemberDataInternal { repeated RoomMemberBinAttrInternal roomMemberBinAttrInternal = 8; } -// RoomGroup message RoomGroup { uint8 groupId = 1; bool withPassword = 2; @@ -101,7 +89,6 @@ message RoomGroup { uint32 curGroupMemberNum = 5; } -// RoomDataInternal message RoomDataInternal { uint16 serverId = 1; uint32 worldId = 2; @@ -116,7 +103,6 @@ message RoomDataInternal { repeated BinAttrInternal roomBinAttrInternal = 11; } -// RoomDataExternal message RoomDataExternal { uint16 serverId = 1; uint32 worldId = 2; @@ -137,31 +123,26 @@ message RoomDataExternal { repeated BinAttr roomBinAttrExternal = 17; } -// IntSearchFilter message IntSearchFilter { uint8 searchOperator = 1; IntAttr attr = 2; } -// BinSearchFilter message BinSearchFilter { uint8 searchOperator = 1; BinAttr attr = 2; } -// PresenceOptionData message PresenceOptionData { bytes data = 1; uint32 len = 2; } -// RoomGroupPasswordConfig message RoomGroupPasswordConfig { uint8 groupId = 1; bool withPassword = 2; } -// SearchRoomRequest message SearchRoomRequest { int32 option = 1; uint32 worldId = 2; @@ -175,14 +156,12 @@ message SearchRoomRequest { repeated uint16 attrId = 10; } -// SearchRoomResponse message SearchRoomResponse { uint32 startIndex = 1; uint32 total = 2; repeated RoomDataExternal rooms = 3; } -// CreateJoinRoomRequest message CreateJoinRoomRequest { uint32 worldId = 1; uint64 lobbyId = 2; @@ -203,7 +182,12 @@ message CreateJoinRoomRequest { OptParam sigOptParam = 17; } -// JoinRoomRequest +// Reply on creating a room +message CreateRoomResponse { + RoomDataInternal internal = 1; + OptParam opt_param = 2; +} + message JoinRoomRequest { uint64 roomId = 1; bytes roomPassword = 2; @@ -213,30 +197,26 @@ message JoinRoomRequest { uint8 teamId = 6; } -// JoinRoomResponse message JoinRoomResponse { RoomDataInternal room_data = 1; repeated Matching2SignalingInfo signaling_data = 2; + OptParam opt_param = 3; } -// LeaveRoomRequest message LeaveRoomRequest { uint64 roomId = 1; PresenceOptionData optData = 2; } -// GetRoomDataExternalListRequest message GetRoomDataExternalListRequest { repeated uint64 roomIds = 1; repeated uint16 attrIds = 2; } -// GetRoomDataExternalListResponse message GetRoomDataExternalListResponse { repeated RoomDataExternal rooms = 1; } -// SetRoomDataExternalRequest message SetRoomDataExternalRequest { uint64 roomId = 1; repeated IntAttr roomSearchableIntAttrExternal = 2; @@ -244,7 +224,6 @@ message SetRoomDataExternalRequest { repeated BinAttr roomBinAttrExternal = 4; } -// SetRoomDataInternalRequest message SetRoomDataInternalRequest { uint64 roomId = 1; uint32 flagFilter = 2; @@ -255,14 +234,12 @@ message SetRoomDataInternalRequest { repeated uint16 ownerPrivilegeRank = 7; } -// GetRoomMemberDataInternalRequest message GetRoomMemberDataInternalRequest { uint64 roomId = 1; uint16 memberId = 2; repeated uint16 attrId = 3; } -// SetRoomMemberDataInternalRequest message SetRoomMemberDataInternalRequest { uint64 roomId = 1; uint16 memberId = 2; @@ -270,40 +247,34 @@ message SetRoomMemberDataInternalRequest { repeated BinAttr roomMemberBinAttrInternal = 4; } -// SetUserInfo message SetUserInfo { uint16 serverId = 1; repeated BinAttr userBinAttr = 2; } -// GetRoomDataInternalRequest message GetRoomDataInternalRequest { uint64 roomId = 1; repeated uint16 attrId = 2; } -// RoomMemberUpdateInfo message RoomMemberUpdateInfo { RoomMemberDataInternal roomMemberDataInternal = 1; uint8 eventCause = 2; PresenceOptionData optData = 3; } -// NotificationUserJoinedRoom message NotificationUserJoinedRoom { uint64 room_id = 1; RoomMemberUpdateInfo update_info = 2; SignalingAddr signaling = 3; } -// RoomUpdateInfo message RoomUpdateInfo { uint8 eventCause = 1; int32 errorCode = 2; PresenceOptionData optData = 3; } -// RoomDataInternalUpdateInfo message RoomDataInternalUpdateInfo { RoomDataInternal newRoomDataInternal = 1; uint32 prevFlagAttr = 2; @@ -312,7 +283,6 @@ message RoomDataInternalUpdateInfo { repeated uint16 newRoomBinAttrInternal = 5; } -// RoomMemberDataInternalUpdateInfo message RoomMemberDataInternalUpdateInfo { RoomMemberDataInternal newRoomMemberDataInternal = 1; uint32 prevFlagAttr = 2; @@ -320,7 +290,6 @@ message RoomMemberDataInternalUpdateInfo { repeated uint16 newRoomMemberBinAttrInternal = 4; } -// GetPingInfoResponse message GetPingInfoResponse { uint16 serverId = 1; uint32 worldId = 2; @@ -328,7 +297,6 @@ message GetPingInfoResponse { uint32 rtt = 4; } -// SendRoomMessageRequest message SendRoomMessageRequest { uint64 roomId = 1; uint8 castType = 2; @@ -337,7 +305,6 @@ message SendRoomMessageRequest { uint8 option = 5; } -// RoomMessageInfo message RoomMessageInfo { bool filtered = 1; uint8 castType = 2; @@ -346,7 +313,6 @@ message RoomMessageInfo { bytes msg = 5; } -// MessageDetails message MessageDetails { string communicationId = 1; uint64 msgId = 2; @@ -358,13 +324,11 @@ message MessageDetails { bytes data = 8; } -// SendMessageRequest message SendMessageRequest { bytes message = 1; repeated string npids = 2; } -// BoardInfo message BoardInfo { uint32 rankLimit = 1; uint32 updateMode = 2; @@ -373,7 +337,6 @@ message BoardInfo { uint32 uploadSizeLimit = 5; } -// RecordScoreRequest message RecordScoreRequest { uint32 boardId = 1; int32 pcId = 2; @@ -382,7 +345,6 @@ message RecordScoreRequest { bytes data = 5; } -// GetScoreRangeRequest message GetScoreRangeRequest { uint32 boardId = 1; uint32 startRank = 2; @@ -391,13 +353,11 @@ message GetScoreRangeRequest { bool withGameInfo = 5; } -// ScoreNpIdPcId message ScoreNpIdPcId { string npid = 1; int32 pcId = 2; } -// GetScoreNpIdRequest message GetScoreNpIdRequest { uint32 boardId = 1; repeated ScoreNpIdPcId npids = 2; @@ -405,7 +365,6 @@ message GetScoreNpIdRequest { bool withGameInfo = 4; } -// GetScoreFriendsRequest message GetScoreFriendsRequest { uint32 boardId = 1; bool include_self = 2; @@ -414,7 +373,6 @@ message GetScoreFriendsRequest { bool withGameInfo = 5; } -// ScoreRankData message ScoreRankData { string npId = 1; string onlineName = 2; @@ -425,12 +383,10 @@ message ScoreRankData { uint64 recordDate = 7; } -// ScoreInfo message ScoreInfo { bytes data = 1; } -// GetScoreResponse message GetScoreResponse { repeated ScoreRankData rankArray = 1; repeated string commentArray = 2; @@ -439,27 +395,23 @@ message GetScoreResponse { uint32 totalRecord = 5; } -// RecordScoreGameDataRequest message RecordScoreGameDataRequest { uint32 boardId = 1; int32 pcId = 2; int64 score = 3; } -// GetScoreGameDataRequest message GetScoreGameDataRequest { uint32 boardId = 1; string npId = 2; int32 pcId = 3; } -// TusUser message TusUser { bool vuser = 1; string npid = 2; } -// TusVariable message TusVariable { string ownerId = 1; bool hasData = 2; @@ -469,31 +421,26 @@ message TusVariable { int64 oldVariable = 6; } -// TusVarResponse message TusVarResponse { repeated TusVariable vars = 1; } -// TusSetMultiSlotVariableRequest message TusSetMultiSlotVariableRequest { TusUser user = 1; repeated int32 slotIdArray = 2; repeated int64 variableArray = 3; } -// TusGetMultiSlotVariableRequest message TusGetMultiSlotVariableRequest { TusUser user = 1; repeated int32 slotIdArray = 2; } -// TusGetMultiUserVariableRequest message TusGetMultiUserVariableRequest { repeated TusUser users = 1; int32 slotId = 2; } -// TusGetFriendsVariableRequest message TusGetFriendsVariableRequest { int32 slotId = 1; bool includeSelf = 2; @@ -501,7 +448,6 @@ message TusGetFriendsVariableRequest { uint32 arrayNum = 4; } -// TusAddAndGetVariableRequest message TusAddAndGetVariableRequest { TusUser user = 1; int32 slotId = 2; @@ -510,7 +456,6 @@ message TusAddAndGetVariableRequest { string isLastChangedAuthorId = 5; } -// TusTryAndSetVariableRequest message TusTryAndSetVariableRequest { TusUser user = 1; int32 slotId = 2; @@ -521,13 +466,11 @@ message TusTryAndSetVariableRequest { repeated int64 compareValue = 7; } -// TusDeleteMultiSlotVariableRequest message TusDeleteMultiSlotVariableRequest { TusUser user = 1; repeated int32 slotIdArray = 2; } -// TusSetDataRequest message TusSetDataRequest { TusUser user = 1; int32 slotId = 2; @@ -537,7 +480,6 @@ message TusSetDataRequest { string isLastChangedAuthorId = 6; } -// TusDataStatus message TusDataStatus { string ownerId = 1; bool hasData = 2; @@ -546,36 +488,30 @@ message TusDataStatus { bytes info = 5; } -// TusData message TusData { TusDataStatus status = 1; bytes data = 2; } -// TusDataStatusResponse message TusDataStatusResponse { repeated TusDataStatus status = 1; } -// TusGetDataRequest message TusGetDataRequest { TusUser user = 1; int32 slotId = 2; } -// TusGetMultiSlotDataStatusRequest message TusGetMultiSlotDataStatusRequest { TusUser user = 1; repeated int32 slotIdArray = 2; } -// TusGetMultiUserDataStatusRequest message TusGetMultiUserDataStatusRequest { repeated TusUser users = 1; int32 slotId = 2; } -// TusGetFriendsDataStatusRequest message TusGetFriendsDataStatusRequest { int32 slotId = 1; bool includeSelf = 2; @@ -583,13 +519,11 @@ message TusGetFriendsDataStatusRequest { uint32 arrayNum = 4; } -// TusDeleteMultiSlotDataRequest message TusDeleteMultiSlotDataRequest { TusUser user = 1; repeated int32 slotIdArray = 2; } -// SetPresenceRequest message SetPresenceRequest { string title = 1; string status = 2; @@ -597,7 +531,6 @@ message SetPresenceRequest { bytes data = 4; } -// MatchingSearchCondition message MatchingSearchCondition { uint32 attr_type = 1; uint32 attr_id = 2; @@ -605,7 +538,6 @@ message MatchingSearchCondition { uint32 comp_value = 4; } -// MatchingAttr message MatchingAttr { uint32 attr_type = 1; uint32 attr_id = 2; @@ -613,7 +545,6 @@ message MatchingAttr { bytes data = 4; } -// CreateRoomGUIRequest message CreateRoomGUIRequest { uint32 total_slots = 1; uint32 private_slots = 2; @@ -622,13 +553,11 @@ message CreateRoomGUIRequest { repeated MatchingAttr game_attrs = 5; } -// GUIUserInfo message GUIUserInfo { UserInfo info = 1; bool owner = 2; } -// MatchingRoomStatus message MatchingRoomStatus { bytes id = 1; repeated GUIUserInfo members = 2; @@ -636,7 +565,6 @@ message MatchingRoomStatus { bytes opt = 4; } -// GetRoomListGUIRequest message GetRoomListGUIRequest { uint32 range_start = 1; uint32 range_max = 2; @@ -644,43 +572,36 @@ message GetRoomListGUIRequest { repeated MatchingAttr attrs = 4; } -// MatchingRoom message MatchingRoom { bytes id = 1; repeated MatchingAttr attr = 2; } -// MatchingRoomList message MatchingRoomList { uint32 start = 1; uint32 total = 2; repeated MatchingRoom rooms = 3; } -// MatchingGuiRoomId message MatchingGuiRoomId { bytes id = 1; } -// SetRoomSearchFlagGUI message SetRoomSearchFlagGUI { bytes roomid = 1; bool stealth = 2; } -// QuickMatchGUIRequest message QuickMatchGUIRequest { repeated MatchingSearchCondition conds = 1; uint32 available_num = 2; } -// SearchJoinRoomGUIRequest message SearchJoinRoomGUIRequest { repeated MatchingSearchCondition conds = 1; repeated MatchingAttr attrs = 2; } -// MatchingSearchJoinRoomInfo message MatchingSearchJoinRoomInfo { MatchingRoomStatus room = 1; repeated MatchingAttr attr = 2; diff --git a/rpcs3/Emu/NP/np_cache.cpp b/rpcs3/Emu/NP/np_cache.cpp index fc90a641a5..04223da545 100644 --- a/rpcs3/Emu/NP/np_cache.cpp +++ b/rpcs3/Emu/NP/np_cache.cpp @@ -120,6 +120,11 @@ namespace np rooms[room_id].password = password; } + void cache_manager::update_opt_param(SceNpMatching2RoomId room_id, const SceNpMatching2SignalingOptParam* sce_opt_param) + { + rooms[room_id].opt_param = *sce_opt_param; + } + std::pair> cache_manager::get_slots(SceNpMatching2RoomId room_id) { std::lock_guard lock(mutex); @@ -223,6 +228,18 @@ namespace np return {CELL_OK, rooms[room_id].password}; } + std::pair> cache_manager::get_opt_param(SceNpMatching2RoomId room_id) + { + std::lock_guard lock(mutex); + + if (!rooms.contains(room_id)) + { + return {SCE_NP_MATCHING2_ERROR_ROOM_NOT_FOUND, {}}; + } + + return {CELL_OK, rooms[room_id].opt_param}; + } + error_code cache_manager::get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl) { std::lock_guard lock(mutex); diff --git a/rpcs3/Emu/NP/np_cache.h b/rpcs3/Emu/NP/np_cache.h index 9e1b496ea5..8870f169a8 100644 --- a/rpcs3/Emu/NP/np_cache.h +++ b/rpcs3/Emu/NP/np_cache.h @@ -58,6 +58,8 @@ namespace np std::map groups; std::map members; + SceNpMatching2SignalingOptParam opt_param{}; + bool owner = false; }; @@ -70,10 +72,12 @@ namespace np bool add_member(SceNpMatching2RoomId room_id, const SceNpMatching2RoomMemberDataInternal* sce_roommemberdata); bool del_member(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id); void update_password(SceNpMatching2RoomId room_id, const std::optional& password); + void update_opt_param(SceNpMatching2RoomId room_id, const SceNpMatching2SignalingOptParam* sce_opt_param); std::pair> get_slots(SceNpMatching2RoomId room_id); std::pair> get_memberids(u64 room_id, s32 sort_method); std::pair> get_password(SceNpMatching2RoomId room_id); + std::pair> get_opt_param(SceNpMatching2RoomId room_id); error_code get_member_and_attrs(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, bool include_onlinename, bool include_avatarurl); std::pair> get_npid(u64 room_id, u16 member_id); std::optional get_memberid(u64 room_id, const SceNpId& npid); diff --git a/rpcs3/Emu/NP/np_handler.cpp b/rpcs3/Emu/NP/np_handler.cpp index f76788287b..c55c16afec 100644 --- a/rpcs3/Emu/NP/np_handler.cpp +++ b/rpcs3/Emu/NP/np_handler.cpp @@ -1672,6 +1672,11 @@ namespace np return np_cache.get_memberids(room_id, sort_method); } + std::pair> np_handler::local_get_signaling_opt_param(SceNpMatching2RoomId room_id) + { + return np_cache.get_opt_param(room_id); + } + error_code np_handler::local_get_room_member_data(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, u32 ctx_id) { auto [include_onlinename, include_avatarurl] = get_match2_context_options(ctx_id); diff --git a/rpcs3/Emu/NP/np_handler.h b/rpcs3/Emu/NP/np_handler.h index d3c1213cc6..a5f8014538 100644 --- a/rpcs3/Emu/NP/np_handler.h +++ b/rpcs3/Emu/NP/np_handler.h @@ -235,6 +235,7 @@ namespace np std::pair> local_get_room_slots(SceNpMatching2RoomId room_id); std::pair> local_get_room_password(SceNpMatching2RoomId room_id); std::pair> local_get_room_memberids(SceNpMatching2RoomId room_id, s32 sort_method); + std::pair> local_get_signaling_opt_param(SceNpMatching2RoomId room_id); error_code local_get_room_member_data(SceNpMatching2RoomId room_id, SceNpMatching2RoomMemberId member_id, const std::vector& binattrs_list, SceNpMatching2RoomMemberDataInternal* ptr_member, u32 addr_data, u32 size_data, u32 ctx_id); // Local GUI functions diff --git a/rpcs3/Emu/NP/np_requests.cpp b/rpcs3/Emu/NP/np_requests.cpp index bcc97a2b25..0ee7d1d0fc 100644 --- a/rpcs3/Emu/NP/np_requests.cpp +++ b/rpcs3/Emu/NP/np_requests.cpp @@ -200,8 +200,11 @@ namespace np return; } - const auto resp = reply.get_protobuf(); + const auto resp = reply.get_protobuf(); ensure(!reply.is_error(), "Malformed reply to CreateRoom command"); + ensure(resp->has_internal()); + + const auto& resp_internal = resp->internal(); const u32 event_key = get_event_key(); auto [include_onlinename, include_avatarurl] = get_match2_context_options(cb_info_opt->ctx_id); @@ -209,13 +212,19 @@ namespace np auto& edata = allocate_req_result(event_key, SCE_NP_MATCHING2_EVENT_DATA_MAX_SIZE_CreateJoinRoom, sizeof(SceNpMatching2CreateJoinRoomResponse)); auto* room_resp = reinterpret_cast(edata.data()); auto* room_info = edata.allocate(sizeof(SceNpMatching2RoomDataInternal), room_resp->roomDataInternal); - RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, *resp, room_info, npid, include_onlinename, include_avatarurl); + RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp_internal, room_info, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); + const auto resp_opt_param = resp->opt_param(); + SceNpMatching2SignalingOptParam opt_param{}; + OptParam_to_SceNpMatching2SignalingOptParam(resp_opt_param, &opt_param); + np_cache.insert_room(room_info); - np_cache.update_password(room_resp->roomDataInternal->roomId, cached_cj_password); + np_cache.update_password(room_info->roomId, cached_cj_password); + np_cache.update_opt_param(room_info->roomId, &opt_param); extra_nps::print_SceNpMatching2CreateJoinRoomResponse(room_resp); + extra_nps::print_SceNpMatching2SignalingOptParam(&opt_param); cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); } @@ -275,36 +284,38 @@ namespace np RoomDataInternal_to_SceNpMatching2RoomDataInternal(edata, resp->room_data(), room_info, npid, include_onlinename, include_avatarurl); np_memory.shrink_allocation(edata.addr(), edata.size()); + const u64 room_id = resp->room_data().roomid(); + + const auto resp_opt_param = resp->opt_param(); + SceNpMatching2SignalingOptParam opt_param{}; + OptParam_to_SceNpMatching2SignalingOptParam(resp_opt_param, &opt_param); np_cache.insert_room(room_info); + np_cache.update_opt_param(room_id, &opt_param); extra_nps::print_SceNpMatching2RoomDataInternal(room_info); + extra_nps::print_SceNpMatching2SignalingOptParam(&opt_param); // We initiate signaling if necessary - if (resp->signaling_data_size() > 0) + for (int i = 0; i < resp->signaling_data_size(); i++) { - const u64 room_id = resp->room_data().roomid(); + const auto& signaling_info = resp->signaling_data(i); + ensure(signaling_info.has_addr()); - for (int i = 0; i < resp->signaling_data_size(); i++) - { - const auto& signaling_info = resp->signaling_data(i); - ensure(signaling_info.has_addr()); + const u32 addr_p2p = register_ip(signaling_info.addr().ip()); + const u16 port_p2p = signaling_info.addr().port().value(); - const u32 addr_p2p = register_ip(signaling_info.addr().ip()); - const u16 port_p2p = signaling_info.addr().port().value(); + const u16 member_id = signaling_info.member_id().value(); + const auto [npid_res, npid_p2p] = np_cache.get_npid(room_id, member_id); - const u16 member_id = signaling_info.member_id().value(); - const auto [npid_res, npid_p2p] = np_cache.get_npid(room_id, member_id); + if (npid_res != CELL_OK) + continue; - if (npid_res != CELL_OK) - continue; + rpcn_log.notice("JoinRoomResult told to connect to member(%d=%s) of room(%d): %s:%d", member_id, reinterpret_cast(npid_p2p->handle.data), room_id, ip_to_string(addr_p2p), port_p2p); - rpcn_log.notice("JoinRoomResult told to connect to member(%d=%s) of room(%d): %s:%d", member_id, reinterpret_cast(npid_p2p->handle.data), room_id, ip_to_string(addr_p2p), port_p2p); - - // Attempt Signaling - auto& sigh = g_fxo->get>(); - const u32 conn_id = sigh.init_sig2(*npid_p2p, room_id, member_id); - sigh.start_sig(conn_id, addr_p2p, port_p2p); - } + // Attempt Signaling + auto& sigh = g_fxo->get>(); + const u32 conn_id = sigh.init_sig2(*npid_p2p, room_id, member_id); + sigh.start_sig(conn_id, addr_p2p, port_p2p); } cb_info_opt->queue_callback(req_id, event_key, 0, edata.size()); diff --git a/rpcs3/Emu/NP/pb_helpers.cpp b/rpcs3/Emu/NP/pb_helpers.cpp index c00eed8496..e82fc2ec0a 100644 --- a/rpcs3/Emu/NP/pb_helpers.cpp +++ b/rpcs3/Emu/NP/pb_helpers.cpp @@ -632,4 +632,11 @@ namespace np MatchingAttr_to_SceNpMatchingAttr(edata, resp.attr(), room_info->attr); } + void OptParam_to_SceNpMatching2SignalingOptParam(const np2_structs::OptParam& resp, SceNpMatching2SignalingOptParam* opt_param) + { + opt_param->type = resp.type().value(); + opt_param->flag = resp.flag().value(); + opt_param->hubMemberId = resp.hubmemberid().value(); + } + } // namespace np diff --git a/rpcs3/Emu/NP/pb_helpers.h b/rpcs3/Emu/NP/pb_helpers.h index a11c092f9c..c7482d7bc4 100644 --- a/rpcs3/Emu/NP/pb_helpers.h +++ b/rpcs3/Emu/NP/pb_helpers.h @@ -32,4 +32,5 @@ namespace np void MatchingRoomList_to_SceNpMatchingRoomList(event_data& edata, const np2_structs::MatchingRoomList& resp, SceNpMatchingRoomList* room_list); void MatchingSearchJoinRoomInfo_to_SceNpMatchingSearchJoinRoomInfo(event_data& edata, const np2_structs::MatchingSearchJoinRoomInfo& resp, SceNpMatchingSearchJoinRoomInfo* room_info); void MatchingAttr_to_SceNpMatchingAttr(event_data& edata, const google::protobuf::RepeatedPtrField& attr_list, vm::bptr& first_attr); + void OptParam_to_SceNpMatching2SignalingOptParam(const np2_structs::OptParam& resp, SceNpMatching2SignalingOptParam* opt_param); } // namespace np diff --git a/rpcs3/Emu/NP/rpcn_client.cpp b/rpcs3/Emu/NP/rpcn_client.cpp index 2b58310f1c..a87fff8244 100644 --- a/rpcs3/Emu/NP/rpcn_client.cpp +++ b/rpcs3/Emu/NP/rpcn_client.cpp @@ -256,7 +256,7 @@ namespace rpcn rpcn_log.notice("online: %s, pr_com_id: %s, pr_title: %s, pr_status: %s, pr_comment: %s, pr_data: %s", online ? "true" : "false", pr_com_id.data, pr_title, pr_status, pr_comment, fmt::buf_to_hexstring(pr_data.data(), pr_data.size())); } - constexpr u32 RPCN_PROTOCOL_VERSION = 29; + constexpr u32 RPCN_PROTOCOL_VERSION = 30; constexpr usz RPCN_HEADER_SIZE = 15; const char* error_to_explanation(rpcn::ErrorType error)