Add remaining documentation
[libcontrac.git] / include / contrac / match.h
1 /** \ingroup Matching
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 way to match collected RPIs with downloaded DTKs
12 * @section DESCRIPTION
13 *
14 * This class provides functionality allowing RPIs that have been collected
15 * over Bluetooth to be matched against DTKs downloaded from a Diagnosis
16 * Server.
17 *
18 * The list of RPIs and DTKs can be constructed easily using the
19 * \ref Container functions.
20 *
21 */
22
23 /** \addtogroup Matching
24 * @{
25 */
26
27 #ifndef __MATCH_H
28 #define __MATCH_H
29
30 // Includes
31
32 #include "contrac/contrac.h"
33 #include "contrac/dtk.h"
34
35 // Defines
36
37 // Structures
38
39 /**
40 * An opaque structure that represents the head of the list.
41 *
42 * The internal structure can be found in match.c
43 */
44 typedef struct _MatchList MatchList;
45
46 /**
47 * An opaque structure that represents an item in the list.
48 *
49 * The internal structure can be found in match.c
50 */
51 typedef struct _MatchListItem MatchListItem;
52
53 // Function prototypes
54
55 MatchList * match_list_new();
56 void match_list_delete(MatchList * data);
57
58 void match_list_clear(MatchList * data);
59 size_t match_list_count(MatchList * data);
60
61 uint32_t match_list_get_day_number(MatchListItem const * data);
62 uint8_t match_list_get_time_interval_number(MatchListItem const * data);
63
64 MatchListItem const * match_list_first(MatchList const * data);
65 MatchListItem const * match_list_next(MatchListItem const * data);
66
67 void match_list_find_matches(MatchList * data, RpiList * beacons, DtkList * diagnosis_keys);
68
69 // Function definitions
70
71 #endif // __MATCH_H
72
73 /** @} addtogroup Matching*/
74