move to a different file (channel.c for the time being) the

wrappers around the basic 'say' functions, and redeclare these
wrappers as ordinary functions rather than function pointers.

This way, alternative implementations of the 'say' functions
will only have to implement the basic functions and not the
wrappers.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-04-19 07:23:22 +00:00
parent 52430bda0d
commit 585e50fb38
3 changed files with 86 additions and 56 deletions

View File

@@ -4219,3 +4219,58 @@ int ast_channel_trylock(struct ast_channel *chan)
}
#endif
/*
* Wrappers for various ast_say_*() functions that call the full version
* of the same functions.
* The proper place would be say.c, but that file is optional and one
* must be able to build asterisk even without it (using a loadable 'say'
* implementation that only supplies the 'full' version of the functions.
*/
int ast_say_number(struct ast_channel *chan, int num,
const char *ints, const char *language, const char *options)
{
return ast_say_number_full(chan, num, ints, language, options, -1, -1);
}
int ast_say_enumeration(struct ast_channel *chan, int num,
const char *ints, const char *language, const char *options)
{
return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
}
int ast_say_digits(struct ast_channel *chan, int num,
const char *ints, const char *lang)
{
return ast_say_digits_full(chan, num, ints, lang, -1, -1);
}
int ast_say_digit_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_character_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_phonetic_str(struct ast_channel *chan, const char *str,
const char *ints, const char *lang)
{
return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
}
int ast_say_digits_full(struct ast_channel *chan, int num,
const char *ints, const char *lang, int audiofd, int ctrlfd)
{
char buf[256];
snprintf(buf, sizeof(buf), "%d", num);
return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
}
/* end of file */