~canonical-platform-qa/ubuntu-system-settings-online-accounts/launch_fixture

« back to all changes in this revision

Viewing changes to src/request-handler.h

  • Committer: CI bot
  • Author(s): Alberto Mardegan
  • Date: 2014-05-30 13:30:01 UTC
  • mfrom: (107.1.13 master)
  • Revision ID: ps-jenkins@lists.canonical.com-20140530133001-an9lfy1dc1pfkifd
Release development branch

Features landing with this branch:
- Updating the ACL when applications are enabled/disabled in System Settings
- Write profile information in the XML files installed by click hooks
- Run tests with Python 3 autopilot.
- Merge signon-ui into online-accounts-ui 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of signon-ui
 
3
 *
 
4
 * Copyright (C) 2014 Canonical Ltd.
 
5
 *
 
6
 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
 
7
 *
 
8
 * This program is free software: you can redistribute it and/or modify it
 
9
 * under the terms of the GNU General Public License version 3, as published
 
10
 * by the Free Software Foundation.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful, but
 
13
 * WITHOUT ANY WARRANTY; without even the implied warranties of
 
14
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
15
 * PURPOSE.  See the GNU General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU General Public License along
 
18
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 
19
 */
 
20
 
 
21
#ifndef SIGNON_UI_REQUEST_HANDLER_H
 
22
#define SIGNON_UI_REQUEST_HANDLER_H
 
23
 
 
24
#include <QObject>
 
25
#include <QVariantMap>
 
26
 
 
27
namespace SignOnUi {
 
28
 
 
29
class RequestHandlerPrivate;
 
30
class Request;
 
31
 
 
32
class RequestHandler: public QObject
 
33
{
 
34
    Q_OBJECT
 
35
    Q_PROPERTY(QObject *request READ request NOTIFY requestChanged)
 
36
    Q_PROPERTY(QString matchKey READ matchKey CONSTANT)
 
37
    Q_PROPERTY(QString matchId READ matchId CONSTANT)
 
38
 
 
39
public:
 
40
    explicit RequestHandler(QObject *parent = 0);
 
41
    ~RequestHandler();
 
42
 
 
43
    void setRequest(QObject *request);
 
44
    QObject *request() const;
 
45
 
 
46
    static QString matchKey() { return QStringLiteral("X-RequestHandler"); }
 
47
    QString matchId() const;
 
48
 
 
49
    static RequestHandler *findMatching(const QVariantMap &parameters);
 
50
 
 
51
Q_SIGNALS:
 
52
    void requestChanged();
 
53
 
 
54
private:
 
55
    RequestHandlerPrivate *d_ptr;
 
56
    Q_DECLARE_PRIVATE(RequestHandler)
 
57
};
 
58
 
 
59
} // namespace
 
60
 
 
61
#endif // SIGNON_UI_REQUEST_HANDLER_H
 
62