From: jiyong.min Date: Mon, 25 May 2020 05:40:07 +0000 (+0900) Subject: [ACR-1561] Add new result code and playback states X-Git-Tag: accepted/tizen/unified/20200619.004556~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F52%2F234352%2F22;p=platform%2Fcore%2Fapi%2Fmedia-controller.git [ACR-1561] Add new result code and playback states Change-Id: I793466c7ea94a6d719fdf8a4ff38329c6d1ad9ef --- diff --git a/include/media_controller_client.h b/include/media_controller_client.h index ab7da14..b96bdf6 100644 --- a/include/media_controller_client.h +++ b/include/media_controller_client.h @@ -256,7 +256,7 @@ typedef bool (*mc_activated_server_cb)(const char *server_name, void *user_data) * * @param[in] server_name The app_id of the media controller server which sent the reply * @param[in] request_id The id of the command request - * @param[in] result_code The result code of the action + * @param[in] result_code The result code of the action, @a mc_result_code_e since 6.0 * @param[in] data The extra data * @param[in] user_data The user data passed from the mc_client_set_cmd_reply_received_cb() function * @@ -1324,7 +1324,7 @@ int mc_client_unset_custom_event_received_cb(mc_client_h client); * @param[in] client The handle of the media controller client * @param[in] server_name The app_id of the media controller server * @param[in] request_id The id of the event request, received in the mc_client_set_custom_event_received_cb() function - * @param[in] result_code The result code of custom event + * @param[in] result_code The result code of custom event, @a mc_result_code_e since 6.0 * @param[in] data The extra data * @return @c 0 on success, * otherwise a negative error value diff --git a/include/media_controller_server.h b/include/media_controller_server.h index 2dcc69c..0aad0d4 100755 --- a/include/media_controller_server.h +++ b/include/media_controller_server.h @@ -201,7 +201,7 @@ typedef bool (*mc_activated_client_cb)(const char *client_name, void *user_data) * * @param[in] client_name The app_id of the media controller client * @param[in] request_id The id of the event request - * @param[in] result_code The result code of the event + * @param[in] result_code The result code of the event, @a mc_result_code_e since 6.0 * @param[in] data The extra data * @param[in] user_data The user data passed from the mc_server_set_event_reply_received_cb() function * @@ -1265,7 +1265,7 @@ int mc_server_unset_display_rotation_cmd_received_cb(mc_server_h server); * @param[in] server The handle to media controller server * @param[in] client_name The app_id of the media controller client * @param[in] request_id The id of the command request, received in the mc_server_custom_cmd_received_cb() function - * @param[in] result_code The result code of custom command + * @param[in] result_code The result code of custom command, @a mc_result_code_e since 6.0 * @param[in] data The extra data * @return @c 0 on success, * otherwise a negative error value diff --git a/include/media_controller_type.h b/include/media_controller_type.h index 5f55257..31124e1 100755 --- a/include/media_controller_type.h +++ b/include/media_controller_type.h @@ -136,6 +136,9 @@ typedef enum { MC_PLAYBACK_STATE_MOVING_TO_PREVIOUS, /**< Moving to the previous item (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) */ MC_PLAYBACK_STATE_FAST_FORWARDING, /**< Fast forwarding (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) */ MC_PLAYBACK_STATE_REWINDING, /**< Rewinding (Since @if MOBILE 4.0 @elseif WEARABLE 5.0 @endif) */ + MC_PLAYBACK_STATE_CONNECTING, /**< Connecting (Since 6.0) */ + MC_PLAYBACK_STATE_BUFFERING, /**< Buffering (Since 6.0) */ + MC_PLAYBACK_STATE_ERROR, /**< Error (Since 6.0) */ } mc_playback_states_e; /** @@ -299,6 +302,34 @@ typedef enum { MC_DISPLAY_ROTATION_270 = 1 << 3, /**< Display is rotated 270 degrees */ } mc_display_rotation_e; + +/** + * @brief The result codes of the reply for the command or the event. + * @since_tizen 6.0 + * + * @see mc_cmd_reply_received_cb() + * @see mc_client_send_event_reply() + * @see mc_server_event_reply_received_cb() + * @see mc_server_send_cmd_reply() + */ +typedef enum { + MC_RESULT_CODE_SUCCESS, /**< The command or the event has been successfully completed. */ + MC_RESULT_CODE_ALREADY_DONE = 200, /**< The command or the event had already been completed. */ + MC_RESULT_CODE_ABORTED = 300, /**< The command or the event is aborted by some external event (e.g. aborted play command by incoming call). */ + MC_RESULT_CODE_DENIED, /**< The command or the event is denied due to application policy (e.g. cannot rewind in recording). */ + MC_RESULT_CODE_NOT_SUPPORTED, /**< The command or the event is not supported. */ + MC_RESULT_CODE_INVALID, /**< The command or the event is out of supported range or the limit is reached. */ + MC_RESULT_CODE_TIMEOUT = 400, /**< Timeout has occurred. */ + MC_RESULT_CODE_APP_FAILED, /**< The application has failed. */ + MC_RESULT_CODE_NO_MEDIA, /**< The command or the event has failed because the application has no media. */ + MC_RESULT_CODE_NO_AUDIO_OUTPUT_DEVICE, /**< The command or the event has failed because there is no audio output device. */ + MC_RESULT_CODE_NO_PEER, /**< The command or the event has failed because there is no peer. */ + MC_RESULT_CODE_NETWORK_FAILED = 500, /**< The network has failed. */ + MC_RESULT_CODE_NO_ACCOUNT = 600, /**< The application needs to have an account to which it's logged in. */ + MC_RESULT_CODE_LOGIN_FAILED, /**< The application could not log in. */ + MC_RESULT_CODE_UNKNOWN = 0xFFFFFFFF, /**< Unknown error. */ +} mc_result_code_e; + /** * @} */