Add remaining documentation
[libcontrac.git] / include / contrac / rpi_list.h
1 /** \ingroup KeyGeneration
2 * @file
3 * @author David Llewellyn-Jones <david@flypig.co.uk>
4 * @version $(VERSION)
5 *
6 * @section LICENSE
7 *
8 * Copyright David Llewellyn-Jones, 2020
9 * Released under the GPLv2.
10 *
11 * @brief Provides a list of RPIs
12 * @section DESCRIPTION
13 *
14 * This class allows the simplified management of lists of Rpi objects. This is
15 * useful when checking DTKs received from a Diagnosis Server with RPIs
16 * captured over Bluetooth. Combined with the \ref DtkList class the two can
17 * be easily stored and passed into the \ref match_list_find_matches() function.
18 *
19 */
20
21 /** \addtogroup Containers
22 * @{
23 */
24
25 #ifndef __RPI_LIST_H
26 #define __RPI_LIST_H
27
28 // Includes
29
30 #include "contrac/contrac.h"
31 #include "contrac/rpi.h"
32
33 // Defines
34
35 // Structures
36
37 /**
38 * An opaque structure that represents the head of the list.
39 *
40 * The internal structure can be found in rpi_list.c
41 */
42 typedef struct _RpiList RpiList;
43
44 /**
45 * An opaque structure that represents an item in the list.
46 *
47 * The internal structure can be found in rpi_list.c
48 */
49 typedef struct _RpiListItem RpiListItem;
50
51 // Function prototypes
52
53 RpiList * rpi_list_new();
54 void rpi_list_delete(RpiList * data);
55
56 void rpi_list_append(RpiList * data, Rpi * rpi);
57 void rpi_list_add_beacon(RpiList * data, unsigned char const * rpi_bytes, uint8_t time_interval_number);
58
59 RpiListItem const * rpi_list_first(RpiList const * data);
60 RpiListItem const * rpi_list_next(RpiListItem const * data);
61 Rpi const * rpi_list_get_rpi(RpiListItem const * data);
62
63 // Function definitions
64
65 #endif // __RPI_LIST_H
66
67 /** @} addtogroup Containers*/
68