Defines, Structures, Typedefs, Functions.
More...
Files |
file | clClistApi.h |
| Header file of Circular List Management related APIs.
|
file | clClistErrors.h |
| Header file of Circular List Management related Error Codes.
|
Functions |
ClRcT | clClistAfterNodeAdd (CL_IN ClClistT listHead, CL_IN ClClistNodeT currentNode, CL_IN ClClistDataT userData) |
| Adds a node after a specified node in the list.
|
ClRcT | clClistBeforeNodeAdd (CL_IN ClClistT listHead, CL_IN ClClistNodeT currentNode, CL_IN ClClistDataT userData) |
| Adds a node before a specified node in the list.
|
ClRcT | clClistCreate (CL_IN ClUint32T maxSize, CL_IN ClClistDropPolicyT dropPolicy, CL_IN ClClistDeleteCallbackT fpUserDeleteCallBack, CL_IN ClClistDeleteCallbackT fpUserDestroyCallBack, CL_OUT ClClistT *pListHead) |
| Creates a Circular Linked List.
|
ClRcT | clClistDataGet (CL_IN ClClistT listHead, CL_IN ClClistNodeT node, CL_OUT ClClistDataT *pUserData) |
| Retrieves data from a node in the list.
|
ClRcT | clClistDelete (CL_IN ClClistT *pListHead) |
| Destroys the list.
|
ClRcT | clClistFirstNodeAdd (CL_IN ClClistT listHead, CL_IN ClClistDataT userData) |
| Adds a node at the beginning of the list.
|
ClRcT | clClistFirstNodeGet (CL_IN ClClistT listHead, CL_IN ClClistNodeT *pFirstNode) |
| Returns the first node from the list.
|
ClRcT | clClistLastNodeAdd (CL_IN ClClistT listHead, CL_IN ClClistDataT userData) |
| Adds a node at the end of the list.
|
ClRcT | clClistLastNodeGet (CL_IN ClClistT listHead, CL_OUT ClClistNodeT *pLastNode) |
| Returns last node from the list.
|
ClRcT | clClistNextNodeGet (CL_IN ClClistT listHead, CL_IN ClClistNodeT currentNode, CL_OUT ClClistNodeT *pNextNode) |
| Returns next node from the list.
|
ClRcT | clClistNodeDelete (CL_IN ClClistT listHead, CL_IN ClClistNodeT node) |
| Deletes a node from the list.
|
ClRcT | clClistPreviousNodeGet (CL_IN ClClistT listHead, CL_IN ClClistNodeT currentNode, CL_OUT ClClistNodeT *pPreviousNode) |
| Returns next node from the list.
|
ClRcT | clClistSizeGet (CL_IN ClClistT listHead, CL_OUT ClUint32T *pSize) |
| Returns number of data elements (nodes) in the list.
|
ClRcT | clClistWalk (CL_IN ClClistT listHead, CL_IN ClClistWalkCallbackT fpUserWalkCallBack, CL_IN void *userArg) |
| Walks through the list.
|
Detailed Description
Defines, Structures, Typedefs, Functions.
Typedef Documentation
Delete callback gets called, whenever a Node is getting deleted.
- Header File:
- clClistApi.h
- Parameters
-
userData | (in) Data of the node is being deleted. |
- Return values
-
- Description:
- This dequeue callback function gets called, whenever user performs node deletion on the Circular list. The Data of the node will be exposed to the user on the callback. This is the place where user can cleanup their data.
- Library File:
- ClUtil
- See Also
- clQueueCreate(), clQueueDelete()
Walk Callback gets called, whenever traverse happens on the Circular linked list.
- Header File:
- clCntApi.h
- Parameters
-
userData | (in) Data of the node is being accessed. |
userArg | (in) User arg of the callback function |
- Return values
-
- Description:
- This Walk callback function gets called, whenever user performs traverse on the Circular Linked List. User can pass any cookie variable as UserArgument, that will be passed as part of the callback function.
- Library File:
- ClUtil
- See Also
- clQueueCreate(), clQueueDelete()
Enumeration Type Documentation
link list with x nodes.
It decides the action to be taken when the linked list is full. The values of the ClClistDropPolicyT enumeration type have the following interpretation:
- Enumerator:
CL_NO_DROP |
If the first node not to be dropped even if the list is full.
|
CL_DROP_FIRST |
Drops the first node if the list is full.
|
CL_DROP_MAX_TYPE |
Adds a new drop policy types before this.
|
Function Documentation
Adds a node after a specified node in the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
currentNode | (in) Handle of node after which the specified data must be added. |
userData | (in) User-data. Memory allocation and de-allocation for user-data must be done by you. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_MAXSIZE_REACHED | If the maximum size is reached. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API adds a node after a specified node in the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistLastNodeAdd(), clClistFirstNodeAdd()
Adds a node before a specified node in the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
currentNode | (in) Handle of node before which the specified data must be added. |
userData | (in) User-data. Memory allocation and de-allocation for user-data must be done by you. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_MAXSIZE_REACHED | If the maximum size is reached. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API adds a node before a specified node in the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistNextNodeGet() clClistFirstNodeAdd(), clClistLastNodeAdd()
Creates a Circular Linked List.
- Header File
- clClistApi.h
- Parameters
-
maxSize | (in) Maximum size of the list. It specifies the maximum number of nodes that can exist at any point of time in the list. This must be an unsigned integer. You can add nodes into the list until this maximum limit is reached. If you specify this parameter as 0, then, there is no limit on the size of the list. |
dropPolicy | (in) Drop policy for the list. Whenever you try to add a node in the list and the list is full, if this policy is set to CL_DROP_FIRST , the first node is dropped and the specified node is added. If this parameter is set to CL_NO_DROP , then an error is returned. This parameter is valid, only if the list is of fixed size. |
fpUserDeleteCallBack | (in) Pointer to the delete callback function of the user. This function accepts a parameter of type ClClistDataT. After deleting the specified node, the user data stored in that node is passed as an argument to the call back function. |
fpUserDestroyCallBacK | (in) Pointer to the user's destroy callback function. This function accepts a parameter of type ClClistDataT. When destroying, the user data stored in each node is passed as an argument to the call back function, one by one. |
pListHead | (out) Pointer to the variable of type ClClistT in which the function returns a valid list handle on successful creation of the list. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API creates and initializes the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete()
Retrieves data from a node in the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
node | (in) Handle of the node. |
pUserData | (out) Pointer to variable of type ClClistDataT. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API retrieves data from the specified node in the list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Destroys the list.
- Header File:
- clClistApi.h
- Parameters
-
pListHead | (in) Handle of list returned by the create API. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API deletes all the nodes in the list. The destroy callback function, registered during the creation, is called for every node in the list with the corresponding data.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Adds a node at the beginning of the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
userData | (in) User-data. Memory allocation and de-allocation for user-data must be done by you. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_MAXSIZE_REACHED | If the maximum size is reached. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API adds a node at the beginning of the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistCreate(), clClistDelete()
Returns the first node from the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
pFirstNode | (out) Pointer to variable of type ClClistNodeT. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
CL_ERR_NOT_EXIST | If the list is empty (an acceptable way to check for length 0 lists). |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API returns the first node from the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete()
Adds a node at the end of the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
userData | (in) User-data. Memory allocation and de-allocation for user-data must be done by you. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NO_MEMORY | On memory allocation failure. |
CL_ERR_MAXSIZE_REACHED | If the maximum size is reached. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API adds a node at the end of the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeAdd()
Returns last node from the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
pLastNode | (out) Pointer to variable of type ClClistNodeT. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
CL_ERR_NOT_EXIST | If the list is empty. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API is used to return the last node from the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Returns next node from the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
currentNode | (in) Handle of the current node. |
pNextNode | (out) Pointer to variable of type ClClistNodeT. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
CL_ERR_NOT_EXIST | If the list is empty. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API is used to return the next node of the specified node from the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Deletes a node from the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
node | (in) Handle of node which is to be deleted. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API deletes the specified node from the Circular Linked list. The delete callback function, registered during the creation is called with the data in the node to be deleted.
- Library File:
- ClUtil
- See Also
- clClistDelete()
Returns next node from the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
currentNode | (in) Handle of the current node. |
pPreviousNode | (out) Pointer to variable of type ClClistNodeT. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
CL_ERR_NOT_EXIST | If the list is empty. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API is used to return the previous node of the specified node from the Circular Linked list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Returns number of data elements (nodes) in the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
pSize | (out) Pointer to variable of type ClUint32T. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API is used to return the number of data elements (nodes) in the list.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()
Walks through the list.
- Header File:
- clClistApi.h
- Parameters
-
listHead | (in) Handle of list returned by the create API. |
fpUserWalkCallBack | (in) Pointer to user callback function. It can have two values:
- The first parameter must be of type ClClistDataT.
- The second parameter must be of type void *.
The user-data stored in each node is passed one-by-one as the first argument to the callback function.
|
userArg | (in) User-specified argument. This variable is passed as the second argument to the callback function. |
- Return values
-
CL_OK | The API executed successfully. |
CL_ERR_NULL_POINTER | On passing a NULL pointer. |
CL_ERR_INVALID_HANDLE | On passing an invalid handle. |
- Note
- Returned error is a combination of the Component Identifier and Error Code. Here as Return values only the Error Codes are listed. Use
CL_GET_ERROR_CODE(RET_CODE)
defined in clCommonErrors.h to get the error code.
- Description:
- This API performs a walk on the Circular Linked list. The user-specified callback function is called with every node's data.
- Library File:
- ClUtil
- See Also
- clClistDelete(), clClistCreate(), clClistFirstNodeGet(), clClistLastNodeGet()