summaryrefslogtreecommitdiff
path: root/include/asterisk/callerid.h
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2009-12-01 20:27:37 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2009-12-01 20:27:37 +0000
commitf59fe83c56f6539c09eb068a94d2db60bfb18f17 (patch)
tree72344fb3a18484772df8f496cc1f9be6e902c64f /include/asterisk/callerid.h
parentb2d115bce95e02589972ad4f07cb9a959ea02139 (diff)
More 32->64 bit codec conversions.
In the process of swapping ULAW to a place in the extended codec space, we found several unhandled cases, where a 32-bit integer was still being used to handle a codec field. Most of these have been fixed with this commit, although there is at least one case (codec_dahdi) which depends upon outside headers to be altered before a conversion can be made. (Fixes AST-278, SWP-459) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@231850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/callerid.h')
-rw-r--r--include/asterisk/callerid.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/asterisk/callerid.h b/include/asterisk/callerid.h
index 717248c12..c5e24a30a 100644
--- a/include/asterisk/callerid.h
+++ b/include/asterisk/callerid.h
@@ -45,6 +45,8 @@
#ifndef _ASTERISK_CALLERID_H
#define _ASTERISK_CALLERID_H
+#include "asterisk/frame_defs.h"
+
#define MAX_CALLERID_SIZE 32000
#define CID_PRIVATE_NAME (1 << 0)
@@ -99,7 +101,7 @@ void callerid_init(void);
* \return It returns the size
* (in bytes) of the data (if it returns a size of 0, there is probably an error)
*/
-int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec);
+int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, format_t codec);
/*! \brief Create a callerID state machine
* \param cid_signalling Type of signalling in use
@@ -122,7 +124,7 @@ struct callerid_state *callerid_new(int cid_signalling);
* \retval 0 for "needs more samples"
* \retval 1 if the CallerID spill reception is complete.
*/
-int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
+int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, format_t codec);
/*! \brief Read samples into the state machine.
* \param cid Which state machine to act upon
@@ -136,7 +138,7 @@ int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples,
* \retval 0 for "needs more samples"
* \retval 1 if the CallerID spill reception is complete.
*/
-int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
+int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, format_t codec);
/*! \brief Extract info out of callerID state machine. Flags are listed above
* \param cid Callerid state machine to act upon
@@ -175,7 +177,7 @@ void callerid_free(struct callerid_state *cid);
* \details
* Acts like callerid_generate except uses an asterisk format callerid string.
*/
-int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec);
+int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, format_t codec);
/*!
* \brief Generate message waiting indicator
@@ -185,13 +187,13 @@ int ast_callerid_generate(unsigned char *buf, const char *name, const char *numb
* \see callerid_generate() for more info as it uses the same encoding
* \version 1.6.1 changed mdmf parameter to type, added name, number and flags for caller id message generation
*/
-int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, int codec, const char *name,
+int ast_callerid_vmwi_generate(unsigned char *buf, int active, int type, format_t codec, const char *name,
const char *number, int flags);
/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
* \see ast_callerid_generate() for other details
*/
-int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec);
+int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, format_t codec);
/*! \brief Destructively parse inbuf into name and location (or number)
* \details
@@ -216,7 +218,7 @@ int ast_callerid_parse(char *instr, char **name, char **location);
* \param codec Which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
* \return Returns -1 on error (if len is less than 2400), 0 on success.
*/
-int ast_gen_cas(unsigned char *outbuf, int sas, int len, int codec);
+int ast_gen_cas(unsigned char *outbuf, int sas, int len, format_t codec);
/*!
* \brief Shrink a phone number in place to just digits (more accurately it just removes ()'s, .'s, and -'s...