aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetlist.h
blob: 249e2f6e56f1995e48e4a1884fd503eec9c9dda9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef __CPHIDGETLIST
#define __CPHIDGETLIST

typedef struct _CList
{
	struct _CList *next;
	void *element;
} CList, *CListHandle;

int CList_addToList(CListHandle *list, void *element, 
	int (*compare_fptr)(void *element1, void *element2));
int CList_removeFromList(CListHandle *list, void *element, 
	int (*compare_fptr)(void *element1, void *element2),
	int freeDevice, void (*free_fptr)(void *element));
int CList_emptyList(CListHandle *list, int freeDevices, void (*free_fptr)(void *element));
int CList_findInList(CListHandle list, void *element, 
	int (*compare_fptr)(void *element1, void *element2), void **found_element);

#endif