#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>
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.
#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
extern "C" {
#endif
+#include <sqlite3.h>
+
typedef sqlite3 switch_core_db;
#define switch_core_db_aggregate_context sqlite3_aggregate_context
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;
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 *);