Header for providers of file and format handling routines. Clients of these routines should include "asterisk/file.h" instead. More...
Go to the source code of this file.
Data Structures | |
struct | ast_filestream |
This structure is allocated by file.c in one chunk, together with buf_size and desc_size bytes of memory to be used for private purposes (e.g. buffers etc.) More... | |
struct | ast_format |
Each supported file format is described by the following structure. More... | |
Macros | |
#define | ast_format_register(f) __ast_format_register(f, ast_module_info->self) |
Functions | |
int | __ast_format_register (const struct ast_format *f, struct ast_module *mod) |
Register a new file format capability. Adds a format to Asterisk's format abilities. More... | |
int | ast_format_unregister (const char *name) |
Unregisters a file format. More... | |
Header for providers of file and format handling routines. Clients of these routines should include "asterisk/file.h" instead.
Definition in file mod_format.h.
#define ast_format_register | ( | f | ) | __ast_format_register(f, ast_module_info->self) |
Definition at line 131 of file mod_format.h.
Referenced by load_module().
int __ast_format_register | ( | const struct ast_format * | f, |
struct ast_module * | mod | ||
) |
Register a new file format capability. Adds a format to Asterisk's format abilities.
0 | on success |
-1 | on failure |
Definition at line 67 of file file.c.
References ast_calloc, ast_log(), AST_RWLIST_INSERT_HEAD, AST_RWLIST_TRAVERSE, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, ast_format::buf_size, ast_format::exts, f, ast_format::list, LOG_WARNING, ast_format::module, and ast_format::name.
int ast_format_unregister | ( | const char * | name | ) |
Unregisters a file format.
name | the name of the format you wish to unregister Unregisters a format based on the name of the format. |
0 | on success |
-1 | on failure to unregister |
Definition at line 104 of file file.c.
References ast_free, ast_log(), AST_RWLIST_REMOVE_CURRENT, AST_RWLIST_TRAVERSE_SAFE_BEGIN, AST_RWLIST_TRAVERSE_SAFE_END, AST_RWLIST_UNLOCK, AST_RWLIST_WRLOCK, ast_verb, ast_format::list, LOG_WARNING, and ast_format::name.
Referenced by unload_module().