Mercurial > minori
comparison include/core/session.h @ 147:6fdf0632c003
track: use a bit of a more sane way to manage recognition
it also works with the new animia API
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 14 Nov 2023 13:19:40 -0500 |
| parents | 39521c47c7a3 |
| children | 975a3f0965e2 |
comparison
equal
deleted
inserted
replaced
| 146:d8a61e7e2a36 | 147:6fdf0632c003 |
|---|---|
| 1 #ifndef __core__session_h | 1 #ifndef __core__session_h |
| 2 #define __core__session_h | 2 #define __core__session_h |
| 3 | 3 |
| 4 #include "core/config.h" | 4 #include "core/config.h" |
| 5 #include "track/types.h" | |
| 6 #include "gui/locale.h" | 5 #include "gui/locale.h" |
| 7 #include <QElapsedTimer> | 6 #include <QElapsedTimer> |
| 8 | 7 |
| 9 struct Session { | 8 struct Session { |
| 10 public: | 9 public: |
| 14 int GetRequests() { return requests; }; | 13 int GetRequests() { return requests; }; |
| 15 int uptime() { return timer.elapsed(); } | 14 int uptime() { return timer.elapsed(); } |
| 16 | 15 |
| 17 Config config; | 16 Config config; |
| 18 | 17 |
| 19 struct { | |
| 20 std::vector<Track::Types::MediaPlayer> players; | |
| 21 std::vector<Track::Types::MediaExtension> extensions; | |
| 22 } recognition; | |
| 23 | |
| 24 private: | 18 private: |
| 25 uint32_t requests = 0; | 19 uint32_t requests = 0; |
| 26 QElapsedTimer timer; | 20 QElapsedTimer timer; |
| 27 }; | 21 }; |
| 28 | 22 |
