2
* This file is part of signon-ui
4
* Copyright (C) 2014 Canonical Ltd.
6
* Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
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.
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.
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/>.
21
#ifndef SIGNON_UI_REQUEST_HANDLER_H
22
#define SIGNON_UI_REQUEST_HANDLER_H
25
#include <QVariantMap>
29
class RequestHandlerPrivate;
32
class RequestHandler: public QObject
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)
40
explicit RequestHandler(QObject *parent = 0);
43
void setRequest(QObject *request);
44
QObject *request() const;
46
static QString matchKey() { return QStringLiteral("X-RequestHandler"); }
47
QString matchId() const;
49
static RequestHandler *findMatching(const QVariantMap ¶meters);
52
void requestChanged();
55
RequestHandlerPrivate *d_ptr;
56
Q_DECLARE_PRIVATE(RequestHandler)
61
#endif // SIGNON_UI_REQUEST_HANDLER_H