diff options
author | Tobias Markmann <tm@ayena.de> | 2015-10-29 10:12:03 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-10-30 12:49:14 (GMT) |
commit | cb62de17d1e17fd3049a6bc8155a100574a42a85 (patch) | |
tree | ddbabd81818f1dd16ba2ebc96b45267a1d2e4bf2 /Swiften/FileTransfer/FileTransfer.cpp | |
parent | 1d921f3d39ed134ca7f1d40011c1a07a5835b73c (diff) | |
download | swift-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.cpp | 13 |
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,20 +1,25 @@ /* - * Copyright (c) 2013-2014 Isode Limited. + * Copyright (c) 2013-2015 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/FileTransfer/FileTransfer.h> 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; } |