summaryrefslogtreecommitdiff
path: root/include/asterisk/file.h
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2018-05-03 10:50:51 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2018-05-03 10:50:51 -0500
commit0565a6c909dff12f02838e23e3984463cbd7da70 (patch)
tree3f28d4ba1756834371e6aadb497978577ef4a591 /include/asterisk/file.h
parente538fc8e86bece8b562cc678ab2c4bcf3978d8e6 (diff)
parent0827d5cc53c2609231c4ef9bc92f321f258c4af2 (diff)
Merge "Add the ability to read the media file type from HTTP header for playback"
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