libcontrac
A library for contact tracing
Data Structures | Functions
dtk_list.c File Reference

Provides a list of DTKs. More...

#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdint.h>
#include "contrac/contrac.h"
#include "contrac/utils.h"
#include "contrac/log.h"
#include "contrac/dtk_list.h"
Include dependency graph for dtk_list.c:

Data Structures

struct  DtkListItem
 A DTK list element. More...
 
struct  DtkList
 The head of a DTK list. More...
 

Functions

DtkList * dtk_list_new ()
 
void dtk_list_delete (DtkList *data)
 
void dtk_list_append (DtkList *data, Dtk *dtk)
 
DtkListItem const * dtk_list_first (DtkList const *data)
 
DtkListItem const * dtk_list_next (DtkListItem const *data)
 
Dtk const * dtk_list_get_dtk (DtkListItem const *data)
 
void dtk_list_add_diagnosis (DtkList *data, unsigned char const *dtk_bytes, uint32_t day_number)
 

Detailed Description

Provides a list of DTKs.

Author
David Llewellyn-Jones david.nosp@m.@fly.nosp@m.pig.c.nosp@m.o.uk
Version
0.01

LICENSE

Copyright David Llewellyn-Jones, 2020 Released under the GPLv2.

DESCRIPTION

This class allows the simplified management of lists of Dtk objects. This is useful when checking DTKs received from a Diagnosis Server with RPIs captured over Bluetooth. Combined with the RpiList class the two can be easily stored and passed into the match_list_find_matches() function.