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 DTKs
12 * @section DESCRIPTION
14 * This class allows the simplified management of lists of Dtk objects. This is
15 * useful when checking DTKs received from a Diagnosis Server with RPIs
16 * captured over Bluetooth. Combined with the \ref RpiList 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/dtk.h"
38 * An opaque structure that represents the head of the list.
40 * The internal structure can be found in dtk_list.c
42 typedef struct _DtkList DtkList
;
45 * An opaque structure that represents an item in the list.
47 * The internal structure can be found in dtk_list.c
49 typedef struct _DtkListItem DtkListItem
;
51 // Function prototypes
53 DtkList
* dtk_list_new();
54 void dtk_list_delete(DtkList
* data
);
56 void dtk_list_append(DtkList
* data
, Dtk
* dtk
);
57 void dtk_list_add_diagnosis(DtkList
* data
, unsigned char const * dtk_bytes
, uint32_t day_number
);
59 DtkListItem
const * dtk_list_first(DtkList
const * data
);
60 DtkListItem
const * dtk_list_next(DtkListItem
const * data
);
61 Dtk
const * dtk_list_get_dtk(DtkListItem
const * data
);
63 // Function definitions
65 #endif // __DTK_LIST_H
67 /** @} addtogroup Containers*/