From f495186a38c93f68c20938498f12d8526bcdf034 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 12 Apr 2018 00:43:31 +0100 Subject: C++17 Implementations of Ice interfaces get their const parameters back. Who knew they could be more const than their base class?! --- netfs/daemon/daemonFile.cpp | 6 +++--- netfs/daemon/daemonFile.h | 6 +++--- netfs/daemon/daemonService.cpp | 2 +- netfs/daemon/daemonService.h | 2 +- netfs/daemon/daemonVolume.cpp | 36 ++++++++++++++++++------------------ netfs/daemon/daemonVolume.h | 36 ++++++++++++++++++------------------ 6 files changed, 44 insertions(+), 44 deletions(-) diff --git a/netfs/daemon/daemonFile.cpp b/netfs/daemon/daemonFile.cpp index ceee92f..0df3c2a 100644 --- a/netfs/daemon/daemonFile.cpp +++ b/netfs/daemon/daemonFile.cpp @@ -18,7 +18,7 @@ FileServer::~FileServer() } void -FileServer::ftruncate(NetFS::ReqEnv re, Ice::Long size, const Ice::Current&) +FileServer::ftruncate(const NetFS::ReqEnv re, Ice::Long size, const Ice::Current&) { (void)re; errno = 0; @@ -28,7 +28,7 @@ FileServer::ftruncate(NetFS::ReqEnv re, Ice::Long size, const Ice::Current&) } NetFS::Attr -FileServer::fgetattr(NetFS::ReqEnv re, const Ice::Current &) +FileServer::fgetattr(const NetFS::ReqEnv re, const Ice::Current &) { (void)re; struct stat s; @@ -65,7 +65,7 @@ FileServer::read(Ice::Long offset, Ice::Long size, const Ice::Current&) } void -FileServer::write(Ice::Long offset, Ice::Long size, NetFS::Buffer data, const Ice::Current&) +FileServer::write(Ice::Long offset, Ice::Long size, const NetFS::Buffer data, const Ice::Current&) { errno = 0; if (pwrite(fd, &data.front(), size, offset) != size) { diff --git a/netfs/daemon/daemonFile.h b/netfs/daemon/daemonFile.h index a53301c..9a01abf 100644 --- a/netfs/daemon/daemonFile.h +++ b/netfs/daemon/daemonFile.h @@ -10,11 +10,11 @@ class FileServer : public NetFS::File, EntryTypeConverter { virtual ~FileServer(); virtual void close(const Ice::Current&) override; - virtual void ftruncate(NetFS::ReqEnv, Ice::Long size, const Ice::Current&) override; - virtual NetFS::Attr fgetattr(NetFS::ReqEnv, const Ice::Current&) override; + virtual void ftruncate(const NetFS::ReqEnv, Ice::Long size, const Ice::Current&) override; + virtual NetFS::Attr fgetattr(const NetFS::ReqEnv, const Ice::Current&) override; virtual NetFS::Buffer read(Ice::Long offset, Ice::Long size, const Ice::Current&) override; - virtual void write(Ice::Long offset, Ice::Long size, NetFS::Buffer data, const Ice::Current&) override; + virtual void write(Ice::Long offset, Ice::Long size, const NetFS::Buffer data, const Ice::Current&) override; private: const int fd; diff --git a/netfs/daemon/daemonService.cpp b/netfs/daemon/daemonService.cpp index ec21bac..a516cb2 100644 --- a/netfs/daemon/daemonService.cpp +++ b/netfs/daemon/daemonService.cpp @@ -9,7 +9,7 @@ ServiceServer::ServiceServer(NetFS::Daemon::ConfigurationPtr c) : } NetFS::VolumePrxPtr -ServiceServer::connect(std::string share, std::string authtoken, const Ice::Current & ice) +ServiceServer::connect(const std::string share, const std::string authtoken, const Ice::Current & ice) { auto ex = AdHoc::safeMapLookup(config->Exports, share); if (!ex->AuthToken.empty() && ex->AuthToken != authtoken) { diff --git a/netfs/daemon/daemonService.h b/netfs/daemon/daemonService.h index 83684c8..d1c77b3 100644 --- a/netfs/daemon/daemonService.h +++ b/netfs/daemon/daemonService.h @@ -10,7 +10,7 @@ class ServiceServer : public NetFS::Service { public: ServiceServer(NetFS::Daemon::ConfigurationPtr c); - virtual NetFS::VolumePrxPtr connect(std::string share, std::string auth, const Ice::Current&) override; + virtual NetFS::VolumePrxPtr connect(const std::string share, const std::string auth, const Ice::Current&) override; private: EntCache userLookup; diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp index 956212f..8ddea5d 100644 --- a/netfs/daemon/daemonVolume.cpp +++ b/netfs/daemon/daemonVolume.cpp @@ -35,7 +35,7 @@ VolumeServer::disconnect(const Ice::Current & ice) } Ice::Int -VolumeServer::access(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ice::Current &) +VolumeServer::access(const NetFS::ReqEnv re, const std::string path, Ice::Int mode, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); struct stat s; @@ -61,7 +61,7 @@ VolumeServer::access(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ic } NetFS::Attr -VolumeServer::getattr(NetFS::ReqEnv re, std::string path, const Ice::Current &) +VolumeServer::getattr(const NetFS::ReqEnv re, const std::string path, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); struct stat s; @@ -74,7 +74,7 @@ VolumeServer::getattr(NetFS::ReqEnv re, std::string path, const Ice::Current &) } void -VolumeServer::mknod(NetFS::ReqEnv re, std::string path, Ice::Int mode, Ice::Int dev, const Ice::Current&) +VolumeServer::mknod(const NetFS::ReqEnv re, const std::string path, Ice::Int mode, Ice::Int dev, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -86,7 +86,7 @@ VolumeServer::mknod(NetFS::ReqEnv re, std::string path, Ice::Int mode, Ice::Int } void -VolumeServer::symlink(NetFS::ReqEnv re, std::string path1, std::string path2, const Ice::Current &) +VolumeServer::symlink(const NetFS::ReqEnv re, const std::string path1, const std::string path2, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -102,7 +102,7 @@ VolumeServer::symlink(NetFS::ReqEnv re, std::string path1, std::string path2, co } void -VolumeServer::link(NetFS::ReqEnv re, std::string path1, std::string path2, const Ice::Current &) +VolumeServer::link(const NetFS::ReqEnv re, const std::string path1, const std::string path2, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -118,7 +118,7 @@ VolumeServer::link(NetFS::ReqEnv re, std::string path1, std::string path2, const } void -VolumeServer::rename(NetFS::ReqEnv re, std::string from, std::string to, const Ice::Current &) +VolumeServer::rename(const NetFS::ReqEnv re, const std::string from, const std::string to, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -132,7 +132,7 @@ VolumeServer::rename(NetFS::ReqEnv re, std::string from, std::string to, const I } std::string -VolumeServer::readlink(NetFS::ReqEnv re, std::string path, const Ice::Current &) +VolumeServer::readlink(const NetFS::ReqEnv re, const std::string path, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -147,7 +147,7 @@ VolumeServer::readlink(NetFS::ReqEnv re, std::string path, const Ice::Current &) } void -VolumeServer::chmod(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ice::Current &) +VolumeServer::chmod(const NetFS::ReqEnv re, const std::string path, Ice::Int mode, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -159,7 +159,7 @@ VolumeServer::chmod(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ice } void -VolumeServer::chown(NetFS::ReqEnv re, std::string path, Ice::Int uid, Ice::Int gid, const Ice::Current &) +VolumeServer::chown(const NetFS::ReqEnv re, const std::string path, Ice::Int uid, Ice::Int gid, const Ice::Current &) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -171,7 +171,7 @@ VolumeServer::chown(NetFS::ReqEnv re, std::string path, Ice::Int uid, Ice::Int g } void -VolumeServer::utimens(NetFS::ReqEnv re, std::string path, +VolumeServer::utimens(const NetFS::ReqEnv re, const std::string path, Ice::Long s0, Ice::Long ns0, Ice::Long s1, Ice::Long ns1, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); @@ -189,7 +189,7 @@ VolumeServer::utimens(NetFS::ReqEnv re, std::string path, } NetFS::VFS -VolumeServer::statfs(NetFS::ReqEnv re, std::string path, const Ice::Current&) +VolumeServer::statfs(const NetFS::ReqEnv re, const std::string path, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -203,7 +203,7 @@ VolumeServer::statfs(NetFS::ReqEnv re, std::string path, const Ice::Current&) } void -VolumeServer::truncate(NetFS::ReqEnv re, std::string path, Ice::Long size, const Ice::Current&) +VolumeServer::truncate(const NetFS::ReqEnv re, const std::string path, Ice::Long size, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -215,7 +215,7 @@ VolumeServer::truncate(NetFS::ReqEnv re, std::string path, Ice::Long size, const } void -VolumeServer::unlink(NetFS::ReqEnv re, std::string path, const Ice::Current&) +VolumeServer::unlink(const NetFS::ReqEnv re, const std::string path, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -227,7 +227,7 @@ VolumeServer::unlink(NetFS::ReqEnv re, std::string path, const Ice::Current&) } NetFS::FilePrxPtr -VolumeServer::open(NetFS::ReqEnv re, std::string path, Ice::Int flags, const Ice::Current & ice) +VolumeServer::open(const NetFS::ReqEnv re, const std::string path, Ice::Int flags, const Ice::Current & ice) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -245,7 +245,7 @@ VolumeServer::open(NetFS::ReqEnv re, std::string path, Ice::Int flags, const Ice } NetFS::FilePrxPtr -VolumeServer::create(NetFS::ReqEnv re, std::string path, Ice::Int flags, Ice::Int mode, const Ice::Current & ice) +VolumeServer::create(const NetFS::ReqEnv re, const std::string path, Ice::Int flags, Ice::Int mode, const Ice::Current & ice) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -265,7 +265,7 @@ VolumeServer::create(NetFS::ReqEnv re, std::string path, Ice::Int flags, Ice::In } NetFS::DirectoryPrxPtr -VolumeServer::opendir(NetFS::ReqEnv re, std::string path, const Ice::Current & ice) +VolumeServer::opendir(const NetFS::ReqEnv re, const std::string path, const Ice::Current & ice) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -280,7 +280,7 @@ VolumeServer::opendir(NetFS::ReqEnv re, std::string path, const Ice::Current & i } void -VolumeServer::mkdir(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ice::Current&) +VolumeServer::mkdir(const NetFS::ReqEnv re, const std::string path, Ice::Int mode, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; @@ -296,7 +296,7 @@ VolumeServer::mkdir(NetFS::ReqEnv re, std::string path, Ice::Int mode, const Ice } void -VolumeServer::rmdir(NetFS::ReqEnv re, std::string path, const Ice::Current&) +VolumeServer::rmdir(const NetFS::ReqEnv re, const std::string path, const Ice::Current&) { ModeCheck mc(re, root, userLookup, groupLookup); errno = 0; diff --git a/netfs/daemon/daemonVolume.h b/netfs/daemon/daemonVolume.h index ff00d4d..9f31aa7 100644 --- a/netfs/daemon/daemonVolume.h +++ b/netfs/daemon/daemonVolume.h @@ -12,30 +12,30 @@ class VolumeServer : public NetFS::Volume { VolumeServer(const boost::filesystem::path & root, const EntCache &, const EntCache &); virtual ~VolumeServer(); - virtual NetFS::DirectoryPrxPtr opendir(NetFS::ReqEnv, std::string path, const Ice::Current&) override; + virtual NetFS::DirectoryPrxPtr opendir(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; - virtual void mkdir(NetFS::ReqEnv, std::string path, Ice::Int id, const Ice::Current&) override; - virtual void rmdir(NetFS::ReqEnv, std::string path, const Ice::Current&) override; + virtual void mkdir(const NetFS::ReqEnv, const std::string path, Ice::Int id, const Ice::Current&) override; + virtual void rmdir(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; - virtual void truncate(NetFS::ReqEnv, std::string path, Ice::Long size, const Ice::Current&) override; + virtual void truncate(const NetFS::ReqEnv, const std::string path, Ice::Long size, const Ice::Current&) override; - virtual void unlink(NetFS::ReqEnv, std::string path, const Ice::Current&) override; + virtual void unlink(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; - virtual NetFS::FilePrxPtr open(NetFS::ReqEnv, std::string path, Ice::Int flags, const Ice::Current&) override; - virtual NetFS::FilePrxPtr create(NetFS::ReqEnv, std::string path, Ice::Int flags, Ice::Int mode, const Ice::Current&) override; + virtual NetFS::FilePrxPtr open(const NetFS::ReqEnv, const std::string path, Ice::Int flags, const Ice::Current&) override; + virtual NetFS::FilePrxPtr create(const NetFS::ReqEnv, const std::string path, Ice::Int flags, Ice::Int mode, const Ice::Current&) override; - virtual NetFS::VFS statfs(NetFS::ReqEnv, std::string path, const Ice::Current&) override; + virtual NetFS::VFS statfs(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; - virtual Ice::Int access(NetFS::ReqEnv, std::string path, Ice::Int mode, const Ice::Current&) override; - virtual NetFS::Attr getattr(NetFS::ReqEnv, std::string path, const Ice::Current&) override; - virtual void mknod(NetFS::ReqEnv, std::string path, Ice::Int mode, Ice::Int dev, const Ice::Current&) override; - virtual void symlink(NetFS::ReqEnv, std::string path1, std::string path2, const Ice::Current&) override; - virtual void link(NetFS::ReqEnv, std::string path1, std::string path2, const Ice::Current&) override; - virtual void rename(NetFS::ReqEnv, std::string path1, std::string path2, const Ice::Current&) override; - virtual std::string readlink(NetFS::ReqEnv, std::string path, const Ice::Current&) override; - virtual void chmod(NetFS::ReqEnv, std::string path, Ice::Int mode, const Ice::Current&) override; - virtual void chown(NetFS::ReqEnv, std::string path, Ice::Int uid, Ice::Int gid, const Ice::Current&) override; - virtual void utimens(NetFS::ReqEnv, std::string path, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&) override; + virtual Ice::Int access(const NetFS::ReqEnv, const std::string path, Ice::Int mode, const Ice::Current&) override; + virtual NetFS::Attr getattr(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; + virtual void mknod(const NetFS::ReqEnv, const std::string path, Ice::Int mode, Ice::Int dev, const Ice::Current&) override; + virtual void symlink(const NetFS::ReqEnv, const std::string path1, const std::string path2, const Ice::Current&) override; + virtual void link(const NetFS::ReqEnv, const std::string path1, const std::string path2, const Ice::Current&) override; + virtual void rename(const NetFS::ReqEnv, const std::string path1, const std::string path2, const Ice::Current&) override; + virtual std::string readlink(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; + virtual void chmod(const NetFS::ReqEnv, const std::string path, Ice::Int mode, const Ice::Current&) override; + virtual void chown(const NetFS::ReqEnv, const std::string path, Ice::Int uid, Ice::Int gid, const Ice::Current&) override; + virtual void utimens(const NetFS::ReqEnv, const std::string path, Ice::Long, Ice::Long, Ice::Long, Ice::Long, const Ice::Current&) override; virtual void disconnect(const Ice::Current&) override; -- cgit v1.2.3