diff options
Diffstat (limited to 'contrib/protoc-bnet')
-rw-r--r-- | contrib/protoc-bnet/BnetServiceGenerator.cpp | 19 | ||||
-rw-r--r-- | contrib/protoc-bnet/method_options.pb.cc | 114 | ||||
-rw-r--r-- | contrib/protoc-bnet/method_options.pb.h | 98 | ||||
-rw-r--r-- | contrib/protoc-bnet/service_options.pb.cc | 248 | ||||
-rw-r--r-- | contrib/protoc-bnet/service_options.pb.h | 449 |
5 files changed, 889 insertions, 39 deletions
diff --git a/contrib/protoc-bnet/BnetServiceGenerator.cpp b/contrib/protoc-bnet/BnetServiceGenerator.cpp index 4dadfda1e78..41088fbf5c2 100644 --- a/contrib/protoc-bnet/BnetServiceGenerator.cpp +++ b/contrib/protoc-bnet/BnetServiceGenerator.cpp @@ -20,7 +20,8 @@ BnetServiceGenerator::BnetServiceGenerator(pb::ServiceDescriptor const* descript else vars_["dllexport"] = options.dllexport_decl + " "; - vars_["original_hash"] = " typedef std::integral_constant<uint32, 0x" + pb::ToUpper(pb::ToHex(HashServiceName(descriptor_->options().GetExtension(Battlenet::original_fully_qualified_descriptor_name)))) + "u> OriginalHash;\n"; + if (descriptor_->options().HasExtension(Battlenet::service_options)) + vars_["original_hash"] = " typedef std::integral_constant<uint32, 0x" + pb::ToUpper(pb::ToHex(HashServiceName(descriptor_->options().GetExtension(Battlenet::service_options).descriptor_name()))) + "u> OriginalHash;\n"; vars_["name_hash"] = " typedef std::integral_constant<uint32, 0x" + pb::ToUpper(pb::ToHex(HashServiceName(descriptor_->full_name()))) + "u> NameHash;\n"; } @@ -85,13 +86,13 @@ void BnetServiceGenerator::GenerateClientMethodSignatures(pb::io::Printer* print for (int i = 0; i < descriptor_->method_count(); i++) { pb::MethodDescriptor const* method = descriptor_->method(i); - if (!method->options().HasExtension(Battlenet::method_id)) + if (!method->options().HasExtension(Battlenet::method_options)) continue; std::map<std::string, std::string> sub_vars; sub_vars["name"] = method->name(); sub_vars["full_name"] = descriptor_->name() + "." + method->name(); - sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_id)); + sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_options).id()); sub_vars["input_type"] = pbcpp::ClassName(method->input_type(), true); sub_vars["output_type"] = pbcpp::ClassName(method->output_type(), true); sub_vars["input_type_name"] = method->input_type()->full_name(); @@ -108,7 +109,7 @@ void BnetServiceGenerator::GenerateServerMethodSignatures(pb::io::Printer* print for (int i = 0; i < descriptor_->method_count(); i++) { pb::MethodDescriptor const* method = descriptor_->method(i); - if (!method->options().HasExtension(Battlenet::method_id)) + if (!method->options().HasExtension(Battlenet::method_options)) continue; std::map<std::string, std::string> sub_vars; @@ -161,14 +162,14 @@ void BnetServiceGenerator::GenerateClientMethodImplementations(pb::io::Printer* for (int i = 0; i < descriptor_->method_count(); i++) { pb::MethodDescriptor const* method = descriptor_->method(i); - if (!method->options().HasExtension(Battlenet::method_id)) + if (!method->options().HasExtension(Battlenet::method_options)) continue; std::map<std::string, std::string> sub_vars; sub_vars["classname"] = vars_["classname"]; sub_vars["name"] = method->name(); sub_vars["full_name"] = descriptor_->name() + "." + method->name(); - sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_id)); + sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_options).id()); sub_vars["input_type"] = pbcpp::ClassName(method->input_type(), true); sub_vars["output_type"] = pbcpp::ClassName(method->output_type(), true); sub_vars["input_type_name"] = method->input_type()->full_name(); @@ -210,14 +211,14 @@ void BnetServiceGenerator::GenerateServerCallMethod(pb::io::Printer* printer) for (int i = 0; i < descriptor_->method_count(); i++) { pb::MethodDescriptor const* method = descriptor_->method(i); - if (!method->options().HasExtension(Battlenet::method_id)) + if (!method->options().HasExtension(Battlenet::method_options)) continue; std::map<std::string, std::string> sub_vars; sub_vars["classname"] = vars_["classname"]; sub_vars["name"] = method->name(); sub_vars["full_name"] = descriptor_->name() + "." + method->name(); - sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_id)); + sub_vars["method_id"] = pb::SimpleItoa(method->options().GetExtension(Battlenet::method_options).id()); sub_vars["input_type"] = pbcpp::ClassName(method->input_type(), true); sub_vars["output_type"] = pbcpp::ClassName(method->output_type(), true); sub_vars["input_type_name"] = method->input_type()->full_name(); @@ -285,7 +286,7 @@ void BnetServiceGenerator::GenerateServerImplementations(pb::io::Printer* printe for (int i = 0; i < descriptor_->method_count(); i++) { pb::MethodDescriptor const* method = descriptor_->method(i); - if (!method->options().HasExtension(Battlenet::method_id)) + if (!method->options().HasExtension(Battlenet::method_options)) continue; std::map<std::string, std::string> sub_vars; diff --git a/contrib/protoc-bnet/method_options.pb.cc b/contrib/protoc-bnet/method_options.pb.cc index ab369b71d76..2b06fcc9b0b 100644 --- a/contrib/protoc-bnet/method_options.pb.cc +++ b/contrib/protoc-bnet/method_options.pb.cc @@ -20,6 +20,9 @@ namespace Battlenet { namespace { +const ::google::protobuf::Descriptor* BGSMethodOptions_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + BGSMethodOptions_reflection_ = NULL; } // namespace @@ -30,6 +33,21 @@ void protobuf_AssignDesc_method_5foptions_2eproto() { ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "method_options.proto"); GOOGLE_CHECK(file != NULL); + BGSMethodOptions_descriptor_ = file->message_type(0); + static const int BGSMethodOptions_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSMethodOptions, id_), + }; + BGSMethodOptions_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + BGSMethodOptions_descriptor_, + BGSMethodOptions::default_instance_, + BGSMethodOptions_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSMethodOptions, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSMethodOptions, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(BGSMethodOptions)); } namespace { @@ -42,11 +60,15 @@ inline void protobuf_AssignDescriptorsOnce() { void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + BGSMethodOptions_descriptor_, &BGSMethodOptions::default_instance()); } } // namespace void protobuf_ShutdownFile_method_5foptions_2eproto() { + delete BGSMethodOptions::default_instance_; + delete BGSMethodOptions_reflection_; } void protobuf_AddDesc_method_5foptions_2eproto() { @@ -58,14 +80,19 @@ void protobuf_AddDesc_method_5foptions_2eproto() { ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\024method_options.proto\022\tBattlenet\032 googl" - "e/protobuf/descriptor.proto:3\n\tmethod_id" - "\022\036.google.protobuf.MethodOptions\030\320\206\003 \001(\r" - "B\002H\002", 124); + "e/protobuf/descriptor.proto\"\036\n\020BGSMethod" + "Options\022\n\n\002id\030\001 \001(\r:U\n\016method_options\022\036." + "google.protobuf.MethodOptions\030\220\277\005 \001(\0132\033." + "Battlenet.BGSMethodOptionsB%\n\rbnet.proto" + "colB\022MethodOptionsProtoH\002", 225); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "method_options.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::ExtensionSet::RegisterExtension( + BGSMethodOptions::default_instance_ = new BGSMethodOptions(); + ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension( &::google::protobuf::MethodOptions::default_instance(), - 50000, 13, false, false); + 90000, 11, false, false, + &::Battlenet::BGSMethodOptions::default_instance()); + BGSMethodOptions::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_method_5foptions_2eproto); } @@ -75,9 +102,82 @@ struct StaticDescriptorInitializer_method_5foptions_2eproto { protobuf_AddDesc_method_5foptions_2eproto(); } } static_descriptor_initializer_method_5foptions_2eproto_; + +// =================================================================== + +#ifndef _MSC_VER +const int BGSMethodOptions::kIdFieldNumber; +#endif // !_MSC_VER + +BGSMethodOptions::BGSMethodOptions() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:Battlenet.BGSMethodOptions) +} + +void BGSMethodOptions::InitAsDefaultInstance() { +} + +BGSMethodOptions::BGSMethodOptions(const BGSMethodOptions& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:Battlenet.BGSMethodOptions) +} + +void BGSMethodOptions::SharedCtor() { + _cached_size_ = 0; + id_ = 0u; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +BGSMethodOptions::~BGSMethodOptions() { + // @@protoc_insertion_point(destructor:Battlenet.BGSMethodOptions) + SharedDtor(); +} + +void BGSMethodOptions::SharedDtor() { + if (this != default_instance_) { + } +} + +void BGSMethodOptions::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* BGSMethodOptions::descriptor() { + protobuf_AssignDescriptorsOnce(); + return BGSMethodOptions_descriptor_; +} + +const BGSMethodOptions& BGSMethodOptions::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_method_5foptions_2eproto(); + return *default_instance_; +} + +BGSMethodOptions* BGSMethodOptions::default_instance_ = NULL; + +BGSMethodOptions* BGSMethodOptions::New() const { + return new BGSMethodOptions; +} + +void BGSMethodOptions::Swap(BGSMethodOptions* other) { + if (other != this) { + GetReflection()->Swap(this, other);} +} + +::google::protobuf::Metadata BGSMethodOptions::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = BGSMethodOptions_descriptor_; + metadata.reflection = BGSMethodOptions_reflection_; + return metadata; +} + ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions, - ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false > - method_id(kMethodIdFieldNumber, 0u); + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::BGSMethodOptions >, 11, false > + method_options(kMethodOptionsFieldNumber, ::Battlenet::BGSMethodOptions::default_instance()); // @@protoc_insertion_point(namespace_scope) diff --git a/contrib/protoc-bnet/method_options.pb.h b/contrib/protoc-bnet/method_options.pb.h index 1d375fdc6c9..0b865109726 100644 --- a/contrib/protoc-bnet/method_options.pb.h +++ b/contrib/protoc-bnet/method_options.pb.h @@ -20,8 +20,10 @@ #endif #include <google/protobuf/generated_message_util.h> +#include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> +#include <google/protobuf/unknown_field_set.h> #include "google/protobuf/descriptor.pb.h" // @@protoc_insertion_point(includes) @@ -32,19 +34,109 @@ void protobuf_AddDesc_method_5foptions_2eproto(); void protobuf_AssignDesc_method_5foptions_2eproto(); void protobuf_ShutdownFile_method_5foptions_2eproto(); +class BGSMethodOptions; // =================================================================== +class BGSMethodOptions : public ::google::protobuf::Message { + public: + BGSMethodOptions(); + virtual ~BGSMethodOptions(); + BGSMethodOptions(const BGSMethodOptions& from); + + inline BGSMethodOptions& operator=(const BGSMethodOptions& 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 BGSMethodOptions& default_instance(); + + void Swap(BGSMethodOptions* other); + + // implements Message ---------------------------------------------- + + BGSMethodOptions* 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 ------------------------------------------------------- + + // optional uint32 id = 1; + inline bool has_id() const; + inline void clear_id(); + static const int kIdFieldNumber = 1; + inline ::google::protobuf::uint32 id() const; + inline void set_id(::google::protobuf::uint32 value); + + // @@protoc_insertion_point(class_scope:Battlenet.BGSMethodOptions) + private: + inline void set_has_id(); + inline void clear_has_id(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::google::protobuf::uint32 id_; + friend void protobuf_AddDesc_method_5foptions_2eproto(); + friend void protobuf_AssignDesc_method_5foptions_2eproto(); + friend void protobuf_ShutdownFile_method_5foptions_2eproto(); + + void InitAsDefaultInstance(); + static BGSMethodOptions* default_instance_; +}; // =================================================================== -static const int kMethodIdFieldNumber = 50000; +static const int kMethodOptionsFieldNumber = 90000; extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MethodOptions, - ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false > - method_id; + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::BGSMethodOptions >, 11, false > + method_options; // =================================================================== +// BGSMethodOptions + +// optional uint32 id = 1; +inline bool BGSMethodOptions::has_id() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void BGSMethodOptions::set_has_id() { + _has_bits_[0] |= 0x00000001u; +} +inline void BGSMethodOptions::clear_has_id() { + _has_bits_[0] &= ~0x00000001u; +} +inline void BGSMethodOptions::clear_id() { + id_ = 0u; + clear_has_id(); +} +inline ::google::protobuf::uint32 BGSMethodOptions::id() const { + // @@protoc_insertion_point(field_get:Battlenet.BGSMethodOptions.id) + return id_; +} +inline void BGSMethodOptions::set_id(::google::protobuf::uint32 value) { + set_has_id(); + id_ = value; + // @@protoc_insertion_point(field_set:Battlenet.BGSMethodOptions.id) +} + // @@protoc_insertion_point(namespace_scope) diff --git a/contrib/protoc-bnet/service_options.pb.cc b/contrib/protoc-bnet/service_options.pb.cc index fb5207a1263..b5d6d3bd545 100644 --- a/contrib/protoc-bnet/service_options.pb.cc +++ b/contrib/protoc-bnet/service_options.pb.cc @@ -20,6 +20,12 @@ namespace Battlenet { namespace { +const ::google::protobuf::Descriptor* BGSServiceOptions_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + BGSServiceOptions_reflection_ = NULL; +const ::google::protobuf::Descriptor* SDKServiceOptions_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + SDKServiceOptions_reflection_ = NULL; } // namespace @@ -30,6 +36,40 @@ void protobuf_AssignDesc_service_5foptions_2eproto() { ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( "service_options.proto"); GOOGLE_CHECK(file != NULL); + BGSServiceOptions_descriptor_ = file->message_type(0); + static const int BGSServiceOptions_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSServiceOptions, descriptor_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSServiceOptions, version_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSServiceOptions, shard_name_), + }; + BGSServiceOptions_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + BGSServiceOptions_descriptor_, + BGSServiceOptions::default_instance_, + BGSServiceOptions_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSServiceOptions, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BGSServiceOptions, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(BGSServiceOptions)); + SDKServiceOptions_descriptor_ = file->message_type(1); + static const int SDKServiceOptions_offsets_[3] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SDKServiceOptions, inbound_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SDKServiceOptions, outbound_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SDKServiceOptions, use_client_id_), + }; + SDKServiceOptions_reflection_ = + new ::google::protobuf::internal::GeneratedMessageReflection( + SDKServiceOptions_descriptor_, + SDKServiceOptions::default_instance_, + SDKServiceOptions_offsets_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SDKServiceOptions, _has_bits_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SDKServiceOptions, _unknown_fields_), + -1, + ::google::protobuf::DescriptorPool::generated_pool(), + ::google::protobuf::MessageFactory::generated_factory(), + sizeof(SDKServiceOptions)); } namespace { @@ -42,11 +82,19 @@ inline void protobuf_AssignDescriptorsOnce() { void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + BGSServiceOptions_descriptor_, &BGSServiceOptions::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SDKServiceOptions_descriptor_, &SDKServiceOptions::default_instance()); } } // namespace void protobuf_ShutdownFile_service_5foptions_2eproto() { + delete BGSServiceOptions::default_instance_; + delete BGSServiceOptions_reflection_; + delete SDKServiceOptions::default_instance_; + delete SDKServiceOptions_reflection_; } void protobuf_AddDesc_service_5foptions_2eproto() { @@ -58,19 +106,31 @@ void protobuf_AddDesc_service_5foptions_2eproto() { ::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto(); ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( "\n\025service_options.proto\022\tBattlenet\032 goog" - "le/protobuf/descriptor.proto:R\n(original" - "_fully_qualified_descriptor_name\022\037.googl" - "e.protobuf.ServiceOptions\030\351\007 \001(\t:5\n\nserv" - "ice_id\022\037.google.protobuf.ServiceOptions\030" - "\320\206\003 \001(\rB\002H\002", 211); + "le/protobuf/descriptor.proto\"Q\n\021BGSServi" + "ceOptions\022\027\n\017descriptor_name\030\001 \001(\t\022\017\n\007ve" + "rsion\030\004 \001(\r\022\022\n\nshard_name\030\005 \001(\t\"M\n\021SDKSe" + "rviceOptions\022\017\n\007inbound\030\001 \001(\010\022\020\n\010outboun" + "d\030\002 \001(\010\022\025\n\ruse_client_id\030\003 \001(\010:X\n\017servic" + "e_options\022\037.google.protobuf.ServiceOptio" + "ns\030\220\277\005 \001(\0132\034.Battlenet.BGSServiceOptions" + ":\\\n\023sdk_service_options\022\037.google.protobu" + "f.ServiceOptions\030\221\277\005 \001(\0132\034.Battlenet.SDK" + "ServiceOptionsB&\n\rbnet.protocolB\023Service" + "OptionsProtoH\002", 454); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "service_options.proto", &protobuf_RegisterTypes); - ::google::protobuf::internal::ExtensionSet::RegisterExtension( + BGSServiceOptions::default_instance_ = new BGSServiceOptions(); + SDKServiceOptions::default_instance_ = new SDKServiceOptions(); + ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension( &::google::protobuf::ServiceOptions::default_instance(), - 1001, 9, false, false); - ::google::protobuf::internal::ExtensionSet::RegisterExtension( + 90000, 11, false, false, + &::Battlenet::BGSServiceOptions::default_instance()); + ::google::protobuf::internal::ExtensionSet::RegisterMessageExtension( &::google::protobuf::ServiceOptions::default_instance(), - 50000, 13, false, false); + 90001, 11, false, false, + &::Battlenet::SDKServiceOptions::default_instance()); + BGSServiceOptions::default_instance_->InitAsDefaultInstance(); + SDKServiceOptions::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_service_5foptions_2eproto); } @@ -80,13 +140,173 @@ struct StaticDescriptorInitializer_service_5foptions_2eproto { protobuf_AddDesc_service_5foptions_2eproto(); } } static_descriptor_initializer_service_5foptions_2eproto_; -const ::std::string original_fully_qualified_descriptor_name_default(""); + +// =================================================================== + +#ifndef _MSC_VER +const int BGSServiceOptions::kDescriptorNameFieldNumber; +const int BGSServiceOptions::kVersionFieldNumber; +const int BGSServiceOptions::kShardNameFieldNumber; +#endif // !_MSC_VER + +BGSServiceOptions::BGSServiceOptions() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:Battlenet.BGSServiceOptions) +} + +void BGSServiceOptions::InitAsDefaultInstance() { +} + +BGSServiceOptions::BGSServiceOptions(const BGSServiceOptions& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:Battlenet.BGSServiceOptions) +} + +void BGSServiceOptions::SharedCtor() { + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + descriptor_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + version_ = 0u; + shard_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +BGSServiceOptions::~BGSServiceOptions() { + // @@protoc_insertion_point(destructor:Battlenet.BGSServiceOptions) + SharedDtor(); +} + +void BGSServiceOptions::SharedDtor() { + if (descriptor_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete descriptor_name_; + } + if (shard_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete shard_name_; + } + if (this != default_instance_) { + } +} + +void BGSServiceOptions::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* BGSServiceOptions::descriptor() { + protobuf_AssignDescriptorsOnce(); + return BGSServiceOptions_descriptor_; +} + +const BGSServiceOptions& BGSServiceOptions::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_service_5foptions_2eproto(); + return *default_instance_; +} + +BGSServiceOptions* BGSServiceOptions::default_instance_ = NULL; + +BGSServiceOptions* BGSServiceOptions::New() const { + return new BGSServiceOptions; +} + +void BGSServiceOptions::Swap(BGSServiceOptions* other) { + if (other != this) { + GetReflection()->Swap(this, other);} +} + +::google::protobuf::Metadata BGSServiceOptions::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = BGSServiceOptions_descriptor_; + metadata.reflection = BGSServiceOptions_reflection_; + return metadata; +} + + +// =================================================================== + +#ifndef _MSC_VER +const int SDKServiceOptions::kInboundFieldNumber; +const int SDKServiceOptions::kOutboundFieldNumber; +const int SDKServiceOptions::kUseClientIdFieldNumber; +#endif // !_MSC_VER + +SDKServiceOptions::SDKServiceOptions() + : ::google::protobuf::Message() { + SharedCtor(); + // @@protoc_insertion_point(constructor:Battlenet.SDKServiceOptions) +} + +void SDKServiceOptions::InitAsDefaultInstance() { +} + +SDKServiceOptions::SDKServiceOptions(const SDKServiceOptions& from) + : ::google::protobuf::Message() { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:Battlenet.SDKServiceOptions) +} + +void SDKServiceOptions::SharedCtor() { + _cached_size_ = 0; + inbound_ = false; + outbound_ = false; + use_client_id_ = false; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +SDKServiceOptions::~SDKServiceOptions() { + // @@protoc_insertion_point(destructor:Battlenet.SDKServiceOptions) + SharedDtor(); +} + +void SDKServiceOptions::SharedDtor() { + if (this != default_instance_) { + } +} + +void SDKServiceOptions::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* SDKServiceOptions::descriptor() { + protobuf_AssignDescriptorsOnce(); + return SDKServiceOptions_descriptor_; +} + +const SDKServiceOptions& SDKServiceOptions::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_service_5foptions_2eproto(); + return *default_instance_; +} + +SDKServiceOptions* SDKServiceOptions::default_instance_ = NULL; + +SDKServiceOptions* SDKServiceOptions::New() const { + return new SDKServiceOptions; +} + +void SDKServiceOptions::Swap(SDKServiceOptions* other) { + if (other != this) { + GetReflection()->Swap(this, other);} +} + +::google::protobuf::Metadata SDKServiceOptions::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SDKServiceOptions_descriptor_; + metadata.reflection = SDKServiceOptions_reflection_; + return metadata; +} + ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions, - ::google::protobuf::internal::StringTypeTraits, 9, false > - original_fully_qualified_descriptor_name(kOriginalFullyQualifiedDescriptorNameFieldNumber, original_fully_qualified_descriptor_name_default); + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::BGSServiceOptions >, 11, false > + service_options(kServiceOptionsFieldNumber, ::Battlenet::BGSServiceOptions::default_instance()); ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions, - ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false > - service_id(kServiceIdFieldNumber, 0u); + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::SDKServiceOptions >, 11, false > + sdk_service_options(kSdkServiceOptionsFieldNumber, ::Battlenet::SDKServiceOptions::default_instance()); // @@protoc_insertion_point(namespace_scope) diff --git a/contrib/protoc-bnet/service_options.pb.h b/contrib/protoc-bnet/service_options.pb.h index 720ca4c36cd..5d15af3ca85 100644 --- a/contrib/protoc-bnet/service_options.pb.h +++ b/contrib/protoc-bnet/service_options.pb.h @@ -20,8 +20,10 @@ #endif #include <google/protobuf/generated_message_util.h> +#include <google/protobuf/message.h> #include <google/protobuf/repeated_field.h> #include <google/protobuf/extension_set.h> +#include <google/protobuf/unknown_field_set.h> #include "google/protobuf/descriptor.pb.h" // @@protoc_insertion_point(includes) @@ -32,23 +34,458 @@ void protobuf_AddDesc_service_5foptions_2eproto(); void protobuf_AssignDesc_service_5foptions_2eproto(); void protobuf_ShutdownFile_service_5foptions_2eproto(); +class BGSServiceOptions; +class SDKServiceOptions; // =================================================================== +class BGSServiceOptions : public ::google::protobuf::Message { + public: + BGSServiceOptions(); + virtual ~BGSServiceOptions(); + BGSServiceOptions(const BGSServiceOptions& from); + + inline BGSServiceOptions& operator=(const BGSServiceOptions& 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 BGSServiceOptions& default_instance(); + + void Swap(BGSServiceOptions* other); + + // implements Message ---------------------------------------------- + + BGSServiceOptions* 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 ------------------------------------------------------- + + // optional string descriptor_name = 1; + inline bool has_descriptor_name() const; + inline void clear_descriptor_name(); + static const int kDescriptorNameFieldNumber = 1; + inline const ::std::string& descriptor_name() const; + inline void set_descriptor_name(const ::std::string& value); + inline void set_descriptor_name(const char* value); + inline void set_descriptor_name(const char* value, size_t size); + inline ::std::string* mutable_descriptor_name(); + inline ::std::string* release_descriptor_name(); + inline void set_allocated_descriptor_name(::std::string* descriptor_name); + + // optional uint32 version = 4; + inline bool has_version() const; + inline void clear_version(); + static const int kVersionFieldNumber = 4; + inline ::google::protobuf::uint32 version() const; + inline void set_version(::google::protobuf::uint32 value); + + // optional string shard_name = 5; + inline bool has_shard_name() const; + inline void clear_shard_name(); + static const int kShardNameFieldNumber = 5; + inline const ::std::string& shard_name() const; + inline void set_shard_name(const ::std::string& value); + inline void set_shard_name(const char* value); + inline void set_shard_name(const char* value, size_t size); + inline ::std::string* mutable_shard_name(); + inline ::std::string* release_shard_name(); + inline void set_allocated_shard_name(::std::string* shard_name); + + // @@protoc_insertion_point(class_scope:Battlenet.BGSServiceOptions) + private: + inline void set_has_descriptor_name(); + inline void clear_has_descriptor_name(); + inline void set_has_version(); + inline void clear_has_version(); + inline void set_has_shard_name(); + inline void clear_has_shard_name(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + ::std::string* descriptor_name_; + ::std::string* shard_name_; + ::google::protobuf::uint32 version_; + friend void protobuf_AddDesc_service_5foptions_2eproto(); + friend void protobuf_AssignDesc_service_5foptions_2eproto(); + friend void protobuf_ShutdownFile_service_5foptions_2eproto(); + + void InitAsDefaultInstance(); + static BGSServiceOptions* default_instance_; +}; +// ------------------------------------------------------------------- + +class SDKServiceOptions : public ::google::protobuf::Message { + public: + SDKServiceOptions(); + virtual ~SDKServiceOptions(); + + SDKServiceOptions(const SDKServiceOptions& from); + + inline SDKServiceOptions& operator=(const SDKServiceOptions& 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 SDKServiceOptions& default_instance(); + + void Swap(SDKServiceOptions* other); + + // implements Message ---------------------------------------------- + + SDKServiceOptions* 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 ------------------------------------------------------- + + // optional bool inbound = 1; + inline bool has_inbound() const; + inline void clear_inbound(); + static const int kInboundFieldNumber = 1; + inline bool inbound() const; + inline void set_inbound(bool value); + + // optional bool outbound = 2; + inline bool has_outbound() const; + inline void clear_outbound(); + static const int kOutboundFieldNumber = 2; + inline bool outbound() const; + inline void set_outbound(bool value); + + // optional bool use_client_id = 3; + inline bool has_use_client_id() const; + inline void clear_use_client_id(); + static const int kUseClientIdFieldNumber = 3; + inline bool use_client_id() const; + inline void set_use_client_id(bool value); + + // @@protoc_insertion_point(class_scope:Battlenet.SDKServiceOptions) + private: + inline void set_has_inbound(); + inline void clear_has_inbound(); + inline void set_has_outbound(); + inline void clear_has_outbound(); + inline void set_has_use_client_id(); + inline void clear_has_use_client_id(); + + ::google::protobuf::UnknownFieldSet _unknown_fields_; + + ::google::protobuf::uint32 _has_bits_[1]; + mutable int _cached_size_; + bool inbound_; + bool outbound_; + bool use_client_id_; + friend void protobuf_AddDesc_service_5foptions_2eproto(); + friend void protobuf_AssignDesc_service_5foptions_2eproto(); + friend void protobuf_ShutdownFile_service_5foptions_2eproto(); + + void InitAsDefaultInstance(); + static SDKServiceOptions* default_instance_; +}; // =================================================================== -static const int kOriginalFullyQualifiedDescriptorNameFieldNumber = 1001; +static const int kServiceOptionsFieldNumber = 90000; extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions, - ::google::protobuf::internal::StringTypeTraits, 9, false > - original_fully_qualified_descriptor_name; -static const int kServiceIdFieldNumber = 50000; + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::BGSServiceOptions >, 11, false > + service_options; +static const int kSdkServiceOptionsFieldNumber = 90001; extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::ServiceOptions, - ::google::protobuf::internal::PrimitiveTypeTraits< ::google::protobuf::uint32 >, 13, false > - service_id; + ::google::protobuf::internal::MessageTypeTraits< ::Battlenet::SDKServiceOptions >, 11, false > + sdk_service_options; // =================================================================== +// BGSServiceOptions + +// optional string descriptor_name = 1; +inline bool BGSServiceOptions::has_descriptor_name() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void BGSServiceOptions::set_has_descriptor_name() { + _has_bits_[0] |= 0x00000001u; +} +inline void BGSServiceOptions::clear_has_descriptor_name() { + _has_bits_[0] &= ~0x00000001u; +} +inline void BGSServiceOptions::clear_descriptor_name() { + if (descriptor_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + descriptor_name_->clear(); + } + clear_has_descriptor_name(); +} +inline const ::std::string& BGSServiceOptions::descriptor_name() const { + // @@protoc_insertion_point(field_get:Battlenet.BGSServiceOptions.descriptor_name) + return *descriptor_name_; +} +inline void BGSServiceOptions::set_descriptor_name(const ::std::string& value) { + set_has_descriptor_name(); + if (descriptor_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + descriptor_name_ = new ::std::string; + } + descriptor_name_->assign(value); + // @@protoc_insertion_point(field_set:Battlenet.BGSServiceOptions.descriptor_name) +} +inline void BGSServiceOptions::set_descriptor_name(const char* value) { + set_has_descriptor_name(); + if (descriptor_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + descriptor_name_ = new ::std::string; + } + descriptor_name_->assign(value); + // @@protoc_insertion_point(field_set_char:Battlenet.BGSServiceOptions.descriptor_name) +} +inline void BGSServiceOptions::set_descriptor_name(const char* value, size_t size) { + set_has_descriptor_name(); + if (descriptor_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + descriptor_name_ = new ::std::string; + } + descriptor_name_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:Battlenet.BGSServiceOptions.descriptor_name) +} +inline ::std::string* BGSServiceOptions::mutable_descriptor_name() { + set_has_descriptor_name(); + if (descriptor_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + descriptor_name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:Battlenet.BGSServiceOptions.descriptor_name) + return descriptor_name_; +} +inline ::std::string* BGSServiceOptions::release_descriptor_name() { + clear_has_descriptor_name(); + if (descriptor_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = descriptor_name_; + descriptor_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void BGSServiceOptions::set_allocated_descriptor_name(::std::string* descriptor_name) { + if (descriptor_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete descriptor_name_; + } + if (descriptor_name) { + set_has_descriptor_name(); + descriptor_name_ = descriptor_name; + } else { + clear_has_descriptor_name(); + descriptor_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:Battlenet.BGSServiceOptions.descriptor_name) +} + +// optional uint32 version = 4; +inline bool BGSServiceOptions::has_version() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void BGSServiceOptions::set_has_version() { + _has_bits_[0] |= 0x00000002u; +} +inline void BGSServiceOptions::clear_has_version() { + _has_bits_[0] &= ~0x00000002u; +} +inline void BGSServiceOptions::clear_version() { + version_ = 0u; + clear_has_version(); +} +inline ::google::protobuf::uint32 BGSServiceOptions::version() const { + // @@protoc_insertion_point(field_get:Battlenet.BGSServiceOptions.version) + return version_; +} +inline void BGSServiceOptions::set_version(::google::protobuf::uint32 value) { + set_has_version(); + version_ = value; + // @@protoc_insertion_point(field_set:Battlenet.BGSServiceOptions.version) +} + +// optional string shard_name = 5; +inline bool BGSServiceOptions::has_shard_name() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void BGSServiceOptions::set_has_shard_name() { + _has_bits_[0] |= 0x00000004u; +} +inline void BGSServiceOptions::clear_has_shard_name() { + _has_bits_[0] &= ~0x00000004u; +} +inline void BGSServiceOptions::clear_shard_name() { + if (shard_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + shard_name_->clear(); + } + clear_has_shard_name(); +} +inline const ::std::string& BGSServiceOptions::shard_name() const { + // @@protoc_insertion_point(field_get:Battlenet.BGSServiceOptions.shard_name) + return *shard_name_; +} +inline void BGSServiceOptions::set_shard_name(const ::std::string& value) { + set_has_shard_name(); + if (shard_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + shard_name_ = new ::std::string; + } + shard_name_->assign(value); + // @@protoc_insertion_point(field_set:Battlenet.BGSServiceOptions.shard_name) +} +inline void BGSServiceOptions::set_shard_name(const char* value) { + set_has_shard_name(); + if (shard_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + shard_name_ = new ::std::string; + } + shard_name_->assign(value); + // @@protoc_insertion_point(field_set_char:Battlenet.BGSServiceOptions.shard_name) +} +inline void BGSServiceOptions::set_shard_name(const char* value, size_t size) { + set_has_shard_name(); + if (shard_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + shard_name_ = new ::std::string; + } + shard_name_->assign(reinterpret_cast<const char*>(value), size); + // @@protoc_insertion_point(field_set_pointer:Battlenet.BGSServiceOptions.shard_name) +} +inline ::std::string* BGSServiceOptions::mutable_shard_name() { + set_has_shard_name(); + if (shard_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + shard_name_ = new ::std::string; + } + // @@protoc_insertion_point(field_mutable:Battlenet.BGSServiceOptions.shard_name) + return shard_name_; +} +inline ::std::string* BGSServiceOptions::release_shard_name() { + clear_has_shard_name(); + if (shard_name_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + return NULL; + } else { + ::std::string* temp = shard_name_; + shard_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return temp; + } +} +inline void BGSServiceOptions::set_allocated_shard_name(::std::string* shard_name) { + if (shard_name_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) { + delete shard_name_; + } + if (shard_name) { + set_has_shard_name(); + shard_name_ = shard_name; + } else { + clear_has_shard_name(); + shard_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_set_allocated:Battlenet.BGSServiceOptions.shard_name) +} + +// ------------------------------------------------------------------- + +// SDKServiceOptions + +// optional bool inbound = 1; +inline bool SDKServiceOptions::has_inbound() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void SDKServiceOptions::set_has_inbound() { + _has_bits_[0] |= 0x00000001u; +} +inline void SDKServiceOptions::clear_has_inbound() { + _has_bits_[0] &= ~0x00000001u; +} +inline void SDKServiceOptions::clear_inbound() { + inbound_ = false; + clear_has_inbound(); +} +inline bool SDKServiceOptions::inbound() const { + // @@protoc_insertion_point(field_get:Battlenet.SDKServiceOptions.inbound) + return inbound_; +} +inline void SDKServiceOptions::set_inbound(bool value) { + set_has_inbound(); + inbound_ = value; + // @@protoc_insertion_point(field_set:Battlenet.SDKServiceOptions.inbound) +} + +// optional bool outbound = 2; +inline bool SDKServiceOptions::has_outbound() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void SDKServiceOptions::set_has_outbound() { + _has_bits_[0] |= 0x00000002u; +} +inline void SDKServiceOptions::clear_has_outbound() { + _has_bits_[0] &= ~0x00000002u; +} +inline void SDKServiceOptions::clear_outbound() { + outbound_ = false; + clear_has_outbound(); +} +inline bool SDKServiceOptions::outbound() const { + // @@protoc_insertion_point(field_get:Battlenet.SDKServiceOptions.outbound) + return outbound_; +} +inline void SDKServiceOptions::set_outbound(bool value) { + set_has_outbound(); + outbound_ = value; + // @@protoc_insertion_point(field_set:Battlenet.SDKServiceOptions.outbound) +} + +// optional bool use_client_id = 3; +inline bool SDKServiceOptions::has_use_client_id() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void SDKServiceOptions::set_has_use_client_id() { + _has_bits_[0] |= 0x00000004u; +} +inline void SDKServiceOptions::clear_has_use_client_id() { + _has_bits_[0] &= ~0x00000004u; +} +inline void SDKServiceOptions::clear_use_client_id() { + use_client_id_ = false; + clear_has_use_client_id(); +} +inline bool SDKServiceOptions::use_client_id() const { + // @@protoc_insertion_point(field_get:Battlenet.SDKServiceOptions.use_client_id) + return use_client_id_; +} +inline void SDKServiceOptions::set_use_client_id(bool value) { + set_has_use_client_id(); + use_client_id_ = value; + // @@protoc_insertion_point(field_set:Battlenet.SDKServiceOptions.use_client_id) +} + // @@protoc_insertion_point(namespace_scope) |