esmp3/include/playlist.h

26 lines
516 B
C
Raw Normal View History

#pragma once
#include <vector>
#include <Arduino.h>
class Playlist {
private:
std::vector<String> files;
uint8_t current_file = 0;
2022-08-21 09:37:42 +00:00
uint32_t current_time = 0;
void set_current_position(uint8_t file, uint32_t position=0);
String rfid_id;
public:
2022-08-21 09:37:42 +00:00
Playlist(String rfid_id="");
void add_file(String filename);
void sort();
2022-08-21 09:37:42 +00:00
String get_rfid_id();
String get_current_file_name();
bool next_track();
bool prev_track();
void restart();
void set_current_time(uint32_t time);
uint32_t get_current_time();
};