- Main Page
- Classes
- Files

- File List

uisessiondata.h
1 /*
2 * This file is part of signon
3 *
4 * Copyright (C) 2009-2010 Nokia Corporation.
5 *
6 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * version 2.1 as published by the Free Software Foundation.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
21 */
27 #ifndef UISESSIONDATA_H
28 #define UISESSIONDATA_H
29
30 #include <SignOn/SessionData>
35 namespace SignOn {
36
37 enum QueryError {
38 QUERY_ERROR_NONE = 0,
39 QUERY_ERROR_GENERAL,
40 QUERY_ERROR_NO_SIGNONUI,
41 QUERY_ERROR_BAD_PARAMETERS,
43 QUERY_ERROR_CANCELED,
45 QUERY_ERROR_NOT_AVAILABLE,
47 QUERY_ERROR_BAD_URL,
48 QUERY_ERROR_BAD_CAPTCHA,
49 QUERY_ERROR_BAD_CAPTCHA_URL,
51 QUERY_ERROR_REFRESH_FAILED,
52 QUERY_ERROR_FORBIDDEN,
53 QUERY_ERROR_FORGOT_PASSWORD
54 //TODO add more errors
55 };
56
60 enum QueryMessageId {
61 QUERY_MESSAGE_EMPTY = 0,
62 QUERY_MESSAGE_LOGIN,
63 QUERY_MESSAGE_NOT_AUTHORIZED
64 //TODO add more messages
65 };
66
74 class UiSessionData : public SessionData
75 {
76 public:
83 UiSessionData(const QVariantMap &data = QVariantMap()) { m_data = data; }
84
91 SIGNON_SESSION_DECLARE_PROPERTY(int, QueryErrorCode)
92
93
100 SIGNON_SESSION_DECLARE_PROPERTY(QString, Caption)
101
107 SIGNON_SESSION_DECLARE_PROPERTY(QString, Title)
108
115 SIGNON_SESSION_DECLARE_PROPERTY(int, QueryMessageId)
116
124 SIGNON_SESSION_DECLARE_PROPERTY(QString, QueryMessage)
125
130 SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryUserName)
131
136 SIGNON_SESSION_DECLARE_PROPERTY(bool, QueryPassword)
137
142 SIGNON_SESSION_DECLARE_PROPERTY(bool, RememberPassword)
143
148 SIGNON_SESSION_DECLARE_PROPERTY(bool, ShowRealm)
149
155 SIGNON_SESSION_DECLARE_PROPERTY(QString, OpenUrl)
156
162 SIGNON_SESSION_DECLARE_PROPERTY(QString, FinalUrl)
163
170 SIGNON_SESSION_DECLARE_PROPERTY(QString, UrlResponse)
171
180 SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaUrl)
181
190 SIGNON_SESSION_DECLARE_PROPERTY(QByteArray, CaptchaImage)
191
200 SIGNON_SESSION_DECLARE_PROPERTY(QString, CaptchaResponse)
201
207 SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPassword)
208
214 SIGNON_SESSION_DECLARE_PROPERTY(QString, ForgotPasswordUrl)
215
221 SIGNON_SESSION_DECLARE_PROPERTY(bool, Confirm)
222
228 SIGNON_SESSION_DECLARE_PROPERTY(QString, Icon)
229
230 };
231
232 } //namespace SignOn
233
234 Q_DECLARE_METATYPE(SignOn::UiSessionData)
235 #endif // UISESSIONDATA_H
SignOn::QUERY_MESSAGE_NOT_AUTHORIZED
Definition: uisessiondata.h:63
SignOn::QUERY_MESSAGE_LOGIN
Definition: uisessiondata.h:62
SignOn::QueryError
QueryError
Definition: uisessiondata.h:37
SignOn::QUERY_ERROR_CANCELED
Definition: uisessiondata.h:43
SignOn::QUERY_ERROR_BAD_CAPTCHA_URL
Definition: uisessiondata.h:49
SignOn::QUERY_MESSAGE_EMPTY
Definition: uisessiondata.h:61
SignOn::UiSessionData
Data container to hold values for authentication session.
Definition: uisessiondata.h:74
SignOn::QUERY_ERROR_NOT_AVAILABLE
Definition: uisessiondata.h:45
SignOn::QUERY_ERROR_FORBIDDEN
Definition: uisessiondata.h:52
SignOn::QUERY_ERROR_NONE
Definition: uisessiondata.h:38
SignOn::UiSessionData::UiSessionData
UiSessionData(const QVariantMap &data=QVariantMap())
Constructor.
Definition: uisessiondata.h:83
SignOn::QUERY_ERROR_BAD_PARAMETERS
Definition: uisessiondata.h:41
SignOn::QUERY_ERROR_REFRESH_FAILED
Definition: uisessiondata.h:51
SignOn::QueryMessageId
QueryMessageId
Predefined messages to be shown to user while querying input.
Definition: uisessiondata.h:60
SignOn::QUERY_ERROR_BAD_URL
Definition: uisessiondata.h:47
SignOn::QUERY_ERROR_FORGOT_PASSWORD
Definition: uisessiondata.h:53
SignOn::QUERY_ERROR_BAD_CAPTCHA
Definition: uisessiondata.h:48
SignOn::QUERY_ERROR_NO_SIGNONUI
Definition: uisessiondata.h:40
SignOn::QUERY_ERROR_GENERAL
Definition: uisessiondata.h:39