remove unused api:modes_action_set_id() accepted/tizen/unified/20200323.172918 submit/tizen/20200323.081203
authorYoungjae Shin <yj99.shin@samsung.com>
Mon, 23 Mar 2020 08:04:49 +0000 (17:04 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Mon, 23 Mar 2020 08:11:27 +0000 (17:11 +0900)
client/mdsc_register_mode.c
include/modes.h
unittest/modes_test_client.cpp

index 011cf08911a36e20a3c60a81c2a92b093470397e..15826bc9a29bc95affc413e61c91e80dcfad5a95 100644 (file)
@@ -128,15 +128,6 @@ API modes_action_h modes_create_action(const char *name, const char *value)
        return action;
 }
 
-API int modes_action_set_id(modes_action_h action, const char *id)
-{
-       RETV_IF(NULL == action, MODES_ERROR_INVALID_PARAMETER);
-       RETV_IF(NULL == id, MODES_ERROR_INVALID_PARAMETER);
-
-       action->id = strdup(id);
-       return MODES_ERROR_NONE;
-}
-
 API int modes_mode_add_action(modes_mode_h mode, modes_action_h action)
 {
        RETV_IF(NULL == mode, MODES_ERROR_INVALID_PARAMETER);
index d93675a60307a2f6364a7dccd014d5f92a3a2377..de20305d3b4feaf053a74d64130efc52a4aea203 100644 (file)
@@ -24,12 +24,10 @@ extern "C" {
 #include <modes_types.h>
 #include <modes_errors.h>
 
-
 /**
  * @file modes.h
  */
 
-
 /**
  * @addtogroup CAPI_MODE_SUPERVISOR_MODULE
  * @{
@@ -149,29 +147,14 @@ int modes_set_hidden(modes_mode_h mode, bool hidden);
  * @since_tizen 6.0
  * @privlevel public
  * @param[out] Action handle pointer to get handle
- * @param[in] Action
+ * @param[in] A name of Action rule
  * @param[in] Value to do action.
  * @return @c 0 on success,
  * @return @c Action handle pointer on success,
  *         otherwise  NULL value
  * @retval NULL Failed to create the action handler
  */
-modes_action_h modes_create_action(const char *name, const char *value);
-
-
-/**
- * @brief Add Action to Mode.
- * @details Calls this function to set ID to action.
- * @since_tizen 6.0
- * @privlevel public
- * @param[in] Action handle
- * @param[in] Action id
- * @return @c 0 on success,
- *         otherwise a negative error value
- * @retval #MODES_ERROR_NONE Successful
- * @retval #MODES_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int modes_action_set_id(modes_action_h action, const char *id);
+modes_action_h modes_create_action(const char *rule, const char *value);
 
 /**
  * @brief Add Action to Mode.
@@ -212,7 +195,6 @@ int modes_register_mode(modes_h handle, modes_mode_h mode);
  */
 void modes_destroy_mode(modes_mode_h mode);
 
-
 /**
  * @brief Specifies the type of function passed to modes_noti_connect().
  * @details When the Modes apply/undo a mode, it is called, immediately.
@@ -317,10 +299,8 @@ int modes_get_mode_state(mode_list_data_h data);
  * @}
  */
 
-
 #ifdef __cplusplus
 }
 #endif
 
-
 #endif //__MODE_SUPERVISOR_H__
index 9c4d6e1af2a1e5f95c216d7ab98df57437260d29..5b024c110566c99af8f64d0fbe5a24e769133c23 100644 (file)
@@ -58,9 +58,7 @@ protected:
                modes_mode_h created_mode = modes_create_mode("created", MODES_TYPE_MODE_NORMAL);
                modes_action_h action_handle[2];
                action_handle[0] = modes_create_action("test.printBool", "on");
-               modes_action_set_id(action_handle[0], "printBoolOn");
                action_handle[1] = modes_create_action("test.printBool", "off");
-               modes_action_set_id(action_handle[1], "printBoolOff");
 
                for (int i = 0; i < 2; i++) {
                        result = modes_mode_add_action(created_mode, action_handle[i]);