Archive / / / / / Playlist.h
2008-10-21 13:51:33 UTC
previous next
/* Echo Media Player * Copyright (C) 2008 Shane O'Connell * * [ The original file includes a copyright header in this location describing * the file as being released under the terms of the GNU General Public * License. It has been removed in order to display the file as part of the * archive. ] */ #ifndef PLAYLIST_H_ #define PLAYLIST_H_ #include "DbPlaySource.h" #include "SQL.h" #include <list> #include <string> #include <boost/array.hpp> #include <sqlite3.h> class Database; class Playlist : public DbPlaySource { public: Playlist(); const Glib::ustring& get_name() const { return m_playlist_name; } const Glib::ustring& get_icon() const { return m_playlist_icon; } int get_num_tracks() const; void insert_track(int index, TrackRef track); void remove_track(int index); void move_track(int old_index, int new_index); private: Database& db; // TODO make these set to something Glib::ustring m_playlist_name; Glib::ustring m_playlist_icon; int m_size; long long m_playlist_id; SQLstmt m_remove1_stmt; SQLstmt m_remove2_stmt; SQLstmt m_insert1_stmt; SQLstmt m_insert2_stmt; }; typedef boost::shared_ptr<Playlist> PlaylistRef; #endif /* PLAYLIST_H_ */