| 1643 | } |
| 1644 | |
| 1645 | void readNoteEmailParameters(ThriftBinaryBufferReader& r, NoteEmailParameters& s) { |
| 1646 | QString fname; |
| 1647 | ThriftFieldType::type fieldType; |
| 1648 | qint16 fieldId; |
| 1649 | r.readStructBegin(fname); |
| 1650 | while(true) { |
| 1651 | r.readFieldBegin(fname, fieldType, fieldId); |
| 1652 | if(fieldType == ThriftFieldType::T_STOP) break; |
| 1653 | if(fieldId == 1) { |
| 1654 | if(fieldType == ThriftFieldType::T_STRING) { |
| 1655 | QString v; |
| 1656 | r.readString(v); |
| 1657 | s.guid = v; |
| 1658 | } else { |
| 1659 | r.skip(fieldType); |
| 1660 | } |
| 1661 | } else |
| 1662 | if(fieldId == 2) { |
| 1663 | if(fieldType == ThriftFieldType::T_STRUCT) { |
| 1664 | Note v; |
| 1665 | readNote(r, v); |
| 1666 | s.note = v; |
| 1667 | } else { |
| 1668 | r.skip(fieldType); |
| 1669 | } |
| 1670 | } else |
| 1671 | if(fieldId == 3) { |
| 1672 | if(fieldType == ThriftFieldType::T_LIST) { |
| 1673 | QStringList v; |
| 1674 | quint32 size; |
| 1675 | ThriftFieldType::type elemType; |
| 1676 | r.readListBegin(elemType, size); |
| 1677 | v.reserve(size); |
| 1678 | if(elemType != ThriftFieldType::T_STRING) throw ThriftException(ThriftException::Type::INVALID_DATA, "Incorrect list type (NoteEmailParameters.toAddresses)"); |
| 1679 | for(quint32 i = 0; i < size; i++) { |
| 1680 | QString elem; |
| 1681 | r.readString(elem); |
| 1682 | v.append(elem); |
| 1683 | } |
| 1684 | r.readListEnd(); |
| 1685 | s.toAddresses = v; |
| 1686 | } else { |
| 1687 | r.skip(fieldType); |
| 1688 | } |
| 1689 | } else |
| 1690 | if(fieldId == 4) { |
| 1691 | if(fieldType == ThriftFieldType::T_LIST) { |
| 1692 | QStringList v; |
| 1693 | quint32 size; |
| 1694 | ThriftFieldType::type elemType; |
| 1695 | r.readListBegin(elemType, size); |
| 1696 | v.reserve(size); |
| 1697 | if(elemType != ThriftFieldType::T_STRING) throw ThriftException(ThriftException::Type::INVALID_DATA, "Incorrect list type (NoteEmailParameters.ccAddresses)"); |
| 1698 | for(quint32 i = 0; i < size; i++) { |
| 1699 | QString elem; |
| 1700 | r.readString(elem); |
| 1701 | v.append(elem); |
| 1702 | } |
nothing calls this directly
no test coverage detected