summaryrefslogtreecommitdiff
path: root/include/asterisk/app.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/app.h')
-rw-r--r--include/asterisk/app.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h
index 6d73b7786..e2ec86328 100644
--- a/include/asterisk/app.h
+++ b/include/asterisk/app.h
@@ -84,6 +84,12 @@ struct ast_ivr_menu {
static struct ast_ivr_option __options_##holder[] = foo;\
static struct ast_ivr_menu holder = { title, flags, __options_##holder }
+typedef enum {
+ TIMELEN_HOURS,
+ TIMELEN_MINUTES,
+ TIMELEN_SECONDS,
+ TIMELEN_MILLISECONDS,
+} ast_timelen;
/*! \brief Runs an IVR menu
\return returns 0 on successful completion, -1 on hangup, or -2 on user error in menu */
@@ -580,6 +586,17 @@ int ast_safe_fork(int stop_reaper);
*/
void ast_safe_fork_cleanup(void);
+/*!
+ * \brief Common routine to parse time lengths, with optional time unit specifier
+ * \param[in] timestr String to parse
+ * \param[in] defunit Default unit type
+ * \param[out] result Resulting value, specified in milliseconds
+ * \retval 0 Success
+ * \retval -1 Failure
+ * \since 1.8
+ */
+int ast_app_parse_timelen(const char *timestr, int *result, ast_timelen defunit);
+
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif