~libqtelegram-team/consoletelegram/trunk

« back to all changes in this revision

Viewing changes to dumper.cpp

  • Committer: Roberto Mier Escandón
  • Date: 2014-05-26 17:16:23 UTC
  • Revision ID: rmescandon@gmail.com-20140526171623-xlhsf6z8sx100qz0
ADDED tests for updates get state and updates get difference

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
    dumpPeerNotifySettings(chat.notifySettings());
654
654
}
655
655
 
656
 
 
 
656
void Dumper::dumpEncryptedMessage(const EncryptedMessage &msg) {
 
657
    qDebug() << "#EncryptedMessage";
 
658
    qDebug() << "randomId:" << msg.randomId();
 
659
    qDebug() << "chatId:" << msg.chatId();
 
660
    qDebug() << "date:" << unixTimeToDate(msg.date());
 
661
    qDebug() << "bytes:" << msg.bytes();
 
662
    if (msg.classType() == EncryptedMessage::typeEncryptedMessage) {
 
663
        dumpEncryptedFile(msg.file());
 
664
    }
 
665
}
 
666
 
 
667
void Dumper::dumpEncryptedFile(const EncryptedFile &file) {
 
668
    qDebug() << "#EncryptedFile";
 
669
    if (file.classType() == EncryptedFile::typeEncryptedFile) {
 
670
        qDebug() << "id:" << file.id();
 
671
        qDebug() << "accessHash:" << file.accessHash();
 
672
        qDebug() << "size:" << file.size();
 
673
        qDebug() << "dcId:" << file.dcId();
 
674
        qDebug() << "keyFingerprint:" << file.keyFingerprint();
 
675
    }
 
676
}
 
677
 
 
678
void Dumper::dumpUpdatesState(const UpdatesState update) {
 
679
    qDebug() << "#UpdatesState";
 
680
    qDebug() << "pts:" << update.pts();
 
681
    qDebug() << "qts:" << update.qts();
 
682
    qDebug() << "date:" << update.date();
 
683
    qDebug() << "seq:" << update.seq();
 
684
    qDebug() << "unreadCount:" << update.unreadCount();
 
685
}