mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
FS-9638
This commit is contained in:
@@ -195,6 +195,7 @@ struct switch_core_session {
|
||||
switch_slin_data_t *sdata;
|
||||
|
||||
switch_buffer_t *text_buffer;
|
||||
switch_buffer_t *text_line_buffer;
|
||||
switch_mutex_t *text_mutex;
|
||||
};
|
||||
|
||||
|
||||
@@ -93,6 +93,9 @@ SWITCH_DECLARE(int) switch_channel_test_ready(switch_channel_t *channel, switch_
|
||||
|
||||
#define switch_channel_media_ack(_channel) (!switch_channel_test_cap(_channel, CC_MEDIA_ACK) || switch_channel_test_flag(_channel, CF_MEDIA_ACK))
|
||||
|
||||
#define switch_channel_text_only(_channel) (switch_channel_test_flag(_channel, CF_HAS_TEXT) && !switch_channel_test_flag(_channel, CF_AUDIO))
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, switch_channel_t *other_channel, switch_channel_state_t want_state);
|
||||
SWITCH_DECLARE(void) switch_channel_wait_for_state_timeout(switch_channel_t *other_channel, switch_channel_state_t want_state, uint32_t timeout);
|
||||
SWITCH_DECLARE(switch_status_t) switch_channel_wait_for_flag(switch_channel_t *channel,
|
||||
|
||||
@@ -235,6 +235,7 @@ SWITCH_DECLARE(bool) email(char *to, char *from, char *headers = NULL, char *bod
|
||||
|
||||
SWITCH_DECLARE(int) insertFile(const char *file, const char *insert_file, int sample_point);
|
||||
SWITCH_DECLARE(int) answer();
|
||||
SWITCH_DECLARE(int) print(char *txt);
|
||||
SWITCH_DECLARE(int) preAnswer();
|
||||
SWITCH_DECLARE(void) hangup(const char *cause = "normal_clearing");
|
||||
SWITCH_DECLARE(void) hangupState(void);
|
||||
|
||||
@@ -1535,7 +1535,15 @@ typedef enum {
|
||||
CF_TEXT_ECHO,
|
||||
CF_TEXT_ACTIVE,
|
||||
CF_TEXT_IDLE,
|
||||
CF_TEXT_LINE_BASED,
|
||||
CF_QUEUE_TEXT_EVENTS,
|
||||
CF_MSRP,
|
||||
CF_MSRPS,
|
||||
CF_WANT_MSRP,
|
||||
CF_WANT_MSRPS,
|
||||
CF_RTT,
|
||||
CF_WANT_RTT,
|
||||
CF_AUDIO,
|
||||
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
|
||||
/* IF YOU ADD NEW ONES CHECK IF THEY SHOULD PERSIST OR ZERO THEM IN switch_core_session.c switch_core_session_request_xml() */
|
||||
CF_FLAG_MAX
|
||||
@@ -1604,7 +1612,8 @@ typedef enum {
|
||||
SAF_ROUTING_EXEC = (1 << 1),
|
||||
SAF_MEDIA_TAP = (1 << 2),
|
||||
SAF_ZOMBIE_EXEC = (1 << 3),
|
||||
SAF_NO_LOOPBACK = (1 << 4)
|
||||
SAF_NO_LOOPBACK = (1 << 4),
|
||||
SAF_SUPPORT_TEXT_ONLY = (1 << 5)
|
||||
} switch_application_flag_enum_t;
|
||||
typedef uint32_t switch_application_flag_t;
|
||||
|
||||
|
||||
@@ -47,6 +47,25 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_URL_UNSAFE "\r\n #%&+:;<=>?@[\\]^`{|}\""
|
||||
|
||||
|
||||
static inline char *switch_get_hex_bytes(switch_byte_t *buf, switch_size_t datalen, char *new_buf, switch_size_t new_datalen)
|
||||
{
|
||||
switch_byte_t *p, *e;
|
||||
char *pp, *ee;
|
||||
|
||||
e = buf + datalen;
|
||||
ee = new_buf + new_datalen;
|
||||
pp = new_buf;
|
||||
|
||||
for (p = buf; p < e && pp < ee - 4; p++) {
|
||||
snprintf(pp, 4, "%.2x ", (int)*p);
|
||||
pp += 3;
|
||||
}
|
||||
*(pp-1) = '\0';
|
||||
|
||||
return new_buf;
|
||||
}
|
||||
|
||||
|
||||
static inline uint32_t switch_round_to_step(uint32_t num, uint32_t step)
|
||||
{
|
||||
uint32_t r;
|
||||
@@ -1321,6 +1340,8 @@ typedef struct {
|
||||
**/
|
||||
SWITCH_DECLARE(void) switch_getcputime(switch_cputime *t);
|
||||
|
||||
SWITCH_DECLARE(char *)switch_html_strip(const char *str);
|
||||
|
||||
SWITCH_END_EXTERN_C
|
||||
#endif
|
||||
/* For Emacs:
|
||||
|
||||
Reference in New Issue
Block a user