diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-05-29 11:31:51 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-05-29 11:31:51 +0100 |
commit | d1dd13984271090307a91e730a5196503d32d95e (patch) | |
tree | 4bcdb14aff04150899ec4b334901b4da312a7348 /src | |
parent | Fix up all warnings from all the tools (diff) | |
download | netfs-gitfs-d1dd13984271090307a91e730a5196503d32d95e.tar.bz2 netfs-gitfs-d1dd13984271090307a91e730a5196503d32d95e.tar.xz netfs-gitfs-d1dd13984271090307a91e730a5196503d32d95e.zip |
Update to NetFS 1.5 interfaceHEADnetfs-gitfs-0.2.3main
Diffstat (limited to 'src')
-rw-r--r-- | src/blob.cpp | 7 | ||||
-rw-r--r-- | src/blob.h | 7 | ||||
-rw-r--r-- | src/repoList.cpp | 8 | ||||
-rw-r--r-- | src/repoList.h | 1 |
4 files changed, 17 insertions, 6 deletions
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::Byte *, const Ice::Byte *>, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } @@ -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<const Ice::Byte *, const Ice::Byte *> 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 <Ice/Communicator.h> #include <Ice/Current.h> #include <Ice/ObjectAdapter.h> #include <Ice/Properties.h> @@ -33,3 +34,10 @@ GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth, c } return Ice::uncheckedCast<NetFS::VolumePrx>(ice.adapter->addWithUUID(std::make_shared<Repo>(propReader))); } + +NetFS::SettingsPtr +GitFS::RepoList::getSettings(const ::Ice::Current & ice) +{ + const auto props = ice.adapter->getCommunicator()->getProperties(); + return std::make_shared<NetFS::Settings>(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; |