From: hj kim Date: Thu, 11 Mar 2021 05:59:36 +0000 (+0900) Subject: webrtc : improve api description X-Git-Tag: submit/tizen/20210729.023123~115 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5a2ff2b1fb7be7f14e494c80c192cfa20765d54;p=platform%2Fcore%2Fapi%2Fwebrtc.git webrtc : improve api description add missing error codes and webrtc state. remove unnecessary error codes. [Version] 0.1.126 [Issue Type] Improvement Change-Id: I573ec8475cb49cd0e87a11c2f535661cf711218c --- diff --git a/include/webrtc.h b/include/webrtc.h index f1435efe..f625c346 100644 --- a/include/webrtc.h +++ b/include/webrtc.h @@ -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); diff --git a/packaging/capi-media-webrtc.spec b/packaging/capi-media-webrtc.spec index 1451356e..af250695 100644 --- a/packaging/capi-media-webrtc.spec +++ b/packaging/capi-media-webrtc.spec @@ -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