2 * Copyright (C) 2013-2016 Samsung Electronics. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY SAMSUNG ELECTRONICS. AND ITS CONTRIBUTORS
14 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
15 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SAMSUNG ELECTRONICS. OR ITS
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
23 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #ifndef ewk_user_media_internal_h
27 #define ewk_user_media_internal_h
31 #include "ewk_security_origin_internal.h"
37 typedef struct _Ewk_User_Media_Permission_Request Ewk_User_Media_Permission_Request;
40 * Requests for getting origin of local media permission request.
42 * @param request Ewk_User_Media_Permission_Request object to get origin for
43 * userMedia permission request
45 * @return security origin of userMedia permission request
47 EXPORT_API const Ewk_Security_Origin* ewk_user_media_permission_request_origin_get(const Ewk_User_Media_Permission_Request* request);
50 * Sets the permission to access local media
52 * @param request Ewk_View_User_Media_Permission_Request object for userMedia
54 * @param allowed decided permission value from user
56 EXPORT_API void ewk_user_media_permission_request_set(Ewk_User_Media_Permission_Request* request, Eina_Bool allowed);
59 * Suspend the operation for user media permission
61 * @param request user media permission request object
63 * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
65 EXPORT_API Eina_Bool ewk_user_media_permission_request_suspend(Ewk_User_Media_Permission_Request* request);
68 * Reply the result about user media permission.
70 * @param request Ewk_User_Media_Permission_Request object to get
71 * the information about user media permission request
72 * @param allow result about user media permission
74 EXPORT_API void ewk_user_media_permission_reply(Ewk_User_Media_Permission_Request* request, Eina_Bool allow);
79 #endif // ewk_user_media_internal_h