#ifndef PROJECTMANAGER_H #define PROJECTMANAGER_H #include #include #include #include namespace Ember { class ProjectManager { public: typedef std::map RecentProjectMap; /** * @brief Constructor */ ProjectManager(); /** * @brief Gets a list of recent projects. First time reads from disk. * @return Map of recent projects. */ const RecentProjectMap& recentProjects(); /** * @brief Pins or unpins a recent project. Updates storage as well. * @param path Path * @param pinned True to pin, false to unpin */ void pinRecentProject(boost::filesystem::path path, bool pinned = true); /** * @brief Deletes a recent project. * @param path */ void deleteRecentProject(boost::filesystem::path path); private: void saveRecentProjects(); Project* m_currentProject; RecentProjectMap m_recentProjects; bool m_recentProjectsLoaded; }; } #endif // PROJECTMANAGER_H