WIP. Reorganizing things to get settings work. First attempt on Database settings

This commit is contained in:
emeric
2014-07-22 12:57:29 +02:00
parent f1cea2404e
commit 938e96cc40
32 changed files with 752 additions and 96 deletions
+10
View File
@@ -1,3 +1,5 @@
#include <boost/foreach.hpp>
#include "MediaDirectory.hpp"
namespace Database {
@@ -27,6 +29,14 @@ MediaDirectory::create(Wt::Dbo::Session& session, boost::filesystem::path p, Typ
return session.add( new MediaDirectory( p, type ) );
}
void
MediaDirectory::eraseAll(Wt::Dbo::Session& session)
{
std::vector<MediaDirectory::pointer> dirs = getAll(session);
BOOST_FOREACH(MediaDirectory::pointer dir, dirs)
dir.remove();
}
std::vector<MediaDirectory::pointer>
MediaDirectory::getAll(Wt::Dbo::Session& session)
{