spandsp
0.0.6
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * schedule.h 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2004 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 */ 00025 00026 /*! \file */ 00027 00028 /*! \page schedule_page Scheduling 00029 \section schedule_page_sec_1 What does it do? 00030 ???. 00031 00032 \section schedule_page_sec_2 How does it work? 00033 ???. 00034 */ 00035 00036 #if !defined(_SPANDSP_SCHEDULE_H_) 00037 #define _SPANDSP_SCHEDULE_H_ 00038 00039 /*! A scheduled event entry. */ 00040 typedef struct span_sched_s span_sched_t; 00041 00042 /*! A scheduled event queue. */ 00043 typedef struct span_sched_state_s span_sched_state_t; 00044 00045 typedef void (*span_sched_callback_func_t)(span_sched_state_t *s, void *user_data); 00046 00047 #if defined(__cplusplus) 00048 extern "C" 00049 { 00050 #endif 00051 00052 SPAN_DECLARE(uint64_t) span_schedule_next(span_sched_state_t *s); 00053 SPAN_DECLARE(uint64_t) span_schedule_time(span_sched_state_t *s); 00054 00055 SPAN_DECLARE(int) span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data); 00056 SPAN_DECLARE(void) span_schedule_update(span_sched_state_t *s, int us); 00057 SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int id); 00058 00059 SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s); 00060 SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s); 00061 SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s); 00062 00063 #if defined(__cplusplus) 00064 } 00065 #endif 00066 00067 #endif 00068 /*- End of file ------------------------------------------------------------*/