Archive / / / / / Library.h
2008-10-22 15:13:51 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 LIBRARY_H_ #define LIBRARY_H_ #include "../PlaySource.h" #include <gtkmm.h> #include <sqlite3.h> #include <boost/array.hpp> #include <map> class Database; class Library : public PlaySource { public: const Glib::ustring& get_name() const { return m_name; } const Glib::ustring& get_icon() const { return m_icon; } int get_num_tracks() const { return m_tracks.size(); } TrackRef get_track(int index) const; //void set_filter void refresh(); private: friend class Database; Library(long long id, const Glib::ustring& name, const Glib::ustring& icon); void refresh_from_uri(const std::string& uri); void update_refreshed_track(TrackRef track); Database& db; long long m_library_id; Glib::ustring m_name; Glib::ustring m_icon; std::vector<ArtistRef> m_artists; std::vector<TrackRef> m_tracks; // ------------ Signals ------------ public: sigc::signal<void, const Glib::ustring&> signal_refesh_pulse() { return m_signal_refesh_pulse; } private: sigc::signal<void, const Glib::ustring&> m_signal_refesh_pulse; }; typedef boost::shared_ptr<Library> LibraryRef; #endif /* LIBRARY_H_ */