| 6521 | } |
| 6522 | |
| 6523 | void readBootstrapProfile(ThriftBinaryBufferReader& r, BootstrapProfile& s) { |
| 6524 | QString fname; |
| 6525 | ThriftFieldType::type fieldType; |
| 6526 | qint16 fieldId; |
| 6527 | bool name_isset = false; |
| 6528 | bool settings_isset = false; |
| 6529 | r.readStructBegin(fname); |
| 6530 | while(true) { |
| 6531 | r.readFieldBegin(fname, fieldType, fieldId); |
| 6532 | if(fieldType == ThriftFieldType::T_STOP) break; |
| 6533 | if(fieldId == 1) { |
| 6534 | if(fieldType == ThriftFieldType::T_STRING) { |
| 6535 | name_isset = true; |
| 6536 | QString v; |
| 6537 | r.readString(v); |
| 6538 | s.name = v; |
| 6539 | } else { |
| 6540 | r.skip(fieldType); |
| 6541 | } |
| 6542 | } else |
| 6543 | if(fieldId == 2) { |
| 6544 | if(fieldType == ThriftFieldType::T_STRUCT) { |
| 6545 | settings_isset = true; |
| 6546 | BootstrapSettings v; |
| 6547 | readBootstrapSettings(r, v); |
| 6548 | s.settings = v; |
| 6549 | } else { |
| 6550 | r.skip(fieldType); |
| 6551 | } |
| 6552 | } else |
| 6553 | { |
| 6554 | r.skip(fieldType); |
| 6555 | } |
| 6556 | r.readFieldEnd(); |
| 6557 | } |
| 6558 | r.readStructEnd(); |
| 6559 | if(!name_isset) throw ThriftException(ThriftException::Type::INVALID_DATA, "BootstrapProfile.name has no value"); |
| 6560 | if(!settings_isset) throw ThriftException(ThriftException::Type::INVALID_DATA, "BootstrapProfile.settings has no value"); |
| 6561 | } |
| 6562 | |
| 6563 | void writeBootstrapInfo(ThriftBinaryBufferWriter& w, const BootstrapInfo& s) { |
| 6564 | w.writeStructBegin("BootstrapInfo"); |
no test coverage detected