FreeSWITCH API Documentation  1.7.0
Modules | Data Structures | Enumerations | Enumerator | Functions | Variables
Brought To You By APR
+ Collaboration diagram for Brought To You By APR:

Modules

 Memory Pool Functions
 
 String Handling funcions
 
 Time Routines
 
 Thread Mutex Routines
 
 Multi-Threaded Adtomic Operations Routines
 
 Thread Read/Write lock Routines
 
 Condition Variable Routines
 
 UUID Handling
 
 Thread Safe FIFO bounded queue
 
 File I/O Handling Functions
 
 Threads and Process Functions
 
 Network Routines
 
 Poll Routines
 

Data Structures

union  switch_descriptor_t
 
struct  switch_pollfd
 

Enumerations

enum  switch_pollset_type_t { SWITCH_NO_DESC, SWITCH_POLL_SOCKET, SWITCH_POLL_FILE, SWITCH_POLL_LASTDESC }
 

Functions

unsigned int switch_hashfunc_default (const char *key, switch_ssize_t *klen)
 
unsigned int switch_ci_hashfunc_default (const char *char_key, switch_ssize_t *klen)
 

Variables

int32_t switch_time_exp_t::tm_usec
 
int32_t switch_time_exp_t::tm_sec
 
int32_t switch_time_exp_t::tm_min
 
int32_t switch_time_exp_t::tm_hour
 
int32_t switch_time_exp_t::tm_mday
 
int32_t switch_time_exp_t::tm_mon
 
int32_t switch_time_exp_t::tm_year
 
int32_t switch_time_exp_t::tm_wday
 
int32_t switch_time_exp_t::tm_yday
 
int32_t switch_time_exp_t::tm_isdst
 
int32_t switch_time_exp_t::tm_gmtoff
 
unsigned char switch_uuid_t::data [16]
 
switch_memory_pool_tswitch_array_header_t::pool
 
int switch_array_header_t::elt_size
 
int switch_array_header_t::nelts
 
int switch_array_header_t::nalloc
 
char * switch_array_header_t::elts
 
switch_file_tswitch_descriptor_t::f
 
switch_socket_tswitch_descriptor_t::s
 
switch_memory_pool_tswitch_pollfd::p
 
switch_pollset_type_t switch_pollfd::desc_type
 
int16_t switch_pollfd::reqevents
 
int16_t switch_pollfd::rtnevents
 
switch_descriptor_t switch_pollfd::desc
 
void * switch_pollfd::client_data
 

Detailed Description

Enumeration Type Documentation

Enumerator
SWITCH_NO_DESC 

nothing here

SWITCH_POLL_SOCKET 

descriptor refers to a socket

SWITCH_POLL_FILE 

descriptor refers to a file

SWITCH_POLL_LASTDESC 

descriptor is the last one in the list

Definition at line 1283 of file switch_apr.h.

1286  {
1287  switch_memory_pool_t *p; /**< associated pool */
1288  switch_pollset_type_t desc_type;
switch_pollset_type_t
Definition: switch_apr.h:1283
struct apr_pool_t switch_memory_pool_t

Function Documentation

unsigned int switch_ci_hashfunc_default ( const char *  char_key,
switch_ssize_t klen 
)

Definition at line 98 of file switch_apr.c.

References hash.

Referenced by add_handle(), get_handle(), switch_core_media_add_payload_map(), switch_event_base_add_header(), switch_event_del_header_val(), switch_event_get_header_ptr(), switch_event_rename_header(), switch_scheduler_add_task(), and switch_scheduler_del_task_group().

99 {
100  unsigned int hash = 0;
101  const unsigned char *key = (const unsigned char *) char_key;
102  const unsigned char *p;
103  apr_ssize_t i;
104 
105  if (*klen == APR_HASH_KEY_STRING) {
106  for (p = key; *p; p++) {
107  hash = hash * 33 + tolower(*p);
108  }
109  *klen = p - key;
110  } else {
111  for (p = key, i = *klen; i; i--, p++) {
112  hash = hash * 33 + tolower(*p);
113  }
114  }
115 
116  return hash;
117 }
switch_hash_t * hash
Definition: switch_event.c:74
unsigned int switch_hashfunc_default ( const char *  key,
switch_ssize_t klen 
)

The default hash function.

Parameters
keypointer to the key.
klenthe key length.

Definition at line 120 of file switch_apr.c.

Referenced by switch_ivr_parse_event().

121 {
122  return apr_hashfunc_default(key, klen);
123 }

Variable Documentation

void* switch_pollfd::client_data

allows app to associate context

Definition at line 1302 of file switch_apr.h.

unsigned char switch_uuid_t::data[16]

the actual UUID

Definition at line 540 of file switch_apr.h.

switch_descriptor_t switch_pollfd::desc
See also
apr_descriptor

Definition at line 1301 of file switch_apr.h.

switch_pollset_type_t switch_pollfd::desc_type

descriptor type

Definition at line 1297 of file switch_apr.h.

int switch_array_header_t::elt_size

The amount of memory allocated for each element of the array

Definition at line 917 of file switch_apr.h.

char* switch_array_header_t::elts

The elements in the array

Definition at line 923 of file switch_apr.h.

switch_file_t* switch_descriptor_t::f

file

Definition at line 1291 of file switch_apr.h.

int switch_array_header_t::nalloc

The number of elements allocated in the array

Definition at line 921 of file switch_apr.h.

int switch_array_header_t::nelts

The number of active elements in the array

Definition at line 919 of file switch_apr.h.

switch_memory_pool_t* switch_pollfd::p

associated pool

Definition at line 1296 of file switch_apr.h.

switch_memory_pool_t* switch_array_header_t::pool

The pool the array is allocated out of

Definition at line 915 of file switch_apr.h.

int16_t switch_pollfd::reqevents

requested events

Definition at line 1299 of file switch_apr.h.

int16_t switch_pollfd::rtnevents

returned events

Definition at line 1300 of file switch_apr.h.

switch_socket_t* switch_descriptor_t::s

socket

Definition at line 1292 of file switch_apr.h.

int32_t switch_time_exp_t::tm_gmtoff

seconds east of UTC

Definition at line 220 of file switch_apr.h.

Referenced by switch_str_time(), switch_xml_std_datetime_check(), and tm2switchtime().

int32_t switch_time_exp_t::tm_hour
int32_t switch_time_exp_t::tm_isdst

daylight saving time

Definition at line 218 of file switch_apr.h.

Referenced by switch_str_time(), switch_xml_std_datetime_check(), and tm2switchtime().

int32_t switch_time_exp_t::tm_mday
int32_t switch_time_exp_t::tm_min
int32_t switch_time_exp_t::tm_mon
int32_t switch_time_exp_t::tm_sec
int32_t switch_time_exp_t::tm_usec

microseconds past tm_sec

Definition at line 200 of file switch_apr.h.

Referenced by process_rtcp_report(), rtcp_generate_sender_info(), switch_log_vprintf(), and switch_str_time().

int32_t switch_time_exp_t::tm_wday

(0-6) days since sunday

Definition at line 214 of file switch_apr.h.

Referenced by switch_xml_std_datetime_check(), and tm2switchtime().

int32_t switch_time_exp_t::tm_yday

(0-365) days since jan 1

Definition at line 216 of file switch_apr.h.

Referenced by switch_xml_std_datetime_check(), and tm2switchtime().

int32_t switch_time_exp_t::tm_year