comparison include/track/types.h @ 118:39521c47c7a3

*: another huge megacommit, SORRY The torrents page works a lot better now Added the edit option to the anime list right click menu Vectorized currently playing files Available player and extensions are now loaded at runtime from files in (dotpath)/players.json and (dotpath)/extensions.json These paths are not permanent and will likely be moved to (dotpath)/recognition ... ... ...
author Paper <mrpapersonic@gmail.com>
date Tue, 07 Nov 2023 23:40:54 -0500
parents
children
comparison
equal deleted inserted replaced
117:2c1b6782e1d0 118:39521c47c7a3
1 #ifndef __track__types_h
2 #define __track__types_h
3
4 #include <string>
5 #include <vector>
6
7 namespace Track {
8 namespace Types {
9
10 struct MediaPlayer {
11 public:
12 std::string GetName() const { return _name; };
13 std::string GetExecutable() const { return _executable; };
14 bool GetEnabled() const { return _enabled; };
15
16 void SetName(const std::string& name) { _name = name; };
17 void SetExecutable(const std::string& executable) { _executable = executable; };
18 void SetEnabled(const bool enabled) { _enabled = enabled; };
19
20 private:
21 std::string _name;
22 std::string _executable;
23 bool _enabled;
24 };
25
26 struct MediaExtension {
27 public:
28 std::string GetExtension() const { return _extension; };
29 bool GetEnabled() const { return _enabled; };
30
31 void SetExtension(const std::string& extension) { _extension = extension; };
32 void SetEnabled(const bool enabled) { _enabled = enabled; };
33
34 private:
35 std::string _extension;
36 bool _enabled;
37 };
38
39 void LoadPlayers(std::vector<MediaPlayer>& players);
40 void LoadExtensions(std::vector<MediaExtension>& extensions);
41
42 void SavePlayers(const std::vector<MediaPlayer>& players);
43 void SaveExtensions(const std::vector<MediaExtension>& extensions);
44
45 }
46 }
47
48 #endif // __track__types_h