summaryrefslogtreecommitdiff
path: root/src/common/gsignond-signonui-data.c
blob: c489b9bae5cf0e4a50835281c57a6c48086080d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
/* vi: set et sw=4 ts=4 cino=t0,(0: */
/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of gsignond
 *
 * Copyright (C) 2013 Intel Corporation.
 *
 * Contact: Amarnath Valluri<amarnath.valluri@linux.intel.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA
 */

#include <gsignond/gsignond-signonui-data.h>

#define SIGNONUI_KEY_CAPTCHA_RESPONSE "CaptchaResponse"
#define SIGNONUI_KEY_CAPTCHA_URL "CaptchaUrl"
#define SIGNONUI_KEY_CAPTION "Caption"
#define SIGNONUI_KEY_CONFIRM "Confirm"
#define SIGNONUI_KEY_FINAL_URL "FinalUrl"
#define SIGNONUI_KEY_FORGOT_PASSWORD "ForgotPassword"
#define SIGNONUI_KEY_FORGOT_PASSWORD_URL "ForgotPasswordUrl"
#define SIGNONUI_KEY_MESSAGE "Message"
#define SIGNONUI_KEY_OPEN_URL "OpenUrl"
#define SIGNONUI_KEY_PASSWORD "Secret"
#define SIGNONUI_KEY_QUERY_ERROR_CODE "QueryErrorCode"
#define SIGNONUI_KEY_QUERY_PASSWORD "QueryPassword"
#define SIGNONUI_KEY_QUERY_USERNAME "QueryUserName"
#define SIGNONUI_KEY_REMEMBER_PASSWORD "RememberPassword"
#define SIGNONUI_KEY_REQUEST_ID "RequestId"
#define SIGNONUI_KEY_TEST_REPLY_VALUES "TestReplyValues"
#define SIGNONUI_KEY_TITLE "Title"
#define SIGNONUI_KEY_URL_RESPONSE "UrlResponse"
#define SIGNONUI_KEY_USERNAME "UserName"

const gchar*
gsignond_signonui_data_get_captcha_response (GSignondSignonuiData *data) 
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTCHA_RESPONSE);
}

void
gsignond_signonui_data_set_captcha_response (GSignondSignonuiData *data,
                                             const gchar *response)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTCHA_RESPONSE, response);
}

const gchar*
gsignond_signonui_data_get_captcha_url (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTCHA_URL);
}

void
gsignond_signonui_data_set_captcha_url (GSignondSignonuiData *data,
                                        const gchar *url)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTCHA_URL, url);
}

const gchar*
gsignond_signonui_data_get_caption (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_CAPTION);
}

void
gsignond_signonui_data_set_caption (GSignondSignonuiData *data,
                                    const gchar *caption)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_CAPTION, caption);
}

gboolean
gsignond_signonui_data_get_confirm (GSignondSignonuiData *data,
                                    gboolean *confirm)
{
    return gsignond_dictionary_get_boolean (data, SIGNONUI_KEY_CONFIRM, confirm);
}

void
gsignond_signonui_data_set_confirm (GSignondSignonuiData *data,
                                    gboolean confirm)
{
    gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_CONFIRM, confirm);
}

const gchar*
gsignond_signonui_data_get_final_url (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_FINAL_URL);
}

void
gsignond_signonui_data_set_final_url (GSignondSignonuiData *data,
                                      const gchar *url)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_FINAL_URL, url);
}

gboolean
gsignond_signonui_data_get_forgot_password (GSignondSignonuiData *data,
                                            gboolean *forgot_password)
{
    return gsignond_dictionary_get_boolean (data, 
                                            SIGNONUI_KEY_FORGOT_PASSWORD,
                                            forgot_password);
}

void
gsignond_signonui_data_set_forgot_password (GSignondSignonuiData *data,
                                            gboolean forgot)
{
    gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_FORGOT_PASSWORD, forgot);
}

const gchar*
gsignond_signonui_data_get_forgot_password_url (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_FORGOT_PASSWORD_URL);
}

void
gsignond_signonui_data_set_forgot_password_url (GSignondSignonuiData *data,
                                                const gchar *url)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_FORGOT_PASSWORD_URL, url);
}

