diff options
Diffstat (limited to 'Swift/Controllers/FileTransfer/FileTransferProgressInfo.h')
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferProgressInfo.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferProgressInfo.h b/Swift/Controllers/FileTransfer/FileTransferProgressInfo.h index 5fb955c..869ceba 100644 --- a/Swift/Controllers/FileTransfer/FileTransferProgressInfo.h +++ b/Swift/Controllers/FileTransfer/FileTransferProgressInfo.h | |||
| @@ -5,31 +5,32 @@ | |||
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (c) 2016 Isode Limited. | 8 | * Copyright (c) 2016-2018 Isode Limited. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #pragma once | 13 | #pragma once |
| 14 | 14 | ||
| 15 | #include <boost/cstdint.hpp> | 15 | #include <cstddef> |
| 16 | |||
| 16 | #include <boost/signals2.hpp> | 17 | #include <boost/signals2.hpp> |
| 17 | 18 | ||
| 18 | namespace Swift { | 19 | namespace Swift { |
| 19 | 20 | ||
| 20 | class FileTransferProgressInfo { | 21 | class FileTransferProgressInfo { |
| 21 | public: | 22 | public: |
| 22 | FileTransferProgressInfo(boost::uintmax_t completeBytes); | 23 | FileTransferProgressInfo(size_t completeBytes); |
| 23 | 24 | ||
| 24 | public: | 25 | public: |
| 25 | void setBytesProcessed(int processedBytes); | 26 | void setBytesProcessed(size_t processedBytes); |
| 26 | 27 | ||
| 27 | int getPercentage() const; | 28 | int getPercentage() const; |
| 28 | boost::signals2::signal<void (int)> onProgressPercentage; | 29 | boost::signals2::signal<void (int)> onProgressPercentage; |
| 29 | 30 | ||
| 30 | private: | 31 | private: |
| 31 | boost::uintmax_t completeBytes; | 32 | size_t completeBytes; |
| 32 | boost::uintmax_t completedBytes; | 33 | size_t completedBytes; |
| 33 | int percentage; | 34 | int percentage; |
| 34 | }; | 35 | }; |
| 35 | 36 | ||
Swift