Fri Apr 27 14:27:30 2012

Asterisk developer's documentation


say.h File Reference

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

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

Go to the source code of this file.

Defines

#define SAY_EXTERN
#define SAY_INIT(x)   = (typeof (x))say_stub

Functions

int ast_say_character_str (struct ast_channel *chan, const char *num, const char *ints, const char *lang)
int ast_say_counted_adjective (struct ast_channel *chan, int num, const char *adjective, const char *gender)
int ast_say_counted_noun (struct ast_channel *chan, int num, const char *noun)
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)
static int say_stub (struct ast_channel *chan,...)
 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.

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)

Detailed Description

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

Definition in file say.h.


Define Documentation

#define SAY_EXTERN

Definition at line 63 of file say.h.

#define SAY_INIT (  )     = (typeof (x))say_stub

Definition at line 62 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 5579 of file channel.c.

References ast_say_character_str_full.

Referenced by common_exec(), pbx_builtin_saycharacters(), play_mailbox_owner(), rpt_exec(), rpt_tele_thread(), and saycharstr().

05581 {
05582         return ast_say_character_str_full(chan, str, ints, lang, -1, -1);
05583 }

int ast_say_counted_adjective ( struct ast_channel chan,
int  num,
const char *  adjective,
const char *  gender 
)
int ast_say_counted_noun ( struct ast_channel chan,
int  num,
const char *  noun 
)
int ast_say_digit_str ( struct ast_channel chan,
const char *  num,
const char *  ints,
const char *  lang 
)

Definition at line 5573 of file channel.c.

References ast_say_digit_str_full.

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

05575 {
05576         return ast_say_digit_str_full(chan, str, ints, lang, -1, -1);
05577 }

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

Definition at line 5567 of file channel.c.

References ast_say_digits_full().

Referenced by common_exec(), conf_exec(), park_call_full(), parkandannounce_exec(), and rpt_tele_thread().

05569 {
05570         return ast_say_digits_full(chan, num, ints, lang, -1, -1);
05571 }

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 
)

Definition at line 5585 of file channel.c.

References ast_say_phonetic_str_full.

Referenced by pbx_builtin_sayphonetic().

05587 {
05588         return ast_say_phonetic_str_full(chan, str, ints, lang, -1, -1);
05589 }

static int say_stub ( struct ast_channel chan,
  ... 
) [static]

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 55 of file say.h.

References ast_log(), and LOG_WARNING.

00056 {
00057    ast_log(LOG_WARNING, "no implementation for the say() functions\n");
00058         return -1;
00059 };


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)
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)

Generated on 27 Apr 2012 for Asterisk - the Open Source PBX by  doxygen 1.6.1