Codename Pineapple

Home page | Mailing list | Docs

Last updated: Sat Feb 3 05:01:49 2007

Asterisk developer's documentation :: Codename Pineapple


say.h File Reference


Detailed Description

Say numbers and dates (maybe words one day too).

Definition in file say.h.

#include "asterisk/channel.h"
#include "asterisk/file.h"
#include <time.h>

Include dependency graph for say.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SAY_EXTERN   extern
#define SAY_INIT(x)
 The basic ast_say_* functions are implemented as function pointers, initialized to the function say_stub() which simply returns an error. Other interfaces, declared here as regular functions, are simply wrappers around the basic functions.

Functions

int ast_say_character_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
int ast_say_digit_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
int ast_say_digits (struct ast_channel *chan, int num, const char *ints, const char *lang)
int ast_say_digits_full (struct ast_channel *chan, int num, const char *ints, const char *lang, int audiofd, int ctrlfd)
int ast_say_enumeration (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
int ast_say_number (struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options)
int ast_say_phonetic_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)

Variables

SAY_EXTERN int(* ast_say_character_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full)
SAY_EXTERN int(* ast_say_date )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_date)
SAY_EXTERN int(* ast_say_date_with_format )(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format)
SAY_EXTERN int(* ast_say_datetime )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime)
SAY_EXTERN int(* ast_say_datetime_from_now )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime_from_now)
SAY_EXTERN int(* ast_say_digit_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_digit_str_full)
SAY_EXTERN int(* ast_say_enumeration_full )(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_enumeration_full)
SAY_EXTERN int(* ast_say_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_full)
SAY_EXTERN int(* ast_say_number_full )(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_number_full)
SAY_EXTERN int(* ast_say_phonetic_str_full )(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_phonetic_str_full)
SAY_EXTERN int(* ast_say_time )(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_time)


Define Documentation

#define SAY_EXTERN   extern
 

Definition at line 66 of file say.h.

#define SAY_INIT  ) 
 

The basic ast_say_* functions are implemented as function pointers, initialized to the function say_stub() which simply returns an error. Other interfaces, declared here as regular functions, are simply wrappers around the basic functions.

An implementation of the basic ast_say functions (e.g. from say.c or from a dynamically loaded module) will just have to reassign the pointers to the relevant functions to override the previous implementation.

Todo:
XXX As the conversion from the old implementation of say.c to the new implementation will be completed, and the API suitably reworked by removing redundant functions and/or arguments, this mechanism may be reverted back to pure static functions, if needed.

Definition at line 65 of file say.h.


Function Documentation

int ast_say_character_str struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang
 

Definition at line 4696 of file channel.c.

References ast_say_character_str_full.

Referenced by pbx_builtin_saycharacters().

04698 {
04699         return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
04700 }

int ast_say_digit_str struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang
 

Definition at line 4690 of file channel.c.

References ast_say_digit_str_full.

Referenced by mgcp_ss(), pbx_builtin_saydigits(), and ss_thread().

04692 {
04693         return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
04694 }

int ast_say_digits struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang
 

Definition at line 4684 of file channel.c.

References ast_say_digits_full().

04686 {
04687         return ast_say_digits_full(chan, num, ints, lang, -1, -1);
04688 }

int ast_say_digits_full struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
int  audiofd,
int  ctrlfd
 

Definition at line 4708 of file channel.c.

References ast_say_digit_str_full.

Referenced by ast_say_digits(), ast_say_enumeration_full_da(), ast_say_enumeration_full_de(), ast_say_number_full_cz(), ast_say_number_full_da(), ast_say_number_full_de(), ast_say_number_full_en(), ast_say_number_full_en_GB(), ast_say_number_full_es(), ast_say_number_full_fr(), ast_say_number_full_he(), ast_say_number_full_it(), ast_say_number_full_nl(), ast_say_number_full_no(), ast_say_number_full_pt(), ast_say_number_full_ru(), ast_say_number_full_se(), and ast_say_number_full_tw().

04710 {
04711         char buf[256];
04712 
04713         snprintf(buf, sizeof(buf), "%d", num);
04714         return ast_say_digit_str_full(chan, buf, ints, lang, audiofd, ctrlfd);
04715 }

int ast_say_enumeration struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options
 

Definition at line 4678 of file channel.c.

