PlayerLink/src/backend.hpp

35 lines
917 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>
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;
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-01 14:10:00 +01:00
std::shared_ptr<MediaInfo> getMediaInformation();
} // namespace backend
2024-11-01 14:10:00 +01:00
#endif