26 lines
516 B
C++
26 lines
516 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <Arduino.h>
|
|
|
|
class Playlist {
|
|
private:
|
|
std::vector<String> files;
|
|
uint8_t current_file = 0;
|
|
uint32_t current_time = 0;
|
|
void set_current_position(uint8_t file, uint32_t position=0);
|
|
String rfid_id;
|
|
|
|
public:
|
|
Playlist(String rfid_id="");
|
|
void add_file(String filename);
|
|
void sort();
|
|
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();
|
|
};
|