~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to include/file/CFileSender.h

  • Committer: Nathan Osman
  • Date: 2012-06-27 21:56:40 UTC
  • Revision ID: admin@quickmediasolutions.com-20120627215640-c6mspvllk1br9vx2
Implemented basic progress bar for uploads (which seems to be broken at the moment) and corrected a bug with the way unique IDs were generated for each machine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
    public:
33
33
 
34
 
        enum SendState {
35
 
            WaitingForConnection,
36
 
            WaitingForResponse,
37
 
            WaitingForACK
 
34
        enum {
 
35
            ProgressNone = 101,
 
36
            ProgressComplete,
 
37
            ProgressError
38
38
        };
39
39
 
40
40
        CFileSender(QObject *, QStringList);
42
42
 
43
43
        void Start(CMachine);
44
44
 
 
45
    signals:
 
46
 
 
47
        void Progress(int);
 
48
 
45
49
    private slots:
46
50
 
47
51
        void OnConnected();
49
53
 
50
54
    private:
51
55
 
 
56
        enum SendState {
 
57
            WaitingForConnection,
 
58
            WaitingForResponse,
 
59
            WaitingForACK
 
60
        };
 
61
 
 
62
        SendState m_state;
 
63
 
52
64
        void PrepareHeaders(QStringList);
53
65
        void SendFiles();
54
66
 
55
67
        QList<CFileHeader *> m_headers;
56
 
 
57
 
        SendState m_state;
 
68
        qint64 m_total_uncompressed;
 
69
        qint64 m_current_uncompressed;
58
70
};
59
71
 
60
72
#endif // CFILESENDER_H