From d1dd13984271090307a91e730a5196503d32d95e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 29 May 2022 11:31:51 +0100 Subject: Update to NetFS 1.5 interface --- src/blob.cpp | 7 ++++--- src/blob.h | 7 ++++--- src/repoList.cpp | 8 ++++++++ src/repoList.h | 1 + 4 files changed, 17 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/blob.cpp b/src/blob.cpp index a5482df..2211736 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -38,7 +38,7 @@ GitFS::Blob::close(const ::Ice::Current & current) } NetFS::Attr -GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current &) +GitFS::Blob::fgetattr(const ::Ice::Current &) { NetFS::Attr a; a << *blob << *entry << *repo->commit; @@ -60,13 +60,14 @@ GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current &) } void -GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current &) +GitFS::Blob::ftruncate(long long int, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } void -GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current &) +GitFS::Blob::write( + long long int, long long int, std::pair, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } diff --git a/src/blob.h b/src/blob.h index 24e8c6f..0b2f6e7 100644 --- a/src/blob.h +++ b/src/blob.h @@ -18,10 +18,11 @@ namespace GitFS { Blob(const Repo * const r, std::string &&); void close(const ::Ice::Current & current) override; - Attr fgetattr(ReqEnv env, const ::Ice::Current & current) override; + Attr fgetattr(const ::Ice::Current & current) override; Buffer read(long long int offset, long long int size, const ::Ice::Current & current) override; - void ftruncate(ReqEnv env, long long int size, const ::Ice::Current & current) override; - void write(long long int offset, long long int size, Buffer data, const ::Ice::Current & current) override; + void ftruncate(long long int size, const ::Ice::Current & current) override; + void write(long long int offset, long long int size, std::pair data, + const ::Ice::Current & current) override; long long int copyrange( FilePrxPtr, long long int, long long int, long long int, int, const Ice::Current &) override; diff --git a/src/repoList.cpp b/src/repoList.cpp index 2a50421..7a69b78 100644 --- a/src/repoList.cpp +++ b/src/repoList.cpp @@ -1,5 +1,6 @@ #include "repoList.h" #include "repo.h" +#include #include #include #include @@ -33,3 +34,10 @@ GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth, c } return Ice::uncheckedCast(ice.adapter->addWithUUID(std::make_shared(propReader))); } + +NetFS::SettingsPtr +GitFS::RepoList::getSettings(const ::Ice::Current & ice) +{ + const auto props = ice.adapter->getCommunicator()->getProperties(); + return std::make_shared(props->getPropertyAsIntWithDefault("Ice.MessageSizeMax", 1024)); +} diff --git a/src/repoList.h b/src/repoList.h index d32f3b0..7995136 100644 --- a/src/repoList.h +++ b/src/repoList.h @@ -16,6 +16,7 @@ namespace GitFS { NetFS::VolumePrxPtr connect( const ::std::string volume, const ::std::string auth, const ::Ice::Current & current) override; + NetFS::SettingsPtr getSettings(const ::Ice::Current & current) override; private: const Ice::PropertiesPtr properties; -- cgit v1.2.3