diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-24 04:58:44 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2009-11-24 04:58:44 +0000 |
commit | 0bccc4fbe6de5aa963720aab43f8d58ec656b4b2 (patch) | |
tree | 9f78f8f885cc6d087031088bce9c25bac65f2f4d /include | |
parent | 606276ec483aabb9aea47e56ffb6c90792d3b617 (diff) |
Add REPLACE & PASSTHRU functions, overhaul of func_strings, fix API docs for the ast_get_encoded_* functions.
* Add REPLACE function, which searches a given variable for a set of
characters and replaces each with a given character.
* Add PASSTHRU function, which passes a literal string back, like a NoOp for
functions. Intent is to be able to specify a literal string to another
function that takes a variable name as an argument.
* Let the array manipulation functions work with dialplan functions, in
addition to variables. This allows the array manipulation functions to
modify ASTDB and ODBC backends, assuming the func_odbc configuration has
both read and write functions.
(closes issue #15223)
Reported by: ajohnson
Patches:
20091112__issue15223.diff.txt uploaded by tilghman (license 14)
Tested by: lmadsen, tilghman
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@230994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/app.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/asterisk/app.h b/include/asterisk/app.h index bdf0ae4aa..a7c0730e9 100644 --- a/include/asterisk/app.h +++ b/include/asterisk/app.h @@ -555,12 +555,21 @@ int ast_app_dtget(struct ast_channel *chan, const char *context, char *collect, /*! \brief Allow to record message and have a review option */ int ast_record_review(struct ast_channel *chan, const char *playfile, const char *recordfile, int maxtime, const char *fmt, int *duration, const char *path); -/*! \brief Decode an encoded control or extended ASCII character - \return Returns a pointer to the result string -*/ +/*!\brief Decode an encoded control or extended ASCII character + * \param[in] stream String to decode + * \param[out] result Decoded character + * \param[out] consumed Number of characters used in stream to encode the character + * \retval -1 Stream is of zero length + * \retval 0 Success + */ int ast_get_encoded_char(const char *stream, char *result, size_t *consumed); -/*! \brief Decode a stream of encoded control or extended ASCII characters */ +/*!\brief Decode a stream of encoded control or extended ASCII characters + * \param[in] stream Encoded string + * \param[out] result Decoded string + * \param[in] result_len Maximum size of the result buffer + * \return A pointer to the result string + */ char *ast_get_encoded_str(const char *stream, char *result, size_t result_len); /*! \brief Decode a stream of encoded control or extended ASCII characters */ |