2
* Copyright 2014 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3, as published
6
* by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranties of
10
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
* PURPOSE. See the GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License along
14
* with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Charles Kerr <charles.kerr@canonical.com>
20
#include <transfer/transfer-mock.h>
32
MockTransfer::MockTransfer(const Id& id, const std::string& icon_filename):
34
m_icon_filename(icon_filename)
38
MockTransfer::~MockTransfer()
46
m_history.push_back(Pause);
50
MockTransfer::resume()
53
m_history.push_back(Resume);
57
MockTransfer::cancel()
59
m_state.set(CANCELING);
60
m_history.push_back(Cancel);
66
m_history.push_back(Clear);
72
g_warn_if_fail(state().get() == DONE);
73
m_history.push_back(Open);
77
MockTransfer::icon() const
79
auto file = g_file_new_for_path(m_icon_filename.c_str());
80
auto icon = g_file_icon_new (file);
89
} // namespace transfer
90
} // namespace indicator