summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-10-29 10:12:03 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-10-30 12:49:14 (GMT)
commitcb62de17d1e17fd3049a6bc8155a100574a42a85 (patch)
treeddbabd81818f1dd16ba2ebc96b45267a1d2e4bf2 /Swiften/FileTransfer/FileTransfer.cpp
parent1d921f3d39ed134ca7f1d40011c1a07a5835b73c (diff)
downloadswift-cb62de17d1e17fd3049a6bc8155a100574a42a85.zip
swift-cb62de17d1e17fd3049a6bc8155a100574a42a85.tar.bz2
Add FileTransfer::getState() method
In addition, this adds the file-transfer classes to the Doxygen documentation. Test-Information: Unit and integration tests still pass. Change-Id: Ib6c16078c90ed56fae835cb2abfea8a564c3afa3
Diffstat (limited to 'Swiften/FileTransfer/FileTransfer.cpp')
-rw-r--r--Swiften/FileTransfer/FileTransfer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/Swiften/FileTransfer/FileTransfer.cpp b/Swiften/FileTransfer/FileTransfer.cpp
index 6b594aa..f63a4e8 100644
--- a/Swiften/FileTransfer/FileTransfer.cpp
+++ b/Swiften/FileTransfer/FileTransfer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 Isode Limited.
+ * Copyright (c) 2013-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,13 +8,18 @@
using namespace Swift;
-FileTransfer::FileTransfer() : fileSizeInBytes(0) {
+FileTransfer::FileTransfer() : fileSizeInBytes_(0), state_(State::Initial) {
}
FileTransfer::~FileTransfer() {
}
+void FileTransfer::setState(const State& state) {
+ state_ = state;
+ onStateChanged(state);
+}
+
void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) {
- filename = name;
- fileSizeInBytes = size;
+ filename_ = name;
+ fileSizeInBytes_ = size;
}