add preliminary support for SIP timers (issue #4359)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-08-22 22:55:06 +00:00
parent c9287324ea
commit 3480297607
3 changed files with 220 additions and 74 deletions

View File

@@ -62,10 +62,27 @@ typedef int (*ast_sched_cb)(void *data);
* Schedule an event to take place at some point in the future. callback
* will be called with data as the argument, when milliseconds into the
* future (approximately)
* If callback returns 0, no further events will be re-scheduled
* Returns a schedule item ID on success, -1 on failure
*/
extern int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, void *data);
/*!Adds a scheduled event */
/*!
* \param con Schduler context to add
* \param when how many milliseconds to wait for event to occur
* \param callback function to call when the amount of time expires
* \param data data to pass to the callback
* \param variable If true, the result value of callback function will be
* used for rescheduling
* Schedule an event to take place at some point in the future. callback
* will be called with data as the argument, when milliseconds into the
* future (approximately)
* If callback returns 0, no further events will be re-scheduled
* Returns a schedule item ID on success, -1 on failure
*/
extern int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, void *data, int variable);
/*! Deletes a scheduled event */
/*!
* \param con scheduling context to delete item from