/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
* bino
* Copyright (C) Henrik Reinstädtler 2011
*
* bino is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* bino is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see .
*/
#ifndef _PLAYLIST_H_
#define _PLAYLIST_H_
class playlistItem
{
public:
playlistItem();
~playlistItem();
std::string name;//Name of Item
std::string path;//path to the Item(eg. /home/user/video.mp4)
std::string description;//Description of Item
}
class playlist
{
public:
void Createlist(const std::string name);
void addItem(std::string name, std::string FilePath);
void save(std::string fileName);
void open(std::string path);
void next();
void reset();
void setTo(int index);
void last();
int getCurrentIndex();
media_input current();
protected:
media_input getItem(int I);
void initalizeDataBase();
template
void addEntry(const char* table,const char* name, T);
template
T getValue(const char* table, int index);
private:
int index;
media_input[] Items;
};
#endif // _PLAYLIST_H_