[Asterisk-cvs] asterisk/include/asterisk file.h, 1.17, 1.18 say.h,
1.10, 1.11
markster at lists.digium.com
markster at lists.digium.com
Sat Nov 13 11:12:12 CST 2004
- Previous message: [Asterisk-cvs] asterisk file.c,1.51,1.52 say.c,1.42,1.43
- Next message: [Asterisk-cvs] asterisk/formats format_g723.c, 1.14,
1.15 format_g726.c, 1.4, 1.5 format_g729.c, 1.12,
1.13 format_gsm.c, 1.17, 1.18 format_h263.c, 1.6,
1.7 format_ilbc.c, 1.5, 1.6 format_pcm.c, 1.14,
1.15 format_pcm_alaw.c, 1.12, 1.13 format_sln.c, 1.1,
1.2 format_vox.c, 1.16, 1.17 format_wav.c, 1.18,
1.19 format_wav_gsm.c, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/include/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv16605/include/asterisk
Modified Files:
file.h say.h
Log Message:
Updates from char * to const char * + german syntax + enumeration (bug #2780)
Index: file.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/file.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- file.h 30 Jun 2004 03:22:29 -0000 1.17
+++ file.h 13 Nov 2004 16:13:07 -0000 1.18
@@ -38,9 +38,9 @@
* Adds a format to asterisk's format abilities. Fill in the fields, and it will work. For examples, look at some of the various format code.
* returns 0 on success, -1 on failure
*/
-int ast_format_register(char *name, char *exts, int format,
+int ast_format_register(const char *name, const char *exts, int format,
struct ast_filestream * (*open)(int fd),
- struct ast_filestream * (*rewrite)(int fd, char *comment),
+ struct ast_filestream * (*rewrite)(int fd, const char *comment),
int (*write)(struct ast_filestream *, struct ast_frame *),
int (*seek)(struct ast_filestream *, long offset, int whence),
int (*trunc)(struct ast_filestream *),
@@ -55,7 +55,7 @@
* Unregisters a format based on the name of the format.
* Returns 0 on success, -1 on failure to unregister
*/
-int ast_format_unregister(char *name);
+int ast_format_unregister(const char *name);
//! Streams a file
/*!
@@ -66,7 +66,7 @@
* Also, it will stop any existing streams on the channel.
* Returns 0 on success, or -1 on failure.
*/
-int ast_streamfile(struct ast_channel *c, char *filename, char *preflang);
+int ast_streamfile(struct ast_channel *c, const char *filename, const char *preflang);
//! Stops a stream
/*!
@@ -84,7 +84,7 @@
* See if a given file exists in a given format. If fmt is NULL, any format is accepted.
* Returns -1 if file does not exist, non-zero positive otherwise.
*/
-int ast_fileexists(char *filename, char *fmt, char *preflang);
+int ast_fileexists(const char *filename, const char *fmt, const char *preflang);
//! Renames a file
/*!
@@ -94,7 +94,7 @@
* Rename a given file in a given format, or if fmt is NULL, then do so for all
* Returns -1 on failure
*/
-int ast_filerename(char *oldname, char *newname, char *fmt);
+int ast_filerename(const char *oldname, const char *newname, const char *fmt);
//! Deletes a file
/*!
@@ -102,7 +102,7 @@
* \param format of the file
* Delete a given file in a given format, or if fmt is NULL, then do so for all
*/
-int ast_filedelete(char *filename, char *fmt);
+int ast_filedelete(const char *filename, const char *fmt);
//! Copies a file
/*!
@@ -111,7 +111,7 @@
* \param fmt the format of the file
* Copy a given file in a given format, or if fmt is NULL, then do so for all
*/
-int ast_filecopy(char *oldname, char *newname, char *fmt);
+int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
//! Waits for a stream to stop or digit to be pressed
/*!
@@ -121,7 +121,7 @@
* Wait for a stream to stop or for any one of a given digit to arrive, Returns 0
* if the stream finishes, the character if it was interrupted, and -1 on error
*/
-char ast_waitstream(struct ast_channel *c, char *breakon);
+char ast_waitstream(struct ast_channel *c, const char *breakon);
//! Same as waitstream but allows stream to be forwarded or rewound
/*!
@@ -134,11 +134,11 @@
* Wait for a stream to stop or for any one of a given digit to arrive, Returns 0
* if the stream finishes, the character if it was interrupted, and -1 on error
*/
-char ast_waitstream_fr(struct ast_channel *c, char *breakon, char *forward, char *rewind, int ms);
+char ast_waitstream_fr(struct ast_channel *c, const char *breakon, const char *forward, const char *rewind, int ms);
/* Same as waitstream, but with audio output to fd and monitored fd checking. Returns
1 if monfd is ready for reading */
-char ast_waitstream_full(struct ast_channel *c, char *breakon, int audiofd, int monfd);
+char ast_waitstream_full(struct ast_channel *c, const char *breakon, int audiofd, int monfd);
//! Starts reading from a file
/*!
@@ -154,7 +154,7 @@
* Please note, this is a blocking function. Program execution will not return until ast_waitstream completes it's execution.
* Returns a struct ast_filestream on success, NULL on failure
*/
-struct ast_filestream *ast_readfile(char *filename, char *type, char *comment, int flags, int check, mode_t mode);
+struct ast_filestream *ast_readfile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode);
//! Starts writing a file
/*!
@@ -170,7 +170,7 @@
* Please note, this is a blocking function. Program execution will not return until ast_waitstream completes it's execution.
* Returns a struct ast_filestream on success, NULL on failure
*/
-struct ast_filestream *ast_writefile(char *filename, char *type, char *comment, int flags, int check, mode_t mode);
+struct ast_filestream *ast_writefile(const char *filename, const char *type, const char *comment, int flags, int check, mode_t mode);
//! Writes a frame to a stream
/*!
@@ -196,7 +196,7 @@
* \param preflang prefered language to use
* Returns a ast_filestream pointer if it opens the file, NULL on error
*/
-struct ast_filestream *ast_openstream(struct ast_channel *chan, char *filename, char *preflang);
+struct ast_filestream *ast_openstream(struct ast_channel *chan, const char *filename, const char *preflang);
//! Opens stream for use in seeking, playing
/*!
@@ -205,7 +205,7 @@
* \param preflang prefered language to use
* Returns a ast_filestream pointer if it opens the file, NULL on error
*/
-struct ast_filestream *ast_openvstream(struct ast_channel *chan, char *filename, char *preflang);
+struct ast_filestream *ast_openvstream(struct ast_channel *chan, const char *filename, const char *preflang);
//! Applys a open stream to a channel.
/*!
Index: say.h
===================================================================
RCS file: /usr/cvsroot/asterisk/include/asterisk/say.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- say.h 15 May 2004 15:34:31 -0000 1.10
+++ say.h 13 Nov 2004 16:13:07 -0000 1.11
@@ -23,23 +23,34 @@
extern "C" {
#endif
-//! says a number
-/*!
+/* says a number
* \param chan channel to say them number on
* \param num number to say on the channel
* \param ints which dtmf to interrupt on
* \param lang language to speak the number
- * \param options set to 'f' for female, 'm' for masculine (used in portuguese)
+ * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
* Vocally says a number on a given channel
* Returns 0 on success, DTMF digit on interrupt, -1 on failure
*/
-int ast_say_number(struct ast_channel *chan, int num, char *ints, char *lang, char *options);
+int ast_say_number(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options);
/* Same as above with audiofd for received audio and returns 1 on ctrlfd being readable */
-int ast_say_number_full(struct ast_channel *chan, int num, char *ints, char *lang, char *options, int audiofd, int ctrlfd);
+int ast_say_number_full(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd);
-//! says digits
-/*!
+/* says an enumeration
+ * \param chan channel to say them enumeration on
+ * \param num number to say on the channel
+ * \param ints which dtmf to interrupt on
+ * \param lang language to speak the enumeration
+ * \param options set to 'f' for female, 'm' for male, 'c' for commune, 'n' for neuter, 'p' for plural
+ * Vocally says a enumeration on a given channel (first, sencond, third, forth, thirtyfirst, hundredth, ....)
+ * especially useful for dates and messages. says 'last' if num equals to INT_MAX
+ * Returns 0 on success, DTMF digit on interrupt, -1 on failure
+ */
+int ast_say_enumeration(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options);
+int ast_say_enumeration_full(struct ast_channel *chan, int num, const char *ints, const char *lang, const char *options, int audiofd, int ctrlfd);
+
+/* says digits
* \param chan channel to act upon
* \param num number to speak
* \param ints which dtmf to interrupt on
@@ -47,11 +58,10 @@
* Vocally says digits of a given number
* Returns 0 on success, dtmf if interrupted, -1 on failure
*/
-int ast_say_digits(struct ast_channel *chan, int num, char *ints, char *lang);
-int ast_say_digits_full(struct ast_channel *chan, int num, char *ints, char *lang, int audiofd, int ctrlfd);
+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);
-//! says digits of a string
-/*!
+/* says digits of a string
* \param chan channel to act upon
* \param num string to speak
* \param ints which dtmf to interrupt on
@@ -59,22 +69,22 @@
* Vocally says the digits of a given string
* Returns 0 on success, dtmf if interrupted, -1 on failure
*/
-int ast_say_digit_str(struct ast_channel *chan, char *num, char *ints, char *lang);
-int ast_say_digit_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
-int ast_say_character_str(struct ast_channel *chan, char *num, char *ints, char *lang);
-int ast_say_character_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
-int ast_say_phonetic_str(struct ast_channel *chan, char *num, char *ints, char *lang);
-int ast_say_phonetic_str_full(struct ast_channel *chan, char *num, char *ints, char *lang, int audiofd, int ctrlfd);
+int ast_say_digit_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
+int ast_say_digit_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
+int ast_say_character_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
+int ast_say_character_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
+int ast_say_phonetic_str(struct ast_channel *chan, const char *num, const char *ints, const char *lang);
+int ast_say_phonetic_str_full(struct ast_channel *chan, const char *num, const char *ints, const char *lang, int audiofd, int ctrlfd);
-int ast_say_datetime(struct ast_channel *chan, time_t t, char *ints, char *lang);
+int ast_say_datetime(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
-int ast_say_time(struct ast_channel *chan, time_t t, char *ints, char *lang);
+int ast_say_time(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
-int ast_say_date(struct ast_channel *chan, time_t t, char *ints, char *lang);
+int ast_say_date(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
-int ast_say_datetime_from_now(struct ast_channel *chan, time_t t, char *ints, char *lang);
+int ast_say_datetime_from_now(struct ast_channel *chan, time_t t, const char *ints, const char *lang);
-int ast_say_date_with_format(struct ast_channel *chan, time_t t, char *ints, char *lang, char *format, char *timezone);
+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);
#if defined(__cplusplus) || defined(c_plusplus)
}
- Previous message: [Asterisk-cvs] asterisk file.c,1.51,1.52 say.c,1.42,1.43
- Next message: [Asterisk-cvs] asterisk/formats format_g723.c, 1.14,
1.15 format_g726.c, 1.4, 1.5 format_g729.c, 1.12,
1.13 format_gsm.c, 1.17, 1.18 format_h263.c, 1.6,
1.7 format_ilbc.c, 1.5, 1.6 format_pcm.c, 1.14,
1.15 format_pcm_alaw.c, 1.12, 1.13 format_sln.c, 1.1,
1.2 format_vox.c, 1.16, 1.17 format_wav.c, 1.18,
1.19 format_wav_gsm.c, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list