summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/FileTransfer/FileTransferController.h')
-rw-r--r--Swift/Controllers/FileTransfer/FileTransferController.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.h b/Swift/Controllers/FileTransfer/FileTransferController.h
index 3d6f7d5..490773d 100644
--- a/Swift/Controllers/FileTransfer/FileTransferController.h
+++ b/Swift/Controllers/FileTransfer/FileTransferController.h
@@ -2,22 +2,29 @@
2 * Copyright (c) 2011 Tobias Markmann 2 * Copyright (c) 2011 Tobias Markmann
3 * Licensed under the simplified BSD license. 3 * Licensed under the simplified BSD license.
4 * See Documentation/Licenses/BSD-simplified.txt for more information. 4 * See Documentation/Licenses/BSD-simplified.txt for more information.
5 */ 5 */
6 6
7/*
8 * Copyright (c) 2015 Isode Limited.
9 * All rights reserved.
10 * See the COPYING file for more information.
11 */
12
7#pragma once 13#pragma once
8 14
9#include <string> 15#include <string>
10 16
11#include <boost/shared_ptr.hpp>
12#include <boost/cstdint.hpp> 17#include <boost/cstdint.hpp>
18#include <boost/shared_ptr.hpp>
13 19
14#include <Swiften/JID/JID.h>
15#include <Swiften/FileTransfer/FileTransfer.h>
16#include <Swiften/FileTransfer/IncomingFileTransfer.h>
17#include <Swiften/FileTransfer/FileReadBytestream.h> 20#include <Swiften/FileTransfer/FileReadBytestream.h>
21#include <Swiften/FileTransfer/FileTransfer.h>
18#include <Swiften/FileTransfer/FileWriteBytestream.h> 22#include <Swiften/FileTransfer/FileWriteBytestream.h>
23#include <Swiften/FileTransfer/IncomingFileTransfer.h>
24#include <Swiften/JID/JID.h>
25
19#include <Swift/Controllers/FileTransfer/FileTransferProgressInfo.h> 26#include <Swift/Controllers/FileTransfer/FileTransferProgressInfo.h>
20 27
21namespace Swift { 28namespace Swift {
22 29
23class FileTransferManager; 30class FileTransferManager;
@@ -47,18 +54,18 @@ public:
47 bool isIncoming() const; 54 bool isIncoming() const;
48 FileTransfer::State getState() const; 55 FileTransfer::State getState() const;
49 int getProgress() const; 56 int getProgress() const;
50 boost::uintmax_t getSize() const; 57 boost::uintmax_t getSize() const;
51 58
52 boost::signal<void ()> onStateChage; 59 boost::signal<void ()> onStateChanged;
53 boost::signal<void ()> onProgressChange; 60 boost::signal<void ()> onProgressChange;
54 61
55private: 62private:
56 void handleFileTransferStateChange(FileTransfer::State); 63 void handleFileTransferStateChange(FileTransfer::State);
57 void handleProgressPercentageChange(int percentage); 64 void handleProgressPercentageChange(int percentage);
58 65
59private: 66private:
60 bool sending; 67 bool sending;
61 JID otherParty; 68 JID otherParty;
62 std::string filename; 69 std::string filename;
63 FileTransfer::ref transfer; 70 FileTransfer::ref transfer;
64 boost::shared_ptr<FileReadBytestream> fileReadStream; 71 boost::shared_ptr<FileReadBytestream> fileReadStream;