\param private void pointer to private data
\return SWITCH_STATUS_SUCCESS if data was set
*/
-SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private);
+SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private_info);
/*!
\brief Retrieve private from a given channel
/*!
\brief Add private user data to a session
\param session the session to add used data to
- \param private the used data to add
+ \param private_info the used data to add
\return SWITCH_STATUS_SUCCESS if data is added
*/
-SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session *session, void *private);
+SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session *session, void *private_info);
/*!
\brief Add a logical stream to a session
\param session the session to add the stream to
- \param private an optional pointer to private data for the new stream
+ \param private_info an optional pointer to private data for the new stream
\return the stream id of the new stream
*/
-SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session, void *private);
+SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session, void *private_info);
/*!
\brief Retreive a logical stream from a session
\param session the session to add the stream to
\param index the index to retrieve
- \return the private data (if any)
+ \return the stream
*/
SWITCH_DECLARE(void *) switch_core_session_get_stream(switch_core_session *session, int index);
const switch_state_handler_table *state_handler;
/*! private information */
- void *private;
+ void *private_info;
/* to facilitate linking */
const struct switch_endpoint_interface *next;
/*! the timer's memory pool */
switch_memory_pool *memory_pool;
/*! private data for loadable modules to store information */
- void *private;
+ void *private_info;
};
/*! \brief A table of functions that a timer module implements */
/*! the handle's memory pool */
switch_memory_pool *memory_pool;
/*! private data for the format module to store handle specific info */
- void *private;
+ void *private_info;
};
/*! the handle's memory pool */
switch_memory_pool *memory_pool;
/*! private data for the format module to store handle specific info */
- void *private;
+ void *private_info;
};
/*! the handle's memory pool */
switch_memory_pool *memory_pool;
/*! private data for the format module to store handle specific info */
- void *private;
+ void *private_info;
};
/*! the handle's memory pool*/
switch_memory_pool *memory_pool;
/*! private data for the codec module to store handle specific info */
- void *private;
+ void *private_info;
};
/*! \brief A table of settings and callbacks that define a paticular implementation of a codec */
g729_init_decoder(&context->decoder_object);
}
- codec->private = context;
+ codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
static switch_status switch_g729_destroy(switch_codec *codec)
{
- codec->private = NULL;
+ codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
unsigned int *flag)
{
- struct g729_context *context = codec->private;
+ struct g729_context *context = codec->private_info;
int cbret = 0;
if (!context) {
unsigned int *flag)
{
- struct g729_context *context = codec->private;
+ struct g729_context *context = codec->private_info;
if (!context) {
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
-}
\ No newline at end of file
+}
if (decoding)
context->decoder = gsm_create();
}
- codec->private = context;
+ codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_destroy(switch_codec *codec)
{
- struct gsm_context *context = codec->private;
+ struct gsm_context *context = codec->private_info;
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
int decoding = (codec->flags & SWITCH_CODEC_FLAG_DECODE);
if (encoding)
gsm_destroy(context->encoder);
if (decoding)
gsm_destroy(context->decoder);
- codec->private = NULL;
+ codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_gsm_encode(switch_codec *codec, switch_codec *other_codec, void *decoded_data,
size_t decoded_data_len, int decoded_rate, void *encoded_data,
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
{
- struct gsm_context *context = codec->private;
+ struct gsm_context *context = codec->private_info;
if (!context) {
return SWITCH_STATUS_FALSE;
}
size_t encoded_data_len, int encoded_rate, void *decoded_data,
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
{
- struct gsm_context *context = codec->private;
+ struct gsm_context *context = codec->private_info;
if (!context) {
return SWITCH_STATUS_FALSE;
}
context->decoder = ilbc_create();
}
- codec->private = context;
+ codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
static switch_status switch_ilbc_destroy(switch_codec *codec)
{
- struct ilbc_context *context = codec->private;
+ struct ilbc_context *context = codec->private_info;
int encoding = (codec->flags & SWITCH_CODEC_FLAG_ENCODE);
int decoding = (codec->flags & SWITCH_CODEC_FLAG_DECODE);
if (decoding)
ilbc_destroy(context->decoder);
- codec->private = NULL;
+ codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
int *encoded_rate,
unsigned int *flag)
{
- struct ilbc_context *context = codec->private;
+ struct ilbc_context *context = codec->private_info;
int cbret = 0;
if (!context) {
int *decoded_rate,
unsigned int *flag)
{
- struct ilbc_context *context = codec->private;
+ struct ilbc_context *context = codec->private_info;
if (!context) {
return SWITCH_STATUS_FALSE;
- codec->private = context;
+ codec->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
}
void *encoded_data,
size_t *encoded_data_len, int *encoded_rate, unsigned int *flag)
{
- struct speex_context *context = codec->private;
+ struct speex_context *context = codec->private_info;
short *buf;
int is_speech = 1;
void *decoded_data,
size_t *decoded_data_len, int *decoded_rate, unsigned int *flag)
{
- struct speex_context *context = codec->private;
+ struct speex_context *context = codec->private_info;
short *buf;
if (!context) {
static switch_status switch_speex_destroy(switch_codec *codec)
{
int encoding, decoding;
- struct speex_context *context = codec->private;
+ struct speex_context *context = codec->private_info;
if (!context) {
return SWITCH_STATUS_FALSE;
speex_decoder_destroy(context->decoder_state);
}
- codec->private = NULL;
+ codec->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
}
- dh->private = context;
+ dh->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
{
struct ldap_context *context;
- context = dh->private;
+ context = dh->private_info;
assert(context != NULL);
ldap_unbind_s(context->ld);
{
struct ldap_context *context;
- context = dh->private;
+ context = dh->private_info;
assert(context != NULL);
if (ldap_search_s(context->ld, base, LDAP_SCOPE_SUBTREE, query, NULL, 0, &context->msg) != LDAP_SUCCESS) {
{
struct ldap_context *context;
- context = dh->private;
+ context = dh->private_info;
assert(context != NULL);
context->vitt = 0;
{
struct ldap_context *context;
- context = dh->private;
+ context = dh->private_info;
assert(context != NULL);
*var = *val = NULL;
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
- chanmap = tech_pvt->spri->private;
+ chanmap = tech_pvt->spri->private_info;
sangoma_socket_close(&tech_pvt->socket);
do {
if ((spri = &SPANS[span]->spri)) {
- chanmap = spri->private;
+ chanmap = spri->private_info;
if (channo == 0) {
if (autochan > 0) {
for(channo = 1; channo < SANGOMA_MAX_CHAN_PER_SPAN; channo++) {
switch_core_session *session;
struct private_object *tech_pvt;
- chanmap = spri->private;
+ chanmap = spri->private_info;
if ((session = chanmap->map[event->hangup.channel])) {
switch_channel *channel = NULL;
switch_channel *channel;
struct channel_map *chanmap;
- chanmap = spri->private;
+ chanmap = spri->private_info;
if ((session = chanmap->map[event->answer.channel])) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "-- Answer on channel %d\n", event->answer.channel);
switch_channel *channel;
struct channel_map *chanmap;
- chanmap = spri->private;
+ chanmap = spri->private_info;
if ((session = chanmap->map[event->proceeding.channel])) {
switch_caller_profile *originator;
struct channel_map *chanmap;
struct private_object *tech_pvt;
- chanmap = spri->private;
+ chanmap = spri->private_info;
if ((session = chanmap->map[event->ringing.channel])) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "-- Ringing on channel %d\n", event->ringing.channel);
- chanmap = spri->private;
+ chanmap = spri->private_info;
if (chanmap->map[event->ring.channel]) {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "--Duplicate Ring on channel %d (ignored)\n",
event->ring.channel);
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "-- Restarting channel %d\n", event->restart.channel);
- chanmap = spri->private;
+ chanmap = spri->private_info;
if ((session = chanmap->map[event->restart.channel])) {
switch_channel *channel;
SANGOMA_MAP_PRI_EVENT((*spri), SANGOMA_PRI_EVENT_RESTART, on_restart);
spri->on_loop = check_flags;
- spri->private = &chanmap;
+ spri->private_info = &chanmap;
if (switch_event_create(&s_event, SWITCH_EVENT_PUBLISH) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(s_event, SWITCH_STACK_BOTTOM, "service", "_pri._tcp");
handle->sections = context->sfinfo.sections;
handle->seekable = context->sfinfo.seekable;
- handle->private = context;
+ handle->private_info = context;
return SWITCH_STATUS_SUCCESS;
}
switch_status sndfile_file_close(switch_file_handle *handle)
{
- sndfile_context *context = handle->private;
+ sndfile_context *context = handle->private_info;
sf_close(context->handle);
switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int *cur_sample, unsigned int samples, int whence)
{
- sndfile_context *context = handle->private;
+ sndfile_context *context = handle->private_info;
if (!handle->seekable) {
return SWITCH_STATUS_NOTIMPL;
switch_status sndfile_file_read(switch_file_handle *handle, void *data, size_t *len)
{
size_t inlen = *len;
- sndfile_context *context = handle->private;
+ sndfile_context *context = handle->private_info;
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
*len = (size_t) sf_read_raw(context->handle, data, inlen);
switch_status sndfile_file_write(switch_file_handle *handle, void *data, size_t *len)
{
size_t inlen = *len;
- sndfile_context *context = handle->private;
+ sndfile_context *context = handle->private_info;
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
*len = (size_t) sf_write_raw(context->handle, data, inlen);
struct timer_private *private;
private = switch_core_alloc(timer->memory_pool, sizeof(*private));
- timer->private = private;
+ timer->private_info = private;
#ifdef WINTIMER
QueryPerformanceFrequency(&private->freq);
static switch_status soft_timer_next(switch_timer *timer)
{
- struct timer_private *private = timer->private;
+ struct timer_private *private = timer->private_info;
#ifdef WINTIMER
private->base.QuadPart += timer->interval * (private->freq.QuadPart / 1000);
static switch_status soft_timer_destroy(switch_timer *timer)
{
- timer->private = NULL;
+ timer->private_info = NULL;
return SWITCH_STATUS_SUCCESS;
}
int state_handler_index;
switch_hash *variables;
switch_channel_timetable_t times;
- void *private;
+ void *private_info;
int freq;
int bits;
int channels;
return switch_core_hash_find(channel->variables, varname);
}
-SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private)
+SWITCH_DECLARE(switch_status) switch_channel_set_private(switch_channel *channel, void *private_info)
{
assert(channel != NULL);
- channel->private = private;
+ channel->private_info = private_info;
return SWITCH_STATUS_SUCCESS;
}
SWITCH_DECLARE(void *) switch_channel_get_private(switch_channel *channel)
{
assert(channel != NULL);
- return channel->private;
+ return channel->private_info;
}
SWITCH_DECLARE(switch_status) switch_channel_set_name(switch_channel *channel, char *name)
int stream_count;
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
- void *private;
+ void *private_info;
};
struct switch_core_runtime {
SWITCH_DECLARE(void *) switch_core_session_get_private(switch_core_session *session)
{
assert(session != NULL);
- return session->private;
+ return session->private_info;
}
-SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session *session, void *private)
+SWITCH_DECLARE(switch_status) switch_core_session_set_private(switch_core_session *session, void *private_info)
{
assert(session != NULL);
- session->private = private;
+ session->private_info = private_info;
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session, void *private)
+SWITCH_DECLARE(int) switch_core_session_add_stream(switch_core_session *session, void *private_info)
{
- session->streams[session->stream_count++] = private;
+ session->streams[session->stream_count++] = private_info;
return session->stream_count - 1;
}