[M67 Dev][EWK] Classify EWK APIs by public, internal, or product
[platform/framework/web/chromium-efl.git] / tizen_src / ewk / efl_integration / public / ewk_geolocation.cc
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 #include "public/ewk_geolocation_internal.h"
6
7 #include "public/ewk_security_origin.h"
8 #include "private/ewk_security_origin_private.h"
9 #include "private/ewk_geolocation_private.h"
10
11 const Ewk_Security_Origin* ewk_geolocation_permission_request_origin_get(const Ewk_Geolocation_Permission_Request* permissionRequest)
12 {
13     EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, 0);
14     return static_cast<const Ewk_Security_Origin*>(permissionRequest->GetOrigin());
15 }
16
17 Eina_Bool ewk_geolocation_permission_request_set(Ewk_Geolocation_Permission_Request* permissionRequest, Eina_Bool allow)
18 {
19     EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, EINA_FALSE);
20     return permissionRequest->setDecision(allow == EINA_TRUE);
21 }
22
23 Eina_Bool ewk_geolocation_permission_reply(Ewk_Geolocation_Permission_Request* permissionRequest, Eina_Bool allow)
24 {
25     EINA_SAFETY_ON_NULL_RETURN_VAL(permissionRequest, EINA_FALSE);
26     return permissionRequest->setDecision(allow == EINA_TRUE); // the same as ewk_geolocation_permission_request_set
27 }
28
29 void ewk_geolocation_permission_request_suspend(Ewk_Geolocation_Permission_Request* permissionRequest)
30 {
31     EINA_SAFETY_ON_NULL_RETURN(permissionRequest);
32     permissionRequest->suspend();
33 }
34