mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 04:31:50 +00:00
add append and truncate to audio file api
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15503 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -786,6 +786,8 @@ SWITCH_DECLARE(switch_status_t) switch_file_copy(const char *from_path,
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_close(switch_file_t *thefile);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_trunc(switch_file_t *thefile, int64_t offset);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_file_lock(switch_file_t *thefile, int type);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1505,6 +1505,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_get_string(_In_ switch_file_han
|
||||
\return SWITCH_STATUS_SUCCESS if the file handle was closed
|
||||
*/
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_close(_In_ switch_file_handle_t *fh);
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_core_file_truncate(switch_file_handle_t *fh, int64_t offset);
|
||||
|
||||
|
||||
///\}
|
||||
|
||||
///\defgroup speech ASR/TTS Functions
|
||||
|
||||
@@ -262,6 +262,8 @@ struct switch_file_interface {
|
||||
switch_status_t (*file_open) (switch_file_handle_t *, const char *file_path);
|
||||
/*! function to close the file */
|
||||
switch_status_t (*file_close) (switch_file_handle_t *);
|
||||
/*! function to close the file */
|
||||
switch_status_t (*file_truncate) (switch_file_handle_t *, int64_t offset);
|
||||
/*! function to read from the file */
|
||||
switch_status_t (*file_read) (switch_file_handle_t *, void *data, switch_size_t *len);
|
||||
/*! function to write from the file */
|
||||
|
||||
@@ -1166,7 +1166,8 @@ typedef enum {
|
||||
SWITCH_FILE_OPEN = (1 << 11),
|
||||
SWITCH_FILE_CALLBACK = (1 << 12),
|
||||
SWITCH_FILE_DONE = (1 << 13),
|
||||
SWITCH_FILE_BUFFER_DONE = (1 << 14)
|
||||
SWITCH_FILE_BUFFER_DONE = (1 << 14),
|
||||
SWITCH_FILE_WRITE_APPEND = (1 << 15)
|
||||
} switch_file_flag_enum_t;
|
||||
typedef uint32_t switch_file_flag_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user