Remove icon functions 77/165877/1
authorDaeheyon Jung <darrenh.jung@samsung.com>
Thu, 4 Jan 2018 11:39:55 +0000 (20:39 +0900)
committerDaeheyon Jung <darrenh.jung@samsung.com>
Thu, 4 Jan 2018 11:49:12 +0000 (20:49 +0900)
 - Both icon and generic icon are no more used

Change-Id: Iefe185dcaa677e06a0169ae43f7c00b65e14917a
Signed-off-by: Daeheyon Jung <darrenh.jung@samsung.com>
include/mime_type.h
src/mime_type.c

index 1963675..0f5ab16 100755 (executable)
@@ -112,40 +112,6 @@ int mime_type_get_mime_type_for_data(const void *data, size_t len, char **mime_t
 int mime_type_get_mime_type_for_file(const char *file_path, char **mime_type);
 
 /**
- * @brief Gets the icon name for the given MIME type.
- *
- * @since_tizen 4.0
- * @remarks The @a icon must be released with free() by you.
- * @param[in] mime_type The MIME type
- * @param[out] icon The icon name for the given MIME type
- * @return 0 on success, otherwise a negative error value.
- * @retval #MIME_TYPE_ERROR_NONE Successful
- * @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error
- * @see mime_type_get_mime_type()
- */
-int mime_type_get_icon(const char *mime_type, char **icon);
-
-/**
- * @brief Gets the generic icon name for the given MIME type.
- *
- * @since_tizen 4.0
- * @remarks The @a generic_icon must be released with free() by you.
- * @param[in] mime_type The MIME type
- * @param[out] generic_icon The generic icon name for the given MIME type
- * @return 0 on success, otherwise a negative error value.
- * @retval #MIME_TYPE_ERROR_NONE Successful
- * @retval #MIME_TYPE_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MIME_TYPE_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error
- * @see mime_type_get_mime_type()
- */
-int mime_type_get_generic_icon(const char *mime_type, char **generic_icon);
-
-
-
-/**
  * @}
  */
 
index 3e3a110..b04239c 100755 (executable)
@@ -199,50 +199,3 @@ int mime_type_get_mime_type_for_data(const void *data, size_t len, char **mime_t
        return MIME_TYPE_ERROR_NONE;
 }
 
-int mime_type_get_icon(const char *mime_type, char **icon)
-{
-       const char *xdg_icon = NULL;
-
-       if (mime_type == NULL || icon == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
-
-       xdg_icon = xdg_mime_get_icon(mime_type);
-
-       if (xdg_icon == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the icon from the shared MIME database");
-
-       char *icon_dup = NULL;
-
-       icon_dup = strdup(xdg_icon);
-
-       if (icon_dup == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
-
-       *icon = icon_dup;
-
-       return MIME_TYPE_ERROR_NONE;
-}
-
-int mime_type_get_generic_icon(const char *mime_type, char **generic_icon)
-{
-       const char *xdg_icon = NULL;
-
-       if (mime_type == NULL || generic_icon == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_INVALID_PARAMETER, __FUNCTION__, NULL);
-
-       xdg_icon = xdg_mime_get_generic_icon(mime_type);
-
-       if (xdg_icon == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the generic icon from the shared MIME database");
-
-       char *icon_dup = NULL;
-
-       icon_dup = strdup(xdg_icon);
-
-       if (icon_dup == NULL)
-               return mime_type_error(MIME_TYPE_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
-
-       *generic_icon = icon_dup;
-
-       return MIME_TYPE_ERROR_NONE;
-}