Apply internet privilege to webrtc_create() API 04/252004/4
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 21 Jan 2021 11:53:32 +0000 (20:53 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 25 Jan 2021 07:06:31 +0000 (16:06 +0900)
privilege: http://tizen.org/privilege/internet
privilege level: public

[Version] 0.1.87
[Issue Type] Privilege

Change-Id: I31a0015e206a7e27534960c387b3d4e16d2add8d
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/webrtc.h
packaging/capi-media-webrtc.spec
src/webrtc.c

index 1cef52b68bcef916fced7027ccc1ed71e37ce86d..3ad4690fdeb26803a191d4c4625e0d8699fb5c00 100644 (file)
@@ -369,11 +369,14 @@ int webrtc_unset_state_changed_cb(webrtc_h webrtc);
 /**
  * @brief Creates an instance of WebRTC.
  * @since_tizen 6.5
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/internet
  * @remarks You must release @a webrtc using webrtc_destroy().
  * @param[out] webrtc    WebRTC handle
  * @return @c 0 on success,
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_PERMISSION_DENIED Permission denied
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @post @a webrtc state will be #WEBRTC_STATE_IDLE.
index 468c3935f9a9835720fdf075401ed679ec8bfa69..63b6e33a7bd6ebb4021010c6e023133dfa4b0ae1 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.1.86
+Version:    0.1.87
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 8c2c0b34ea0160406749e3af4a8c0f77fbf03ac9..4ac79d1baadd56587ae2ab48bbf2d2b6c48ddc40 100644 (file)
@@ -21,6 +21,8 @@
 #include "webrtc.h"
 #include "webrtc_private.h"
 
+#define _WEBRTC_PRIVILEGE_INTERNET    "http://tizen.org/privilege/internet"
+
 int webrtc_set_error_cb(webrtc_h webrtc, webrtc_error_cb callback, void *user_data)
 {
        webrtc_s *_webrtc = (webrtc_s*)webrtc;
@@ -107,6 +109,7 @@ int webrtc_create(webrtc_h *webrtc)
        webrtc_s *_webrtc = NULL;
 
        RET_VAL_IF(webrtc == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "webrtc is NULL");
+       RET_ERR_IF_PRIVILEGE_IS_NOT_ALLOWED(_WEBRTC_PRIVILEGE_INTERNET);
 
        _webrtc = g_new0(webrtc_s, 1);