view include/track/types.h @ 138:28842a8d0c6b

dep/animia: huge refactor (again...) but this time, it actually compiles! and it WORKS! (on win32... not sure about other platforms...) configuring players is still not supported: at some point I'll prune something up...
author Paper <mrpapersonic@gmail.com>
date Sun, 12 Nov 2023 04:53:19 -0500
parents 39521c47c7a3
children
line wrap: on
line source

#ifndef __track__types_h
#define __track__types_h

#include <string>
#include <vector>

namespace Track {
namespace Types {

struct MediaPlayer {
	public:
		std::string GetName() const { return _name; };
		std::string GetExecutable() const { return _executable; };
		bool GetEnabled() const { return _enabled; };

		void SetName(const std::string& name) { _name = name; };
		void SetExecutable(const std::string& executable) { _executable = executable; };
		void SetEnabled(const bool enabled) { _enabled = enabled; };

	private:
		std::string _name;
		std::string _executable;
		bool _enabled;
};

struct MediaExtension {
	public:
		std::string GetExtension() const { return _extension; };
		bool GetEnabled() const { return _enabled; };

		void SetExtension(const std::string& extension) { _extension = extension; };
		void SetEnabled(const bool enabled) { _enabled = enabled; };

	private:
		std::string _extension;
		bool _enabled;
};

void LoadPlayers(std::vector<MediaPlayer>& players);
void LoadExtensions(std::vector<MediaExtension>& extensions);

void SavePlayers(const std::vector<MediaPlayer>& players);
void SaveExtensions(const std::vector<MediaExtension>& extensions);

}
}

#endif // __track__types_h