summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/complications/totp_face.h
blob: 0527627aae38e3e2ec909757d3a657e5a3c47046 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef TOTP_FACE_H_
#define TOTP_FACE_H_

#include "movement.h"

typedef struct {
    uint32_t timestamp;
    uint8_t steps;
    uint32_t current_code;

} totp_state_t;

void totp_face_setup(movement_settings_t *settings, void ** context_ptr);
void totp_face_activate(movement_settings_t *settings, void *context);
bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
void totp_face_resign(movement_settings_t *settings, void *context);

static const watch_face_t totp_face = {
    totp_face_setup,
    totp_face_activate,
    totp_face_loop,
    totp_face_resign,
    NULL
};

#endif // TOTP_FACE_H_