Delete unused apis 78/199878/1
authorpr.jung <pr.jung@samsung.com>
Fri, 15 Feb 2019 06:35:03 +0000 (15:35 +0900)
committerpr.jung <pr.jung@samsung.com>
Fri, 15 Feb 2019 06:35:03 +0000 (15:35 +0900)
- feedback_get_resource_path
- feedback_set_resource_path

Change-Id: I33b0290b29cec9a9c839068a190fbd0387c379e5
Signed-off-by: pr.jung <pr.jung@samsung.com>
include/feedback-internal.h
src/feedback.c

index 939f1af..188e104 100644 (file)
@@ -106,54 +106,6 @@ int feedback_play_internal(feedback_pattern_internal_e pattern);
 int feedback_play_type_internal(feedback_type_e type, feedback_pattern_internal_e pattern);
 
 /**
- * @brief Gets the file path of resource for the given feedback type and pattern.
- * @details
- * Depending on the type of each pattern resouorce has a different format. \n
- * Currently, System supports two pattern types. \n
- * #FEEDBACK_TYPE_SOUND type uses .wav format. \n
- * #FEEDBACK_TYPE_VIBRATION type uses monotone format. \n
- * If the given pattern doesn't have a file for the type, @a path will return NULL.
- *
- * @since_tizen 2.3
- *
- * @remarks @a path must be released with free() by you.
- *
- * @param[in]  type      The pattern type
- * @param[in]  pattern   The pre-defined pattern
- * @param[out] path      The file path of resource for feedback type and pattern
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #FEEDBACK_ERROR_NONE               Successful
- * @retval #FEEDBACK_ERROR_INVALID_PARAMETER  Invalid parameter
- * @retval #FEEDBACK_ERROR_OPERATION_FAILED   Operation failed
- * @retval #FEEDBACK_ERROR_NOT_SUPPORTED      Not supported device
- */
-int feedback_get_resource_path(feedback_type_e type, feedback_pattern_e pattern, char **path);
-
-/**
- * @brief Sets the new file path of resource for the given feedback type and pattern.
- * @details
- * Depending on the type of each pattern resouorce has a different format. \n
- * Currently, System supports two pattern types. \n
- * #FEEDBACK_TYPE_SOUND type uses .wav format. \n
- * #FEEDBACK_TYPE_VIBRATION type uses monotone format. \n
- * If the given pattern doesn't have a file for the type, @a path will return NULL.
- *
- * @since_tizen 2.3
- *
- * @param[in]  type      The pattern type
- * @param[in]  pattern   The pre-defined pattern
- * @param[in]  path      The new file path of resource for feedback type and pattern
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #FEEDBACK_ERROR_NONE               Successful
- * @retval #FEEDBACK_ERROR_INVALID_PARAMETER  Invalid parameter
- * @retval #FEEDBACK_ERROR_OPERATION_FAILED   Operation failed
- * @retval #FEEDBACK_ERROR_NOT_SUPPORTED      Not supported device
- */
-int feedback_set_resource_path(feedback_type_e type, feedback_pattern_e pattern, char *path);
-
-/**
  * @}
  */
 
index 8e4b931..f847cb9 100644 (file)
@@ -444,74 +444,3 @@ API int feedback_play_type_internal(feedback_type_e type, feedback_pattern_inter
 
        return FEEDBACK_ERROR_NONE;
 }
-
-API int feedback_get_resource_path(feedback_type_e type, feedback_pattern_e pattern, char** path)
-{
-       const struct device_ops *dev;
-       char buf[PATH_MAX] = {0,};
-       int err;
-
-       if (path == NULL) {
-               _E("Invalid parameter : path(NULL)");
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       if (type <= FEEDBACK_TYPE_NONE ||
-           type >= profile->max_type) {
-               _E("Invalid parameter : type(%d)", type);
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       if (type == FEEDBACK_TYPE_VIBRATION)
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-
-       if (pattern <= FEEDBACK_PATTERN_NONE ||
-           pattern >= profile->max_pattern) {
-               _E("Invalid parameter : pattern(%d)", pattern);
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       /* proper device get path */
-       dev = find_device(type);
-       if (dev) {
-               err = dev->get_path(pattern, buf, sizeof(buf));
-               if (err < 0)
-                       return FEEDBACK_ERROR_OPERATION_FAILED;
-       }
-
-       *path = strdup(buf);
-       return FEEDBACK_ERROR_NONE;
-}
-
-API int feedback_set_resource_path(feedback_type_e type, feedback_pattern_e pattern, char *path)
-{
-       const struct device_ops *dev;
-       int err;
-
-       if (type <= FEEDBACK_TYPE_NONE ||
-           type >= profile->max_type) {
-               _E("Invalid parameter : type(%d)", type);
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       if (pattern <= FEEDBACK_PATTERN_NONE ||
-           pattern >= profile->max_pattern) {
-               _E("Invalid parameter : pattern(%d)", pattern);
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       if (type == FEEDBACK_TYPE_VIBRATION) {
-               _E("Not supported type"); //LCOV_EXCL_LINE
-               return FEEDBACK_ERROR_INVALID_PARAMETER;
-       }
-
-       /* proper device set path */
-       dev = find_device(type);
-       if (dev) {
-               err = dev->set_path(pattern, path);
-               if (err < 0)
-                       return FEEDBACK_ERROR_OPERATION_FAILED;
-       }
-
-       return FEEDBACK_ERROR_NONE;
-}