diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-05 05:39:33 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2005-05-05 05:39:33 +0000 |
commit | 4d2537ae1136e6885c3b1214ebed6ccab2bdbec2 (patch) | |
tree | d1f6c678019f87fb5730998dc62af2c209dc66d6 /include | |
parent | e8bd5968ff53cd8e2acc82c4f80902bc0c404d54 (diff) |
major re-work of dialplan functions, including:
- locking of functions list during registration/unregistration/searching
- rename of function description structure to be consistent with the rest of the API
- addition of 'desc' element to description structure, for detailed description (like applications)
- addition of 'show function' CLI command to show function details
- conversion of existing functions to use uppercase names to match policy
- creation of new 'pbx_functions.so' module to contain standard 'builtin' functions
- removal of all builtin functions from pbx.c and apps and placement into new 'funcs' directory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/pbx.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index 4c9677639..07d8fbbaa 100755 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -53,14 +53,15 @@ typedef int (*ast_state_cb_type)(char *context, char* id, int state, void *data) typedef int (*ast_devstate_cb_type)(const char *dev, int state, void *data); -/*! Data structure associated with an asterisk custom function */ -struct ast_custom_function_obj { +/*! Data structure associated with a custom function */ +struct ast_custom_function { char *name; + char *synopsis; char *desc; char *syntax; char *(*read)(struct ast_channel *, char *, char *, char *, size_t); void (*write)(struct ast_channel *, char *, char *, const char *); - struct ast_custom_function_obj *next; + struct ast_custom_function *next; }; /*! Data structure associated with an asterisk switch */ @@ -597,9 +598,10 @@ int ast_goto_if_exists(struct ast_channel *chan, char* context, char *exten, int int ast_parseable_goto(struct ast_channel *chan, const char *goto_string); int ast_explicit_goto(struct ast_channel *chan, const char *context, const char *exten, int priority); int ast_async_goto_if_exists(struct ast_channel *chan, char* context, char *exten, int priority); -struct ast_custom_function_obj* ast_custom_function_find_obj(char *name); -int ast_custom_function_unregister(struct ast_custom_function_obj *acf); -int ast_custom_function_register(struct ast_custom_function_obj *acf); + +struct ast_custom_function* ast_custom_function_find(char *name); +int ast_custom_function_unregister(struct ast_custom_function *acf); +int ast_custom_function_register(struct ast_custom_function *acf); #if defined(__cplusplus) || defined(c_plusplus) } |