#ifndef MUSIC_H #define MUSIC_H #include "http.h" #include #include #include namespace fs = boost::filesystem; class MusicListing { public: typedef boost::shared_ptr p; fs::path path; virtual void render(HTTPRequest& req, HTTPResponse& res) = 0; }; class MusicTrack : public MusicListing { public: MusicTrack(const fs::path path); virtual void render(HTTPRequest& req, HTTPResponse& res); }; class MusicDirectory : public MusicListing { public: typedef std::vector PathListings; PathListings directories; PathListings tracks; MusicDirectory(const fs::path root); virtual void render(HTTPRequest& req, HTTPResponse& res); }; namespace music { void init(std::string root); MusicListing::p get(const std::string path); }; #endif