court_monitor/Storage.h

31 lines
548 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef COURT_MONITOR_STORAGE_H
#define COURT_MONITOR_STORAGE_H
#include <cstddef>
#include <string>
#include <vector>
struct Counter
{
int courtId = 0;
std::string caseNumber;
std::size_t value = 0;
};
struct Subscription
{
int userId = 0;
std::vector<Counter> counters;
};
struct LocalStorage
{
std::string token;
std::vector<Subscription> subscriptions;
std::uint32_t checkTime; // секунды с 00:00
};
void loadStorage(LocalStorage& storage);
void saveStorage(const LocalStorage& storage);
#endif // COURT_MONITOR_STORAGE_H