diff --git a/src/include/switch.h b/src/include/switch.h index 5d34e79eca..b08cd3329c 100644 --- a/src/include/switch.h +++ b/src/include/switch.h @@ -39,32 +39,9 @@ extern "C" { #include <config.h> #endif -#include <switch_platform.h> - -#include <apr.h> -#include <apr_network_io.h> -#include <apr_errno.h> -#include <apr_general.h> -#include <apr_thread_proc.h> -#include <apr_thread_mutex.h> -#include <apr_thread_cond.h> -#include <apr_thread_rwlock.h> -#include <apr_file_io.h> -#include <apr_poll.h> -#include <apr_dso.h> -#include <apr_hash.h> -#include <apr_strings.h> -#include <apr_network_io.h> -#include <apr_poll.h> -#include <apr_queue.h> -#include <apr_uuid.h> -#include <apr_strmatch.h> -#define APR_WANT_STDIO -#define APR_WANT_STRFUNC -#include <apr_want.h> #include <assert.h> -#include <sqlite3.h> +#include <switch_platform.h> #include <switch_apr.h> #include <switch_sqlite.h> #include <switch_types.h> diff --git a/src/include/switch_apr.h b/src/include/switch_apr.h index 86c9a17310..d451789000 100644 --- a/src/include/switch_apr.h +++ b/src/include/switch_apr.h @@ -35,6 +35,28 @@ extern "C" { #endif +#include <apr.h> +#include <apr_network_io.h> +#include <apr_errno.h> +#include <apr_general.h> +#include <apr_thread_proc.h> +#include <apr_thread_mutex.h> +#include <apr_thread_cond.h> +#include <apr_thread_rwlock.h> +#include <apr_file_io.h> +#include <apr_poll.h> +#include <apr_dso.h> +#include <apr_hash.h> +#include <apr_strings.h> +#include <apr_network_io.h> +#include <apr_poll.h> +#include <apr_queue.h> +#include <apr_uuid.h> +#include <apr_strmatch.h> +#define APR_WANT_STDIO +#define APR_WANT_STRFUNC +#include <apr_want.h> + /* The pieces of apr we allow ppl to pass around between modules we typedef into our namespace and wrap all the functions any other apr code should be as hidden as possible. diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index 7d70666513..b44935b454 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -46,25 +46,25 @@ extern "C" { #ifdef WIN32 #if defined(SWITCH_CORE_DECLARE_STATIC) -#define SWITCH_DECLARE(type) type __stdcall -#define SWITCH_DECLARE_NONSTD(type) type __cdecl +#define SWITCH_DECLARE(type) type __stdcall +#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_NONSTD(type) __declspec(dllexport) type __cdecl -#define SWITCH_DECLARE_DATA __declspec(dllexport) +#define SWITCH_DECLARE(type) __declspec(dllexport) type __stdcall +#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_NONSTD(type) __declspec(dllimport) type __cdecl -#define SWITCH_DECLARE_DATA __declspec(dllimport) +#define SWITCH_DECLARE(type) __declspec(dllimport) type __stdcall +#define SWITCH_DECLARE_NONSTD(type) __declspec(dllimport) type __cdecl +#define SWITCH_DECLARE_DATA __declspec(dllimport) #endif #if defined(SWITCH_MOD_DECLARE_STATIC) -#define SWITCH_MOD_DECLARE(type) type __cdecl +#define SWITCH_MOD_DECLARE(type) type __cdecl #elif defined(MOD_EXPORTS) -#define SWITCH_MOD_DECLARE(type) __declspec(dllexport) type __cdecl +#define SWITCH_MOD_DECLARE(type) __declspec(dllexport) type __cdecl #else -#define SWITCH_MOD_DECLARE(type) __declspec(dllimport) type __cdecl +#define SWITCH_MOD_DECLARE(type) __declspec(dllimport) type __cdecl #endif #else //not win32 #define SWITCH_DECLARE(type) type diff --git a/src/include/switch_sqlite.h b/src/include/switch_sqlite.h index 3d4fbd8417..dd0fe3b8aa 100644 --- a/src/include/switch_sqlite.h +++ b/src/include/switch_sqlite.h @@ -35,6 +35,8 @@ extern "C" { #endif +#include <sqlite3.h> + typedef sqlite3 switch_core_db; #define switch_core_db_aggregate_context sqlite3_aggregate_context diff --git a/src/include/switch_types.h b/src/include/switch_types.h index f17ec4dfe4..65fae82cc1 100644 --- a/src/include/switch_types.h +++ b/src/include/switch_types.h @@ -152,7 +152,6 @@ typedef struct switch_event_header switch_event_header; typedef struct switch_event switch_event; typedef struct switch_event_subclass switch_event_subclass; typedef struct switch_event_node switch_event_node; -typedef void (*switch_event_callback_t)(switch_event *); typedef struct switch_loadable_module switch_loadable_module; typedef struct switch_frame switch_frame; typedef struct switch_channel switch_channel; @@ -188,6 +187,7 @@ typedef struct switch_io_event_hooks switch_io_event_hooks; typedef struct switch_buffer switch_buffer; typedef struct switch_codec_settings switch_codec_settings; typedef void (*switch_application_function)(switch_core_session *, char *); +typedef void (*switch_event_callback_t)(switch_event *); typedef switch_caller_extension *(*switch_dialplan_hunt_function)(switch_core_session *); typedef switch_status (*switch_event_handler)(switch_core_session *); typedef switch_status (*switch_outgoing_channel_hook)(switch_core_session *, switch_caller_profile *, switch_core_session *);