OpenClovis Logo

clQueueApi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : utils
21  * File : clQueueApi.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  *
27  * A simple queue implementation.
28  *
29  *
30  *****************************************************************************/
31 
32 /*************************************************************************/
33 /************************** QUEUE APIs ***********************************/
34 /*************************************************************************/
35 /* */
36 /* clQueueCreate */
37 /* clQueueNodeInsert */
38 /* clQueueNodeDelete */
39 /* clQueueWalk */
40 /* clQueueSizeGet */
41 /* clQueueDelete */
42 /* */
43 /*************************************************************************/
44 
57 #ifndef _CL_QUEUE_API_H_
58 #define _CL_QUEUE_API_H_
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
64 #include <clCommon.h>
65 
69 typedef ClPtrT ClQueueT;
70 
74 typedef ClHandleT ClQueueNodeT; // Mynk NTC
75 
79 typedef ClPtrT ClQueueDataT;
80 
81 
104 typedef ClRcT (*ClQueueWalkCallbackT)(CL_IN ClQueueDataT userData,
105  CL_IN void *userArg);
128 typedef void (*ClQueueDequeueCallbackT)(CL_IN ClQueueDataT userData);
129 
174 extern ClRcT clQueueCreate(CL_IN ClUint32T maxSize,
175  CL_IN ClQueueDequeueCallbackT fpUserDequeueCallBack,
176  CL_IN ClQueueDequeueCallbackT fpUserDestroyCallBack,
177  CL_OUT ClQueueT *pQueueHandle);
208 extern ClRcT clQueueNodeInsert(CL_IN ClQueueT queueHandle,
209  CL_IN ClQueueDataT userData);
240 extern ClRcT clQueueNodeDelete(CL_IN ClQueueT queueHandle,
241  CL_OUT ClQueueDataT* userData);
242 
280 extern ClRcT clQueueWalk(CL_IN ClQueueT queueHandle,
281  CL_IN ClQueueWalkCallbackT fpUserWalkFunction,
282  CL_IN void* userArg);
311 extern ClRcT clQueueSizeGet(CL_IN ClQueueT queueHandle,
312  CL_OUT ClUint32T *pSize);
313 
342 extern ClRcT clQueueDelete(CL_IN ClQueueT* pQueueHandle);
343 
344 #ifdef __cplusplus
345 }
346 #endif
347 
348 #endif /* _CL_QUEUE_API_H_ */
349 

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen