1 /** \ingroup KeyGeneration
3 * @author David Llewellyn-Jones <david@flypig.co.uk>
8 * Copyright David Llewellyn-Jones, 2020
9 * Released under the GPLv2.
11 * @brief Provides a list of RPIs
12 * @section DESCRIPTION
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.
21 /** \addtogroup Containers
30 #include "contrac/contrac.h"
31 #include "contrac/rpi.h"
38 * An opaque structure that represents the head of the list.
40 * The internal structure can be found in rpi_list.c
42 typedef struct _RpiList RpiList
;
45 * An opaque structure that represents an item in the list.
47 * The internal structure can be found in rpi_list.c
49 typedef struct _RpiListItem RpiListItem
;
51 // Function prototypes
53 RpiList
* rpi_list_new();
54 void rpi_list_delete(RpiList
* data
);
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
);
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
);
63 // Function definitions
65 #endif // __RPI_LIST_H
67 /** @} addtogroup Containers*/