1
/** \file download_progress.h */ // -*-c++-*-
3
// Copyright (C) 2010 Daniel Burrows
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License as
7
// published by the Free Software Foundation; either version 2 of the
8
// License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful, but
11
// WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; see the file COPYING. If not, write to
17
// the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
// Boston, MA 02111-1307, USA.
20
#ifndef APTITUDE_GENERIC_VIEWS_MOCKS_DOWNLOAD_PROGRESS_H
21
#define APTITUDE_GENERIC_VIEWS_MOCKS_DOWNLOAD_PROGRESS_H
24
#include <generic/util/mocks/mock_util.h>
25
#include <generic/views/download_progress.h>
28
#include <boost/make_shared.hpp>
30
#include <gmock/gmock.h>
38
class download_progress : public aptitude::views::download_progress,
39
public aptitude::util::mocks::Mock<download_progress>
42
friend boost::shared_ptr<download_progress> boost::make_shared<download_progress>();
46
MOCK_METHOD1(update_progress, bool(const status &));
47
MOCK_METHOD3(file_started, void(const std::string &,
48
const boost::optional<unsigned long> &,
49
const boost::optional<unsigned long> &));
50
MOCK_METHOD4(error, void(bool,
53
const boost::optional<unsigned long> &));
54
MOCK_METHOD2(file_finished, void(const std::string &,
55
const boost::optional<unsigned long> &));
56
MOCK_METHOD3(done, void(double, unsigned long, double));
57
MOCK_METHOD3(media_change, void(const std::string &,
59
const sigc::slot1<void, bool> &));
65
#endif // APTITUDE_GENERIC_VIEWS_MOCKS_DOWNLOAD_PROGRESS_H