* @retval #MIME_TYPE_ERROR_IO_ERROR Internal I/O error
* @see mime_type_get_mime_type()
*/
-int mime_type_get_file_extension(const char *mime_type, char *** file_extension, int *length);
+int mime_type_get_file_extension(const char *mime_type, char ***file_extension, int *length);
/**
* @brief Gets the MIME type for the given data.
* @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);
+int mime_type_get_icon(const char *mime_type, char **icon);
/**
* @brief Gets the generic icon name for the given MIME type.
#define FILE_EXTENSION_DELIMITER '.'
-static const char* mime_type_error_to_string(mime_type_error_e error)
+static const char *mime_type_error_to_string(mime_type_error_e error)
{
switch (error) {
case MIME_TYPE_ERROR_NONE:
}
}
-static int mime_type_error(mime_type_error_e error, const char* function, const char *description)
+static int mime_type_error(mime_type_error_e error, const char *function, const char *description)
{
if (description)
LOGE("[%s] %s(0x%08x) : %s", function, mime_type_error_to_string(error), error, description);
return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the shared MIME database");
}
- char * mime_type_dup = NULL;
+ char *mime_type_dup = NULL;
mime_type_dup = strdup(xdg_mime_type);
return MIME_TYPE_ERROR_NONE;
}
-int mime_type_get_file_extension(const char *mime_type, char *** file_extension, int *length)
+int mime_type_get_file_extension(const char *mime_type, char ***file_extension, int *length)
{
const char **xdg_file_extension = NULL;
int xdg_file_extension_length = 0;
while (xdg_file_extension[xdg_file_extension_length] != NULL)
xdg_file_extension_length++;
- file_extension_array = calloc(xdg_file_extension_length, sizeof(char*));
+ file_extension_array = calloc(xdg_file_extension_length, sizeof(char *));
if (file_extension_array == NULL)
return mime_type_error(MIME_TYPE_ERROR_OUT_OF_MEMORY, __FUNCTION__, NULL);
return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the shared MIME database");
}
- char * mime_type_dup = NULL;
+ char *mime_type_dup = NULL;
mime_type_dup = strdup(xdg_mime_type);
return mime_type_error(MIME_TYPE_ERROR_IO_ERROR, __FUNCTION__, "failed to get the mime type from the sahred MIME database");
}
- char * mime_type_dup = NULL;
+ char *mime_type_dup = NULL;
mime_type_dup = strdup(xdg_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;
+ char *icon_dup = NULL;
icon_dup = strdup(xdg_icon);
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;
+ char *icon_dup = NULL;
icon_dup = strdup(xdg_icon);