create macro to define scheduler function prototypes.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5168 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2007-05-12 21:43:41 +00:00
parent 521eac756e
commit 606199ff20
3 changed files with 9 additions and 4 deletions

View File

@ -1013,8 +1013,13 @@ typedef switch_bool_t (*switch_media_bug_callback_t) (switch_media_bug_t *, void
typedef void (*switch_application_function_t) (switch_core_session_t *, char *);
typedef void (*switch_event_callback_t) (switch_event_t *);
typedef switch_caller_extension_t *(*switch_dialplan_hunt_function_t) (switch_core_session_t *, void *, switch_caller_profile_t *);
typedef struct switch_scheduler_task switch_scheduler_task_t;
typedef void (*switch_scheduler_func_t) (switch_scheduler_task_t *task);
#define SWITCH_STANDARD_SCHED_FUNC(name) static void name (switch_scheduler_task_t *task)
typedef switch_status_t (*switch_state_handler_t) (switch_core_session_t *);
typedef struct switch_stream_handle switch_stream_handle_t;
typedef switch_status_t (*switch_stream_handle_write_function_t) (switch_stream_handle_t *handle, const char *fmt, ...);

View File

@ -71,7 +71,7 @@ static void send_heartbeat(void)
}
}
static void heartbeat_callback(switch_scheduler_task_t *task)
SWITCH_STANDARD_SCHED_FUNC(heartbeat_callback)
{
send_heartbeat();

View File

@ -615,7 +615,7 @@ struct hangup_helper {
switch_call_cause_t cause;
};
static void sch_hangup_callback(switch_scheduler_task_t *task)
SWITCH_STANDARD_SCHED_FUNC(sch_hangup_callback)
{
struct hangup_helper *helper;
switch_core_session_t *session, *other_session;
@ -665,7 +665,7 @@ struct transfer_helper {
char *context;
};
static void sch_transfer_callback(switch_scheduler_task_t *task)
SWITCH_STANDARD_SCHED_FUNC(sch_transfer_callback)
{
struct transfer_helper *helper;
switch_core_session_t *session;
@ -732,7 +732,7 @@ struct broadcast_helper {
switch_media_flag_t flags;
};
static void sch_broadcast_callback(switch_scheduler_task_t *task)
SWITCH_STANDARD_SCHED_FUNC(sch_broadcast_callback)
{
struct broadcast_helper *helper;
assert(task);