8443e9cb03c4468379ff8c1fe6e41bf7c96e9ec7
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_auth_challenge.h
1 // Copyright 2013 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6  * @file    ewk_auth_challenge.h
7  * @brief   Describes the authentication challenge API.
8  */
9
10 #ifndef ewk_auth_challenge_h
11 #define ewk_auth_challenge_h
12
13 #include <Eina.h>
14 #include <tizen.h>
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 /** Creates a type name for _Ewk_Auth_Challenge */
21 typedef struct _Ewk_Auth_Challenge Ewk_Auth_Challenge;
22
23 /**
24  * Gets the realm string of authentication challenge received from "authentication,challenge" evas object smart callback.
25  *
26  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
27  * @return the realm of authentication challenge on success, @c 0 otherwise
28  *
29  */
30 EXPORT_API const char* ewk_auth_challenge_realm_get(Ewk_Auth_Challenge* auth_challenge);
31
32 /**
33  * Gets the url string of authentication challenge received from "authentication,challenge" evas object smart callback.
34  *
35  * @param auth_challenge authentication challenge request instance received from "authentication,challenge" evas object smart callback.
36  * @return the url of authentication challenge on success, @c 0 otherwise
37  *
38  */
39 EXPORT_API const char* ewk_auth_challenge_url_get(Ewk_Auth_Challenge* auth_challenge);
40
41 /**
42  * Suspend the operation for authentication challenge.
43  *
44  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
45  *
46  */
47 EXPORT_API void ewk_auth_challenge_suspend(Ewk_Auth_Challenge* auth_challenge);
48
49 /**
50  *  If user select ok, send credential for authentication challenge from user input.
51  *
52  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
53  * @param user user id from user input.
54  * @param password user password from user input.
55  *
56  */
57 EXPORT_API void ewk_auth_challenge_credential_use(Ewk_Auth_Challenge* auth_challenge, const char* user, const char* password);
58
59 /**
60  *  If user select cancel, send cancellation notification for authentication challenge.
61  *
62  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
63  *
64  */
65 EXPORT_API void ewk_auth_challenge_credential_cancel(Ewk_Auth_Challenge* auth_challenge);
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif // ewk_auth_challenge_h