Create string tightly when retrive string from cbhm callback event
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_auth_challenge.h
1 /*
2  * Copyright (C) 2012 Samsung Electronics
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 /**
21  * @file    ewk_auth_challenge.h
22  * @brief   Describes the authentication challenge API.
23  */
24
25 #ifndef ewk_auth_challenge_h
26 #define ewk_auth_challenge_h
27
28 #include <Eina.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /** Creates a type name for _Ewk_Auth_Challenge */
35 typedef struct _Ewk_Auth_Challenge Ewk_Auth_Challenge;
36
37 /**
38  * Gets the realm string of authentication challenge received from "authentication,challenge" evas object smart callback.
39  *
40  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
41  * @return the realm of authentication challenge on success, @c 0 otherwise
42  *
43  */
44 EAPI const char* ewk_auth_challenge_realm_get(Ewk_Auth_Challenge* auth_challenge);
45
46 /**
47  * Gets the url string of authentication challenge received from "authentication,challenge" evas object smart callback.
48  *
49  * @param auth_challenge authentication challenge request instance received from "authentication,challenge" evas object smart callback.
50  * @return the url of authentication challenge on success, @c 0 otherwise
51  *
52  */
53 EAPI const char* ewk_auth_challenge_url_get(Ewk_Auth_Challenge* auth_challenge);
54
55 /**
56  * Suspend the operation for authentication challenge.
57  *
58  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
59  *
60  */
61 EAPI void ewk_auth_challenge_suspend(Ewk_Auth_Challenge* auth_challenge);
62
63 /**
64  *  If user select ok, send credential for authentication challenge from user input.
65  *
66  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
67  * @param user user id from user input.
68  * @param password user password from user input.
69  *
70  */
71 EAPI void ewk_auth_challenge_credential_use(Ewk_Auth_Challenge* auth_challenge, char* user, char* password);
72
73 /**
74  *  If user select cancel, send cancellation notification for authentication challenge.
75  *
76  * @param auth_challenge authentication challenge instance received from "authentication,challenge" evas object smart callback.
77  *
78  */
79 EAPI void ewk_auth_challenge_credential_cancel(Ewk_Auth_Challenge* auth_challenge);
80
81 #ifdef __cplusplus
82 }
83 #endif
84
85 #endif // ewk_auth_challenge_h