MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / NoteStore_updateNote_readReply

Function NoteStore_updateNote_readReply

qevercloud/generated/services.cpp:4477–4554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4475}
4476
4477Note NoteStore_updateNote_readReply(QByteArray reply)
4478{
4479 bool resultIsSet = false;
4480 Note result = Note();
4481 ThriftBinaryBufferReader r(reply);
4482 qint32 rseqid = 0;
4483 QString fname;
4484 ThriftMessageType::type mtype;
4485 r.readMessageBegin(fname, mtype, rseqid);
4486 if (mtype == ThriftMessageType::T_EXCEPTION) {
4487 ThriftException e = readThriftException(r);
4488 r.readMessageEnd();
4489 throw e;
4490 }
4491 if (mtype != ThriftMessageType::T_REPLY) {
4492 r.skip(ThriftFieldType::T_STRUCT);
4493 r.readMessageEnd();
4494 throw ThriftException(ThriftException::Type::INVALID_MESSAGE_TYPE);
4495 }
4496 if (fname.compare("updateNote") != 0) {
4497 r.skip(ThriftFieldType::T_STRUCT);
4498 r.readMessageEnd();
4499 throw ThriftException(ThriftException::Type::WRONG_METHOD_NAME);
4500 }
4501
4502 ThriftFieldType::type fieldType;
4503 qint16 fieldId;
4504 r.readStructBegin(fname);
4505 while(true) {
4506 r.readFieldBegin(fname, fieldType, fieldId);
4507 if(fieldType == ThriftFieldType::T_STOP) break;
4508 if(fieldId == 0) {
4509 if(fieldType == ThriftFieldType::T_STRUCT) {
4510 resultIsSet = true;
4511 Note v;
4512 readNote(r, v);
4513 result = v;
4514 } else {
4515 r.skip(fieldType);
4516 }
4517 }
4518 else if(fieldId == 1) {
4519 if(fieldType == ThriftFieldType::T_STRUCT) {
4520 EDAMUserException e;
4521 readEDAMUserException(r, e);
4522 throw e;
4523 } else {
4524 r.skip(fieldType);
4525 }
4526 }
4527 else if(fieldId == 2) {
4528 if(fieldType == ThriftFieldType::T_STRUCT) {
4529 EDAMSystemException e;
4530 readEDAMSystemException(r, e);
4531 throwEDAMSystemException(e);
4532 } else {
4533 r.skip(fieldType);
4534 }

Callers 2

updateNoteMethod · 0.85

Calls 15

NoteClass · 0.85
readThriftExceptionFunction · 0.85
ThriftExceptionClass · 0.85
readNoteFunction · 0.85
readEDAMUserExceptionFunction · 0.85
readEDAMSystemExceptionFunction · 0.85
throwEDAMSystemExceptionFunction · 0.85
readMessageBeginMethod · 0.80
readMessageEndMethod · 0.80
skipMethod · 0.80
readStructBeginMethod · 0.80

Tested by

no test coverage detected