~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to include/file/CFileSender.h

  • Committer: Nathan Osman
  • Date: 2012-07-27 03:17:28 UTC
  • Revision ID: admin@quickmediasolutions.com-20120727031728-57ln6rutgeuelkxl
Started reorganizing the sending code to drastically improve performance. NOTE: the build will BREAK with this commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include <QFileInfo>
21
21
#include <QList>
 
22
#include <QMap>
22
23
#include <QStringList>
23
24
 
24
25
#include "discovery/CMachine.h"
50
51
 
51
52
    private slots:
52
53
 
53
 
        void OnBytesWritten(qint64);
54
54
        void OnConnected();
55
55
        void OnData(QByteArray);
56
56
 
69
69
        void PrepareHeaders(QStringList);
70
70
        void SendFile(CFileHeader *);
71
71
 
72
 
        QList<CFileHeader *> m_headers;
73
 
        bool m_compress_files,
74
 
             m_calculate_checksum,
75
 
             m_oversized_prompt;
76
 
 
77
 
        /* Yes, I do believe in verbosity - code completion to the rescue! */
78
 
        qint64 m_total_uncompressed_bytes,
79
 
               m_total_uncompressed_bytes_so_far;
80
 
        qint64 m_current_file_uncompressed_bytes,
81
 
               m_current_file_transfer_bytes,
82
 
               m_current_file_bytes_so_far;
 
72
        /* This map contains a mapping of ID => header, allowing
 
73
           the remote server to tell us what files it would like
 
74
           to receive after receiving the headers. */
 
75
        QMap<int, CFileHeader *> m_header_map;
 
76
 
 
77
        /* This list contains all of the files that the remote
 
78
           server would like to receive. */
 
79
        QVariantList m_accepted_files;
 
80
 
 
81
        /* Statistics used for calculating progress during transfer. */
 
82
        qint64 m_total_chunks, m_chunks_transferred;
83
83
 
84
84
};
85
85