void Session::workUpdatesCombined(InboundPkt &inboundPkt, qint64 msgId) { qCDebug(TG_CORE_SESSION) << "workUpdatesCombined: msgId =" << QString::number(msgId, 16); mAsserter.check(inboundPkt.fetchInt() == (qint32)TL_UpdatesCombined); //updates mAsserter.check(inboundPkt.fetchInt() == (qint32)TL_Vector); qint32 n = inboundPkt.fetchInt(); QList<Update> updates; for (qint32 i = 0; i < n; i++) { updates.append(inboundPkt.fetchUpdate()); } //users mAsserter.check(inboundPkt.fetchInt() == (qint32)TL_Vector); n = inboundPkt.fetchInt(); QList<User> users; for (qint32 i = 0; i < n; i++) { users.append(inboundPkt.fetchUser()); } //chats mAsserter.check(inboundPkt.fetchInt() == (qint32)TL_Vector); n = inboundPkt.fetchInt(); QList<Chat> chats; for (qint32 i = 0; i < n; i++) { chats.append(inboundPkt.fetchChat()); } qint32 date = inboundPkt.fetchInt(); qint32 seqStart = inboundPkt.fetchInt(); qint32 seq = inboundPkt.fetchInt(); Q_EMIT updatesCombined(updates, users, chats, date, seqStart, seq); }
void Session::workUpdatesCombined(InboundPkt &inboundPkt, qint64 msgId) { qCDebug(TG_CORE_SESSION) << "workUpdatesCombined: msgId =" << QString::number(msgId, 16); UpdatesType upd(&inboundPkt); Q_EMIT updatesCombined(upd.updates(), upd.users(), upd.chats(), upd.date(), upd.seqStart(), upd.seq()); }