spandsp 0.0.6
schedule.h
Go to the documentation of this file.
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * schedule.h
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2004 Steve Underwood
9 *
10 * All rights reserved.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 2.1,
14 * as published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26/*! \file */
27
28/*! \page schedule_page Scheduling
29\section schedule_page_sec_1 What does it do?
30???.
31
32\section schedule_page_sec_2 How does it work?
33???.
34*/
35
36#if !defined(_SPANDSP_SCHEDULE_H_)
37#define _SPANDSP_SCHEDULE_H_
38
39/*! A scheduled event entry. */
41
42/*! A scheduled event queue. */
44
45typedef void (*span_sched_callback_func_t)(span_sched_state_t *s, void *user_data);
46
47#if defined(__cplusplus)
48extern "C"
49{
50#endif
51
52SPAN_DECLARE(uint64_t) span_schedule_next(span_sched_state_t *s);
53SPAN_DECLARE(uint64_t) span_schedule_time(span_sched_state_t *s);
54
55SPAN_DECLARE(int) span_schedule_event(span_sched_state_t *s, int us, span_sched_callback_func_t function, void *user_data);
56SPAN_DECLARE(void) span_schedule_update(span_sched_state_t *s, int us);
57SPAN_DECLARE(void) span_schedule_del(span_sched_state_t *s, int id);
58
59SPAN_DECLARE(span_sched_state_t *) span_schedule_init(span_sched_state_t *s);
60SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s);
61SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s);
62
63#if defined(__cplusplus)
64}
65#endif
66
67#endif
68/*- End of file ------------------------------------------------------------*/
struct span_sched_s span_sched_t
Definition schedule.h:40
struct span_sched_state_s span_sched_state_t
Definition schedule.h:43
Definition private/schedule.h:31
Definition private/schedule.h:39