Protos.pb.cc 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: Protos.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "Protos.pb.h"
  5. #include <algorithm>
  6. #include <google/protobuf/stubs/common.h>
  7. #include <google/protobuf/stubs/once.h>
  8. #include <google/protobuf/io/coded_stream.h>
  9. #include <google/protobuf/wire_format_lite_inl.h>
  10. // @@protoc_insertion_point(includes)
  11. namespace runtime {
  12. void protobuf_ShutdownFile_Protos_2eproto() {
  13. delete FileSendProtos::default_instance_;
  14. delete FileSendComplete::default_instance_;
  15. }
  16. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  17. void protobuf_AddDesc_Protos_2eproto_impl() {
  18. GOOGLE_PROTOBUF_VERIFY_VERSION;
  19. #else
  20. void protobuf_AddDesc_Protos_2eproto() {
  21. static bool already_here = false;
  22. if (already_here) return;
  23. already_here = true;
  24. GOOGLE_PROTOBUF_VERIFY_VERSION;
  25. #endif
  26. FileSendProtos::default_instance_ = new FileSendProtos();
  27. FileSendComplete::default_instance_ = new FileSendComplete();
  28. FileSendProtos::default_instance_->InitAsDefaultInstance();
  29. FileSendComplete::default_instance_->InitAsDefaultInstance();
  30. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_Protos_2eproto);
  31. }
  32. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  33. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_Protos_2eproto_once_);
  34. void protobuf_AddDesc_Protos_2eproto() {
  35. ::google::protobuf::::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_Protos_2eproto_once_,
  36. &protobuf_AddDesc_Protos_2eproto_impl);
  37. }
  38. #else
  39. // Force AddDescriptors() to be called at static initialization time.
  40. struct StaticDescriptorInitializer_Protos_2eproto {
  41. StaticDescriptorInitializer_Protos_2eproto() {
  42. protobuf_AddDesc_Protos_2eproto();
  43. }
  44. } static_descriptor_initializer_Protos_2eproto_;
  45. #endif
  46. // ===================================================================
  47. bool FileSendProtos_CompressType_IsValid(int value) {
  48. switch(value) {
  49. case 0:
  50. case 1:
  51. return true;
  52. default:
  53. return false;
  54. }
  55. }
  56. #ifndef _MSC_VER
  57. const FileSendProtos_CompressType FileSendProtos::NO_COMPRESS;
  58. const FileSendProtos_CompressType FileSendProtos::ZIP;
  59. const FileSendProtos_CompressType FileSendProtos::CompressType_MIN;
  60. const FileSendProtos_CompressType FileSendProtos::CompressType_MAX;
  61. const int FileSendProtos::CompressType_ARRAYSIZE;
  62. #endif // _MSC_VER
  63. bool FileSendProtos_VerifyMode_IsValid(int value) {
  64. switch(value) {
  65. case 0:
  66. case 1:
  67. case 2:
  68. return true;
  69. default:
  70. return false;
  71. }
  72. }
  73. #ifndef _MSC_VER
  74. const FileSendProtos_VerifyMode FileSendProtos::NO_VERIFY;
  75. const FileSendProtos_VerifyMode FileSendProtos::CRC;
  76. const FileSendProtos_VerifyMode FileSendProtos::MD5;
  77. const FileSendProtos_VerifyMode FileSendProtos::VerifyMode_MIN;
  78. const FileSendProtos_VerifyMode FileSendProtos::VerifyMode_MAX;
  79. const int FileSendProtos::VerifyMode_ARRAYSIZE;
  80. #endif // _MSC_VER
  81. #ifndef _MSC_VER
  82. const int FileSendProtos::kFileNameFieldNumber;
  83. const int FileSendProtos::kPackageSeqFieldNumber;
  84. const int FileSendProtos::kPackageSumFieldNumber;
  85. const int FileSendProtos::kContentSizeFieldNumber;
  86. const int FileSendProtos::kCompressTypeFieldNumber;
  87. const int FileSendProtos::kModifiedTimeFieldNumber;
  88. const int FileSendProtos::kVerifyModeFieldNumber;
  89. const int FileSendProtos::kVerifySignFieldNumber;
  90. const int FileSendProtos::kUncompressSizeFieldNumber;
  91. #endif // !_MSC_VER
  92. FileSendProtos::FileSendProtos()
  93. : ::google::protobuf::MessageLite() {
  94. SharedCtor();
  95. }
  96. void FileSendProtos::InitAsDefaultInstance() {
  97. }
  98. FileSendProtos::FileSendProtos(const FileSendProtos& from)
  99. : ::google::protobuf::MessageLite() {
  100. SharedCtor();
  101. MergeFrom(from);
  102. }
  103. void FileSendProtos::SharedCtor() {
  104. _cached_size_ = 0;
  105. file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  106. package_seq_ = 0;
  107. package_sum_ = 0;
  108. content_size_ = GOOGLE_ULONGLONG(0);
  109. compress_type_ = 0;
  110. modified_time_ = GOOGLE_ULONGLONG(0);
  111. verify_mode_ = 0;
  112. verify_sign_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  113. uncompress_size_ = GOOGLE_ULONGLONG(0);
  114. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  115. }
  116. FileSendProtos::~FileSendProtos() {
  117. SharedDtor();
  118. }
  119. void FileSendProtos::SharedDtor() {
  120. if (file_name_ != &::google::protobuf::internal::kEmptyString) {
  121. delete file_name_;
  122. }
  123. if (verify_sign_ != &::google::protobuf::internal::kEmptyString) {
  124. delete verify_sign_;
  125. }
  126. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  127. if (this != &default_instance()) {
  128. #else
  129. if (this != default_instance_) {
  130. #endif
  131. }
  132. }
  133. void FileSendProtos::SetCachedSize(int size) const {
  134. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  135. _cached_size_ = size;
  136. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  137. }
  138. const FileSendProtos& FileSendProtos::default_instance() {
  139. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  140. protobuf_AddDesc_Protos_2eproto();
  141. #else
  142. if (default_instance_ == NULL) protobuf_AddDesc_Protos_2eproto();
  143. #endif
  144. return *default_instance_;
  145. }
  146. FileSendProtos* FileSendProtos::default_instance_ = NULL;
  147. FileSendProtos* FileSendProtos::New() const {
  148. return new FileSendProtos;
  149. }
  150. void FileSendProtos::Clear() {
  151. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  152. if (has_file_name()) {
  153. if (file_name_ != &::google::protobuf::internal::kEmptyString) {
  154. file_name_->clear();
  155. }
  156. }
  157. package_seq_ = 0;
  158. package_sum_ = 0;
  159. content_size_ = GOOGLE_ULONGLONG(0);
  160. compress_type_ = 0;
  161. modified_time_ = GOOGLE_ULONGLONG(0);
  162. verify_mode_ = 0;
  163. if (has_verify_sign()) {
  164. if (verify_sign_ != &::google::protobuf::internal::kEmptyString) {
  165. verify_sign_->clear();
  166. }
  167. }
  168. }
  169. if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  170. uncompress_size_ = GOOGLE_ULONGLONG(0);
  171. }
  172. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  173. }
  174. bool FileSendProtos::MergePartialFromCodedStream(
  175. ::google::protobuf::io::CodedInputStream* input) {
  176. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  177. ::google::protobuf::uint32 tag;
  178. while ((tag = input->ReadTag()) != 0) {
  179. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  180. // required string file_name = 1;
  181. case 1: {
  182. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  183. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  184. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  185. input, this->mutable_file_name()));
  186. } else {
  187. goto handle_uninterpreted;
  188. }
  189. if (input->ExpectTag(16)) goto parse_package_seq;
  190. break;
  191. }
  192. // required int32 package_seq = 2;
  193. case 2: {
  194. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  195. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  196. parse_package_seq:
  197. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  198. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  199. input, &package_seq_)));
  200. set_has_package_seq();
  201. } else {
  202. goto handle_uninterpreted;
  203. }
  204. if (input->ExpectTag(24)) goto parse_package_sum;
  205. break;
  206. }
  207. // required int32 package_sum = 3;
  208. case 3: {
  209. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  210. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  211. parse_package_sum:
  212. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  213. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  214. input, &package_sum_)));
  215. set_has_package_sum();
  216. } else {
  217. goto handle_uninterpreted;
  218. }
  219. if (input->ExpectTag(32)) goto parse_content_size;
  220. break;
  221. }
  222. // required uint64 content_size = 4;
  223. case 4: {
  224. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  225. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  226. parse_content_size:
  227. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  228. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  229. input, &content_size_)));
  230. set_has_content_size();
  231. } else {
  232. goto handle_uninterpreted;
  233. }
  234. if (input->ExpectTag(40)) goto parse_compress_type;
  235. break;
  236. }
  237. // required .runtime.FileSendProtos.CompressType compress_type = 5;
  238. case 5: {
  239. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  240. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  241. parse_compress_type:
  242. int value;
  243. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  244. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  245. input, &value)));
  246. if (::runtime::FileSendProtos_CompressType_IsValid(value)) {
  247. set_compress_type(static_cast< ::runtime::FileSendProtos_CompressType >(value));
  248. }
  249. } else {
  250. goto handle_uninterpreted;
  251. }
  252. if (input->ExpectTag(48)) goto parse_modified_time;
  253. break;
  254. }
  255. // optional uint64 modified_time = 6;
  256. case 6: {
  257. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  258. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  259. parse_modified_time:
  260. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  261. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  262. input, &modified_time_)));
  263. set_has_modified_time();
  264. } else {
  265. goto handle_uninterpreted;
  266. }
  267. if (input->ExpectTag(56)) goto parse_verify_mode;
  268. break;
  269. }
  270. // optional .runtime.FileSendProtos.VerifyMode verify_mode = 7;
  271. case 7: {
  272. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  273. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  274. parse_verify_mode:
  275. int value;
  276. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  277. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  278. input, &value)));
  279. if (::runtime::FileSendProtos_VerifyMode_IsValid(value)) {
  280. set_verify_mode(static_cast< ::runtime::FileSendProtos_VerifyMode >(value));
  281. }
  282. } else {
  283. goto handle_uninterpreted;
  284. }
  285. if (input->ExpectTag(66)) goto parse_verify_sign;
  286. break;
  287. }
  288. // optional string verify_sign = 8;
  289. case 8: {
  290. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  291. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  292. parse_verify_sign:
  293. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  294. input, this->mutable_verify_sign()));
  295. } else {
  296. goto handle_uninterpreted;
  297. }
  298. if (input->ExpectTag(72)) goto parse_uncompress_size;
  299. break;
  300. }
  301. // optional uint64 uncompress_size = 9;
  302. case 9: {
  303. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  304. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  305. parse_uncompress_size:
  306. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  307. ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
  308. input, &uncompress_size_)));
  309. set_has_uncompress_size();
  310. } else {
  311. goto handle_uninterpreted;
  312. }
  313. if (input->ExpectAtEnd()) return true;
  314. break;
  315. }
  316. default: {
  317. handle_uninterpreted:
  318. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  319. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  320. return true;
  321. }
  322. DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
  323. break;
  324. }
  325. }
  326. }
  327. return true;
  328. #undef DO_
  329. }
  330. void FileSendProtos::SerializeWithCachedSizes(
  331. ::google::protobuf::io::CodedOutputStream* output) const {
  332. // required string file_name = 1;
  333. if (has_file_name()) {
  334. ::google::protobuf::internal::WireFormatLite::WriteString(
  335. 1, this->file_name(), output);
  336. }
  337. // required int32 package_seq = 2;
  338. if (has_package_seq()) {
  339. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->package_seq(), output);
  340. }
  341. // required int32 package_sum = 3;
  342. if (has_package_sum()) {
  343. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->package_sum(), output);
  344. }
  345. // required uint64 content_size = 4;
  346. if (has_content_size()) {
  347. ::google::protobuf::internal::WireFormatLite::WriteUInt64(4, this->content_size(), output);
  348. }
  349. // required .runtime.FileSendProtos.CompressType compress_type = 5;
  350. if (has_compress_type()) {
  351. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  352. 5, this->compress_type(), output);
  353. }
  354. // optional uint64 modified_time = 6;
  355. if (has_modified_time()) {
  356. ::google::protobuf::internal::WireFormatLite::WriteUInt64(6, this->modified_time(), output);
  357. }
  358. // optional .runtime.FileSendProtos.VerifyMode verify_mode = 7;
  359. if (has_verify_mode()) {
  360. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  361. 7, this->verify_mode(), output);
  362. }
  363. // optional string verify_sign = 8;
  364. if (has_verify_sign()) {
  365. ::google::protobuf::internal::WireFormatLite::WriteString(
  366. 8, this->verify_sign(), output);
  367. }
  368. // optional uint64 uncompress_size = 9;
  369. if (has_uncompress_size()) {
  370. ::google::protobuf::internal::WireFormatLite::WriteUInt64(9, this->uncompress_size(), output);
  371. }
  372. }
  373. int FileSendProtos::ByteSize() const {
  374. int total_size = 0;
  375. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  376. // required string file_name = 1;
  377. if (has_file_name()) {
  378. total_size += 1 +
  379. ::google::protobuf::internal::WireFormatLite::StringSize(
  380. this->file_name());
  381. }
  382. // required int32 package_seq = 2;
  383. if (has_package_seq()) {
  384. total_size += 1 +
  385. ::google::protobuf::internal::WireFormatLite::Int32Size(
  386. this->package_seq());
  387. }
  388. // required int32 package_sum = 3;
  389. if (has_package_sum()) {
  390. total_size += 1 +
  391. ::google::protobuf::internal::WireFormatLite::Int32Size(
  392. this->package_sum());
  393. }
  394. // required uint64 content_size = 4;
  395. if (has_content_size()) {
  396. total_size += 1 +
  397. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  398. this->content_size());
  399. }
  400. // required .runtime.FileSendProtos.CompressType compress_type = 5;
  401. if (has_compress_type()) {
  402. total_size += 1 +
  403. ::google::protobuf::internal::WireFormatLite::EnumSize(this->compress_type());
  404. }
  405. // optional uint64 modified_time = 6;
  406. if (has_modified_time()) {
  407. total_size += 1 +
  408. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  409. this->modified_time());
  410. }
  411. // optional .runtime.FileSendProtos.VerifyMode verify_mode = 7;
  412. if (has_verify_mode()) {
  413. total_size += 1 +
  414. ::google::protobuf::internal::WireFormatLite::EnumSize(this->verify_mode());
  415. }
  416. // optional string verify_sign = 8;
  417. if (has_verify_sign()) {
  418. total_size += 1 +
  419. ::google::protobuf::internal::WireFormatLite::StringSize(
  420. this->verify_sign());
  421. }
  422. }
  423. if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  424. // optional uint64 uncompress_size = 9;
  425. if (has_uncompress_size()) {
  426. total_size += 1 +
  427. ::google::protobuf::internal::WireFormatLite::UInt64Size(
  428. this->uncompress_size());
  429. }
  430. }
  431. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  432. _cached_size_ = total_size;
  433. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  434. return total_size;
  435. }
  436. void FileSendProtos::CheckTypeAndMergeFrom(
  437. const ::google::protobuf::MessageLite& from) {
  438. MergeFrom(*::google::protobuf::down_cast<const FileSendProtos*>(&from));
  439. }
  440. void FileSendProtos::MergeFrom(const FileSendProtos& from) {
  441. GOOGLE_CHECK_NE(&from, this);
  442. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  443. if (from.has_file_name()) {
  444. set_file_name(from.file_name());
  445. }
  446. if (from.has_package_seq()) {
  447. set_package_seq(from.package_seq());
  448. }
  449. if (from.has_package_sum()) {
  450. set_package_sum(from.package_sum());
  451. }
  452. if (from.has_content_size()) {
  453. set_content_size(from.content_size());
  454. }
  455. if (from.has_compress_type()) {
  456. set_compress_type(from.compress_type());
  457. }
  458. if (from.has_modified_time()) {
  459. set_modified_time(from.modified_time());
  460. }
  461. if (from.has_verify_mode()) {
  462. set_verify_mode(from.verify_mode());
  463. }
  464. if (from.has_verify_sign()) {
  465. set_verify_sign(from.verify_sign());
  466. }
  467. }
  468. if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
  469. if (from.has_uncompress_size()) {
  470. set_uncompress_size(from.uncompress_size());
  471. }
  472. }
  473. }
  474. void FileSendProtos::CopyFrom(const FileSendProtos& from) {
  475. if (&from == this) return;
  476. Clear();
  477. MergeFrom(from);
  478. }
  479. bool FileSendProtos::IsInitialized() const {
  480. if ((_has_bits_[0] & 0x0000001f) != 0x0000001f) return false;
  481. return true;
  482. }
  483. void FileSendProtos::Swap(FileSendProtos* other) {
  484. if (other != this) {
  485. std::swap(file_name_, other->file_name_);
  486. std::swap(package_seq_, other->package_seq_);
  487. std::swap(package_sum_, other->package_sum_);
  488. std::swap(content_size_, other->content_size_);
  489. std::swap(compress_type_, other->compress_type_);
  490. std::swap(modified_time_, other->modified_time_);
  491. std::swap(verify_mode_, other->verify_mode_);
  492. std::swap(verify_sign_, other->verify_sign_);
  493. std::swap(uncompress_size_, other->uncompress_size_);
  494. std::swap(_has_bits_[0], other->_has_bits_[0]);
  495. std::swap(_cached_size_, other->_cached_size_);
  496. }
  497. }
  498. ::std::string FileSendProtos::GetTypeName() const {
  499. return "runtime.FileSendProtos";
  500. }
  501. // ===================================================================
  502. bool FileSendComplete_RESULTTYPE_IsValid(int value) {
  503. switch(value) {
  504. case 0:
  505. case 1:
  506. case 2:
  507. case 3:
  508. case 4:
  509. return true;
  510. default:
  511. return false;
  512. }
  513. }
  514. #ifndef _MSC_VER
  515. const FileSendComplete_RESULTTYPE FileSendComplete::SUCCESS;
  516. const FileSendComplete_RESULTTYPE FileSendComplete::RECV_ERROR;
  517. const FileSendComplete_RESULTTYPE FileSendComplete::UNCOMPRESS_ERROR;
  518. const FileSendComplete_RESULTTYPE FileSendComplete::FOPEN_ERROR;
  519. const FileSendComplete_RESULTTYPE FileSendComplete::FWRITE_ERROR;
  520. const FileSendComplete_RESULTTYPE FileSendComplete::RESULTTYPE_MIN;
  521. const FileSendComplete_RESULTTYPE FileSendComplete::RESULTTYPE_MAX;
  522. const int FileSendComplete::RESULTTYPE_ARRAYSIZE;
  523. #endif // _MSC_VER
  524. #ifndef _MSC_VER
  525. const int FileSendComplete::kFileNameFieldNumber;
  526. const int FileSendComplete::kResultFieldNumber;
  527. const int FileSendComplete::kErrorNumFieldNumber;
  528. #endif // !_MSC_VER
  529. FileSendComplete::FileSendComplete()
  530. : ::google::protobuf::MessageLite() {
  531. SharedCtor();
  532. }
  533. void FileSendComplete::InitAsDefaultInstance() {
  534. }
  535. FileSendComplete::FileSendComplete(const FileSendComplete& from)
  536. : ::google::protobuf::MessageLite() {
  537. SharedCtor();
  538. MergeFrom(from);
  539. }
  540. void FileSendComplete::SharedCtor() {
  541. _cached_size_ = 0;
  542. file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  543. result_ = 0;
  544. error_num_ = 0;
  545. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  546. }
  547. FileSendComplete::~FileSendComplete() {
  548. SharedDtor();
  549. }
  550. void FileSendComplete::SharedDtor() {
  551. if (file_name_ != &::google::protobuf::internal::kEmptyString) {
  552. delete file_name_;
  553. }
  554. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  555. if (this != &default_instance()) {
  556. #else
  557. if (this != default_instance_) {
  558. #endif
  559. }
  560. }
  561. void FileSendComplete::SetCachedSize(int size) const {
  562. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  563. _cached_size_ = size;
  564. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  565. }
  566. const FileSendComplete& FileSendComplete::default_instance() {
  567. #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
  568. protobuf_AddDesc_Protos_2eproto();
  569. #else
  570. if (default_instance_ == NULL) protobuf_AddDesc_Protos_2eproto();
  571. #endif
  572. return *default_instance_;
  573. }
  574. FileSendComplete* FileSendComplete::default_instance_ = NULL;
  575. FileSendComplete* FileSendComplete::New() const {
  576. return new FileSendComplete;
  577. }
  578. void FileSendComplete::Clear() {
  579. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  580. if (has_file_name()) {
  581. if (file_name_ != &::google::protobuf::internal::kEmptyString) {
  582. file_name_->clear();
  583. }
  584. }
  585. result_ = 0;
  586. error_num_ = 0;
  587. }
  588. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  589. }
  590. bool FileSendComplete::MergePartialFromCodedStream(
  591. ::google::protobuf::io::CodedInputStream* input) {
  592. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  593. ::google::protobuf::uint32 tag;
  594. while ((tag = input->ReadTag()) != 0) {
  595. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  596. // required string file_name = 1;
  597. case 1: {
  598. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  599. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  600. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  601. input, this->mutable_file_name()));
  602. } else {
  603. goto handle_uninterpreted;
  604. }
  605. if (input->ExpectTag(16)) goto parse_result;
  606. break;
  607. }
  608. // required .runtime.FileSendComplete.RESULTTYPE result = 2;
  609. case 2: {
  610. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  611. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  612. parse_result:
  613. int value;
  614. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  615. int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
  616. input, &value)));
  617. if (::runtime::FileSendComplete_RESULTTYPE_IsValid(value)) {
  618. set_result(static_cast< ::runtime::FileSendComplete_RESULTTYPE >(value));
  619. }
  620. } else {
  621. goto handle_uninterpreted;
  622. }
  623. if (input->ExpectTag(24)) goto parse_error_num;
  624. break;
  625. }
  626. // required int32 error_num = 3;
  627. case 3: {
  628. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  629. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  630. parse_error_num:
  631. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  632. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  633. input, &error_num_)));
  634. set_has_error_num();
  635. } else {
  636. goto handle_uninterpreted;
  637. }
  638. if (input->ExpectAtEnd()) return true;
  639. break;
  640. }
  641. default: {
  642. handle_uninterpreted:
  643. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  644. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  645. return true;
  646. }
  647. DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
  648. break;
  649. }
  650. }
  651. }
  652. return true;
  653. #undef DO_
  654. }
  655. void FileSendComplete::SerializeWithCachedSizes(
  656. ::google::protobuf::io::CodedOutputStream* output) const {
  657. // required string file_name = 1;
  658. if (has_file_name()) {
  659. ::google::protobuf::internal::WireFormatLite::WriteString(
  660. 1, this->file_name(), output);
  661. }
  662. // required .runtime.FileSendComplete.RESULTTYPE result = 2;
  663. if (has_result()) {
  664. ::google::protobuf::internal::WireFormatLite::WriteEnum(
  665. 2, this->result(), output);
  666. }
  667. // required int32 error_num = 3;
  668. if (has_error_num()) {
  669. ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->error_num(), output);
  670. }
  671. }
  672. int FileSendComplete::ByteSize() const {
  673. int total_size = 0;
  674. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  675. // required string file_name = 1;
  676. if (has_file_name()) {
  677. total_size += 1 +
  678. ::google::protobuf::internal::WireFormatLite::StringSize(
  679. this->file_name());
  680. }
  681. // required .runtime.FileSendComplete.RESULTTYPE result = 2;
  682. if (has_result()) {
  683. total_size += 1 +
  684. ::google::protobuf::internal::WireFormatLite::EnumSize(this->result());
  685. }
  686. // required int32 error_num = 3;
  687. if (has_error_num()) {
  688. total_size += 1 +
  689. ::google::protobuf::internal::WireFormatLite::Int32Size(
  690. this->error_num());
  691. }
  692. }
  693. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  694. _cached_size_ = total_size;
  695. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  696. return total_size;
  697. }
  698. void FileSendComplete::CheckTypeAndMergeFrom(
  699. const ::google::protobuf::MessageLite& from) {
  700. MergeFrom(*::google::protobuf::down_cast<const FileSendComplete*>(&from));
  701. }
  702. void FileSendComplete::MergeFrom(const FileSendComplete& from) {
  703. GOOGLE_CHECK_NE(&from, this);
  704. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  705. if (from.has_file_name()) {
  706. set_file_name(from.file_name());
  707. }
  708. if (from.has_result()) {
  709. set_result(from.result());
  710. }
  711. if (from.has_error_num()) {
  712. set_error_num(from.error_num());
  713. }
  714. }
  715. }
  716. void FileSendComplete::CopyFrom(const FileSendComplete& from) {
  717. if (&from == this) return;
  718. Clear();
  719. MergeFrom(from);
  720. }
  721. bool FileSendComplete::IsInitialized() const {
  722. if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
  723. return true;
  724. }
  725. void FileSendComplete::Swap(FileSendComplete* other) {
  726. if (other != this) {
  727. std::swap(file_name_, other->file_name_);
  728. std::swap(result_, other->result_);
  729. std::swap(error_num_, other->error_num_);
  730. std::swap(_has_bits_[0], other->_has_bits_[0]);
  731. std::swap(_cached_size_, other->_cached_size_);
  732. }
  733. }
  734. ::std::string FileSendComplete::GetTypeName() const {
  735. return "runtime.FileSendComplete";
  736. }
  737. // @@protoc_insertion_point(namespace_scope)
  738. } // namespace runtime
  739. // @@protoc_insertion_point(global_scope)