913 lines
30 KiB
C++
913 lines
30 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: messages.proto
|
|
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
|
#include "messages.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
#include <google/protobuf/stubs/once.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
|
#include <google/protobuf/descriptor.h>
|
|
#include <google/protobuf/generated_message_reflection.h>
|
|
#include <google/protobuf/reflection_ops.h>
|
|
#include <google/protobuf/wire_format.h>
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace {
|
|
|
|
const ::google::protobuf::Descriptor* ClientMessage_descriptor_ = NULL;
|
|
const ::google::protobuf::internal::GeneratedMessageReflection*
|
|
ClientMessage_reflection_ = NULL;
|
|
const ::google::protobuf::EnumDescriptor* ClientMessage_Type_descriptor_ = NULL;
|
|
const ::google::protobuf::Descriptor* ServerMessage_descriptor_ = NULL;
|
|
const ::google::protobuf::internal::GeneratedMessageReflection*
|
|
ServerMessage_reflection_ = NULL;
|
|
const ::google::protobuf::EnumDescriptor* ServerMessage_Type_descriptor_ = NULL;
|
|
|
|
} // namespace
|
|
|
|
|
|
void protobuf_AssignDesc_messages_2eproto() {
|
|
protobuf_AddDesc_messages_2eproto();
|
|
const ::google::protobuf::FileDescriptor* file =
|
|
::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
|
|
"messages.proto");
|
|
GOOGLE_CHECK(file != NULL);
|
|
ClientMessage_descriptor_ = file->message_type(0);
|
|
static const int ClientMessage_offsets_[4] = {
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, type_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, auth_request_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, collection_request_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, media_request_),
|
|
};
|
|
ClientMessage_reflection_ =
|
|
new ::google::protobuf::internal::GeneratedMessageReflection(
|
|
ClientMessage_descriptor_,
|
|
ClientMessage::default_instance_,
|
|
ClientMessage_offsets_,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, _has_bits_[0]),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ClientMessage, _unknown_fields_),
|
|
-1,
|
|
::google::protobuf::DescriptorPool::generated_pool(),
|
|
::google::protobuf::MessageFactory::generated_factory(),
|
|
sizeof(ClientMessage));
|
|
ClientMessage_Type_descriptor_ = ClientMessage_descriptor_->enum_type(0);
|
|
ServerMessage_descriptor_ = file->message_type(1);
|
|
static const int ServerMessage_offsets_[4] = {
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, type_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, auth_response_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, collection_response_),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, media_response_),
|
|
};
|
|
ServerMessage_reflection_ =
|
|
new ::google::protobuf::internal::GeneratedMessageReflection(
|
|
ServerMessage_descriptor_,
|
|
ServerMessage::default_instance_,
|
|
ServerMessage_offsets_,
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, _has_bits_[0]),
|
|
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerMessage, _unknown_fields_),
|
|
-1,
|
|
::google::protobuf::DescriptorPool::generated_pool(),
|
|
::google::protobuf::MessageFactory::generated_factory(),
|
|
sizeof(ServerMessage));
|
|
ServerMessage_Type_descriptor_ = ServerMessage_descriptor_->enum_type(0);
|
|
}
|
|
|
|
namespace {
|
|
|
|
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
|
|
inline void protobuf_AssignDescriptorsOnce() {
|
|
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
|
|
&protobuf_AssignDesc_messages_2eproto);
|
|
}
|
|
|
|
void protobuf_RegisterTypes(const ::std::string&) {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
|
ClientMessage_descriptor_, &ClientMessage::default_instance());
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
|
|
ServerMessage_descriptor_, &ServerMessage::default_instance());
|
|
}
|
|
|
|
} // namespace
|
|
|
|
void protobuf_ShutdownFile_messages_2eproto() {
|
|
delete ClientMessage::default_instance_;
|
|
delete ClientMessage_reflection_;
|
|
delete ServerMessage::default_instance_;
|
|
delete ServerMessage_reflection_;
|
|
}
|
|
|
|
void protobuf_AddDesc_messages_2eproto() {
|
|
static bool already_here = false;
|
|
if (already_here) return;
|
|
already_here = true;
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
::protobuf_AddDesc_common_2eproto();
|
|
::protobuf_AddDesc_auth_2eproto();
|
|
::protobuf_AddDesc_collection_2eproto();
|
|
::protobuf_AddDesc_media_2eproto();
|
|
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
|
"\n\016messages.proto\032\014common.proto\032\nauth.pro"
|
|
"to\032\020collection.proto\032\013media.proto\"\356\001\n\rCl"
|
|
"ientMessage\022!\n\004type\030\001 \002(\0162\023.ClientMessag"
|
|
"e.Type\022\"\n\014auth_request\030\002 \001(\0132\014.AuthReque"
|
|
"st\022.\n\022collection_request\030\003 \001(\0132\022.Collect"
|
|
"ionRequest\022$\n\rmedia_request\030\004 \001(\0132\r.Medi"
|
|
"aRequest\"@\n\004Type\022\017\n\013AuthRequest\020\001\022\025\n\021Col"
|
|
"lectionRequest\020\002\022\020\n\014MediaRequest\020\003\"\367\001\n\rS"
|
|
"erverMessage\022!\n\004type\030\001 \002(\0162\023.ServerMessa"
|
|
"ge.Type\022$\n\rauth_response\030\002 \001(\0132\r.AuthRes"
|
|
"ponse\0220\n\023collection_response\030\003 \001(\0132\023.Col"
|
|
"lectionResponse\022&\n\016media_response\030\004 \001(\0132"
|
|
"\016.MediaResponse\"C\n\004Type\022\020\n\014AuthResponse\020"
|
|
"\001\022\026\n\022CollectionResponse\020\002\022\021\n\rMediaRespon"
|
|
"se\020\003", 564);
|
|
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
|
"messages.proto", &protobuf_RegisterTypes);
|
|
ClientMessage::default_instance_ = new ClientMessage();
|
|
ServerMessage::default_instance_ = new ServerMessage();
|
|
ClientMessage::default_instance_->InitAsDefaultInstance();
|
|
ServerMessage::default_instance_->InitAsDefaultInstance();
|
|
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_messages_2eproto);
|
|
}
|
|
|
|
// Force AddDescriptors() to be called at static initialization time.
|
|
struct StaticDescriptorInitializer_messages_2eproto {
|
|
StaticDescriptorInitializer_messages_2eproto() {
|
|
protobuf_AddDesc_messages_2eproto();
|
|
}
|
|
} static_descriptor_initializer_messages_2eproto_;
|
|
|
|
// ===================================================================
|
|
|
|
const ::google::protobuf::EnumDescriptor* ClientMessage_Type_descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return ClientMessage_Type_descriptor_;
|
|
}
|
|
bool ClientMessage_Type_IsValid(int value) {
|
|
switch(value) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#ifndef _MSC_VER
|
|
const ClientMessage_Type ClientMessage::AuthRequest;
|
|
const ClientMessage_Type ClientMessage::CollectionRequest;
|
|
const ClientMessage_Type ClientMessage::MediaRequest;
|
|
const ClientMessage_Type ClientMessage::Type_MIN;
|
|
const ClientMessage_Type ClientMessage::Type_MAX;
|
|
const int ClientMessage::Type_ARRAYSIZE;
|
|
#endif // _MSC_VER
|
|
#ifndef _MSC_VER
|
|
const int ClientMessage::kTypeFieldNumber;
|
|
const int ClientMessage::kAuthRequestFieldNumber;
|
|
const int ClientMessage::kCollectionRequestFieldNumber;
|
|
const int ClientMessage::kMediaRequestFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientMessage::ClientMessage()
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientMessage::InitAsDefaultInstance() {
|
|
auth_request_ = const_cast< ::AuthRequest*>(&::AuthRequest::default_instance());
|
|
collection_request_ = const_cast< ::CollectionRequest*>(&::CollectionRequest::default_instance());
|
|
media_request_ = const_cast< ::MediaRequest*>(&::MediaRequest::default_instance());
|
|
}
|
|
|
|
ClientMessage::ClientMessage(const ClientMessage& from)
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientMessage::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
type_ = 1;
|
|
auth_request_ = NULL;
|
|
collection_request_ = NULL;
|
|
media_request_ = NULL;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientMessage::~ClientMessage() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientMessage::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
delete auth_request_;
|
|
delete collection_request_;
|
|
delete media_request_;
|
|
}
|
|
}
|
|
|
|
void ClientMessage::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ::google::protobuf::Descriptor* ClientMessage::descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return ClientMessage_descriptor_;
|
|
}
|
|
|
|
const ClientMessage& ClientMessage::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_messages_2eproto();
|
|
return *default_instance_;
|
|
}
|
|
|
|
ClientMessage* ClientMessage::default_instance_ = NULL;
|
|
|
|
ClientMessage* ClientMessage::New() const {
|
|
return new ClientMessage;
|
|
}
|
|
|
|
void ClientMessage::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
type_ = 1;
|
|
if (has_auth_request()) {
|
|
if (auth_request_ != NULL) auth_request_->::AuthRequest::Clear();
|
|
}
|
|
if (has_collection_request()) {
|
|
if (collection_request_ != NULL) collection_request_->::CollectionRequest::Clear();
|
|
}
|
|
if (has_media_request()) {
|
|
if (media_request_ != NULL) media_request_->::MediaRequest::Clear();
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
mutable_unknown_fields()->Clear();
|
|
}
|
|
|
|
bool ClientMessage::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
|
::google::protobuf::uint32 tag;
|
|
while ((tag = input->ReadTag()) != 0) {
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required .ClientMessage.Type type = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::ClientMessage_Type_IsValid(value)) {
|
|
set_type(static_cast< ::ClientMessage_Type >(value));
|
|
} else {
|
|
mutable_unknown_fields()->AddVarint(1, value);
|
|
}
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(18)) goto parse_auth_request;
|
|
break;
|
|
}
|
|
|
|
// optional .AuthRequest auth_request = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_auth_request:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_auth_request()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(26)) goto parse_collection_request;
|
|
break;
|
|
}
|
|
|
|
// optional .CollectionRequest collection_request = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_collection_request:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_collection_request()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(34)) goto parse_media_request;
|
|
break;
|
|
}
|
|
|
|
// optional .MediaRequest media_request = 4;
|
|
case 4: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_media_request:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_media_request()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectAtEnd()) return true;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_uninterpreted:
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
|
return true;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
#undef DO_
|
|
}
|
|
|
|
void ClientMessage::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// required .ClientMessage.Type type = 1;
|
|
if (has_type()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
1, this->type(), output);
|
|
}
|
|
|
|
// optional .AuthRequest auth_request = 2;
|
|
if (has_auth_request()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
2, this->auth_request(), output);
|
|
}
|
|
|
|
// optional .CollectionRequest collection_request = 3;
|
|
if (has_collection_request()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
3, this->collection_request(), output);
|
|
}
|
|
|
|
// optional .MediaRequest media_request = 4;
|
|
if (has_media_request()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
4, this->media_request(), output);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
unknown_fields(), output);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::uint8* ClientMessage::SerializeWithCachedSizesToArray(
|
|
::google::protobuf::uint8* target) const {
|
|
// required .ClientMessage.Type type = 1;
|
|
if (has_type()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
|
1, this->type(), target);
|
|
}
|
|
|
|
// optional .AuthRequest auth_request = 2;
|
|
if (has_auth_request()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
2, this->auth_request(), target);
|
|
}
|
|
|
|
// optional .CollectionRequest collection_request = 3;
|
|
if (has_collection_request()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
3, this->collection_request(), target);
|
|
}
|
|
|
|
// optional .MediaRequest media_request = 4;
|
|
if (has_media_request()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
4, this->media_request(), target);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
unknown_fields(), target);
|
|
}
|
|
return target;
|
|
}
|
|
|
|
int ClientMessage::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// required .ClientMessage.Type type = 1;
|
|
if (has_type()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
|
|
}
|
|
|
|
// optional .AuthRequest auth_request = 2;
|
|
if (has_auth_request()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->auth_request());
|
|
}
|
|
|
|
// optional .CollectionRequest collection_request = 3;
|
|
if (has_collection_request()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->collection_request());
|
|
}
|
|
|
|
// optional .MediaRequest media_request = 4;
|
|
if (has_media_request()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->media_request());
|
|
}
|
|
|
|
}
|
|
if (!unknown_fields().empty()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
unknown_fields());
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientMessage::MergeFrom(const ::google::protobuf::Message& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
const ClientMessage* source =
|
|
::google::protobuf::internal::dynamic_cast_if_available<const ClientMessage*>(
|
|
&from);
|
|
if (source == NULL) {
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void ClientMessage::MergeFrom(const ClientMessage& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_type()) {
|
|
set_type(from.type());
|
|
}
|
|
if (from.has_auth_request()) {
|
|
mutable_auth_request()->::AuthRequest::MergeFrom(from.auth_request());
|
|
}
|
|
if (from.has_collection_request()) {
|
|
mutable_collection_request()->::CollectionRequest::MergeFrom(from.collection_request());
|
|
}
|
|
if (from.has_media_request()) {
|
|
mutable_media_request()->::MediaRequest::MergeFrom(from.media_request());
|
|
}
|
|
}
|
|
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
|
}
|
|
|
|
void ClientMessage::CopyFrom(const ::google::protobuf::Message& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientMessage::CopyFrom(const ClientMessage& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientMessage::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
|
|
if (has_auth_request()) {
|
|
if (!this->auth_request().IsInitialized()) return false;
|
|
}
|
|
if (has_collection_request()) {
|
|
if (!this->collection_request().IsInitialized()) return false;
|
|
}
|
|
if (has_media_request()) {
|
|
if (!this->media_request().IsInitialized()) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void ClientMessage::Swap(ClientMessage* other) {
|
|
if (other != this) {
|
|
std::swap(type_, other->type_);
|
|
std::swap(auth_request_, other->auth_request_);
|
|
std::swap(collection_request_, other->collection_request_);
|
|
std::swap(media_request_, other->media_request_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_unknown_fields_.Swap(&other->_unknown_fields_);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::Metadata ClientMessage::GetMetadata() const {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::Metadata metadata;
|
|
metadata.descriptor = ClientMessage_descriptor_;
|
|
metadata.reflection = ClientMessage_reflection_;
|
|
return metadata;
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
const ::google::protobuf::EnumDescriptor* ServerMessage_Type_descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return ServerMessage_Type_descriptor_;
|
|
}
|
|
bool ServerMessage_Type_IsValid(int value) {
|
|
switch(value) {
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#ifndef _MSC_VER
|
|
const ServerMessage_Type ServerMessage::AuthResponse;
|
|
const ServerMessage_Type ServerMessage::CollectionResponse;
|
|
const ServerMessage_Type ServerMessage::MediaResponse;
|
|
const ServerMessage_Type ServerMessage::Type_MIN;
|
|
const ServerMessage_Type ServerMessage::Type_MAX;
|
|
const int ServerMessage::Type_ARRAYSIZE;
|
|
#endif // _MSC_VER
|
|
#ifndef _MSC_VER
|
|
const int ServerMessage::kTypeFieldNumber;
|
|
const int ServerMessage::kAuthResponseFieldNumber;
|
|
const int ServerMessage::kCollectionResponseFieldNumber;
|
|
const int ServerMessage::kMediaResponseFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ServerMessage::ServerMessage()
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ServerMessage::InitAsDefaultInstance() {
|
|
auth_response_ = const_cast< ::AuthResponse*>(&::AuthResponse::default_instance());
|
|
collection_response_ = const_cast< ::CollectionResponse*>(&::CollectionResponse::default_instance());
|
|
media_response_ = const_cast< ::MediaResponse*>(&::MediaResponse::default_instance());
|
|
}
|
|
|
|
ServerMessage::ServerMessage(const ServerMessage& from)
|
|
: ::google::protobuf::Message() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ServerMessage::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
type_ = 1;
|
|
auth_response_ = NULL;
|
|
collection_response_ = NULL;
|
|
media_response_ = NULL;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ServerMessage::~ServerMessage() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ServerMessage::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
delete auth_response_;
|
|
delete collection_response_;
|
|
delete media_response_;
|
|
}
|
|
}
|
|
|
|
void ServerMessage::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ::google::protobuf::Descriptor* ServerMessage::descriptor() {
|
|
protobuf_AssignDescriptorsOnce();
|
|
return ServerMessage_descriptor_;
|
|
}
|
|
|
|
const ServerMessage& ServerMessage::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_messages_2eproto();
|
|
return *default_instance_;
|
|
}
|
|
|
|
ServerMessage* ServerMessage::default_instance_ = NULL;
|
|
|
|
ServerMessage* ServerMessage::New() const {
|
|
return new ServerMessage;
|
|
}
|
|
|
|
void ServerMessage::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
type_ = 1;
|
|
if (has_auth_response()) {
|
|
if (auth_response_ != NULL) auth_response_->::AuthResponse::Clear();
|
|
}
|
|
if (has_collection_response()) {
|
|
if (collection_response_ != NULL) collection_response_->::CollectionResponse::Clear();
|
|
}
|
|
if (has_media_response()) {
|
|
if (media_response_ != NULL) media_response_->::MediaResponse::Clear();
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
mutable_unknown_fields()->Clear();
|
|
}
|
|
|
|
bool ServerMessage::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
|
|
::google::protobuf::uint32 tag;
|
|
while ((tag = input->ReadTag()) != 0) {
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required .ServerMessage.Type type = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::ServerMessage_Type_IsValid(value)) {
|
|
set_type(static_cast< ::ServerMessage_Type >(value));
|
|
} else {
|
|
mutable_unknown_fields()->AddVarint(1, value);
|
|
}
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(18)) goto parse_auth_response;
|
|
break;
|
|
}
|
|
|
|
// optional .AuthResponse auth_response = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_auth_response:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_auth_response()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(26)) goto parse_collection_response;
|
|
break;
|
|
}
|
|
|
|
// optional .CollectionResponse collection_response = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_collection_response:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_collection_response()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(34)) goto parse_media_response;
|
|
break;
|
|
}
|
|
|
|
// optional .MediaResponse media_response = 4;
|
|
case 4: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_media_response:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_media_response()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectAtEnd()) return true;
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_uninterpreted:
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
|
return true;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormat::SkipField(
|
|
input, tag, mutable_unknown_fields()));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
#undef DO_
|
|
}
|
|
|
|
void ServerMessage::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// required .ServerMessage.Type type = 1;
|
|
if (has_type()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
1, this->type(), output);
|
|
}
|
|
|
|
// optional .AuthResponse auth_response = 2;
|
|
if (has_auth_response()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
2, this->auth_response(), output);
|
|
}
|
|
|
|
// optional .CollectionResponse collection_response = 3;
|
|
if (has_collection_response()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
3, this->collection_response(), output);
|
|
}
|
|
|
|
// optional .MediaResponse media_response = 4;
|
|
if (has_media_response()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
|
|
4, this->media_response(), output);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
|
|
unknown_fields(), output);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::uint8* ServerMessage::SerializeWithCachedSizesToArray(
|
|
::google::protobuf::uint8* target) const {
|
|
// required .ServerMessage.Type type = 1;
|
|
if (has_type()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
|
|
1, this->type(), target);
|
|
}
|
|
|
|
// optional .AuthResponse auth_response = 2;
|
|
if (has_auth_response()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
2, this->auth_response(), target);
|
|
}
|
|
|
|
// optional .CollectionResponse collection_response = 3;
|
|
if (has_collection_response()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
3, this->collection_response(), target);
|
|
}
|
|
|
|
// optional .MediaResponse media_response = 4;
|
|
if (has_media_response()) {
|
|
target = ::google::protobuf::internal::WireFormatLite::
|
|
WriteMessageNoVirtualToArray(
|
|
4, this->media_response(), target);
|
|
}
|
|
|
|
if (!unknown_fields().empty()) {
|
|
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
|
|
unknown_fields(), target);
|
|
}
|
|
return target;
|
|
}
|
|
|
|
int ServerMessage::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// required .ServerMessage.Type type = 1;
|
|
if (has_type()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
|
|
}
|
|
|
|
// optional .AuthResponse auth_response = 2;
|
|
if (has_auth_response()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->auth_response());
|
|
}
|
|
|
|
// optional .CollectionResponse collection_response = 3;
|
|
if (has_collection_response()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->collection_response());
|
|
}
|
|
|
|
// optional .MediaResponse media_response = 4;
|
|
if (has_media_response()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->media_response());
|
|
}
|
|
|
|
}
|
|
if (!unknown_fields().empty()) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
|
|
unknown_fields());
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ServerMessage::MergeFrom(const ::google::protobuf::Message& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
const ServerMessage* source =
|
|
::google::protobuf::internal::dynamic_cast_if_available<const ServerMessage*>(
|
|
&from);
|
|
if (source == NULL) {
|
|
::google::protobuf::internal::ReflectionOps::Merge(from, this);
|
|
} else {
|
|
MergeFrom(*source);
|
|
}
|
|
}
|
|
|
|
void ServerMessage::MergeFrom(const ServerMessage& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_type()) {
|
|
set_type(from.type());
|
|
}
|
|
if (from.has_auth_response()) {
|
|
mutable_auth_response()->::AuthResponse::MergeFrom(from.auth_response());
|
|
}
|
|
if (from.has_collection_response()) {
|
|
mutable_collection_response()->::CollectionResponse::MergeFrom(from.collection_response());
|
|
}
|
|
if (from.has_media_response()) {
|
|
mutable_media_response()->::MediaResponse::MergeFrom(from.media_response());
|
|
}
|
|
}
|
|
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
|
|
}
|
|
|
|
void ServerMessage::CopyFrom(const ::google::protobuf::Message& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ServerMessage::CopyFrom(const ServerMessage& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ServerMessage::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
|
|
if (has_auth_response()) {
|
|
if (!this->auth_response().IsInitialized()) return false;
|
|
}
|
|
if (has_collection_response()) {
|
|
if (!this->collection_response().IsInitialized()) return false;
|
|
}
|
|
if (has_media_response()) {
|
|
if (!this->media_response().IsInitialized()) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void ServerMessage::Swap(ServerMessage* other) {
|
|
if (other != this) {
|
|
std::swap(type_, other->type_);
|
|
std::swap(auth_response_, other->auth_response_);
|
|
std::swap(collection_response_, other->collection_response_);
|
|
std::swap(media_response_, other->media_response_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_unknown_fields_.Swap(&other->_unknown_fields_);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::google::protobuf::Metadata ServerMessage::GetMetadata() const {
|
|
protobuf_AssignDescriptorsOnce();
|
|
::google::protobuf::Metadata metadata;
|
|
metadata.descriptor = ServerMessage_descriptor_;
|
|
metadata.reflection = ServerMessage_reflection_;
|
|
return metadata;
|
|
}
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
// @@protoc_insertion_point(global_scope)
|