My Project: SignOn/uisessiondata.h Source File

My Project

uisessiondata.h
1/*
2 * This file is part of signon
3 *
4 * Copyright (C) 2009-2010 Nokia Corporation.
5 * Copyright (C) 2012-2016 Canonical Ltd.
6 *
7 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * version 2.1 as published by the Free Software Foundation.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21 * 02110-1301 USA
22 */
28#ifndef UISESSIONDATA_H
29#define UISESSIONDATA_H
30
31#include <SignOn/SessionData>
36namespace SignOn {
37
38 enum QueryError {
39 QUERY_ERROR_NONE = 0,
40 QUERY_ERROR_GENERAL,
41 QUERY_ERROR_NO_SIGNONUI,
42 QUERY_ERROR_BAD_PARAMETERS,
44 QUERY_ERROR_CANCELED,
46 QUERY_ERROR_NOT_AVAILABLE,
48 QUERY_ERROR_BAD_URL,
49 QUERY_ERROR_BAD_CAPTCHA,
50 QUERY_ERROR_BAD_CAPTCHA_URL,
52 QUERY_ERROR_REFRESH_FAILED,
53 QUERY_ERROR_FORBIDDEN,
54 QUERY_ERROR_FORGOT_PASSWORD,
55 QUERY_ERROR_NETWORK,
56 QUERY_ERROR_SSL,
57};
58
62 enum QueryMessageId {
63 QUERY_MESSAGE_EMPTY = 0,
64 QUERY_MESSAGE_LOGIN,
65 QUERY_MESSAGE_NOT_AUTHORIZED
66 //TODO add more messages
67};
68
76 class UiSessionData : public SessionData
77{
78public:
85 UiSessionData(const QVariantMap &data = QVariantMap()) { m_data = data; }
86
93 SIGNON_SESSION_DECLARE_PROPERTY(int, QueryErrorCode)
94
95
102 SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
103
104
109 SIGNON_SESSION_DECLARE_PROPERTY(QString, Title)
110
111
117 SIGNON_SESSION_DECLARE_PROPERTY(int, QueryMessageId)
118
119
126 SIGNON_SESSION_DECLARE_PROPERTY(QString, QueryMessage)
127
128
132 SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryUserName)
133
134
138 SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryPassword)
139
140
144 SIGNON_SESSION_DECLARE_PROPERTY(bool, RememberPassword)
145
146
150 SIGNON_SESSION_DECLARE_PROPERTY(bool, ShowRealm)
151
152
157 SIGNON_SESSION_DECLARE_PROPERTY(QString, OpenUrl)
158
159
164 SIGNON_SESSION_DECLARE_PROPERTY(QString, FinalUrl)
165
166
172 SIGNON_SESSION_DECLARE_PROPERTY(QString, UrlResponse)
173
174
182 SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaUrl)
183
184
192 SIGNON_SESSION_DECLARE_PROPERTY(QByteArray, CaptchaImage)
193
194
202 SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaResponse)
203
204
209 SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPassword)
210
211
216 SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPasswordUrl)
217
218
223 SIGNON_SESSION_DECLARE_PROPERTY(bool, Confirm)
224
225
230 SIGNON_SESSION_DECLARE_PROPERTY(QString, Icon)
231
232};
233
234} //namespace SignOn
235
236Q_DECLARE_METATYPE(SignOn::UiSessionData)
237#endif // UISESSIONDATA_H
SignOn::UiSessionData
Data container to hold values for authentication session.
Definition uisessiondata.h:77
SignOn::UiSessionData::UiSessionData
UiSessionData(const QVariantMap &data=QVariantMap())
Constructor.
Definition uisessiondata.h:85
SignOn
Error codes for ui interaction.
Definition blobiohandler.h:32
SignOn::QueryMessageId
QueryMessageId
Predefined messages to be shown to user while querying input.
Definition uisessiondata.h:62
SignOn::QUERY_MESSAGE_NOT_AUTHORIZED
@ QUERY_MESSAGE_NOT_AUTHORIZED
Definition uisessiondata.h:65
SignOn::QUERY_MESSAGE_LOGIN
@ QUERY_MESSAGE_LOGIN
Definition uisessiondata.h:64
SignOn::QUERY_MESSAGE_EMPTY
@ QUERY_MESSAGE_EMPTY
Definition uisessiondata.h:63
SignOn::QueryError
QueryError
Definition uisessiondata.h:38
SignOn::QUERY_ERROR_FORGOT_PASSWORD
@ QUERY_ERROR_FORGOT_PASSWORD
Definition uisessiondata.h:54
SignOn::QUERY_ERROR_NOT_AVAILABLE
@ QUERY_ERROR_NOT_AVAILABLE
Definition uisessiondata.h:46
SignOn::QUERY_ERROR_BAD_CAPTCHA
@ QUERY_ERROR_BAD_CAPTCHA
Definition uisessiondata.h:49
SignOn::QUERY_ERROR_BAD_PARAMETERS
@ QUERY_ERROR_BAD_PARAMETERS
Definition uisessiondata.h:42
SignOn::QUERY_ERROR_SSL
@ QUERY_ERROR_SSL
Definition uisessiondata.h:56
SignOn::QUERY_ERROR_BAD_URL
@ QUERY_ERROR_BAD_URL
Definition uisessiondata.h:48
SignOn::QUERY_ERROR_NETWORK
@ QUERY_ERROR_NETWORK
Definition uisessiondata.h:55
SignOn::QUERY_ERROR_CANCELED
@ QUERY_ERROR_CANCELED
Definition uisessiondata.h:44
SignOn::QUERY_ERROR_NONE
@ QUERY_ERROR_NONE
Definition uisessiondata.h:39
SignOn::QUERY_ERROR_GENERAL
@ QUERY_ERROR_GENERAL
Definition uisessiondata.h:40
SignOn::QUERY_ERROR_NO_SIGNONUI
@ QUERY_ERROR_NO_SIGNONUI
Definition uisessiondata.h:41
SignOn::QUERY_ERROR_BAD_CAPTCHA_URL
@ QUERY_ERROR_BAD_CAPTCHA_URL
Definition uisessiondata.h:50
SignOn::QUERY_ERROR_REFRESH_FAILED
@ QUERY_ERROR_REFRESH_FAILED
Definition uisessiondata.h:52
SignOn::QUERY_ERROR_FORBIDDEN
@ QUERY_ERROR_FORBIDDEN
Definition uisessiondata.h:53