UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
apt_cyclic_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_cyclic_queue.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef APT_CYCLIC_QUEUE_H
20 #define APT_CYCLIC_QUEUE_H
21 
22 /**
23  * @file apt_cyclic_queue.h
24  * @brief Cyclic FIFO Queue of Opaque void* Objects
25  */
26 
27 #include "apt.h"
28 
30 
31 /** Default size (number of elements) of cyclic queue */
32 #define CYCLIC_QUEUE_DEFAULT_SIZE 100
33 
34 /** Opaque cyclic queue declaration */
36 
37 /**
38  * Create cyclic queue.
39  * @param size the initial size of the queue
40  * @return the created queue
41  */
43 
44 /**
45  * Destroy cyclic queue.
46  * @param queue the queue to destroy
47  */
49 
50 /**
51  * Push object to the queue.
52  * @param queue the queue to push object to
53  * @param obj the object to push
54  */
56 
57 /**
58  * Pop object from the queue.
59  * @param queue the queue to pop message from
60  */
62 
63 /**
64  * Clear the queue (remove all the elements from the queue).
65  * @param queue the queue to clear
66  */
68 
69 /**
70  * Query whether the queue is empty.
71  * @param queue the queue to query
72  * @return TRUE if empty, otherwise FALSE
73  */
75 
76 
78 
79 #endif /* APT_CYCLIC_QUEUE_H */