diff options
author | hj kim <backto.kim@samsung.com> | 2018-03-08 11:06:19 +0900 |
---|---|---|
committer | hj kim <backto.kim@samsung.com> | 2018-03-09 08:31:10 +0900 |
commit | 67b9bee42ff92a8bb897bcdfa52029cf4beb3087 (patch) | |
tree | 0f5f9c43a56d4527dd9b1161466f5918c6f2fa4a | |
parent | 4a270c8a46467ede047bfa9f7933a6acf65275c1 (diff) | |
download | media-controller-67b9bee42ff92a8bb897bcdfa52029cf4beb3087.tar.gz media-controller-67b9bee42ff92a8bb897bcdfa52029cf4beb3087.tar.bz2 media-controller-67b9bee42ff92a8bb897bcdfa52029cf4beb3087.zip |
[ACR-1172] Add repeat mode for one mediasubmit/tizen/20180313.014139submit/tizen/20180312.020434accepted/tizen/unified/20180315.061319
Change-Id: I6014c25574f744d56574dce02cc33f01ec6163dc
-rwxr-xr-x | include/media_controller_type.h | 3 | ||||
-rwxr-xr-x | src/media_controller_client.c | 2 | ||||
-rwxr-xr-x | src/media_controller_server.c | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/include/media_controller_type.h b/include/media_controller_type.h index 454c4ff..63fddec 100755 --- a/include/media_controller_type.h +++ b/include/media_controller_type.h @@ -129,8 +129,9 @@ typedef enum { * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { - MC_REPEAT_MODE_ON = 0, /**< Repeat mode on */ + MC_REPEAT_MODE_ON = 0, /**< Repeat mode on for all media*/ MC_REPEAT_MODE_OFF, /**< Repeat mode off */ + MC_REPEAT_MODE_ONE_MEDIA, /**< Repeat mode on for one media (Since 5.0)*/ } mc_repeat_mode_e; /** diff --git a/src/media_controller_client.c b/src/media_controller_client.c index d2f142c..d886af6 100755 --- a/src/media_controller_client.c +++ b/src/media_controller_client.c @@ -1054,7 +1054,7 @@ int mc_client_send_repeat_mode_command(mc_client_h client, const char *server_na mc_retvm_if(mc_client == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL"); mc_retvm_if(!MC_STRING_VALID(server_name), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Invalid server_name"); - mc_retvm_if(((repeat_mode < MC_REPEAT_MODE_ON) || (repeat_mode > MC_REPEAT_MODE_OFF)), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "repeat is invalid"); + mc_retvm_if(((repeat_mode < MC_REPEAT_MODE_ON) || (repeat_mode > MC_REPEAT_MODE_ONE_MEDIA)), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "repeat is invalid [%d]", repeat_mode); ret = mc_db_check_server_table_exist(mc_client->db_handle, server_name, &exist_server); mc_retvm_if(ret != MEDIA_CONTROLLER_ERROR_NONE, ret, "Error mc_db_check_server_table_exist [%d]", ret); diff --git a/src/media_controller_server.c b/src/media_controller_server.c index a422ce6..fd53f1e 100755 --- a/src/media_controller_server.c +++ b/src/media_controller_server.c @@ -425,11 +425,7 @@ int mc_server_update_repeat_mode(mc_server_h server, mc_repeat_mode_e mode) media_controller_server_s *mc_server = (media_controller_server_s *)server; mc_retvm_if(mc_server == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL"); - - if ((mode != MC_REPEAT_MODE_ON) && (mode != MC_REPEAT_MODE_OFF)) { - mc_error("Invalid repeat mode [%d]", mode); - return MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER; - } + mc_retvm_if(((mode < MC_REPEAT_MODE_ON) || (mode > MC_REPEAT_MODE_ONE_MEDIA)), MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "repeat is invalid [%d]", mode); mc_debug("repeat mode %d", mode); |