webrtc : improve api description 78/254978/6
authorhj kim <backto.kim@samsung.com>
Thu, 11 Mar 2021 05:59:36 +0000 (14:59 +0900)
committerhj kim <backto.kim@samsung.com>
Mon, 15 Mar 2021 07:37:58 +0000 (16:37 +0900)
add missing error codes and webrtc state.
remove unnecessary error codes.

[Version] 0.1.126
[Issue Type] Improvement

Change-Id: I573ec8475cb49cd0e87a11c2f535661cf711218c

include/webrtc.h
packaging/capi-media-webrtc.spec

index f1435efe837734ee0954140ea20f26994b5a6d48..f625c3466568f1d5bac4d0a3f7010138c22bc6bc 100644 (file)
@@ -402,6 +402,7 @@ int webrtc_unset_state_changed_cb(webrtc_h webrtc);
  * @return @c 0 on success,
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE Successful
+ * @retval #WEBRTC_ERROR_NOT_SUPPORTED Not supported
  * @retval #WEBRTC_ERROR_PERMISSION_DENIED Permission denied
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
@@ -420,6 +421,7 @@ int webrtc_create(webrtc_h *webrtc);
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
+ * @retval #WEBRTC_ERROR_RESOURCE_FAILED Resource failed
  * @pre webrtc_ice_candidate_cb() must be set by calling webrtc_set_ice_candidate_cb().
  * @pre webrtc_media_packet_source_set_format() must be called if @a webrtc has a media packet source.
  * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
@@ -437,8 +439,8 @@ int webrtc_start(webrtc_h webrtc);
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
+ * @retval #WEBRTC_ERROR_RESOURCE_FAILED Resource failed
  * @pre @a webrtc state must be set to #WEBRTC_STATE_NEGOTIATING or #WEBRTC_STATE_PLAYING.
  * @post @a webrtc state will be #WEBRTC_STATE_IDLE.
  * @see webrtc_create()
@@ -454,8 +456,6 @@ int webrtc_stop(webrtc_h webrtc);
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
  * @see webrtc_create()
  */
 int webrtc_destroy(webrtc_h webrtc);
@@ -469,7 +469,6 @@ int webrtc_destroy(webrtc_h webrtc);
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @see #webrtc_state_e
  */
 int webrtc_get_state(webrtc_h webrtc, webrtc_state_e *state);
@@ -678,7 +677,6 @@ int webrtc_get_stun_server(webrtc_h webrtc, char **stun_server);
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
  * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
  * @post webrtc_negotiation_needed_cb() will be invoked.
@@ -696,6 +694,8 @@ int webrtc_set_negotiation_needed_cb(webrtc_h webrtc, webrtc_negotiation_needed_
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
+ * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
  * @see webrtc_set_negotiation_needed_cb()
  */
 int webrtc_unset_negotiation_needed_cb(webrtc_h webrtc);
@@ -710,7 +710,6 @@ int webrtc_unset_negotiation_needed_cb(webrtc_h webrtc);
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
  * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
  * @post webrtc_ice_candidate_cb() will be invoked.
@@ -728,6 +727,8 @@ int webrtc_set_ice_candidate_cb(webrtc_h webrtc, webrtc_ice_candidate_cb callbac
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
+ * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
  * @see webrtc_set_ice_candidate_cb()
  */
 int webrtc_unset_ice_candidate_cb(webrtc_h webrtc);
@@ -948,6 +949,8 @@ int webrtc_set_data_channel_cb(webrtc_h webrtc, webrtc_data_channel_cb callback,
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #WEBRTC_ERROR_INVALID_STATE Invalid state
+ * @pre @a webrtc state must be set to #WEBRTC_STATE_IDLE.
  * @see webrtc_set_data_channel_cb()
  */
 int webrtc_unset_data_channel_cb(webrtc_h webrtc);
@@ -1144,7 +1147,6 @@ int webrtc_data_channel_send_bytes(webrtc_data_channel_h channel, const char *da
  *         otherwise a negative error value
  * @retval #WEBRTC_ERROR_NONE    Successful
  * @retval #WEBRTC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WEBRTC_ERROR_INVALID_OPERATION Invalid operation
  * @see webrtc_data_channel_message_cb()
  */
 int webrtc_get_data(webrtc_bytes_data_h bytes, const char **data, unsigned int *size);
index 1451356e6af87ca4948ec6a2c2202ddd9b24f823..af250695bf90128819697c267b21108aa90fc3d6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-webrtc
 Summary:    A WebRTC library in Tizen Native API
-Version:    0.1.125
+Version:    0.1.126
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0