RTS API Documentation  1.10.11
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

◆ switch_pollset_type_t

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 1298 of file switch_apr.h.

1301  {
1302  switch_memory_pool_t *p; /**< associated pool */
1303  switch_pollset_type_t desc_type;
switch_pollset_type_t
Definition: switch_apr.h:1298
struct fspr_pool_t switch_memory_pool_t

Function Documentation

◆ switch_ci_hashfunc_default()

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

Definition at line 121 of file switch_apr.c.

References hash, and key.

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_ex(), and switch_scheduler_del_task_group().

122 {
123  unsigned int hash = 0;
124  const unsigned char *key = (const unsigned char *) char_key;
125  const unsigned char *p;
126  fspr_ssize_t i;
127 
128  if (*klen == APR_HASH_KEY_STRING) {
129  for (p = key; *p; p++) {
130  hash = hash * 33 + tolower(*p);
131  }
132  *klen = p - key;
133  } else {
134  for (p = key, i = *klen; i; i--, p++) {
135  hash = hash * 33 + tolower(*p);
136  }
137  }
138 
139  return hash;
140 }
switch_hash_t * hash
Definition: switch_event.c:76
char * key
Definition: switch_msrp.c:64

◆ switch_hashfunc_default()

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 143 of file switch_apr.c.

Referenced by switch_ivr_parse_event().

144 {
145  return fspr_hashfunc_default(key, klen);
146 }
char * key
Definition: switch_msrp.c:64

Variable Documentation

◆ client_data

void* switch_pollfd::client_data

allows app to associate context

Definition at line 1317 of file switch_apr.h.

◆ data

unsigned char switch_uuid_t::data[16]

the actual UUID

Definition at line 540 of file switch_apr.h.

Referenced by switch_uuid_format(), switch_uuid_get(), and switch_uuid_parse().

◆ desc

switch_descriptor_t switch_pollfd::desc
See also
fspr_descriptor

Definition at line 1316 of file switch_apr.h.

◆ desc_type

switch_pollset_type_t switch_pollfd::desc_type

descriptor type

Definition at line 1312 of file switch_apr.h.

◆ elt_size

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.

◆ elts

char* switch_array_header_t::elts

The elements in the array

Definition at line 923 of file switch_apr.h.

◆ f

switch_file_t* switch_descriptor_t::f

file

Definition at line 1306 of file switch_apr.h.

◆ nalloc

int switch_array_header_t::nalloc

The number of elements allocated in the array

Definition at line 921 of file switch_apr.h.

◆ nelts

int switch_array_header_t::nelts

The number of active elements in the array

Definition at line 919 of file switch_apr.h.

◆ p

switch_memory_pool_t* switch_pollfd::p

associated pool

Definition at line 1311 of file switch_apr.h.

◆ pool

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.

◆ reqevents

int16_t switch_pollfd::reqevents

requested events

Definition at line 1314 of file switch_apr.h.

◆ rtnevents

int16_t switch_pollfd::rtnevents

returned events

Definition at line 1315 of file switch_apr.h.

◆ s

switch_socket_t* switch_descriptor_t::s

socket

Definition at line 1307 of file switch_apr.h.

◆ tm_gmtoff

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().

◆ tm_hour

int32_t switch_time_exp_t::tm_hour

◆ tm_isdst

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().

◆ tm_mday

int32_t switch_time_exp_t::tm_mday

◆ tm_min

int32_t switch_time_exp_t::tm_min

◆ tm_mon

int32_t switch_time_exp_t::tm_mon

◆ tm_sec

int32_t switch_time_exp_t::tm_sec

◆ tm_usec

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_meta_vprintf(), and switch_str_time().

◆ tm_wday

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().

◆ tm_yday

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().

◆ tm_year

int32_t switch_time_exp_t::tm_year