UniMRCP
1.3.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
libs
apr-toolkit
include
apt_timer_queue.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2014 Arsen Chaloyan
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* $Id: apt_timer_queue.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17
*/
18
19
#ifndef APT_TIMER_QUEUE_H
20
#define APT_TIMER_QUEUE_H
21
22
/**
23
* @file apt_timer_queue.h
24
* @brief Timer Queue
25
*/
26
27
#include "
apt.h
"
28
29
APT_BEGIN_EXTERN_C
30
31
/** Opaque timer declaration */
32
typedef
struct
apt_timer_t
apt_timer_t
;
33
/** Opaque timer queue declaration */
34
typedef
struct
apt_timer_queue_t
apt_timer_queue_t
;
35
36
/** Prototype of timer callback */
37
typedef
void (*
apt_timer_proc_f
)(
apt_timer_t
*timer,
void
*obj);
38
39
40
/** Create timer queue */
41
APT_DECLARE
(
apt_timer_queue_t
*)
apt_timer_queue_create
(apr_pool_t *pool);
42
43
/** Destroy timer queue */
44
APT_DECLARE
(
void
)
apt_timer_queue_destroy
(
apt_timer_queue_t
*timer_queue);
45
46
/** Advance scheduled timers */
47
APT_DECLARE
(
void
)
apt_timer_queue_advance
(
apt_timer_queue_t
*timer_queue, apr_uint32_t elapsed_time);
48
49
/** Is timer queue empty */
50
APT_DECLARE
(
apt_bool_t
)
apt_timer_queue_is_empty
(const
apt_timer_queue_t
*timer_queue);
51
52
/** Get current timeout */
53
APT_DECLARE
(
apt_bool_t
)
apt_timer_queue_timeout_get
(const
apt_timer_queue_t
*timer_queue, apr_uint32_t *timeout);
54
55
56
/** Create timer */
57
APT_DECLARE
(
apt_timer_t
*)
apt_timer_create
(
apt_timer_queue_t
*timer_queue,
apt_timer_proc_f
proc,
void
*obj, apr_pool_t *pool);
58
59
/** Set one-shot timer */
60
APT_DECLARE
(
apt_bool_t
)
apt_timer_set
(
apt_timer_t
*timer, apr_uint32_t timeout);
61
62
/** Kill timer */
63
APT_DECLARE
(
apt_bool_t
)
apt_timer_kill
(
apt_timer_t
*timer);
64
65
66
APT_END_EXTERN_C
67
68
#endif
/* APT_TIMER_QUEUE_H */
Generated on Mon Feb 2 2015 19:41:38 for UniMRCP by
1.8.3.1