Debian Codegraph @

online-accounts-ui/src/signonui-request.h

raw symbols SCIP
1 /*
2 * This file is part of lomiri-online-accounts-ui
3 *
4 * Copyright (C) 2011-2014 Canonical Ltd.
5 *
6 * Contact: Alberto Mardegan <[email protected]>
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_H
22 #define SIGNON_UI_REQUEST_H
23
24 #include "request.h"
25
26 namespace SignOnUi {
27
28 class RequestHandler;
29 class RequestPrivate;
30
31 class Request: public OnlineAccountsUi::Request
32 {
33 Q_OBJECT
34
35 public:
36 static Request *newRequest(int id,
37 const QString &clientProfile,
38 const QVariantMap &parameters,
39 QObject *parent = 0);
40 ~Request();
41
42 static QString ssoId(const QVariantMap &parameters);
43 QString ssoId() const;
44
45 uint identity() const;
46 QString method() const;
47 QString mechanism() const;
48 QString providerId() const;
49 QString windowTitle() const;
50
51 const QVariantMap &clientData() const;
52
53 void setHandler(RequestHandler *handler);
54 RequestHandler *handler() const;
55 bool hasHandler() const { return handler() != 0; }
56
57 protected:
58 explicit Request(int id,
59 const QString &clientProfile,
60 const QVariantMap &parameters,
61 QObject *parent = 0);
62 virtual void setWindow(QWindow *window) Q_DECL_OVERRIDE;
63 virtual void setCanceled() Q_DECL_OVERRIDE;
64
65 private:
66 RequestPrivate *d_ptr;
67 Q_DECLARE_PRIVATE(Request)
68 };
69
70 } // namespace
71
72 #endif // SIGNON_UI_REQUEST_H
73