PlayerLink/src/backend.hpp

38 lines
1006 B
C++
Raw Normal View History

2024-11-01 14:10:00 +01:00
#ifndef _BACKEND_
#define _BACKEND_
#include <stdint.h>
#include <memory>
#include <string>
2024-11-08 19:57:34 +01:00
#include <filesystem>
2024-11-01 14:10:00 +01:00
struct MediaInfo {
bool paused;
std::string songTitle;
std::string songArtist;
std::string songAlbum;
std::string songThumbnailData;
int64_t songDuration;
int64_t songElapsedTime;
std::string playbackSource;
2024-11-06 11:28:59 +01:00
MediaInfo() {}
2024-11-01 14:10:00 +01:00
MediaInfo(bool p, std::string title, std::string artist, std::string album, std::string source,
std::string thumbnail, int duration, int elapsed)
: paused(p),
songTitle(title),
songArtist(artist),
songAlbum(album),
songDuration(duration),
songElapsedTime(elapsed),
playbackSource(source),
songThumbnailData(thumbnail) {}
};
namespace backend {
bool init();
2024-11-04 18:29:25 +01:00
bool toggleAutostart(bool enabled);
2024-11-08 19:57:34 +01:00
std::filesystem::path getConfigDirectory();
2024-11-01 14:10:00 +01:00
std::shared_ptr<MediaInfo> getMediaInformation();
} // namespace backend
2024-11-01 14:10:00 +01:00
#endif