summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer/FileTransfer.cpp')
-rw-r--r--Swiften/FileTransfer/FileTransfer.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/Swiften/FileTransfer/FileTransfer.cpp b/Swiften/FileTransfer/FileTransfer.cpp
index c11e8e4..32c9f53 100644
--- a/Swiften/FileTransfer/FileTransfer.cpp
+++ b/Swiften/FileTransfer/FileTransfer.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright (c) 2013 Remko Tronçon
- * Licensed under the GNU General Public License.
+ * Copyright (c) 2013-2015 Isode Limited.
+ * All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,13 +8,19 @@
using namespace Swift;
-FileTransfer::FileTransfer() {
+FileTransfer::FileTransfer() : fileSizeInBytes_(0), state_(State::Initial) {
}
FileTransfer::~FileTransfer() {
}
-void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) {
- filename = name;
- fileSizeInBytes = size;
+void FileTransfer::setState(const State& state) {
+ state_ = state;
+ onStateChanged(state);
+}
+
+void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size, const std::string& description) {
+ filename_ = name;
+ fileSizeInBytes_ = size;
+ description_ = description;
}