1 // Generated by the protocol buffer compiler. DO NOT EDIT!
3 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
4 #include "msgheader.pb.h"
5 #include <google/protobuf/stubs/once.h>
6 #include <google/protobuf/io/coded_stream.h>
7 #include <google/protobuf/wire_format_lite_inl.h>
8 #include <google/protobuf/descriptor.h>
9 #include <google/protobuf/reflection_ops.h>
10 #include <google/protobuf/wire_format.h>
11 // @@protoc_insertion_point(includes)
13 namespace communication {
17 const ::google::protobuf::Descriptor* MsgHeader_descriptor_ = NULL;
18 const ::google::protobuf::internal::GeneratedMessageReflection*
19 MsgHeader_reflection_ = NULL;
24 void protobuf_AssignDesc_msgheader_2eproto() {
25 protobuf_AddDesc_msgheader_2eproto();
26 const ::google::protobuf::FileDescriptor* file =
27 ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
29 GOOGLE_CHECK(file != NULL);
30 MsgHeader_descriptor_ = file->message_type(0);
31 static const int MsgHeader_offsets_[4] = {
32 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, cmd_),
33 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, length_data_),
34 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, status_),
35 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, token_),
37 MsgHeader_reflection_ =
38 new ::google::protobuf::internal::GeneratedMessageReflection(
39 MsgHeader_descriptor_,
40 MsgHeader::default_instance_,
42 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, _has_bits_[0]),
43 GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, _unknown_fields_),
45 ::google::protobuf::DescriptorPool::generated_pool(),
46 ::google::protobuf::MessageFactory::generated_factory(),
52 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
53 inline void protobuf_AssignDescriptorsOnce() {
54 ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
55 &protobuf_AssignDesc_msgheader_2eproto);
58 void protobuf_RegisterTypes(const ::std::string&) {
59 protobuf_AssignDescriptorsOnce();
60 ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
61 MsgHeader_descriptor_, &MsgHeader::default_instance());
66 void protobuf_ShutdownFile_msgheader_2eproto() {
67 delete MsgHeader::default_instance_;
68 delete MsgHeader_reflection_;
71 void protobuf_AddDesc_msgheader_2eproto() {
72 static bool already_here = false;
73 if (already_here) return;
75 GOOGLE_PROTOBUF_VERIFY_VERSION;
77 ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
78 "\n\017msgheader.proto\022\rcommunication\"L\n\tMsgH"
79 "eader\022\013\n\003cmd\030\001 \002(\r\022\023\n\013length_data\030\002 \002(\r\022"
80 "\016\n\006status\030\003 \001(\r\022\r\n\005token\030\004 \001(\004B$\n\"com.an"
81 "droid.internal.communication", 148);
82 ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
83 "msgheader.proto", &protobuf_RegisterTypes);
84 MsgHeader::default_instance_ = new MsgHeader();
85 MsgHeader::default_instance_->InitAsDefaultInstance();
86 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_msgheader_2eproto);
89 // Force AddDescriptors() to be called at static initialization time.
90 struct StaticDescriptorInitializer_msgheader_2eproto {
91 StaticDescriptorInitializer_msgheader_2eproto() {
92 protobuf_AddDesc_msgheader_2eproto();
94 } static_descriptor_initializer_msgheader_2eproto_;
97 // ===================================================================
100 const int MsgHeader::kCmdFieldNumber;
101 const int MsgHeader::kLengthDataFieldNumber;
102 const int MsgHeader::kStatusFieldNumber;
103 const int MsgHeader::kTokenFieldNumber;
106 MsgHeader::MsgHeader()
107 : ::google::protobuf::Message() {
111 void MsgHeader::InitAsDefaultInstance() {
114 MsgHeader::MsgHeader(const MsgHeader& from)
115 : ::google::protobuf::Message() {
120 void MsgHeader::SharedCtor() {
125 token_ = GOOGLE_ULONGLONG(0);
126 ::memset(_has_bits_, 0, sizeof(_has_bits_));
129 MsgHeader::~MsgHeader() {
133 void MsgHeader::SharedDtor() {
134 if (this != default_instance_) {
138 void MsgHeader::SetCachedSize(int size) const {
139 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
140 _cached_size_ = size;
141 GOOGLE_SAFE_CONCURRENT_WRITES_END();
143 const ::google::protobuf::Descriptor* MsgHeader::descriptor() {
144 protobuf_AssignDescriptorsOnce();
145 return MsgHeader_descriptor_;
148 const MsgHeader& MsgHeader::default_instance() {
149 if (default_instance_ == NULL) protobuf_AddDesc_msgheader_2eproto(); return *default_instance_;
152 MsgHeader* MsgHeader::default_instance_ = NULL;
154 MsgHeader* MsgHeader::New() const {
155 return new MsgHeader;
158 void MsgHeader::Clear() {
159 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
163 token_ = GOOGLE_ULONGLONG(0);
165 ::memset(_has_bits_, 0, sizeof(_has_bits_));
166 mutable_unknown_fields()->Clear();
169 bool MsgHeader::MergePartialFromCodedStream(
170 ::google::protobuf::io::CodedInputStream* input) {
171 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
172 ::google::protobuf::uint32 tag;
173 while ((tag = input->ReadTag()) != 0) {
174 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
175 // required uint32 cmd = 1;
177 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
178 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
179 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
180 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
184 goto handle_uninterpreted;
186 if (input->ExpectTag(16)) goto parse_length_data;
190 // required uint32 length_data = 2;
192 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
193 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
195 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
196 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
197 input, &length_data_)));
200 goto handle_uninterpreted;
202 if (input->ExpectTag(24)) goto parse_status;
206 // optional uint32 status = 3;
208 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
209 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
211 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
212 ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
216 goto handle_uninterpreted;
218 if (input->ExpectTag(32)) goto parse_token;
222 // optional uint64 token = 4;
224 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
225 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
227 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
228 ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
232 goto handle_uninterpreted;
234 if (input->ExpectAtEnd()) return true;
239 handle_uninterpreted:
240 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
241 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
244 DO_(::google::protobuf::internal::WireFormat::SkipField(
245 input, tag, mutable_unknown_fields()));
254 void MsgHeader::SerializeWithCachedSizes(
255 ::google::protobuf::io::CodedOutputStream* output) const {
256 // required uint32 cmd = 1;
258 ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->cmd(), output);
261 // required uint32 length_data = 2;
263 ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->length_data(), output);
266 // optional uint32 status = 3;
268 ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->status(), output);
271 // optional uint64 token = 4;
273 ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->token(), output);
276 if (!unknown_fields().empty()) {
277 ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
278 unknown_fields(), output);
282 ::google::protobuf::uint8* MsgHeader::SerializeWithCachedSizesToArray(
283 ::google::protobuf::uint8* target) const {
284 // required uint32 cmd = 1;
286 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->cmd(), target);
289 // required uint32 length_data = 2;
291 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->length_data(), target);
294 // optional uint32 status = 3;
296 target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->status(), target);
299 // optional uint64 token = 4;
301 target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->token(), target);
304 if (!unknown_fields().empty()) {
305 target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
306 unknown_fields(), target);
311 int MsgHeader::ByteSize() const {
314 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
315 // required uint32 cmd = 1;
318 ::google::protobuf::internal::WireFormatLite::UInt32Size(
322 // required uint32 length_data = 2;
323 if (has_length_data()) {
325 ::google::protobuf::internal::WireFormatLite::UInt32Size(
326 this->length_data());
329 // optional uint32 status = 3;
332 ::google::protobuf::internal::WireFormatLite::UInt32Size(
336 // optional uint64 token = 4;
339 ::google::protobuf::internal::WireFormatLite::UInt64Size(
344 if (!unknown_fields().empty()) {
346 ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
349 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
350 _cached_size_ = total_size;
351 GOOGLE_SAFE_CONCURRENT_WRITES_END();
355 void MsgHeader::MergeFrom(const ::google::protobuf::Message& from) {
356 GOOGLE_CHECK_NE(&from, this);
357 const MsgHeader* source =
358 ::google::protobuf::internal::dynamic_cast_if_available<const MsgHeader*>(
360 if (source == NULL) {
361 ::google::protobuf::internal::ReflectionOps::Merge(from, this);
367 void MsgHeader::MergeFrom(const MsgHeader& from) {
368 GOOGLE_CHECK_NE(&from, this);
369 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
370 if (from._has_bit(0)) {
373 if (from._has_bit(1)) {
374 set_length_data(from.length_data());
376 if (from._has_bit(2)) {
377 set_status(from.status());
379 if (from._has_bit(3)) {
380 set_token(from.token());
383 mutable_unknown_fields()->MergeFrom(from.unknown_fields());
386 void MsgHeader::CopyFrom(const ::google::protobuf::Message& from) {
387 if (&from == this) return;
392 void MsgHeader::CopyFrom(const MsgHeader& from) {
393 if (&from == this) return;
398 bool MsgHeader::IsInitialized() const {
399 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
404 void MsgHeader::Swap(MsgHeader* other) {
406 std::swap(cmd_, other->cmd_);
407 std::swap(length_data_, other->length_data_);
408 std::swap(status_, other->status_);
409 std::swap(token_, other->token_);
410 std::swap(_has_bits_[0], other->_has_bits_[0]);
411 _unknown_fields_.Swap(&other->_unknown_fields_);
412 std::swap(_cached_size_, other->_cached_size_);
416 ::google::protobuf::Metadata MsgHeader::GetMetadata() const {
417 protobuf_AssignDescriptorsOnce();
418 ::google::protobuf::Metadata metadata;
419 metadata.descriptor = MsgHeader_descriptor_;
420 metadata.reflection = MsgHeader_reflection_;
425 // @@protoc_insertion_point(namespace_scope)
427 } // namespace communication
429 // @@protoc_insertion_point(global_scope)