aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/pbx.h
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-16 18:24:29 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-16 18:24:29 +0000
commite61903fcf60ee38e6d968a793460292ab186de83 (patch)
tree421e0b496d4bd2074e436c513a30b752557e35c7 /include/asterisk/pbx.h
parent27c6701a34eed39589aa33fcfdaf264bd35fbe7e (diff)
For my next trick I will make it so dialplan functions no longer need to call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75255 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/pbx.h')
-rw-r--r--include/asterisk/pbx.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 70373999e..41dd0d441 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -76,6 +76,7 @@ struct ast_custom_function {
const char *syntax; /*!< Syntax description */
int (*read)(struct ast_channel *, const char *, char *, char *, size_t); /*!< Read function, if read is supported */
int (*write)(struct ast_channel *, const char *, char *, const char *); /*!< Write function, if write is supported */
+ struct ast_module *mod; /*!< Module this custom function belongs to */
AST_RWLIST_ENTRY(ast_custom_function) acflist;
};
@@ -862,9 +863,14 @@ struct ast_custom_function* ast_custom_function_find(const char *name);
int ast_custom_function_unregister(struct ast_custom_function *acf);
/*!
- * \brief Reigster a custom function
+ * \brief Register a custom function
*/
-int ast_custom_function_register(struct ast_custom_function *acf);
+#define ast_custom_function_register(acf) ast_custom_function_register2(acf, ast_module_info->self)
+
+/*!
+ * \brief Register a custom function
+ */
+int ast_custom_function_register2(struct ast_custom_function *acf, struct ast_module *mod);
/*!
* \brief Retrieve the number of active calls