#ifndef COMMANDS_H #define COMMANDS_H #include "music.h" #include #include #include #include #include #include class Commands; class CommandException : public std::runtime_error { public: CommandException(const char *s) : std::runtime_error(s) {}; CommandException(std::string s) : std::runtime_error(s.c_str()) {}; }; class Commands { private: typedef boost::function (Commands*)> Handler; std::map handlers; typedef boost::function (const std::string artist)> FindFunction; std::map find_handlers; boost::asio::io_service& io_service; std::vector& args; std::vector ls(); std::vector find(); std::vector update(); public: Commands(boost::asio::io_service& io_service, std::vector& args); std::vector operator()(); }; #endif