mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add api interface to oz and use it in ozmod_libpri
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@656 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -298,13 +298,14 @@ struct zap_stream_handle {
|
||||
zap_size_t alloc_chunk;
|
||||
};
|
||||
|
||||
|
||||
zap_status_t zap_console_stream_raw_write(zap_stream_handle_t *handle, uint8_t *data, zap_size_t datalen);
|
||||
zap_status_t zap_console_stream_write(zap_stream_handle_t *handle, const char *fmt, ...);
|
||||
|
||||
#define ZAP_CMD_CHUNK_LEN 1024
|
||||
#define ZAP_STANDARD_STREAM(s) memset(&s, 0, sizeof(s)); s.data = malloc(ZAP_CMD_CHUNK_LEN); \
|
||||
switch_assert(s.data); \
|
||||
memset(s.data, 0, SWITCH_CMD_CHUNK_LEN); \
|
||||
assert(s.data); \
|
||||
memset(s.data, 0, ZAP_CMD_CHUNK_LEN); \
|
||||
s.end = s.data; \
|
||||
s.data_size = ZAP_CMD_CHUNK_LEN; \
|
||||
s.write_function = zap_console_stream_write; \
|
||||
@@ -624,6 +625,7 @@ zap_status_t zap_span_start(zap_span_t *span);
|
||||
int zap_load_module(const char *name);
|
||||
int zap_load_module_assume(const char *name);
|
||||
zap_status_t zap_span_find_by_name(const char *name, zap_span_t **span);
|
||||
char *zap_api_execute(const char *type, const char *cmd);
|
||||
|
||||
ZIO_CODEC_FUNCTION(zio_slin2ulaw);
|
||||
ZIO_CODEC_FUNCTION(zio_ulaw2slin);
|
||||
|
@@ -397,10 +397,12 @@ typedef struct zap_sigmsg zap_sigmsg_t;
|
||||
typedef struct zap_span zap_span_t;
|
||||
typedef struct zap_caller_data zap_caller_data_t;
|
||||
typedef struct zap_io_interface zap_io_interface_t;
|
||||
|
||||
struct zap_stream_handle;
|
||||
typedef struct zap_stream_handle zap_stream_handle_t;
|
||||
|
||||
typedef zap_status_t (*zap_stream_handle_write_function_t) (zap_stream_handle_t *handle, uint8_t *data, zap_size_t datalen);
|
||||
typedef zap_status_t (*zap_stream_handle_raw_write_function_t) (zap_stream_handle_t *handle, const char *fmt, ...);
|
||||
typedef zap_status_t (*zap_stream_handle_raw_write_function_t) (zap_stream_handle_t *handle, uint8_t *data, zap_size_t datalen);
|
||||
typedef zap_status_t (*zap_stream_handle_write_function_t) (zap_stream_handle_t *handle, const char *fmt, ...);
|
||||
|
||||
#define ZIO_CHANNEL_REQUEST_ARGS (zap_span_t *span, uint32_t chan_id, zap_direction_t direction, zap_caller_data_t *caller_data, zap_channel_t **zchan)
|
||||
#define ZIO_CHANNEL_OUTGOING_CALL_ARGS (zap_channel_t *zchan)
|
||||
@@ -476,7 +478,7 @@ typedef zap_status_t (*zio_api_t) ZIO_API_ARGS ;
|
||||
#define ZIO_SIG_CONFIGURE_FUNCTION(name) zap_status_t name ZIO_SIG_CONFIGURE_ARGS
|
||||
#define ZIO_IO_UNLOAD_FUNCTION(name) zap_status_t name ZIO_IO_UNLOAD_ARGS
|
||||
#define ZIO_SIG_UNLOAD_FUNCTION(name) zap_status_t name ZIO_SIG_UNLOAD_ARGS
|
||||
#define ZIP_API_FUNCTION(name) zap_status_t name ZIO_API_ARGS
|
||||
#define ZIO_API_FUNCTION(name) zap_status_t name ZIO_API_ARGS
|
||||
|
||||
#include "zap_dso.h"
|
||||
|
||||
|
Reference in New Issue
Block a user