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 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2013-2014 Isode Limited. | 2 | * Copyright (c) 2013-2015 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <Swiften/FileTransfer/FileTransfer.h> | 7 | #include <Swiften/FileTransfer/FileTransfer.h> |
| 8 | 8 | ||
| 9 | using namespace Swift; | 9 | using namespace Swift; |
| 10 | 10 | ||
| 11 | FileTransfer::FileTransfer() : fileSizeInBytes(0) { | 11 | FileTransfer::FileTransfer() : fileSizeInBytes_(0), state_(State::Initial) { |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | FileTransfer::~FileTransfer() { | 14 | FileTransfer::~FileTransfer() { |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | void FileTransfer::setState(const State& state) { | ||
| 18 | state_ = state; | ||
| 19 | onStateChanged(state); | ||
| 20 | } | ||
| 21 | |||
| 17 | void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) { | 22 | void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) { |
| 18 | filename = name; | 23 | filename_ = name; |
| 19 | fileSizeInBytes = size; | 24 | fileSizeInBytes_ = size; |
| 20 | } | 25 | } |
Swift