WIP. Restoring video playback

This commit is contained in:
emeric
2014-09-09 14:06:44 +02:00
parent 9f400f6e6c
commit 614cffc5c1
12 changed files with 152 additions and 386 deletions
+16 -6
View File
@@ -1,22 +1,32 @@
#include "VideoTypes.hpp"
#include "FileTypes.hpp"
namespace Database {
Video::Video()
{
}
Video::Video(Wt::Dbo::ptr<Path> path)
: _path(path)
Video::Video(const boost::filesystem::path& p)
: _filePath(p.string())
{
}
Video::pointer
Video::create(Wt::Dbo::Session& session, Wt::Dbo::ptr<Path> path)
Video::create(Wt::Dbo::Session& session, const boost::filesystem::path& p)
{
return session.add(new Video(path));
return session.add(new Video(p));
}
Wt::Dbo::collection< Video::pointer >
Video::getAll(Wt::Dbo::Session& session)
{
return session.find<Video>();
}
Video::pointer
Video::getByPath(Wt::Dbo::Session& session, const boost::filesystem::path& p)
{
return session.find<Video>().where("path = ?").bind(p.string());
}
} // namespace Video