From 85b4c11bdef971c1c842bbfb64f461dd2bce2e9a Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 28 Jul 2024 18:12:53 +0200 Subject: Core/Proto: Added messages and services missing descriptors in client (cherry picked from commit 7ff646efa98a2c54770d4793eeada751af5ee5a2) --- .../api/client/v2/notification_listener.pb.cc | 216 +++++++++++++++++++++ .../api/client/v2/notification_listener.pb.h | 194 ++++++++++++++++++ .../api/client/v2/notification_listener.proto | 30 +++ 3 files changed, 440 insertions(+) create mode 100644 src/server/proto/Client/api/client/v2/notification_listener.pb.cc create mode 100644 src/server/proto/Client/api/client/v2/notification_listener.pb.h create mode 100644 src/server/proto/Client/api/client/v2/notification_listener.proto (limited to 'src/server/proto/Client/api') diff --git a/src/server/proto/Client/api/client/v2/notification_listener.pb.cc b/src/server/proto/Client/api/client/v2/notification_listener.pb.cc new file mode 100644 index 00000000000..378fa1e3877 --- /dev/null +++ b/src/server/proto/Client/api/client/v2/notification_listener.pb.cc @@ -0,0 +1,216 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: api/client/v2/notification_listener.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include "api/client/v2/notification_listener.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include "BattlenetRpcErrorCodes.h" +// @@protoc_insertion_point(includes) + +namespace bgs { +namespace protocol { +namespace notification { +namespace v2 { +namespace client { + +namespace { + +const ::google::protobuf::Descriptor* NotificationReceivedNotification_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + NotificationReceivedNotification_reflection_ = NULL; +const ::google::protobuf::ServiceDescriptor* NotificationListener_descriptor_ = NULL; + +} // namespace + +void protobuf_AssignDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto() { + protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "api/client/v2/notification_listener.proto"); + GOOGLE_CHECK(file != NULL); + NotificationReceivedNotification_descriptor_ = file->message_type(0); + static const int NotificationReceivedNotification_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NotificationReceivedNotification, notifications_), + }; + NotificationReceivedNotification_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + NotificationReceivedNotification_descriptor_, + NotificationReceivedNotification::default_instance_, + NotificationReceivedNotification_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NotificationReceivedNotification, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NotificationReceivedNotification, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(NotificationReceivedNotification)); + NotificationListener_descriptor_ = file->service(0); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + NotificationReceivedNotification_descriptor_, &NotificationReceivedNotification::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_api_2fclient_2fv2_2fnotification_5flistener_2eproto() { + delete NotificationReceivedNotification::default_instance_; + delete NotificationReceivedNotification_reflection_; +} + +void protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::bgs::protocol::protobuf_AddDesc_rpc_5ftypes_2eproto(); + ::bgs::protocol::notification::v2::client::protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5ftypes_2eproto(); + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n)api/client/v2/notification_listener.pr" + "oto\022#bgs.protocol.notification.v2.client" + "\032\017rpc_types.proto\032&api/client/v2/notific" + "ation_types.proto\"l\n NotificationReceive" + "dNotification\022H\n\rnotifications\030\001 \003(\01321.b" + "gs.protocol.notification.v2.client.Notif" + "ication2\346\001\n\024NotificationListener\022\202\001\n\026OnN" + "otificationReceived\022E.bgs.protocol.notif" + "ication.v2.client.NotificationReceivedNo" + "tification\032\031.bgs.protocol.NO_RESPONSE\"\006\202" + "\371+\002\010\001\032I\202\371+=\n9bnet.protocol.notification." + "v2.client.NotificationListener8\001\212\371+\004\010\001\030\001" + "B\005H\002\200\001\000", 487); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "api/client/v2/notification_listener.proto", &protobuf_RegisterTypes); + NotificationReceivedNotification::default_instance_ = new NotificationReceivedNotification(); + NotificationReceivedNotification::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_api_2fclient_2fv2_2fnotification_5flistener_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_api_2fclient_2fv2_2fnotification_5flistener_2eproto { + StaticDescriptorInitializer_api_2fclient_2fv2_2fnotification_5flistener_2eproto() { + protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + } +} static_descriptor_initializer_api_2fclient_2fv2_2fnotification_5flistener_2eproto_; +// =================================================================== + +#ifndef _MSC_VER +const int NotificationReceivedNotification::kNotificationsFieldNumber; +#endif // !_MSC_VER + +NotificationReceivedNotification::NotificationReceivedNotification() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:bgs.protocol.notification.v2.client.NotificationReceivedNotification) +} + +void NotificationReceivedNotification::InitAsDefaultInstance() { +} + +NotificationReceivedNotification::NotificationReceivedNotification(const NotificationReceivedNotification& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:bgs.protocol.notification.v2.client.NotificationReceivedNotification) +} + +void NotificationReceivedNotification::SharedCtor() { + _cached_size_ = 0; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +NotificationReceivedNotification::~NotificationReceivedNotification() { + // @@protoc_insertion_point(destructor:bgs.protocol.notification.v2.client.NotificationReceivedNotification) + SharedDtor(); +} + +void NotificationReceivedNotification::SharedDtor() { + if (this != default_instance_) { + } +} + +void NotificationReceivedNotification::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* NotificationReceivedNotification::descriptor() { + protobuf_AssignDescriptorsOnce(); + return NotificationReceivedNotification_descriptor_; +} + +const NotificationReceivedNotification& NotificationReceivedNotification::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + return *default_instance_; +} + +NotificationReceivedNotification* NotificationReceivedNotification::default_instance_ = NULL; + +NotificationReceivedNotification* NotificationReceivedNotification::New() const { + return new NotificationReceivedNotification; +} + +void NotificationReceivedNotification::Swap(NotificationReceivedNotification* other) { + if (other != this) { + GetReflection()->Swap(this, other);} +} + +::google::protobuf::Metadata NotificationReceivedNotification::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = NotificationReceivedNotification_descriptor_; + metadata.reflection = NotificationReceivedNotification_reflection_; + return metadata; +} + +// =================================================================== + +NotificationListener::NotificationListener(bool use_original_hash) : ServiceBase(use_original_hash ? OriginalHash::value : NameHash::value) { +} + +NotificationListener::~NotificationListener() { +} + +google::protobuf::ServiceDescriptor const* NotificationListener::descriptor() { + protobuf_AssignDescriptorsOnce(); + return NotificationListener_descriptor_; +} + +void NotificationListener::OnNotificationReceived(::bgs::protocol::notification::v2::client::NotificationReceivedNotification const* request, bool client /*= false*/, bool server /*= false*/) { + LogCallClientMethod("NotificationListener.OnNotificationReceived", "bgs.protocol.notification.v2.client.NotificationReceivedNotification", request); + SendRequest(service_hash_, 1 | (client ? 0x40000000 : 0) | (server ? 0x80000000 : 0), request); +} + +void NotificationListener::CallServerMethod(uint32 /*token*/, uint32 methodId, MessageBuffer /*buffer*/) { + LogDisallowedMethod(methodId); +} + +// @@protoc_insertion_point(namespace_scope) + +} // namespace client +} // namespace v2 +} // namespace notification +} // namespace protocol +} // namespace bgs + +// @@protoc_insertion_point(global_scope) diff --git a/src/server/proto/Client/api/client/v2/notification_listener.pb.h b/src/server/proto/Client/api/client/v2/notification_listener.pb.h new file mode 100644 index 00000000000..7359cb12426 --- /dev/null +++ b/src/server/proto/Client/api/client/v2/notification_listener.pb.h @@ -0,0 +1,194 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: api/client/v2/notification_listener.proto + +#ifndef PROTOBUF_api_2fclient_2fv2_2fnotification_5flistener_2eproto__INCLUDED +#define PROTOBUF_api_2fclient_2fv2_2fnotification_5flistener_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 2006000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 2006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include "rpc_types.pb.h" +#include "api/client/v2/notification_types.pb.h" +#include "ServiceBase.h" +#include "MessageBuffer.h" +#include +#include +// @@protoc_insertion_point(includes) + +namespace bgs { +namespace protocol { +namespace notification { +namespace v2 { +namespace client { + +// Internal implementation detail -- do not call these. +void TC_PROTO_API protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); +void protobuf_AssignDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); +void protobuf_ShutdownFile_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + +class NotificationReceivedNotification; + +// =================================================================== + +class TC_PROTO_API NotificationReceivedNotification : public ::google::protobuf::Message { + public: + NotificationReceivedNotification(); + virtual ~NotificationReceivedNotification(); + + NotificationReceivedNotification(const NotificationReceivedNotification& from); + + inline NotificationReceivedNotification& operator=(const NotificationReceivedNotification& from) { + CopyFrom(from); + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _unknown_fields_; + } + + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return &_unknown_fields_; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const NotificationReceivedNotification& default_instance(); + + void Swap(NotificationReceivedNotification* other); + + // implements Message ---------------------------------------------- + + NotificationReceivedNotification* New() const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .bgs.protocol.notification.v2.client.Notification notifications = 1; + inline int notifications_size() const; + inline void clear_notifications(); + static const int kNotificationsFieldNumber = 1; + inline const ::bgs::protocol::notification::v2::client::Notification& notifications(int index) const; + inline ::bgs::protocol::notification::v2::client::Notification* mutable_notifications(int index); + inline ::bgs::protocol::notification::v2::client::Notification* add_notifications(); + inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::notification::v2::client::Notification >& + notifications() const; + inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::notification::v2::client::Notification >* + mutable_notifications(); + + // @@protoc_insertion_point(class_scope:bgs.protocol.notification.v2.client.NotificationReceivedNotification) + private: + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::RepeatedPtrField< ::bgs::protocol::notification::v2::client::Notification > notifications_; + friend void TC_PROTO_API protobuf_AddDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + friend void protobuf_AssignDesc_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + friend void protobuf_ShutdownFile_api_2fclient_2fv2_2fnotification_5flistener_2eproto(); + + void InitAsDefaultInstance(); + static NotificationReceivedNotification* default_instance_; +}; +// =================================================================== + +class TC_PROTO_API NotificationListener : public ServiceBase +{ + public: + + explicit NotificationListener(bool use_original_hash); + NotificationListener(NotificationListener const&) = delete; + NotificationListener(NotificationListener&&) = delete; + NotificationListener& operator=(NotificationListener const&) = delete; + NotificationListener& operator=(NotificationListener&&) = delete; + virtual ~NotificationListener(); + + typedef std::integral_constant OriginalHash; + typedef std::integral_constant NameHash; + + static google::protobuf::ServiceDescriptor const* descriptor(); + + // client methods -------------------------------------------------- + void OnNotificationReceived(::bgs::protocol::notification::v2::client::NotificationReceivedNotification const* request, bool client = false, bool server = false); + + void CallServerMethod(uint32 token, uint32 methodId, MessageBuffer buffer) final; +}; + +// =================================================================== + +// =================================================================== + +// NotificationReceivedNotification + +// repeated .bgs.protocol.notification.v2.client.Notification notifications = 1; +inline int NotificationReceivedNotification::notifications_size() const { + return notifications_.size(); +} +inline void NotificationReceivedNotification::clear_notifications() { + notifications_.Clear(); +} +inline const ::bgs::protocol::notification::v2::client::Notification& NotificationReceivedNotification::notifications(int index) const { + // @@protoc_insertion_point(field_get:bgs.protocol.notification.v2.client.NotificationReceivedNotification.notifications) + return notifications_.Get(index); +} +inline ::bgs::protocol::notification::v2::client::Notification* NotificationReceivedNotification::mutable_notifications(int index) { + // @@protoc_insertion_point(field_mutable:bgs.protocol.notification.v2.client.NotificationReceivedNotification.notifications) + return notifications_.Mutable(index); +} +inline ::bgs::protocol::notification::v2::client::Notification* NotificationReceivedNotification::add_notifications() { + // @@protoc_insertion_point(field_add:bgs.protocol.notification.v2.client.NotificationReceivedNotification.notifications) + return notifications_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::bgs::protocol::notification::v2::client::Notification >& +NotificationReceivedNotification::notifications() const { + // @@protoc_insertion_point(field_list:bgs.protocol.notification.v2.client.NotificationReceivedNotification.notifications) + return notifications_; +} +inline ::google::protobuf::RepeatedPtrField< ::bgs::protocol::notification::v2::client::Notification >* +NotificationReceivedNotification::mutable_notifications() { + // @@protoc_insertion_point(field_mutable_list:bgs.protocol.notification.v2.client.NotificationReceivedNotification.notifications) + return ¬ifications_; +} + +// @@protoc_insertion_point(namespace_scope) + +} // namespace client +} // namespace v2 +} // namespace notification +} // namespace protocol +} // namespace bgs + +#ifndef SWIG +namespace google { +namespace protobuf { +} // namespace google +} // namespace protobuf +#endif // SWIG + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_api_2fclient_2fv2_2fnotification_5flistener_2eproto__INCLUDED diff --git a/src/server/proto/Client/api/client/v2/notification_listener.proto b/src/server/proto/Client/api/client/v2/notification_listener.proto new file mode 100644 index 00000000000..c9628fb9653 --- /dev/null +++ b/src/server/proto/Client/api/client/v2/notification_listener.proto @@ -0,0 +1,30 @@ +syntax = "proto2"; + +import "rpc_types.proto"; +import "api/client/v2/notification_types.proto"; +package bgs.protocol.notification.v2.client; + +option optimize_for = CODE_SIZE; +option cc_generic_services = false; + +message NotificationReceivedNotification { + repeated .bgs.protocol.notification.v2.client.Notification notifications = 1; +} + +service NotificationListener { + option (.bgs.protocol.service_options) = { + descriptor_name: "bnet.protocol.notification.v2.client.NotificationListener" + type: SERVICE_TYPE_RPC_DIRECT + }; + option (.bgs.protocol.sdk_service_options) = { + inbound: true + use_client_id: true + }; + rpc OnNotificationReceived(.bgs.protocol.notification.v2.client.NotificationReceivedNotification) returns (.bgs.protocol.NO_RESPONSE) { + option (.bgs.protocol.method_options) = { + id: 1 + }; + } +} + + -- cgit v1.2.3