diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-21 20:28:32 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-21 20:28:32 +0000 |
commit | fd45704e44c7607442a4c4f7f3ad15a703e2841e (patch) | |
tree | afa0bc4a9718214b473e0ee1a40981e66fbeb85d /include | |
parent | 6c864f19d698a93c0b6242c63bb6ac61111a68b3 (diff) |
move wait_and_stream to ast_wait_and_stream() because equivalent
code is replicated in way too many places not to have a global
function for that.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22075 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/file.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asterisk/file.h b/include/asterisk/file.h index f8ac14b04..395b41c5d 100644 --- a/include/asterisk/file.h +++ b/include/asterisk/file.h @@ -162,6 +162,14 @@ int ast_format_unregister(const char *name); */ int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang); +/* + * if the file name is non-empty, try to play it. + * Return 0 if success, -1 if error, digit if interrupted by a digit. + * If digits == "" then we can simply check for non-zero. + */ +int ast_stream_and_wait(struct ast_channel *chan, const char *file, + const char *language, const char *digits); + /*! Stops a stream */ /*! * \param c The channel you wish to stop playback on |