OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / hardware / ril / mock-ril / src / cpp / msgheader.pb.cpp
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2
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)
12
13 namespace communication {
14
15 namespace {
16
17 const ::google::protobuf::Descriptor* MsgHeader_descriptor_ = NULL;
18 const ::google::protobuf::internal::GeneratedMessageReflection*
19   MsgHeader_reflection_ = NULL;
20
21 }  // namespace
22
23
24 void protobuf_AssignDesc_msgheader_2eproto() {
25   protobuf_AddDesc_msgheader_2eproto();
26   const ::google::protobuf::FileDescriptor* file =
27     ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
28       "msgheader.proto");
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_),
36   };
37   MsgHeader_reflection_ =
38     new ::google::protobuf::internal::GeneratedMessageReflection(
39       MsgHeader_descriptor_,
40       MsgHeader::default_instance_,
41       MsgHeader_offsets_,
42       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, _has_bits_[0]),
43       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MsgHeader, _unknown_fields_),
44       -1,
45       ::google::protobuf::DescriptorPool::generated_pool(),
46       ::google::protobuf::MessageFactory::generated_factory(),
47       sizeof(MsgHeader));
48 }
49
50 namespace {
51
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);
56 }
57
58 void protobuf_RegisterTypes(const ::std::string&) {
59   protobuf_AssignDescriptorsOnce();
60   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
61     MsgHeader_descriptor_, &MsgHeader::default_instance());
62 }
63
64 }  // namespace
65
66 void protobuf_ShutdownFile_msgheader_2eproto() {
67   delete MsgHeader::default_instance_;
68   delete MsgHeader_reflection_;
69 }
70
71 void protobuf_AddDesc_msgheader_2eproto() {
72   static bool already_here = false;
73   if (already_here) return;
74   already_here = true;
75   GOOGLE_PROTOBUF_VERIFY_VERSION;
76
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);
87 }
88
89 // Force AddDescriptors() to be called at static initialization time.
90 struct StaticDescriptorInitializer_msgheader_2eproto {
91   StaticDescriptorInitializer_msgheader_2eproto() {
92     protobuf_AddDesc_msgheader_2eproto();
93   }
94 } static_descriptor_initializer_msgheader_2eproto_;
95
96
97 // ===================================================================
98
99 #ifndef _MSC_VER
100 const int MsgHeader::kCmdFieldNumber;
101 const int MsgHeader::kLengthDataFieldNumber;
102 const int MsgHeader::kStatusFieldNumber;
103 const int MsgHeader::kTokenFieldNumber;
104 #endif  // !_MSC_VER
105
106 MsgHeader::MsgHeader()
107   : ::google::protobuf::Message() {
108   SharedCtor();
109 }
110
111 void MsgHeader::InitAsDefaultInstance() {
112 }
113
114 MsgHeader::MsgHeader(const MsgHeader& from)
115   : ::google::protobuf::Message() {
116   SharedCtor();
117   MergeFrom(from);
118 }
119
120 void MsgHeader::SharedCtor() {
121   _cached_size_ = 0;
122   cmd_ = 0u;
123   length_data_ = 0u;
124   status_ = 0u;
125   token_ = GOOGLE_ULONGLONG(0);
126   ::memset(_has_bits_, 0, sizeof(_has_bits_));
127 }
128
129 MsgHeader::~MsgHeader() {
130   SharedDtor();
131 }
132
133 void MsgHeader::SharedDtor() {
134   if (this != default_instance_) {
135   }
136 }
137
138 void MsgHeader::SetCachedSize(int size) const {
139   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
140   _cached_size_ = size;
141   GOOGLE_SAFE_CONCURRENT_WRITES_END();
142 }
143 const ::google::protobuf::Descriptor* MsgHeader::descriptor() {
144   protobuf_AssignDescriptorsOnce();
145   return MsgHeader_descriptor_;
146 }
147
148 const MsgHeader& MsgHeader::default_instance() {
149   if (default_instance_ == NULL) protobuf_AddDesc_msgheader_2eproto();  return *default_instance_;
150 }
151
152 MsgHeader* MsgHeader::default_instance_ = NULL;
153
154 MsgHeader* MsgHeader::New() const {
155   return new MsgHeader;
156 }
157
158 void MsgHeader::Clear() {
159   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
160     cmd_ = 0u;
161     length_data_ = 0u;
162     status_ = 0u;
163     token_ = GOOGLE_ULONGLONG(0);
164   }
165   ::memset(_has_bits_, 0, sizeof(_has_bits_));
166   mutable_unknown_fields()->Clear();
167 }
168
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;
176       case 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>(
181                  input, &cmd_)));
182           _set_bit(0);
183         } else {
184           goto handle_uninterpreted;
185         }
186         if (input->ExpectTag(16)) goto parse_length_data;
187         break;
188       }
189       
190       // required uint32 length_data = 2;
191       case 2: {
192         if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
193             ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
194          parse_length_data:
195           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
196                    ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
197                  input, &length_data_)));
198           _set_bit(1);
199         } else {
200           goto handle_uninterpreted;
201         }
202         if (input->ExpectTag(24)) goto parse_status;
203         break;
204       }
205       
206       // optional uint32 status = 3;
207       case 3: {
208         if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
209             ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
210          parse_status:
211           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
212                    ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
213                  input, &status_)));
214           _set_bit(2);
215         } else {
216           goto handle_uninterpreted;
217         }
218         if (input->ExpectTag(32)) goto parse_token;
219         break;
220       }
221       
222       // optional uint64 token = 4;
223       case 4: {
224         if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
225             ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
226          parse_token:
227           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
228                    ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
229                  input, &token_)));
230           _set_bit(3);
231         } else {
232           goto handle_uninterpreted;
233         }
234         if (input->ExpectAtEnd()) return true;
235         break;
236       }
237       
238       default: {
239       handle_uninterpreted:
240         if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
241             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
242           return true;
243         }
244         DO_(::google::protobuf::internal::WireFormat::SkipField(
245               input, tag, mutable_unknown_fields()));
246         break;
247       }
248     }
249   }
250   return true;
251 #undef DO_
252 }
253
254 void MsgHeader::SerializeWithCachedSizes(
255     ::google::protobuf::io::CodedOutputStream* output) const {
256   // required uint32 cmd = 1;
257   if (_has_bit(0)) {
258     ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->cmd(), output);
259   }
260   
261   // required uint32 length_data = 2;
262   if (_has_bit(1)) {
263     ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->length_data(), output);
264   }
265   
266   // optional uint32 status = 3;
267   if (_has_bit(2)) {
268     ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->status(), output);
269   }
270   
271   // optional uint64 token = 4;
272   if (_has_bit(3)) {
273     ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->token(), output);
274   }
275   
276   if (!unknown_fields().empty()) {
277     ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
278         unknown_fields(), output);
279   }
280 }
281
282 ::google::protobuf::uint8* MsgHeader::SerializeWithCachedSizesToArray(
283     ::google::protobuf::uint8* target) const {
284   // required uint32 cmd = 1;
285   if (_has_bit(0)) {
286     target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->cmd(), target);
287   }
288   
289   // required uint32 length_data = 2;
290   if (_has_bit(1)) {
291     target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->length_data(), target);
292   }
293   
294   // optional uint32 status = 3;
295   if (_has_bit(2)) {
296     target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->status(), target);
297   }
298   
299   // optional uint64 token = 4;
300   if (_has_bit(3)) {
301     target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(4, this->token(), target);
302   }
303   
304   if (!unknown_fields().empty()) {
305     target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
306         unknown_fields(), target);
307   }
308   return target;
309 }
310
311 int MsgHeader::ByteSize() const {
312   int total_size = 0;
313   
314   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
315     // required uint32 cmd = 1;
316     if (has_cmd()) {
317       total_size += 1 +
318         ::google::protobuf::internal::WireFormatLite::UInt32Size(
319           this->cmd());
320     }
321     
322     // required uint32 length_data = 2;
323     if (has_length_data()) {
324       total_size += 1 +
325         ::google::protobuf::internal::WireFormatLite::UInt32Size(
326           this->length_data());
327     }
328     
329     // optional uint32 status = 3;
330     if (has_status()) {
331       total_size += 1 +
332         ::google::protobuf::internal::WireFormatLite::UInt32Size(
333           this->status());
334     }
335     
336     // optional uint64 token = 4;
337     if (has_token()) {
338       total_size += 1 +
339         ::google::protobuf::internal::WireFormatLite::UInt64Size(
340           this->token());
341     }
342     
343   }
344   if (!unknown_fields().empty()) {
345     total_size +=
346       ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
347         unknown_fields());
348   }
349   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
350   _cached_size_ = total_size;
351   GOOGLE_SAFE_CONCURRENT_WRITES_END();
352   return total_size;
353 }
354
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*>(
359       &from);
360   if (source == NULL) {
361     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
362   } else {
363     MergeFrom(*source);
364   }
365 }
366
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)) {
371       set_cmd(from.cmd());
372     }
373     if (from._has_bit(1)) {
374       set_length_data(from.length_data());
375     }
376     if (from._has_bit(2)) {
377       set_status(from.status());
378     }
379     if (from._has_bit(3)) {
380       set_token(from.token());
381     }
382   }
383   mutable_unknown_fields()->MergeFrom(from.unknown_fields());
384 }
385
386 void MsgHeader::CopyFrom(const ::google::protobuf::Message& from) {
387   if (&from == this) return;
388   Clear();
389   MergeFrom(from);
390 }
391
392 void MsgHeader::CopyFrom(const MsgHeader& from) {
393   if (&from == this) return;
394   Clear();
395   MergeFrom(from);
396 }
397
398 bool MsgHeader::IsInitialized() const {
399   if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
400   
401   return true;
402 }
403
404 void MsgHeader::Swap(MsgHeader* other) {
405   if (other != this) {
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_);
413   }
414 }
415
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_;
421   return metadata;
422 }
423
424
425 // @@protoc_insertion_point(namespace_scope)
426
427 }  // namespace communication
428
429 // @@protoc_insertion_point(global_scope)