Libu2f-emu  0.0.0
Universal 2nd Factor (U2F) Emulation C Library
counter.h
Go to the documentation of this file.
1 #ifndef COUNTER_H
2 #define COUNTER_H
3 
4 #include <stdbool.h>
5 #include <stdint.h>
6 
7 #include "u2f-emu-types.h"
8 
9 
10 #define COUNTER_FILENAME "counter"
11 
21 bool counter_new_from_dir(const char *pathname,
22  struct u2f_emu_vdev_counter **counter_ref);
23 
32  struct u2f_emu_vdev_counter **counter_ref);
33 
39 void counter_free(struct u2f_emu_vdev_counter *vdev_counter);
40 
41 #endif
void counter_free(struct u2f_emu_vdev_counter *vdev_counter)
Release the ressources used by the counter.
Definition: counter.c:125
U2F virtual emulated device counter structure.
Definition: u2f-emu-types.h:42
bool counter_new_epthemeral(struct u2f_emu_vdev_counter **counter_ref)
Create a new ephemeral counter.
Definition: counter.c:103
bool counter_new_from_dir(const char *pathname, struct u2f_emu_vdev_counter **counter_ref)
Create a new counter that sync with the counter file inside the setup directory.
Definition: counter.c:67