File: coap_list.h

package info (click to toggle)
libcoap 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,540 kB
  • ctags: 1,419
  • sloc: ansic: 10,982; sh: 4,486; makefile: 215
file content (33 lines) | stat: -rw-r--r-- 836 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 * -*- */

/* coap_list.h -- CoAP list structures
 *
 * Copyright (C) 2010,2011,2015 Olaf Bergmann <bergmann@tzi.org>
 *
 * This file is part of the CoAP library libcoap. Please see README for terms of
 * use.
 */

#ifndef _COAP_LIST_H_
#define _COAP_LIST_H_

#include "utlist.h"

typedef struct coap_list_t {
  struct coap_list_t *next;
  char data[];
} coap_list_t;

/**
 * Adds node to given queue, ordered by specified order function. Returns 1
 * when insert was successful, 0 otherwise.
 */
int coap_insert(coap_list_t **queue, coap_list_t *node);

/* destroys specified node */
int coap_delete(coap_list_t *node);

/* removes all items from given queue and frees the allocated storage */
void coap_delete_list(coap_list_t *queue);

#endif /* _COAP_LIST_H_ */