common_protocol.pb.cc 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: common_protocol.proto
  3. #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
  4. #include "common_protocol.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. #include <google/protobuf/descriptor.h>
  11. #include <google/protobuf/generated_message_reflection.h>
  12. #include <google/protobuf/reflection_ops.h>
  13. #include <google/protobuf/wire_format.h>
  14. // @@protoc_insertion_point(includes)
  15. namespace common_protocol {
  16. namespace {
  17. const ::google::protobuf::Descriptor* PlayerConnect_descriptor_ = NULL;
  18. const ::google::protobuf::internal::GeneratedMessageReflection*
  19. PlayerConnect_reflection_ = NULL;
  20. const ::google::protobuf::Descriptor* PlayerConnectResult_descriptor_ = NULL;
  21. const ::google::protobuf::internal::GeneratedMessageReflection*
  22. PlayerConnectResult_reflection_ = NULL;
  23. } // namespace
  24. void protobuf_AssignDesc_common_5fprotocol_2eproto() {
  25. protobuf_AddDesc_common_5fprotocol_2eproto();
  26. const ::google::protobuf::FileDescriptor* file =
  27. ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
  28. "common_protocol.proto");
  29. GOOGLE_CHECK(file != NULL);
  30. PlayerConnect_descriptor_ = file->message_type(0);
  31. static const int PlayerConnect_offsets_[6] = {
  32. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, account_),
  33. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, token_),
  34. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, sign_),
  35. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, platform_),
  36. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, pay_platform_),
  37. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, channel_),
  38. };
  39. PlayerConnect_reflection_ =
  40. new ::google::protobuf::internal::GeneratedMessageReflection(
  41. PlayerConnect_descriptor_,
  42. PlayerConnect::default_instance_,
  43. PlayerConnect_offsets_,
  44. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, _has_bits_[0]),
  45. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnect, _unknown_fields_),
  46. -1,
  47. ::google::protobuf::DescriptorPool::generated_pool(),
  48. ::google::protobuf::MessageFactory::generated_factory(),
  49. sizeof(PlayerConnect));
  50. PlayerConnectResult_descriptor_ = file->message_type(1);
  51. static const int PlayerConnectResult_offsets_[4] = {
  52. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, servertime_),
  53. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, gaming_),
  54. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, ver_),
  55. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, result_),
  56. };
  57. PlayerConnectResult_reflection_ =
  58. new ::google::protobuf::internal::GeneratedMessageReflection(
  59. PlayerConnectResult_descriptor_,
  60. PlayerConnectResult::default_instance_,
  61. PlayerConnectResult_offsets_,
  62. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, _has_bits_[0]),
  63. GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PlayerConnectResult, _unknown_fields_),
  64. -1,
  65. ::google::protobuf::DescriptorPool::generated_pool(),
  66. ::google::protobuf::MessageFactory::generated_factory(),
  67. sizeof(PlayerConnectResult));
  68. }
  69. namespace {
  70. GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
  71. inline void protobuf_AssignDescriptorsOnce() {
  72. ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
  73. &protobuf_AssignDesc_common_5fprotocol_2eproto);
  74. }
  75. void protobuf_RegisterTypes(const ::std::string&) {
  76. protobuf_AssignDescriptorsOnce();
  77. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  78. PlayerConnect_descriptor_, &PlayerConnect::default_instance());
  79. ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
  80. PlayerConnectResult_descriptor_, &PlayerConnectResult::default_instance());
  81. }
  82. } // namespace
  83. void protobuf_ShutdownFile_common_5fprotocol_2eproto() {
  84. delete PlayerConnect::default_instance_;
  85. delete PlayerConnect_reflection_;
  86. delete PlayerConnect::_default_platform_;
  87. delete PlayerConnect::_default_pay_platform_;
  88. delete PlayerConnect::_default_channel_;
  89. delete PlayerConnectResult::default_instance_;
  90. delete PlayerConnectResult_reflection_;
  91. }
  92. void protobuf_AddDesc_common_5fprotocol_2eproto() {
  93. static bool already_here = false;
  94. if (already_here) return;
  95. already_here = true;
  96. GOOGLE_PROTOBUF_VERIFY_VERSION;
  97. ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
  98. "\n\025common_protocol.proto\022\017common_protocol"
  99. "\"\213\001\n\rPlayerConnect\022\017\n\007account\030\001 \001(\t\022\r\n\005t"
  100. "oken\030\002 \001(\t\022\014\n\004sign\030\003 \001(\t\022\031\n\010platform\030\004 \001"
  101. "(\t:\007dwc_def\022\035\n\014pay_platform\030\005 \001(\t:\007dwc_d"
  102. "ef\022\022\n\007channel\030\006 \001(\t:\0010\"V\n\023PlayerConnectR"
  103. "esult\022\022\n\nservertime\030\001 \001(\005\022\016\n\006gaming\030\002 \001("
  104. "\005\022\013\n\003ver\030\003 \001(\t\022\016\n\006result\030\004 \001(\005", 270);
  105. ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
  106. "common_protocol.proto", &protobuf_RegisterTypes);
  107. PlayerConnect::_default_platform_ =
  108. new ::std::string("dwc_def", 7);
  109. PlayerConnect::_default_pay_platform_ =
  110. new ::std::string("dwc_def", 7);
  111. PlayerConnect::_default_channel_ =
  112. new ::std::string("0", 1);
  113. PlayerConnect::default_instance_ = new PlayerConnect();
  114. PlayerConnectResult::default_instance_ = new PlayerConnectResult();
  115. PlayerConnect::default_instance_->InitAsDefaultInstance();
  116. PlayerConnectResult::default_instance_->InitAsDefaultInstance();
  117. ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_common_5fprotocol_2eproto);
  118. }
  119. // Force AddDescriptors() to be called at static initialization time.
  120. struct StaticDescriptorInitializer_common_5fprotocol_2eproto {
  121. StaticDescriptorInitializer_common_5fprotocol_2eproto() {
  122. protobuf_AddDesc_common_5fprotocol_2eproto();
  123. }
  124. } static_descriptor_initializer_common_5fprotocol_2eproto_;
  125. // ===================================================================
  126. ::std::string* PlayerConnect::_default_platform_ = NULL;
  127. ::std::string* PlayerConnect::_default_pay_platform_ = NULL;
  128. ::std::string* PlayerConnect::_default_channel_ = NULL;
  129. #ifndef _MSC_VER
  130. const int PlayerConnect::kAccountFieldNumber;
  131. const int PlayerConnect::kTokenFieldNumber;
  132. const int PlayerConnect::kSignFieldNumber;
  133. const int PlayerConnect::kPlatformFieldNumber;
  134. const int PlayerConnect::kPayPlatformFieldNumber;
  135. const int PlayerConnect::kChannelFieldNumber;
  136. #endif // !_MSC_VER
  137. PlayerConnect::PlayerConnect()
  138. : ::google::protobuf::Message() {
  139. SharedCtor();
  140. }
  141. void PlayerConnect::InitAsDefaultInstance() {
  142. }
  143. PlayerConnect::PlayerConnect(const PlayerConnect& from)
  144. : ::google::protobuf::Message() {
  145. SharedCtor();
  146. MergeFrom(from);
  147. }
  148. void PlayerConnect::SharedCtor() {
  149. _cached_size_ = 0;
  150. account_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  151. token_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  152. sign_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  153. platform_ = const_cast< ::std::string*>(_default_platform_);
  154. pay_platform_ = const_cast< ::std::string*>(_default_pay_platform_);
  155. channel_ = const_cast< ::std::string*>(_default_channel_);
  156. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  157. }
  158. PlayerConnect::~PlayerConnect() {
  159. SharedDtor();
  160. }
  161. void PlayerConnect::SharedDtor() {
  162. if (account_ != &::google::protobuf::internal::kEmptyString) {
  163. delete account_;
  164. }
  165. if (token_ != &::google::protobuf::internal::kEmptyString) {
  166. delete token_;
  167. }
  168. if (sign_ != &::google::protobuf::internal::kEmptyString) {
  169. delete sign_;
  170. }
  171. if (platform_ != _default_platform_) {
  172. delete platform_;
  173. }
  174. if (pay_platform_ != _default_pay_platform_) {
  175. delete pay_platform_;
  176. }
  177. if (channel_ != _default_channel_) {
  178. delete channel_;
  179. }
  180. if (this != default_instance_) {
  181. }
  182. }
  183. void PlayerConnect::SetCachedSize(int size) const {
  184. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  185. _cached_size_ = size;
  186. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  187. }
  188. const ::google::protobuf::Descriptor* PlayerConnect::descriptor() {
  189. protobuf_AssignDescriptorsOnce();
  190. return PlayerConnect_descriptor_;
  191. }
  192. const PlayerConnect& PlayerConnect::default_instance() {
  193. if (default_instance_ == NULL) protobuf_AddDesc_common_5fprotocol_2eproto();
  194. return *default_instance_;
  195. }
  196. PlayerConnect* PlayerConnect::default_instance_ = NULL;
  197. PlayerConnect* PlayerConnect::New() const {
  198. return new PlayerConnect;
  199. }
  200. void PlayerConnect::Clear() {
  201. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  202. if (has_account()) {
  203. if (account_ != &::google::protobuf::internal::kEmptyString) {
  204. account_->clear();
  205. }
  206. }
  207. if (has_token()) {
  208. if (token_ != &::google::protobuf::internal::kEmptyString) {
  209. token_->clear();
  210. }
  211. }
  212. if (has_sign()) {
  213. if (sign_ != &::google::protobuf::internal::kEmptyString) {
  214. sign_->clear();
  215. }
  216. }
  217. if (has_platform()) {
  218. if (platform_ != _default_platform_) {
  219. platform_->assign(*_default_platform_);
  220. }
  221. }
  222. if (has_pay_platform()) {
  223. if (pay_platform_ != _default_pay_platform_) {
  224. pay_platform_->assign(*_default_pay_platform_);
  225. }
  226. }
  227. if (has_channel()) {
  228. if (channel_ != _default_channel_) {
  229. channel_->assign(*_default_channel_);
  230. }
  231. }
  232. }
  233. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  234. mutable_unknown_fields()->Clear();
  235. }
  236. bool PlayerConnect::MergePartialFromCodedStream(
  237. ::google::protobuf::io::CodedInputStream* input) {
  238. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  239. ::google::protobuf::uint32 tag;
  240. while ((tag = input->ReadTag()) != 0) {
  241. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  242. // optional string account = 1;
  243. case 1: {
  244. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  245. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  246. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  247. input, this->mutable_account()));
  248. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  249. this->account().data(), this->account().length(),
  250. ::google::protobuf::internal::WireFormat::PARSE);
  251. } else {
  252. goto handle_uninterpreted;
  253. }
  254. if (input->ExpectTag(18)) goto parse_token;
  255. break;
  256. }
  257. // optional string token = 2;
  258. case 2: {
  259. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  260. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  261. parse_token:
  262. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  263. input, this->mutable_token()));
  264. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  265. this->token().data(), this->token().length(),
  266. ::google::protobuf::internal::WireFormat::PARSE);
  267. } else {
  268. goto handle_uninterpreted;
  269. }
  270. if (input->ExpectTag(26)) goto parse_sign;
  271. break;
  272. }
  273. // optional string sign = 3;
  274. case 3: {
  275. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  276. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  277. parse_sign:
  278. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  279. input, this->mutable_sign()));
  280. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  281. this->sign().data(), this->sign().length(),
  282. ::google::protobuf::internal::WireFormat::PARSE);
  283. } else {
  284. goto handle_uninterpreted;
  285. }
  286. if (input->ExpectTag(34)) goto parse_platform;
  287. break;
  288. }
  289. // optional string platform = 4 [default = "dwc_def"];
  290. case 4: {
  291. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  292. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  293. parse_platform:
  294. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  295. input, this->mutable_platform()));
  296. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  297. this->platform().data(), this->platform().length(),
  298. ::google::protobuf::internal::WireFormat::PARSE);
  299. } else {
  300. goto handle_uninterpreted;
  301. }
  302. if (input->ExpectTag(42)) goto parse_pay_platform;
  303. break;
  304. }
  305. // optional string pay_platform = 5 [default = "dwc_def"];
  306. case 5: {
  307. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  308. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  309. parse_pay_platform:
  310. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  311. input, this->mutable_pay_platform()));
  312. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  313. this->pay_platform().data(), this->pay_platform().length(),
  314. ::google::protobuf::internal::WireFormat::PARSE);
  315. } else {
  316. goto handle_uninterpreted;
  317. }
  318. if (input->ExpectTag(50)) goto parse_channel;
  319. break;
  320. }
  321. // optional string channel = 6 [default = "0"];
  322. case 6: {
  323. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  324. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  325. parse_channel:
  326. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  327. input, this->mutable_channel()));
  328. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  329. this->channel().data(), this->channel().length(),
  330. ::google::protobuf::internal::WireFormat::PARSE);
  331. } else {
  332. goto handle_uninterpreted;
  333. }
  334. if (input->ExpectAtEnd()) return true;
  335. break;
  336. }
  337. default: {
  338. handle_uninterpreted:
  339. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  340. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  341. return true;
  342. }
  343. DO_(::google::protobuf::internal::WireFormat::SkipField(
  344. input, tag, mutable_unknown_fields()));
  345. break;
  346. }
  347. }
  348. }
  349. return true;
  350. #undef DO_
  351. }
  352. void PlayerConnect::SerializeWithCachedSizes(
  353. ::google::protobuf::io::CodedOutputStream* output) const {
  354. // optional string account = 1;
  355. if (has_account()) {
  356. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  357. this->account().data(), this->account().length(),
  358. ::google::protobuf::internal::WireFormat::SERIALIZE);
  359. ::google::protobuf::internal::WireFormatLite::WriteString(
  360. 1, this->account(), output);
  361. }
  362. // optional string token = 2;
  363. if (has_token()) {
  364. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  365. this->token().data(), this->token().length(),
  366. ::google::protobuf::internal::WireFormat::SERIALIZE);
  367. ::google::protobuf::internal::WireFormatLite::WriteString(
  368. 2, this->token(), output);
  369. }
  370. // optional string sign = 3;
  371. if (has_sign()) {
  372. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  373. this->sign().data(), this->sign().length(),
  374. ::google::protobuf::internal::WireFormat::SERIALIZE);
  375. ::google::protobuf::internal::WireFormatLite::WriteString(
  376. 3, this->sign(), output);
  377. }
  378. // optional string platform = 4 [default = "dwc_def"];
  379. if (has_platform()) {
  380. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  381. this->platform().data(), this->platform().length(),
  382. ::google::protobuf::internal::WireFormat::SERIALIZE);
  383. ::google::protobuf::internal::WireFormatLite::WriteString(
  384. 4, this->platform(), output);
  385. }
  386. // optional string pay_platform = 5 [default = "dwc_def"];
  387. if (has_pay_platform()) {
  388. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  389. this->pay_platform().data(), this->pay_platform().length(),
  390. ::google::protobuf::internal::WireFormat::SERIALIZE);
  391. ::google::protobuf::internal::WireFormatLite::WriteString(
  392. 5, this->pay_platform(), output);
  393. }
  394. // optional string channel = 6 [default = "0"];
  395. if (has_channel()) {
  396. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  397. this->channel().data(), this->channel().length(),
  398. ::google::protobuf::internal::WireFormat::SERIALIZE);
  399. ::google::protobuf::internal::WireFormatLite::WriteString(
  400. 6, this->channel(), output);
  401. }
  402. if (!unknown_fields().empty()) {
  403. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  404. unknown_fields(), output);
  405. }
  406. }
  407. ::google::protobuf::uint8* PlayerConnect::SerializeWithCachedSizesToArray(
  408. ::google::protobuf::uint8* target) const {
  409. // optional string account = 1;
  410. if (has_account()) {
  411. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  412. this->account().data(), this->account().length(),
  413. ::google::protobuf::internal::WireFormat::SERIALIZE);
  414. target =
  415. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  416. 1, this->account(), target);
  417. }
  418. // optional string token = 2;
  419. if (has_token()) {
  420. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  421. this->token().data(), this->token().length(),
  422. ::google::protobuf::internal::WireFormat::SERIALIZE);
  423. target =
  424. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  425. 2, this->token(), target);
  426. }
  427. // optional string sign = 3;
  428. if (has_sign()) {
  429. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  430. this->sign().data(), this->sign().length(),
  431. ::google::protobuf::internal::WireFormat::SERIALIZE);
  432. target =
  433. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  434. 3, this->sign(), target);
  435. }
  436. // optional string platform = 4 [default = "dwc_def"];
  437. if (has_platform()) {
  438. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  439. this->platform().data(), this->platform().length(),
  440. ::google::protobuf::internal::WireFormat::SERIALIZE);
  441. target =
  442. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  443. 4, this->platform(), target);
  444. }
  445. // optional string pay_platform = 5 [default = "dwc_def"];
  446. if (has_pay_platform()) {
  447. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  448. this->pay_platform().data(), this->pay_platform().length(),
  449. ::google::protobuf::internal::WireFormat::SERIALIZE);
  450. target =
  451. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  452. 5, this->pay_platform(), target);
  453. }
  454. // optional string channel = 6 [default = "0"];
  455. if (has_channel()) {
  456. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  457. this->channel().data(), this->channel().length(),
  458. ::google::protobuf::internal::WireFormat::SERIALIZE);
  459. target =
  460. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  461. 6, this->channel(), target);
  462. }
  463. if (!unknown_fields().empty()) {
  464. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  465. unknown_fields(), target);
  466. }
  467. return target;
  468. }
  469. int PlayerConnect::ByteSize() const {
  470. int total_size = 0;
  471. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  472. // optional string account = 1;
  473. if (has_account()) {
  474. total_size += 1 +
  475. ::google::protobuf::internal::WireFormatLite::StringSize(
  476. this->account());
  477. }
  478. // optional string token = 2;
  479. if (has_token()) {
  480. total_size += 1 +
  481. ::google::protobuf::internal::WireFormatLite::StringSize(
  482. this->token());
  483. }
  484. // optional string sign = 3;
  485. if (has_sign()) {
  486. total_size += 1 +
  487. ::google::protobuf::internal::WireFormatLite::StringSize(
  488. this->sign());
  489. }
  490. // optional string platform = 4 [default = "dwc_def"];
  491. if (has_platform()) {
  492. total_size += 1 +
  493. ::google::protobuf::internal::WireFormatLite::StringSize(
  494. this->platform());
  495. }
  496. // optional string pay_platform = 5 [default = "dwc_def"];
  497. if (has_pay_platform()) {
  498. total_size += 1 +
  499. ::google::protobuf::internal::WireFormatLite::StringSize(
  500. this->pay_platform());
  501. }
  502. // optional string channel = 6 [default = "0"];
  503. if (has_channel()) {
  504. total_size += 1 +
  505. ::google::protobuf::internal::WireFormatLite::StringSize(
  506. this->channel());
  507. }
  508. }
  509. if (!unknown_fields().empty()) {
  510. total_size +=
  511. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  512. unknown_fields());
  513. }
  514. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  515. _cached_size_ = total_size;
  516. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  517. return total_size;
  518. }
  519. void PlayerConnect::MergeFrom(const ::google::protobuf::Message& from) {
  520. GOOGLE_CHECK_NE(&from, this);
  521. const PlayerConnect* source =
  522. ::google::protobuf::internal::dynamic_cast_if_available<const PlayerConnect*>(
  523. &from);
  524. if (source == NULL) {
  525. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  526. } else {
  527. MergeFrom(*source);
  528. }
  529. }
  530. void PlayerConnect::MergeFrom(const PlayerConnect& from) {
  531. GOOGLE_CHECK_NE(&from, this);
  532. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  533. if (from.has_account()) {
  534. set_account(from.account());
  535. }
  536. if (from.has_token()) {
  537. set_token(from.token());
  538. }
  539. if (from.has_sign()) {
  540. set_sign(from.sign());
  541. }
  542. if (from.has_platform()) {
  543. set_platform(from.platform());
  544. }
  545. if (from.has_pay_platform()) {
  546. set_pay_platform(from.pay_platform());
  547. }
  548. if (from.has_channel()) {
  549. set_channel(from.channel());
  550. }
  551. }
  552. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  553. }
  554. void PlayerConnect::CopyFrom(const ::google::protobuf::Message& from) {
  555. if (&from == this) return;
  556. Clear();
  557. MergeFrom(from);
  558. }
  559. void PlayerConnect::CopyFrom(const PlayerConnect& from) {
  560. if (&from == this) return;
  561. Clear();
  562. MergeFrom(from);
  563. }
  564. bool PlayerConnect::IsInitialized() const {
  565. return true;
  566. }
  567. void PlayerConnect::Swap(PlayerConnect* other) {
  568. if (other != this) {
  569. std::swap(account_, other->account_);
  570. std::swap(token_, other->token_);
  571. std::swap(sign_, other->sign_);
  572. std::swap(platform_, other->platform_);
  573. std::swap(pay_platform_, other->pay_platform_);
  574. std::swap(channel_, other->channel_);
  575. std::swap(_has_bits_[0], other->_has_bits_[0]);
  576. _unknown_fields_.Swap(&other->_unknown_fields_);
  577. std::swap(_cached_size_, other->_cached_size_);
  578. }
  579. }
  580. ::google::protobuf::Metadata PlayerConnect::GetMetadata() const {
  581. protobuf_AssignDescriptorsOnce();
  582. ::google::protobuf::Metadata metadata;
  583. metadata.descriptor = PlayerConnect_descriptor_;
  584. metadata.reflection = PlayerConnect_reflection_;
  585. return metadata;
  586. }
  587. // ===================================================================
  588. #ifndef _MSC_VER
  589. const int PlayerConnectResult::kServertimeFieldNumber;
  590. const int PlayerConnectResult::kGamingFieldNumber;
  591. const int PlayerConnectResult::kVerFieldNumber;
  592. const int PlayerConnectResult::kResultFieldNumber;
  593. #endif // !_MSC_VER
  594. PlayerConnectResult::PlayerConnectResult()
  595. : ::google::protobuf::Message() {
  596. SharedCtor();
  597. }
  598. void PlayerConnectResult::InitAsDefaultInstance() {
  599. }
  600. PlayerConnectResult::PlayerConnectResult(const PlayerConnectResult& from)
  601. : ::google::protobuf::Message() {
  602. SharedCtor();
  603. MergeFrom(from);
  604. }
  605. void PlayerConnectResult::SharedCtor() {
  606. _cached_size_ = 0;
  607. servertime_ = 0;
  608. gaming_ = 0;
  609. ver_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
  610. result_ = 0;
  611. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  612. }
  613. PlayerConnectResult::~PlayerConnectResult() {
  614. SharedDtor();
  615. }
  616. void PlayerConnectResult::SharedDtor() {
  617. if (ver_ != &::google::protobuf::internal::kEmptyString) {
  618. delete ver_;
  619. }
  620. if (this != default_instance_) {
  621. }
  622. }
  623. void PlayerConnectResult::SetCachedSize(int size) const {
  624. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  625. _cached_size_ = size;
  626. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  627. }
  628. const ::google::protobuf::Descriptor* PlayerConnectResult::descriptor() {
  629. protobuf_AssignDescriptorsOnce();
  630. return PlayerConnectResult_descriptor_;
  631. }
  632. const PlayerConnectResult& PlayerConnectResult::default_instance() {
  633. if (default_instance_ == NULL) protobuf_AddDesc_common_5fprotocol_2eproto();
  634. return *default_instance_;
  635. }
  636. PlayerConnectResult* PlayerConnectResult::default_instance_ = NULL;
  637. PlayerConnectResult* PlayerConnectResult::New() const {
  638. return new PlayerConnectResult;
  639. }
  640. void PlayerConnectResult::Clear() {
  641. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  642. servertime_ = 0;
  643. gaming_ = 0;
  644. if (has_ver()) {
  645. if (ver_ != &::google::protobuf::internal::kEmptyString) {
  646. ver_->clear();
  647. }
  648. }
  649. result_ = 0;
  650. }
  651. ::memset(_has_bits_, 0, sizeof(_has_bits_));
  652. mutable_unknown_fields()->Clear();
  653. }
  654. bool PlayerConnectResult::MergePartialFromCodedStream(
  655. ::google::protobuf::io::CodedInputStream* input) {
  656. #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
  657. ::google::protobuf::uint32 tag;
  658. while ((tag = input->ReadTag()) != 0) {
  659. switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  660. // optional int32 servertime = 1;
  661. case 1: {
  662. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  663. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  664. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  665. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  666. input, &servertime_)));
  667. set_has_servertime();
  668. } else {
  669. goto handle_uninterpreted;
  670. }
  671. if (input->ExpectTag(16)) goto parse_gaming;
  672. break;
  673. }
  674. // optional int32 gaming = 2;
  675. case 2: {
  676. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  677. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  678. parse_gaming:
  679. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  680. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  681. input, &gaming_)));
  682. set_has_gaming();
  683. } else {
  684. goto handle_uninterpreted;
  685. }
  686. if (input->ExpectTag(26)) goto parse_ver;
  687. break;
  688. }
  689. // optional string ver = 3;
  690. case 3: {
  691. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  692. ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
  693. parse_ver:
  694. DO_(::google::protobuf::internal::WireFormatLite::ReadString(
  695. input, this->mutable_ver()));
  696. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  697. this->ver().data(), this->ver().length(),
  698. ::google::protobuf::internal::WireFormat::PARSE);
  699. } else {
  700. goto handle_uninterpreted;
  701. }
  702. if (input->ExpectTag(32)) goto parse_result;
  703. break;
  704. }
  705. // optional int32 result = 4;
  706. case 4: {
  707. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  708. ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
  709. parse_result:
  710. DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
  711. ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
  712. input, &result_)));
  713. set_has_result();
  714. } else {
  715. goto handle_uninterpreted;
  716. }
  717. if (input->ExpectAtEnd()) return true;
  718. break;
  719. }
  720. default: {
  721. handle_uninterpreted:
  722. if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
  723. ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
  724. return true;
  725. }
  726. DO_(::google::protobuf::internal::WireFormat::SkipField(
  727. input, tag, mutable_unknown_fields()));
  728. break;
  729. }
  730. }
  731. }
  732. return true;
  733. #undef DO_
  734. }
  735. void PlayerConnectResult::SerializeWithCachedSizes(
  736. ::google::protobuf::io::CodedOutputStream* output) const {
  737. // optional int32 servertime = 1;
  738. if (has_servertime()) {
  739. ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->servertime(), output);
  740. }
  741. // optional int32 gaming = 2;
  742. if (has_gaming()) {
  743. ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->gaming(), output);
  744. }
  745. // optional string ver = 3;
  746. if (has_ver()) {
  747. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  748. this->ver().data(), this->ver().length(),
  749. ::google::protobuf::internal::WireFormat::SERIALIZE);
  750. ::google::protobuf::internal::WireFormatLite::WriteString(
  751. 3, this->ver(), output);
  752. }
  753. // optional int32 result = 4;
  754. if (has_result()) {
  755. ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->result(), output);
  756. }
  757. if (!unknown_fields().empty()) {
  758. ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
  759. unknown_fields(), output);
  760. }
  761. }
  762. ::google::protobuf::uint8* PlayerConnectResult::SerializeWithCachedSizesToArray(
  763. ::google::protobuf::uint8* target) const {
  764. // optional int32 servertime = 1;
  765. if (has_servertime()) {
  766. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->servertime(), target);
  767. }
  768. // optional int32 gaming = 2;
  769. if (has_gaming()) {
  770. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->gaming(), target);
  771. }
  772. // optional string ver = 3;
  773. if (has_ver()) {
  774. ::google::protobuf::internal::WireFormat::VerifyUTF8String(
  775. this->ver().data(), this->ver().length(),
  776. ::google::protobuf::internal::WireFormat::SERIALIZE);
  777. target =
  778. ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
  779. 3, this->ver(), target);
  780. }
  781. // optional int32 result = 4;
  782. if (has_result()) {
  783. target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->result(), target);
  784. }
  785. if (!unknown_fields().empty()) {
  786. target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
  787. unknown_fields(), target);
  788. }
  789. return target;
  790. }
  791. int PlayerConnectResult::ByteSize() const {
  792. int total_size = 0;
  793. if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  794. // optional int32 servertime = 1;
  795. if (has_servertime()) {
  796. total_size += 1 +
  797. ::google::protobuf::internal::WireFormatLite::Int32Size(
  798. this->servertime());
  799. }
  800. // optional int32 gaming = 2;
  801. if (has_gaming()) {
  802. total_size += 1 +
  803. ::google::protobuf::internal::WireFormatLite::Int32Size(
  804. this->gaming());
  805. }
  806. // optional string ver = 3;
  807. if (has_ver()) {
  808. total_size += 1 +
  809. ::google::protobuf::internal::WireFormatLite::StringSize(
  810. this->ver());
  811. }
  812. // optional int32 result = 4;
  813. if (has_result()) {
  814. total_size += 1 +
  815. ::google::protobuf::internal::WireFormatLite::Int32Size(
  816. this->result());
  817. }
  818. }
  819. if (!unknown_fields().empty()) {
  820. total_size +=
  821. ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
  822. unknown_fields());
  823. }
  824. GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  825. _cached_size_ = total_size;
  826. GOOGLE_SAFE_CONCURRENT_WRITES_END();
  827. return total_size;
  828. }
  829. void PlayerConnectResult::MergeFrom(const ::google::protobuf::Message& from) {
  830. GOOGLE_CHECK_NE(&from, this);
  831. const PlayerConnectResult* source =
  832. ::google::protobuf::internal::dynamic_cast_if_available<const PlayerConnectResult*>(
  833. &from);
  834. if (source == NULL) {
  835. ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  836. } else {
  837. MergeFrom(*source);
  838. }
  839. }
  840. void PlayerConnectResult::MergeFrom(const PlayerConnectResult& from) {
  841. GOOGLE_CHECK_NE(&from, this);
  842. if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
  843. if (from.has_servertime()) {
  844. set_servertime(from.servertime());
  845. }
  846. if (from.has_gaming()) {
  847. set_gaming(from.gaming());
  848. }
  849. if (from.has_ver()) {
  850. set_ver(from.ver());
  851. }
  852. if (from.has_result()) {
  853. set_result(from.result());
  854. }
  855. }
  856. mutable_unknown_fields()->MergeFrom(from.unknown_fields());
  857. }
  858. void PlayerConnectResult::CopyFrom(const ::google::protobuf::Message& from) {
  859. if (&from == this) return;
  860. Clear();
  861. MergeFrom(from);
  862. }
  863. void PlayerConnectResult::CopyFrom(const PlayerConnectResult& from) {
  864. if (&from == this) return;
  865. Clear();
  866. MergeFrom(from);
  867. }
  868. bool PlayerConnectResult::IsInitialized() const {
  869. return true;
  870. }
  871. void PlayerConnectResult::Swap(PlayerConnectResult* other) {
  872. if (other != this) {
  873. std::swap(servertime_, other->servertime_);
  874. std::swap(gaming_, other->gaming_);
  875. std::swap(ver_, other->ver_);
  876. std::swap(result_, other->result_);
  877. std::swap(_has_bits_[0], other->_has_bits_[0]);
  878. _unknown_fields_.Swap(&other->_unknown_fields_);
  879. std::swap(_cached_size_, other->_cached_size_);
  880. }
  881. }
  882. ::google::protobuf::Metadata PlayerConnectResult::GetMetadata() const {
  883. protobuf_AssignDescriptorsOnce();
  884. ::google::protobuf::Metadata metadata;
  885. metadata.descriptor = PlayerConnectResult_descriptor_;
  886. metadata.reflection = PlayerConnectResult_reflection_;
  887. return metadata;
  888. }
  889. // @@protoc_insertion_point(namespace_scope)
  890. } // namespace common_protocol
  891. // @@protoc_insertion_point(global_scope)