const gchar*
gsignond_signonui_data_get_message (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_MESSAGE);
}

void
gsignond_signonui_data_set_message (GSignondSignonuiData *data,
                                    const gchar *message)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_MESSAGE, message);
}

const gchar*
gsignond_signonui_data_get_open_url (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_OPEN_URL);
}

void
gsignond_signonui_data_set_open_url (GSignondSignonuiData *data,
                                     const gchar *url)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_OPEN_URL, url);
}

const gchar*
gsignond_signonui_data_get_password (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_PASSWORD);
}

void
gsignond_signonui_data_set_password (GSignondSignonuiData *data,
                                     const gchar *password)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_PASSWORD, password);
}

gboolean
gsignond_signonui_data_get_query_error (GSignondSignonuiData *data,
                                        GSignondSignonuiError *error)
{
    return gsignond_dictionary_get_uint32 (data, 
                                          SIGNONUI_KEY_QUERY_ERROR_CODE, 
                                          error);
}

void
gsignond_signonui_data_set_query_error (GSignondSignonuiData *data,
                                        GSignondSignonuiError error)
{
    gsignond_dictionary_set_uint32 (data, SIGNONUI_KEY_QUERY_ERROR_CODE, error);
}

gboolean
gsignond_signonui_data_get_query_password (GSignondSignonuiData *data,
                                            gboolean *query_password)
{
    return gsignond_dictionary_get_boolean (data, 
                                            SIGNONUI_KEY_QUERY_PASSWORD,
                                            query_password);
}

void
gsignond_signonui_data_set_query_password (GSignondSignonuiData *data,
                                           gboolean query)
{
    gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_QUERY_PASSWORD, query);
}

gboolean
gsignond_signonui_data_get_query_username (GSignondSignonuiData *data,
                                            gboolean *query_username)
{
    return gsignond_dictionary_get_boolean (data, 
                                            SIGNONUI_KEY_QUERY_USERNAME,
                                            query_username);
}

void
gsignond_signonui_data_set_query_username (GSignondSignonuiData *data,
                                           gboolean query)
{
    gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_QUERY_USERNAME, query);
}

gboolean
gsignond_signonui_data_get_remember_password (GSignondSignonuiData *data,
                                            gboolean *remember_password)
{
    return gsignond_dictionary_get_boolean (data, 
                                            SIGNONUI_KEY_REMEMBER_PASSWORD,
                                            remember_password);
}

void
gsignond_signonui_data_set_remember_password (GSignondSignonuiData *data,
                                              gboolean remember)
{
    gsignond_dictionary_set_boolean (data, SIGNONUI_KEY_REMEMBER_PASSWORD, remember);
}

const gchar*
gsignond_signonui_data_get_request_id (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_REQUEST_ID);
}

void
gsignond_signonui_data_set_request_id (GSignondSignonuiData *data,
                                       const gchar *id)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_REQUEST_ID, id);
}

const gchar*
gsignond_signonui_data_get_test_reply (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_TEST_REPLY_VALUES);
}

void
gsignond_signonui_data_set_test_reply (GSignondSignonuiData *data,
                                       const gchar *reply)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_TEST_REPLY_VALUES, reply);
}

const gchar*
gsignond_signonui_data_get_title (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_TITLE);
}

void
gsignond_signonui_data_set_title (GSignondSignonuiData *data,
                                  const gchar* title)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_TITLE, title);
}

const gchar*
gsignond_signonui_data_get_url_response (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_URL_RESPONSE);
}

void
gsignond_signonui_data_set_url_response (GSignondSignonuiData *data,
                                         const gchar *response)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_URL_RESPONSE, response);
}

const gchar*
gsignond_signonui_data_get_username (GSignondSignonuiData *data)
{
    return gsignond_dictionary_get_string (data, SIGNONUI_KEY_USERNAME);
}

void
gsignond_signonui_data_set_username (GSignondSignonuiData *data,
                                     const gchar *username)
{
    gsignond_dictionary_set_string (data, SIGNONUI_KEY_USERNAME, username);
}