summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-02-11 01:04:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2016-02-11 01:04:32 +0000
commit207f8dd16feff1bfc4323c7625c7c49af5379d9e (patch)
tree80c1d6656b35deeba2bf2826ee766d09868837d6
parentUse pid in test directory so that parallel running tests don't clobber each o... (diff)
downloadnetfs-207f8dd16feff1bfc4323c7625c7c49af5379d9e.tar.bz2
netfs-207f8dd16feff1bfc4323c7625c7c49af5379d9e.tar.xz
netfs-207f8dd16feff1bfc4323c7625c7c49af5379d9e.zip
Pass config file path as a path, not a string
-rw-r--r--netfs/fuse/Jamfile.jam1
-rw-r--r--netfs/fuse/fuseApp.cpp2
-rw-r--r--netfs/fuse/fuseApp.h3
-rw-r--r--netfs/unittests/mockFuse.cpp2
-rw-r--r--netfs/unittests/mockFuse.h2
5 files changed, 6 insertions, 4 deletions
diff --git a/netfs/fuse/Jamfile.jam b/netfs/fuse/Jamfile.jam
index 0a168ca..4340687 100644
--- a/netfs/fuse/Jamfile.jam
+++ b/netfs/fuse/Jamfile.jam
@@ -33,6 +33,7 @@ lib netfsClient :
<library>../lib//netfsCommon
<library>..//boost_thread
<library>..//boost_system
+ <library>..//boost_filesystem
<library>..//Ice
<library>Glacier2
<library>..//IceUtil
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index cd55574..a7d84b5 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -61,7 +61,7 @@ NetFS::FuseApp::~FuseApp()
}
NetFS::Client::ConfigurationPtr
-NetFS::FuseApp::ReadConfiguration(const std::string & path) const
+NetFS::FuseApp::ReadConfiguration(const boost::filesystem::path & path) const
{
return Slicer::DeserializeAny<Slicer::XmlFileDeserializer, NetFS::Client::ConfigurationPtr>(path);
}
diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h
index a97d271..a210089 100644
--- a/netfs/fuse/fuseApp.h
+++ b/netfs/fuse/fuseApp.h
@@ -3,6 +3,7 @@
#include <boost/thread/shared_mutex.hpp>
#include <boost/function.hpp>
+#include <boost/filesystem/path.hpp>
#include <Ice/Ice.h>
#include <Glacier2/Session.h>
#include <service.h>
@@ -88,7 +89,7 @@ namespace NetFS {
protected:
typedef boost::function<Client::ResourcePtr()> Configurator;
Configurator configurator;
- virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const std::string &) const;
+ virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const boost::filesystem::path &) const;
virtual NetFS::Client::ResourcePtr configureFromFile(const std::string &, const std::string &) const;
virtual NetFS::Client::ResourcePtr configureFromUri(const std::string &) const;
diff --git a/netfs/unittests/mockFuse.cpp b/netfs/unittests/mockFuse.cpp
index 4b92332..24c2508 100644
--- a/netfs/unittests/mockFuse.cpp
+++ b/netfs/unittests/mockFuse.cpp
@@ -35,7 +35,7 @@ FuseMock::main(int, char **, const struct fuse_operations * o)
}
NetFS::Client::ConfigurationPtr
-FuseMock::ReadConfiguration(const std::string & path) const
+FuseMock::ReadConfiguration(const boost::filesystem::path & path) const
{
auto c = FuseApp::ReadConfiguration(path);
for(auto r : c->Resources) {
diff --git a/netfs/unittests/mockFuse.h b/netfs/unittests/mockFuse.h
index abace25..4002dab 100644
--- a/netfs/unittests/mockFuse.h
+++ b/netfs/unittests/mockFuse.h
@@ -16,7 +16,7 @@ class DLL_PUBLIC FuseMock : public NetFS::FuseApp {
fuse_operations ops;
protected:
- virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const std::string &) const override;
+ virtual NetFS::Client::ConfigurationPtr ReadConfiguration(const boost::filesystem::path &) const override;
private:
const std::string testEndpoint;