summaryrefslogtreecommitdiff
path: root/include/asterisk/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/file.h')
-rw-r--r--include/asterisk/file.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h
index c17cb327b..1c2c7a84a 100644
--- a/include/asterisk/file.h
+++ b/include/asterisk/file.h
@@ -427,6 +427,18 @@ char *ast_format_str_reduce(char *fmts);
*/
struct ast_format *ast_get_format_for_file_ext(const char *file_ext);
+/*!
+ * \brief Get a suitable filename extension for the given MIME type
+ *
+ * \param mime_type The MIME type for which to find extensions
+ * \param buffer A pointer to a buffer to receive the extension
+ * \param capacity The size of 'buffer' in bytes
+ *
+ * \retval 1 if an extension was found for the provided MIME type
+ * \retval 0 if the MIME type was not found
+ */
+int ast_get_extension_for_mime_type(const char *mime_type, char *buffer, size_t capacity);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif