diff options
Diffstat (limited to 'include/asterisk/pbx.h')
-rw-r--r-- | include/asterisk/pbx.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h index e8d6507bb..83997b48d 100644 --- a/include/asterisk/pbx.h +++ b/include/asterisk/pbx.h @@ -1,7 +1,7 @@ /* * Asterisk -- An open source telephony toolkit. * - * Copyright (C) 1999 - 2005, Digium, Inc. + * Copyright (C) 1999 - 2006, Digium, Inc. * * Mark Spencer <markster@digium.com> * @@ -88,8 +88,8 @@ struct ast_custom_function { 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 *); + int (*read)(struct ast_channel *, char *, char *, char *, size_t); + int (*write)(struct ast_channel *, char *, char *, const char *); struct ast_custom_function *next; }; @@ -636,25 +636,24 @@ int ast_active_calls(void); /*! executes a read operation on a function */ /*! * \param chan Channel to execute on - * \param in Data containing the function call string + * \param function Data containing the function call string (will be modified) * \param workspace A pointer to safe memory to use for a return value * \param len the number of bytes in workspace + * \return zero on success, non-zero on failure * This application executes an function in read mode on a given channel. - * It returns a pointer to workspace if the buffer contains any new data - * or NULL if there was a problem. - */ + * */ -char *ast_func_read(struct ast_channel *chan, const char *in, char *workspace, size_t len); +int ast_func_read(struct ast_channel *chan, char *function, char *workspace, size_t len); /*! executes a write operation on a function */ /*! * \param chan Channel to execute on - * \param in Data containing the function call string + * \param function Data containing the function call string (will be modified) * \param value A value parameter to pass for writing + * \return zero on success, non-zero on failure * This application executes an function in write mode on a given channel. - * It has no return value. */ -void ast_func_write(struct ast_channel *chan, const char *in, const char *value); +int ast_func_write(struct ast_channel *chan, char *function, const char *value); void ast_hint_state_changed(const char *device); |