mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-29 15:36:13 +00:00
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
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user