libcoap
4.1.1
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Macros
Groups
Pages
coap_list.h
Go to the documentation of this file.
1
/* coap_list.h -- CoAP list structures
2
*
3
* Copyright (C) 2010,2011 Olaf Bergmann <bergmann@tzi.org>
4
*
5
* This file is part of the CoAP library libcoap. Please see
6
* README for terms of use.
7
*/
8
9
#ifndef _COAP_LIST_H_
10
#define _COAP_LIST_H_
11
12
struct
coap_linkedlistnode
{
13
struct
coap_linkedlistnode
*
next
;
14
void
*
data
;
15
20
void (*
delete_func
)(
void
*);
21
};
22
23
typedef
struct
coap_linkedlistnode
coap_list_t
;
24
29
int
coap_insert
(
coap_list_t
**queue,
coap_list_t
*node,
30
int
(*order)(
void
*,
void
*) );
31
32
/* destroys specified node */
33
int
coap_delete
(
coap_list_t
*node);
34
35
/* removes all items from given queue and frees the allocated storage */
36
void
coap_delete_list
(
coap_list_t
*queue);
37
43
coap_list_t
*
coap_new_listnode
(
void
*
data
,
void
(*
delete_func
)(
void
*) );
44
45
#endif
/* _COAP_LIST_H_ */
coap_new_listnode
coap_list_t * coap_new_listnode(void *data, void(*delete_func)(void *))
Creates a new list node and adds the given data object.
Definition:
coap_list.c:74
coap_linkedlistnode::delete_func
void(* delete_func)(void *)
Callback function that is called from coap_delete to release additional memory allocated by data Set ...
Definition:
coap_list.h:20
coap_linkedlistnode::next
struct coap_linkedlistnode * next
Definition:
coap_list.h:13
coap_linkedlistnode::data
void * data
Definition:
coap_list.h:14
coap_delete
int coap_delete(coap_list_t *node)
Definition:
coap_list.c:52
coap_delete_list
void coap_delete_list(coap_list_t *queue)
Definition:
coap_list.c:65
coap_linkedlistnode
Definition:
coap_list.h:12
coap_insert
int coap_insert(coap_list_t **queue, coap_list_t *node, int(*order)(void *, void *))
Adds node to given queue, ordered by specified order function.
Generated on Thu May 7 2015 19:23:26 for libcoap by
1.8.6