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,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
9using namespace Swift; 9using namespace Swift;
10 10
11FileTransfer::FileTransfer() : fileSizeInBytes(0) { 11FileTransfer::FileTransfer() : fileSizeInBytes_(0), state_(State::Initial) {
12} 12}
13 13
14FileTransfer::~FileTransfer() { 14FileTransfer::~FileTransfer() {
15} 15}
16 16
17void FileTransfer::setState(const State& state) {
18 state_ = state;
19 onStateChanged(state);
20}
21
17void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) { 22void FileTransfer::setFileInfo(const std::string& name, boost::uintmax_t size) {
18 filename = name; 23 filename_ = name;
19 fileSizeInBytes = size; 24 fileSizeInBytes_ = size;
20} 25}