summaryrefslogtreecommitdiff
path: root/mythfs/service/recordingsVolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mythfs/service/recordingsVolume.cpp')
-rw-r--r--mythfs/service/recordingsVolume.cpp49
1 files changed, 25 insertions, 24 deletions
diff --git a/mythfs/service/recordingsVolume.cpp b/mythfs/service/recordingsVolume.cpp
index 3bdc5d2..7be25cb 100644
--- a/mythfs/service/recordingsVolume.cpp
+++ b/mythfs/service/recordingsVolume.cpp
@@ -12,47 +12,48 @@
namespace MythFS {
RecordingsVolume::RecordingsVolume(DBPtr db)
{
- contents.insert({ "all", new AllDirectory(db) });
- contents.insert({ "by title", new ByTitleDirectory(db) });
- contents.insert({ "by date", new ByDateDirectory(db) });
+ contents.insert({ "all", std::make_shared<AllDirectory>(db) });
+ contents.insert({ "by title", std::make_shared<ByTitleDirectory>(db) });
+ contents.insert({ "by date", std::make_shared<ByDateDirectory>(db) });
}
- NetFS::DirectoryPrx
- RecordingsVolume::opendir(const NetFS::ReqEnv &, const std::string & p, const Ice::Current & ic)
+ NetFS::DirectoryPrxPtr
+ RecordingsVolume::opendir(const NetFS::ReqEnv, const std::string p, const Ice::Current & ic)
{
- return ::NetFS::DirectoryPrx::uncheckedCast(ic.adapter->addFacetWithUUID(new OpenDirectory(resolvePath(p)), "v02"));
+ return Ice::uncheckedCast<::NetFS::DirectoryPrx>(
+ ic.adapter->addFacetWithUUID(std::make_shared<OpenDirectory>(resolvePath(p)), "v02"));
}
- void RecordingsVolume::mkdir(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&)
+ void RecordingsVolume::mkdir(const NetFS::ReqEnv, const std::string, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::rmdir(const NetFS::ReqEnv &, const std::string &, const Ice::Current&)
+ void RecordingsVolume::rmdir(const NetFS::ReqEnv, const std::string, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::truncate(const NetFS::ReqEnv &, const std::string &, Ice::Long, const Ice::Current&)
+ void RecordingsVolume::truncate(const NetFS::ReqEnv, const std::string, Ice::Long, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::unlink(const NetFS::ReqEnv &, const std::string &, const Ice::Current&)
+ void RecordingsVolume::unlink(const NetFS::ReqEnv, const std::string, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- NetFS::FilePrx RecordingsVolume::open(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&)
+ NetFS::FilePrxPtr RecordingsVolume::open(const NetFS::ReqEnv, const std::string, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- NetFS::FilePrx RecordingsVolume::create(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&)
+ NetFS::FilePrxPtr RecordingsVolume::create(const NetFS::ReqEnv, const std::string, Ice::Int, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- NetFS::VFS RecordingsVolume::statfs(const NetFS::ReqEnv &, const std::string &, const Ice::Current&)
+ NetFS::VFS RecordingsVolume::statfs(const NetFS::ReqEnv, const std::string, const Ice::Current&)
{
errno = 0;
struct statvfs s;
@@ -63,52 +64,52 @@ namespace MythFS {
return converter.convert(s);
}
- Ice::Int RecordingsVolume::access(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&)
+ Ice::Int RecordingsVolume::access(const NetFS::ReqEnv, const std::string, Ice::Int, const Ice::Current&)
{
return 0;
}
- NetFS::Attr RecordingsVolume::getattr(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&)
+ NetFS::Attr RecordingsVolume::getattr(const NetFS::ReqEnv, const std::string path, const Ice::Current&)
{
return resolvePath(path)->getattr();
}
- void RecordingsVolume::mknod(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&)
+ void RecordingsVolume::mknod(const NetFS::ReqEnv, const std::string, Ice::Int, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::symlink(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&)
+ void RecordingsVolume::symlink(const NetFS::ReqEnv, const std::string, const std::string, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::link(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&)
+ void RecordingsVolume::link(const NetFS::ReqEnv, const std::string, const std::string, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::rename(const NetFS::ReqEnv &, const std::string &, const std::string &, const Ice::Current&)
+ void RecordingsVolume::rename(const NetFS::ReqEnv, const std::string, const std::string, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- std::string RecordingsVolume::readlink(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&)
+ std::string RecordingsVolume::readlink(const NetFS::ReqEnv, const std::string path, const Ice::Current&)
{
return resolvePath(path)->readlink();
}
- void RecordingsVolume::chmod(const NetFS::ReqEnv &, const std::string &, Ice::Int, const Ice::Current&)
+ void RecordingsVolume::chmod(const NetFS::ReqEnv, const std::string, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::chown(const NetFS::ReqEnv &, const std::string &, Ice::Int, Ice::Int, const Ice::Current&)
+ void RecordingsVolume::chown(const NetFS::ReqEnv, const std::string, Ice::Int, Ice::Int, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
- void RecordingsVolume::utimens(const NetFS::ReqEnv &, const std::string &, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&)
+ void RecordingsVolume::utimens(const NetFS::ReqEnv, const std::string, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&)
{
throw ::NetFS::SystemError(ENOSYS);
}
@@ -120,7 +121,7 @@ namespace MythFS {
Node::PointerType
RecordingsVolume::resolvePath(const std::string & p)
{
- Node::PointerType d = this;
+ Node::PointerType d = shared_from_this();
boost::filesystem::path path(p.substr(1));
for (const auto & e : path) {
d = d->getChild(e.string());