References ast_say_enumeration_full.

Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), and ast_say_date_with_format_pl().

04680 {
04681         return ast_say_enumeration_full(chan, num, ints, language, options, -1, -1);
04682 }

int ast_say_number struct ast_channel chan,
int  num,
const char *  ints,
const char *  lang,
const char *  options
 

Definition at line 4672 of file channel.c.

References ast_say_number_full.

Referenced by ast_say_date_da(), ast_say_date_de(), ast_say_date_en(), ast_say_date_fr(), ast_say_date_gr(), ast_say_date_nl(), ast_say_date_pt(), ast_say_date_with_format_da(), ast_say_date_with_format_de(), ast_say_date_with_format_en(), ast_say_date_with_format_es(), ast_say_date_with_format_fr(), ast_say_date_with_format_it(), ast_say_date_with_format_nl(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), ast_say_datetime_en(), ast_say_datetime_fr(), ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), ast_say_datetime_from_now_pt(), ast_say_datetime_pt(), ast_say_datetime_tw(), ast_say_time_de(), ast_say_time_en(), ast_say_time_fr(), ast_say_time_gr(), ast_say_time_nl(), ast_say_time_pt(), ast_say_time_pt_BR(), ast_say_time_tw(), bridge_playfile(), gr_say_number_female(), and pbx_builtin_saynumber().

04674 {
04675         return ast_say_number_full(chan, num, ints, language, options, -1, -1);
04676 }

int ast_say_phonetic_str struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang
 

Definition at line 4702 of file channel.c.

References ast_say_phonetic_str_full.

Referenced by pbx_builtin_sayphonetic().

04704 {
04705         return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
04706 }


Variable Documentation

SAY_EXTERN int(* ast_say_character_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_character_str_full)
 

Definition at line 138 of file say.h.

Referenced by __attribute__(), ast_say_character_str(), and handle_sayalpha().

SAY_EXTERN int(* ast_say_date)(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_date)
 

Definition at line 148 of file say.h.

Referenced by __attribute__(), ast_say_datetime_de(), ast_say_datetime_nl(), ast_say_datetime_pt_BR(), and handle_saydate().

SAY_EXTERN int(* ast_say_date_with_format)(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format)
 

Definition at line 152 of file say.h.

Referenced by __attribute__(), ast_say_date_with_format_pl(), ast_say_date_with_format_pt(), and handle_saydatetime().

SAY_EXTERN int(* ast_say_datetime)(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime)
 

Definition at line 145 of file say.h.

Referenced by __attribute__().

SAY_EXTERN int(* ast_say_datetime_from_now)(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_datetime_from_now)
 

Definition at line 150 of file say.h.

Referenced by __attribute__().

SAY_EXTERN int(* ast_say_digit_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_digit_str_full)
 

Definition at line 124 of file say.h.

Referenced by __attribute__(), ast_say_digit_str(), ast_say_digits_full(), and handle_saydigits().

SAY_EXTERN int(* ast_say_enumeration_full)(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_enumeration_full)
 

Definition at line 97 of file say.h.

Referenced by __attribute__(), and ast_say_enumeration().

SAY_EXTERN int(* ast_say_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_full)
 

Definition at line 130 of file say.h.

SAY_EXTERN int(* ast_say_number_full)(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd) SAY_INIT(ast_say_number_full)
 

Definition at line 82 of file say.h.

Referenced by __attribute__(), ast_say_number(), and handle_saynumber().

SAY_EXTERN int(* ast_say_phonetic_str_full)(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd) SAY_INIT(ast_say_phonetic_str_full)
 

Definition at line 143 of file say.h.

Referenced by __attribute__(), ast_say_phonetic_str(), and handle_sayphonetic().

SAY_EXTERN int(* ast_say_time)(struct ast_channel *chan, time_t t, const char *ints, const char *lang) SAY_INIT(ast_say_time)
 

Definition at line 146 of file say.h.

Referenced by __attribute__(), ast_say_datetime_de(), ast_say_datetime_from_now_en(), ast_say_datetime_from_now_fr(), ast_say_datetime_from_now_pt(), ast_say_datetime_nl(), ast_say_datetime_pt_BR(), and handle_saytime().


Asterisk is a trademark for Digium, inc.. | Edvina.net | Asterisk.org | This documentation was generated with Doxygen