summaryrefslogtreecommitdiff
path: root/include/asterisk/res_pjproject.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asterisk/res_pjproject.h')
-rw-r--r--include/asterisk/res_pjproject.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/include/asterisk/res_pjproject.h b/include/asterisk/res_pjproject.h
index 2095caed2..8828b340c 100644
--- a/include/asterisk/res_pjproject.h
+++ b/include/asterisk/res_pjproject.h
@@ -19,6 +19,14 @@
#ifndef _RES_PJPROJECT_H
#define _RES_PJPROJECT_H
+/*! \brief Determines whether the res_pjproject module is loaded */
+#define CHECK_PJPROJECT_MODULE_LOADED() \
+ do { \
+ if (!ast_module_check("res_pjproject.so")) { \
+ return AST_MODULE_LOAD_DECLINE; \
+ } \
+ } while(0)
+
/*!
* \brief Retrieve a pjproject build option
*
@@ -43,7 +51,33 @@
* \endcode
*
*/
-int ast_pjproject_get_buildopt(char *option, char *format_string, ...) __attribute__((format(scanf, 2,3)));
+int ast_pjproject_get_buildopt(char *option, char *format_string, ...) __attribute__((format(scanf, 2, 3)));
+
+/*!
+ * \brief Begin PJPROJECT log interception for CLI output.
+ * \since 13.8.0
+ *
+ * \param fd CLI file descriptior to send intercepted output.
+ *
+ * \note ast_pjproject_log_intercept_begin() and
+ * ast_pjproject_log_intercept_end() must always be called
+ * in pairs.
+ *
+ * \return Nothing
+ */
+void ast_pjproject_log_intercept_begin(int fd);
+
+/*!
+ * \brief End PJPROJECT log interception for CLI output.
+ * \since 13.8.0
+ *
+ * \note ast_pjproject_log_intercept_begin() and
+ * ast_pjproject_log_intercept_end() must always be called
+ * in pairs.
+ *
+ * \return Nothing
+ */
+void ast_pjproject_log_intercept_end(void);
/*!
* \brief Increment the res_pjproject reference count.