~diegosarmentero/+junk/settings-temp

« back to all changes in this revision

Viewing changes to tests/plugins/system-update/fakenetwork.h

  • Committer: Diego Sarmentero
  • Date: 2013-11-18 09:55:14 UTC
  • Revision ID: diego.sarmentero@gmail.com-20131118095514-kxfblhzwpfw6m6xz
tests working

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This library is free software; you can redistribute it and/or
 
5
 * modify it under the terms of version 3 of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
 * General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public
 
14
 * License along with this library; if not, write to the
 
15
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
16
 * Boston, MA 02110-1301, USA.
 
17
 */
 
18
 
 
19
#ifndef FAKENETWORK_H
 
20
#define FAKENETWORK_H
 
21
 
 
22
#include <QObject>
 
23
#include <QHash>
 
24
#include <QString>
 
25
#include "update.h"
 
26
 
 
27
namespace UpdatePlugin {
 
28
 
 
29
class FakeNetwork : public QObject
 
30
{
 
31
    Q_OBJECT
 
32
public:
 
33
    explicit FakeNetwork(QObject *parent = 0);
 
34
 
 
35
    void checkForNewVersions(QHash<QString, Update*> &apps);
 
36
    void getResourceUrl(QString packagename);
 
37
    void getClickToken(Update* app, const QString& url, const QString& authHeader);
 
38
    
 
39
signals:
 
40
    void updatesFound();
 
41
    void updatesNotFound();
 
42
    void errorOccurred();
 
43
    void downloadUrlFound(QString packagename, QString url);
 
44
    void clickTokenObtained(Update* app, const QString& clickToken);
 
45
};
 
46
 
 
47
}
 
48
 
 
49
#endif // FAKENETWORK_H