~ken-vandine/ubuntu-system-settings/lp1501428

« back to all changes in this revision

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

  • Committer: CI Train Bot
  • Author(s): Manuel de la Pena
  • Date: 2015-09-01 13:59:08 UTC
  • mfrom: (1506.6.8 donot-query-on-error)
  • Revision ID: ci-train-bot@canonical.com-20150901135908-hhxklaq0t29q3yko
Sign the query in order to get a possible auth error from the server and stop the user from trying to do updates with invalid creds.
Approved by: Ken VanDine

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#ifndef FAKENETWORK_H
20
20
#define FAKENETWORK_H
21
21
 
 
22
#include <token.h>
 
23
 
22
24
#include <QObject>
23
25
#include <QHash>
24
26
#include <QString>
 
27
 
25
28
#include "update.h"
26
29
 
27
30
namespace UpdatePlugin {
34
37
 
35
38
    void checkForNewVersions(QHash<QString, Update*> &apps);
36
39
    void getResourceUrl(const QString& packagename);
37
 
    void getClickToken(Update* app, const QString& url, const QString& authHeader);
38
 
    
 
40
    void getClickToken(Update* app, const QString& url);
 
41
    void setUbuntuOneToken(UbuntuOne::Token t) { m_token = t; }
 
42
    UbuntuOne::Token getUbuntuOneToken() { return m_token; }
 
43
 
39
44
signals:
40
45
    void updatesFound();
41
46
    void updatesNotFound();
45
50
    void credentialError();
46
51
    void downloadUrlFound(const QString& packagename, const QString& url);
47
52
    void clickTokenObtained(Update* app, const QString& clickToken);
 
53
 
 
54
private:
 
55
    UbuntuOne::Token m_token;
48
56
};
49
57
 
50
58
}