mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
Merge remote-tracking branch 'fsorig/master'
This commit is contained in:
@@ -103,8 +103,7 @@ struct switch_event {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
EF_UNIQ_HEADERS = (1 << 0),
|
||||
EF_CONTAINS_ARRAYS = (1 << 1),
|
||||
EF_UNIQ_HEADERS = (1 << 0)
|
||||
} switch_event_flag_t;
|
||||
|
||||
|
||||
@@ -152,7 +151,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_set_priority(switch_event_t *event,
|
||||
\return the value of the requested header
|
||||
*/
|
||||
|
||||
_Ret_opt_z_ SWITCH_DECLARE(switch_event_header_t *) switch_event_get_header_ptr(switch_event_t *event, const char *header_name);
|
||||
SWITCH_DECLARE(switch_event_header_t *) switch_event_get_header_ptr(switch_event_t *event, const char *header_name);
|
||||
_Ret_opt_z_ SWITCH_DECLARE(char *) switch_event_get_header_idx(switch_event_t *event, const char *header_name, int idx);
|
||||
#define switch_event_get_header(_e, _h) switch_event_get_header_idx(_e, _h, -1)
|
||||
|
||||
@@ -192,7 +191,7 @@ SWITCH_DECLARE(switch_status_t) switch_event_add_header_string(switch_event_t *e
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_event_del_header_val(switch_event_t *event, const char *header_name, const char *val);
|
||||
#define switch_event_del_header(_e, _h) switch_event_del_header_val(_e, _h, NULL)
|
||||
|
||||
SWITCH_DECLARE(int) switch_event_add_array(switch_event_t *event, const char *var, const char *val);
|
||||
/*!
|
||||
\brief Destroy an event
|
||||
\param event pointer to the pointer to event to destroy
|
||||
|
||||
@@ -137,14 +137,17 @@ typedef int gid_t;
|
||||
#ifdef WIN32
|
||||
#if defined(SWITCH_CORE_DECLARE_STATIC)
|
||||
#define SWITCH_DECLARE(type) type __stdcall
|
||||
#define SWITCH_DECLARE_TYPEDEF(type, name) type (__stdcall name)
|
||||
#define SWITCH_DECLARE_NONSTD(type) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA
|
||||
#elif defined(FREESWITCHCORE_EXPORTS)
|
||||
#define SWITCH_DECLARE(type) __declspec(dllexport) type __stdcall
|
||||
#define SWITCH_DECLARE_TYPEDEF(type, name) __declspec(dllexport) type (__stdcall name)
|
||||
#define SWITCH_DECLARE_NONSTD(type) __declspec(dllexport) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA __declspec(dllexport)
|
||||
#else
|
||||
#define SWITCH_DECLARE(type) __declspec(dllimport) type __stdcall
|
||||
#define SWITCH_DECLARE_TYPEDEF(type, name) __declspec(dllimport) type (__stdcall name)
|
||||
#define SWITCH_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl
|
||||
#define SWITCH_DECLARE_DATA __declspec(dllimport)
|
||||
#endif
|
||||
@@ -174,6 +177,7 @@ typedef int gid_t;
|
||||
#define O_BINARY 0
|
||||
#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(SWITCH_API_VISIBILITY)
|
||||
#define SWITCH_DECLARE(type) __attribute__((visibility("default"))) type
|
||||
#define SWITCH_DECLARE_TYPEDEF(type, name) type (name)
|
||||
#define SWITCH_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type
|
||||
#define SWITCH_DECLARE_DATA __attribute__((visibility("default")))
|
||||
#define SWITCH_MOD_DECLARE(type) __attribute__((visibility("default"))) type
|
||||
@@ -182,6 +186,7 @@ typedef int gid_t;
|
||||
#define SWITCH_DECLARE_CLASS __attribute__((visibility("default")))
|
||||
#else
|
||||
#define SWITCH_DECLARE(type) type
|
||||
#define SWITCH_DECLARE_TYPEDEF(type, name) type (name)
|
||||
#define SWITCH_DECLARE_NONSTD(type) type
|
||||
#define SWITCH_DECLARE_DATA
|
||||
#define SWITCH_MOD_DECLARE(type) type
|
||||
|
||||
@@ -1690,7 +1690,7 @@ struct switch_console_callback_match {
|
||||
};
|
||||
typedef struct switch_console_callback_match switch_console_callback_match_t;
|
||||
|
||||
typedef void (*switch_cap_callback_t) (const char *var, const char *val, void *user_data);
|
||||
typedef SWITCH_DECLARE_TYPEDEF(void, *switch_cap_callback_t) (const char *var, const char *val, void *user_data);
|
||||
typedef switch_status_t (*switch_console_complete_callback_t) (const char *, const char *, switch_console_callback_match_t **matches);
|
||||
typedef switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void *, switch_abc_type_t);
|
||||
typedef switch_bool_t (*switch_tone_detect_callback_t) (switch_core_session_t *, const char *, const char *);
|
||||
|
||||
Reference in New Issue
Block a user