Esempio n. 1
0
int LoginRequest::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string wb_UUID = 1;
    if (has_wb_uuid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->wb_uuid());
    }

    // optional uint32 channel = 2;
    if (has_channel()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->channel());
    }

    // optional uint32 version = 3;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->version());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
Esempio n. 2
0
int Sess::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional string id = 1;
    if (has_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->id());
    }

    // optional int32 type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->type());
    }

    // optional int64 lasttime = 3;
    if (has_lasttime()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->lasttime());
    }

    // optional string sessid = 4;
    if (has_sessid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->sessid());
    }

    // optional int32 consvid = 5;
    if (has_consvid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->consvid());
    }

    // optional string version = 6;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->version());
    }

  }
  // repeated .gim.Pair kvs = 7;
  total_size += 1 * this->kvs_size();
  for (int i = 0; i < this->kvs_size(); i++) {
    total_size +=
      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
        this->kvs(i));
  }

  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
Esempio n. 3
0
int LoginResponse::ByteSize() const {
  int total_size = 0;

  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // required .message.LoginResponse.LoginStatus status = 1;
    if (has_status()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
    }

    // optional .message.NetAddress address = 2;
    if (has_address()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->address());
    }

    // optional .message.DailyRewardSystemData dailyRewardData = 3;
    if (has_dailyrewarddata()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->dailyrewarddata());
    }

    // optional string oldUid = 4;
    if (has_olduid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->olduid());
    }

    // optional uint32 version = 5;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->version());
    }

    // optional string gameName = 6;
    if (has_gamename()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->gamename());
    }

    // optional string gameDownload = 7;
    if (has_gamedownload()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->gamedownload());
    }

  }
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = total_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}
Esempio n. 4
0
void LoginResponse::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // required .message.LoginResponse.LoginStatus status = 1;
  if (has_status()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->status(), output);
  }

  // optional .message.NetAddress address = 2;
  if (has_address()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      2, this->address(), output);
  }

  // optional .message.DailyRewardSystemData dailyRewardData = 3;
  if (has_dailyrewarddata()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      3, this->dailyrewarddata(), output);
  }

  // optional string oldUid = 4;
  if (has_olduid()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->olduid(), output);
  }

  // optional uint32 version = 5;
  if (has_version()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->version(), output);
  }

  // optional string gameName = 6;
  if (has_gamename()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      6, this->gamename(), output);
  }

  // optional string gameDownload = 7;
  if (has_gamedownload()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      7, this->gamedownload(), output);
  }

}
Esempio n. 5
0
void LoginRequest::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string wb_UUID = 1;
  if (has_wb_uuid()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->wb_uuid(), output);
  }

  // optional uint32 channel = 2;
  if (has_channel()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->channel(), output);
  }

  // optional uint32 version = 3;
  if (has_version()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->version(), output);
  }

}
Esempio n. 6
0
void Sess::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // optional string id = 1;
  if (has_id()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->id(), output);
  }

  // optional int32 type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->type(), output);
  }

  // optional int64 lasttime = 3;
  if (has_lasttime()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->lasttime(), output);
  }

  // optional string sessid = 4;
  if (has_sessid()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->sessid(), output);
  }

  // optional int32 consvid = 5;
  if (has_consvid()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->consvid(), output);
  }

  // optional string version = 6;
  if (has_version()) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      6, this->version(), output);
  }

  // repeated .gim.Pair kvs = 7;
  for (int i = 0; i < this->kvs_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      7, this->kvs(i), output);
  }

}
Esempio n. 7
0
void Sess::Clear() {
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (has_id()) {
      if (id_ != &::google::protobuf::internal::kEmptyString) {
        id_->clear();
      }
    }
    type_ = 0;
    lasttime_ = GOOGLE_LONGLONG(0);
    if (has_sessid()) {
      if (sessid_ != &::google::protobuf::internal::kEmptyString) {
        sessid_->clear();
      }
    }
    consvid_ = 0;
    if (has_version()) {
      if (version_ != &::google::protobuf::internal::kEmptyString) {
        version_->clear();
      }
    }
  }
  kvs_.Clear();
  ::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Esempio n. 8
0
int RseLogin::ByteSize() const {
  int total_size = 0;
  
  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    // optional int32 currentTimeMillis = 1;
    if (has_currenttimemillis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->currenttimemillis());
    }
    
    // optional int32 id = 2;
    if (has_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->id());
    }
    
    // optional int32 levelBasedOnScore = 3;
    if (has_levelbasedonscore()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->levelbasedonscore());
    }
    
    // optional int32 myAccountIsLocked = 4;
    if (has_myaccountislocked()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->myaccountislocked());
    }
    
    // optional bool pop = 5;
    if (has_pop()) {
      total_size += 1 + 1;
    }
    
    // optional int32 rqId = 6;
    if (has_rqid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->rqid());
    }
    
    // optional int32 sync = 7;
    if (has_sync()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->sync());
    }
    
    // optional int32 timeFromLastLogin = 8;
    if (has_timefromlastlogin()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->timefromlastlogin());
    }
    
  }
  if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    // optional int32 timeFromLastUpdate = 9;
    if (has_timefromlastupdate()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->timefromlastupdate());
    }
    
    // optional int32 token = 10;
    if (has_token()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->token());
    }
    
    // optional string userId = 11;
    if (has_userid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->userid());
    }
    
    // optional string version = 12;
    if (has_version()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->version());
    }
    
    // optional int32 vip = 13;
    if (has_vip()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->vip());
    }
    
  }
  if (!unknown_fields().empty()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  _cached_size_ = total_size;
  return total_size;
}