Create string tightly when retrive string from cbhm callback event
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / ewk_certificate.h
1 /*
2    Copyright (C) 2011 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 #ifndef ewk_certificate_h
21 #define ewk_certificate_h
22
23 #include <Eina.h>
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 typedef struct _Ewk_Certificate_Policy_Decision Ewk_Certificate_Policy_Decision;
30
31 /**
32  * Set the variable to allow the site access about certificate error.
33  *
34  * @param certificate_policy_decision certificate information data
35  *
36  * @param allowed decided permission value from user
37  */
38 EAPI void ewk_certificate_policy_decision_allowed_set(Ewk_Certificate_Policy_Decision* certificate_policy_decision, Eina_Bool allowed);
39
40 /**
41  * Suspend the operation for certificate error policy decision.
42  *
43  * This suspends the operation for certificate error policy decision when the signal for policy is emitted.
44  * This is very usefull to decide the policy from the additional UI operation like the popup.
45  *
46  * @param certificate_policy_decision certificate information data
47  *
48  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
49  */
50 EAPI void ewk_certificate_policy_decision_suspend(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
51
52 /**
53  * Get the variable url to check the site's url data about certificate error.
54  *
55  * @param certificate_policy_decision certificate information data
56  *
57  * @return @c url string on success or empty string on failure
58  */
59 EAPI const char* ewk_certificate_policy_decision_url_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
60
61 /**
62  * Get the variable certificate pem data to check the information about certificate error.
63  *
64  * @param certificate_policy_decision certificate information data
65  *
66  * @return @c certificate pem string on success or empty string on failure
67  */
68 EAPI const char* ewk_certificate_policy_decision_certificate_pem_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
69
70 /**
71  * Get the variable errro number to check the error cause about certificate error.
72  *
73  * @param certificate_policy_decision certificate information data
74  *
75  * @return @c error number
76  */
77 EAPI int ewk_certificate_policy_decision_error_get(Ewk_Certificate_Policy_Decision* certificate_policy_decision);
78
79 #ifdef __cplusplus
80 }
81 #endif
82 #endif