diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/file.h | 28 | ||||
-rw-r--r-- | include/asterisk/options.h | 2 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 3 |
3 files changed, 33 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h index c71866ead..01e5797f5 100644 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -138,6 +138,34 @@ int ast_filedelete(const char *filename, const char *fmt); int ast_filecopy(const char *oldname, const char *newname, const char *fmt); /*! + * \brief Callback called for each file found when reading directories + * \param dir_name the name of the directory + * \param filename the name of the file + * \param obj user data object + * \return non-zero to stop reading, otherwise zero to continue + */ +typedef int (*ast_file_on_file)(const char *dir_name, const char *filename, void *obj); + +/*! + * \brief Recursively iterate through files and directories up to max_depth + * \param dir_name the name of the directory to search + * \param on_file callback called on each file + * \param obj user data object + * \param max_depth re-curse into sub-directories up to a given maximum (-1 = infinite) + * \return -1 or errno on failure, otherwise 0 + */ +int ast_file_read_dirs(const char *dir_name, ast_file_on_file on_file, void *obj, int max_depth); + +/*! + * \brief Iterate over each file in a given directory + * \param dir_name the name of the directory to search + * \param on_file callback called on each file + * \param obj user data object + * \return -1 or errno on failure, otherwise 0 + */ +#define ast_file_read_dir(dir_name, on_file, obj) ast_file_read_dirs(dir_name, on_file, obj, 1) + +/*! * \brief Waits for a stream to stop or digit to be pressed * \param c channel to waitstream on * \param breakon string of DTMF digits to break upon diff --git a/include/asterisk/options.h b/include/asterisk/options.h index 0da5799ae..21bd7a704 100644 --- a/include/asterisk/options.h +++ b/include/asterisk/options.h @@ -155,6 +155,8 @@ extern int dahdi_chan_name_len; extern int ast_language_is_prefix; +extern unsigned int ast_option_rtpptdynamic; + #if defined(__cplusplus) || defined(c_plusplus) } #endif diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index b7be5e8f4..24af05693 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -84,6 +84,9 @@ extern "C" { /*! First dynamic RTP payload type */ #define AST_RTP_PT_FIRST_DYNAMIC 96 +/*! Last reassignable RTP payload type */ +#define AST_RTP_PT_LAST_REASSIGN 63 + /*! Maximum number of generations */ #define AST_RED_MAX_GENERATION 5 |