From 96bf384e7d84291c40dcbe2e26e16af1c5a974c1 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sun, 12 Feb 2006 04:28:58 +0000 Subject: major dialplan functions update deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/pbx.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'include/asterisk/pbx.h') 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 * @@ -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); -- cgit v1.2.3