[M67 Dev][EWK] Classify EWK APIs by public, internal, or product
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_policy_decision_internal.h
1 /*
2    Copyright (C) 2016 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_policy_decision_internal_h
21 #define ewk_policy_decision_internal_h
22
23 #include "ewk_frame_internal.h"
24 #include "ewk_policy_decision.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /**
31  * Returns user id for Authorization from Policy Decision object.
32  *
33  * @param policy_decision policy decision object
34  *
35  * @return @c user id string on success or empty string on failure
36  */
37 EXPORT_API const char* ewk_policy_decision_userid_get(const Ewk_Policy_Decision* policy_decision);
38
39 /**
40  * Returns password for Authorization from Policy Decision object.
41  *
42  * @param policy_decision policy decision object
43  *
44  * @return @c password string on success or empty string on failure
45  */
46 EXPORT_API const char* ewk_policy_decision_password_get(const Ewk_Policy_Decision* policy_decision);
47
48 /**
49  * Suspend the operation for policy decision.
50  *
51  * This suspends the operation for policy decision when the signal for policy is emitted.
52  * This is very useful to decide the policy from the additional UI operation like the popup.
53  *
54  * @param policy_decision policy decision object
55  *
56  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
57  */
58 EXPORT_API Eina_Bool ewk_policy_decision_suspend(Ewk_Policy_Decision* policy_decision);
59
60 /**
61  * Cause a download from this decision.
62  *
63  * @param policy_decision policy decision object
64  *
65  * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
66  */
67 EXPORT_API Eina_Bool ewk_policy_decision_download(Ewk_Policy_Decision* policy_decision);
68
69 /**
70  * Gets the frame reference from Policy Decision object.
71  *
72  * @param policy_decision policy decision object
73  *
74  * @return frame reference on success, or NULL on failure
75  */
76 EXPORT_API Ewk_Frame_Ref ewk_policy_decision_frame_get(Ewk_Policy_Decision* policy_decision);
77
78 /**
79  * Checks if frame requested in policy decision is main frame.
80  *
81  * @param policy_decision policy decision object
82  *
83  * @return @c EINA_TRUE or @c EINA_FALSE
84  */
85 EXPORT_API Eina_Bool ewk_policy_decision_is_main_frame(const Ewk_Policy_Decision* policy_decision);
86
87 #ifdef __cplusplus
88 }
89 #endif
90 #endif // ewk_policy_decision_internal_h