summaryrefslogtreecommitdiffstats
blob: 32c9f53a0ea24e919d4e7d0465015ce08ee978b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * 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), 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, const std::string& description) {
    filename_ = name;
    fileSizeInBytes_ = size;
    description_ = description;
}