| 967 | } |
| 968 | |
| 969 | void writeNoteMetadata(ThriftBinaryBufferWriter& w, const NoteMetadata& s) { |
| 970 | w.writeStructBegin("NoteMetadata"); |
| 971 | w.writeFieldBegin("guid", ThriftFieldType::T_STRING, 1); |
| 972 | w.writeString(s.guid); |
| 973 | w.writeFieldEnd(); |
| 974 | if(s.title.isSet()) { |
| 975 | w.writeFieldBegin("title", ThriftFieldType::T_STRING, 2); |
| 976 | w.writeString(s.title.ref()); |
| 977 | w.writeFieldEnd(); |
| 978 | } |
| 979 | if(s.contentLength.isSet()) { |
| 980 | w.writeFieldBegin("contentLength", ThriftFieldType::T_I32, 5); |
| 981 | w.writeI32(s.contentLength.ref()); |
| 982 | w.writeFieldEnd(); |
| 983 | } |
| 984 | if(s.created.isSet()) { |
| 985 | w.writeFieldBegin("created", ThriftFieldType::T_I64, 6); |
| 986 | w.writeI64(s.created.ref()); |
| 987 | w.writeFieldEnd(); |
| 988 | } |
| 989 | if(s.updated.isSet()) { |
| 990 | w.writeFieldBegin("updated", ThriftFieldType::T_I64, 7); |
| 991 | w.writeI64(s.updated.ref()); |
| 992 | w.writeFieldEnd(); |
| 993 | } |
| 994 | if(s.deleted.isSet()) { |
| 995 | w.writeFieldBegin("deleted", ThriftFieldType::T_I64, 8); |
| 996 | w.writeI64(s.deleted.ref()); |
| 997 | w.writeFieldEnd(); |
| 998 | } |
| 999 | if(s.updateSequenceNum.isSet()) { |
| 1000 | w.writeFieldBegin("updateSequenceNum", ThriftFieldType::T_I32, 10); |
| 1001 | w.writeI32(s.updateSequenceNum.ref()); |
| 1002 | w.writeFieldEnd(); |
| 1003 | } |
| 1004 | if(s.notebookGuid.isSet()) { |
| 1005 | w.writeFieldBegin("notebookGuid", ThriftFieldType::T_STRING, 11); |
| 1006 | w.writeString(s.notebookGuid.ref()); |
| 1007 | w.writeFieldEnd(); |
| 1008 | } |
| 1009 | if(s.tagGuids.isSet()) { |
| 1010 | w.writeFieldBegin("tagGuids", ThriftFieldType::T_LIST, 12); |
| 1011 | w.writeListBegin(ThriftFieldType::T_STRING, s.tagGuids.ref().length()); |
| 1012 | Q_FOREACH(const Guid& elem, s.tagGuids.ref()) { |
| 1013 | w.writeString(elem); |
| 1014 | } |
| 1015 | w.writeListEnd(); |
| 1016 | w.writeFieldEnd(); |
| 1017 | } |
| 1018 | if(s.attributes.isSet()) { |
| 1019 | w.writeFieldBegin("attributes", ThriftFieldType::T_STRUCT, 14); |
| 1020 | writeNoteAttributes(w, s.attributes.ref()); |
| 1021 | w.writeFieldEnd(); |
| 1022 | } |
| 1023 | if(s.largestResourceMime.isSet()) { |
| 1024 | w.writeFieldBegin("largestResourceMime", ThriftFieldType::T_STRING, 20); |
| 1025 | w.writeString(s.largestResourceMime.ref()); |
| 1026 | w.writeFieldEnd(); |
no test coverage detected