From ff6c433341ad4bf63413938dd462c6bd7071032a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 17 Apr 2018 22:31:10 +0100 Subject: C++17 and Ice 3.7 Update everything to Ice 3.7 and C++17 in keeping with other libs/services --- Jamroot.jam | 14 ++++--- mythfs/Jamfile.jam | 7 ++-- mythfs/service/Jamfile.jam | 5 +-- mythfs/service/dbimpl.cpp | 2 +- mythfs/service/dbimpl.h | 2 +- mythfs/service/inodes/allDirectory.cpp | 2 +- mythfs/service/inodes/filterByDateDirectory.cpp | 2 +- mythfs/service/inodes/filterByTitleDirectory.cpp | 2 +- mythfs/service/inodes/groupingByDateDirectory.cpp | 2 +- mythfs/service/inodes/groupingByTitleDirectory.cpp | 2 +- mythfs/service/inodes/node.h | 4 +- mythfs/service/main.cpp | 7 ++-- mythfs/service/recordingsVolume.cpp | 49 +++++++++++----------- mythfs/service/recordingsVolume.h | 38 ++++++++--------- mythfs/service/service.cpp | 10 ++--- mythfs/service/service.h | 2 +- mythfs/unittests/Jamfile.jam | 10 ++--- mythfs/unittests/mockDefs.cpp | 5 +-- mythfs/unittests/mockDefs.h | 6 +-- mythfs/unittests/testMain.cpp | 4 +- slice.jam | 12 ++---- 21 files changed, 91 insertions(+), 96 deletions(-) diff --git a/Jamroot.jam b/Jamroot.jam index d39b5f5..896177a 100644 --- a/Jamroot.jam +++ b/Jamroot.jam @@ -8,12 +8,14 @@ variant coverage : debug ; project : requirements - release:"-std=c++1y -fvisibility=hidden -flto" - release:"-Wl,-z,defs,--warn-once,--gc-sections -flto" - debug:"-W -Wall -Werror -Wwrite-strings -std=c++1y -fvisibility=hidden" - debug:"-Wl,-z,defs,--warn-once" - coverage:"-W -Wall -Werror -Wwrite-strings -std=c++1y --coverage -fvisibility=hidden" - coverage:"-Wl,-z,defs,--warn-once --coverage" + ICE_CPP11_MAPPING + "-std=c++17 -fvisibility=hidden -fvisibility-inlines-hidden" + "-Wl,-z,defs,--warn-once,--gc-sections" + release:"-flto=2" + release:"-flto=2" + debug:"-W -Wall -Werror -Wextra" + coverage:"--coverage" + coverage:"--coverage" ; build-project mythfs ; diff --git a/mythfs/Jamfile.jam b/mythfs/Jamfile.jam index 7159557..bb3cbf1 100644 --- a/mythfs/Jamfile.jam +++ b/mythfs/Jamfile.jam @@ -7,10 +7,9 @@ lib slicer-db : : : : /usr/include/slicer ; lib netfs-api : : : : /usr/include/netfs ; lib icetray : : : : /usr/include/icetray ; lib dbppcore : : : : /usr/include/dbpp ; -lib Ice ; -lib IceUtil ; +lib Ice : : Ice++11 ; lib pthread ; -lib IceBox ; +lib IceBox : : IceBox++11 ; lib boost_filesystem ; lib boost_system ; lib boost_thread ; @@ -20,6 +19,6 @@ build-project service ; build-project unittests ; package.install install : : : - service//mythfs + service//mythfs++11 ; diff --git a/mythfs/service/Jamfile.jam b/mythfs/service/Jamfile.jam index 6ef0337..433deb2 100644 --- a/mythfs/service/Jamfile.jam +++ b/mythfs/service/Jamfile.jam @@ -1,7 +1,7 @@ import icetray ; import package ; -lib mythfs : +lib mythfs++11 : [ glob *.cpp inodes/*.cpp *.ice sql/*.sql ] : yes @@ -13,7 +13,6 @@ lib mythfs : ..//boost_date_time ..//Ice ..//IceBox - ..//IceUtil ..//pthread ..//icetray ..//slicer @@ -28,5 +27,5 @@ lib mythfs : ..//icetray ; -package.install install : : : mythfs ; +package.install install : : : mythfs++11 ; diff --git a/mythfs/service/dbimpl.cpp b/mythfs/service/dbimpl.cpp index c3d1b3d..498c8c8 100644 --- a/mythfs/service/dbimpl.cpp +++ b/mythfs/service/dbimpl.cpp @@ -2,7 +2,7 @@ #include namespace MythFS { - DBImpl::DBImpl(IceTray::DatabasePoolPtr d) : + DBImpl::DBImpl(const ::DB::ConnectionPoolPtr & d) : IceTray::AbstractCachingDatabaseClient(d) { } diff --git a/mythfs/service/dbimpl.h b/mythfs/service/dbimpl.h index e6c4b19..d4e1f12 100644 --- a/mythfs/service/dbimpl.h +++ b/mythfs/service/dbimpl.h @@ -7,7 +7,7 @@ namespace MythFS { class DLL_PUBLIC DBImpl : public DB, ::IceTray::AbstractCachingDatabaseClient { public: - DBImpl(IceTray::DatabasePoolPtr); + DBImpl(const ::DB::ConnectionPoolPtr &); Recordeds getRecorded() override; }; diff --git a/mythfs/service/inodes/allDirectory.cpp b/mythfs/service/inodes/allDirectory.cpp index d7278a3..f9bea8c 100644 --- a/mythfs/service/inodes/allDirectory.cpp +++ b/mythfs/service/inodes/allDirectory.cpp @@ -21,7 +21,7 @@ namespace MythFS { }) == rs.end()) { throw NetFS::SystemError(ENOENT); } - return new Symlink("/var/store/mythrecordings/" + path); + return std::make_shared("/var/store/mythrecordings/" + path); } } diff --git a/mythfs/service/inodes/filterByDateDirectory.cpp b/mythfs/service/inodes/filterByDateDirectory.cpp index 53298e9..2fceb64 100644 --- a/mythfs/service/inodes/filterByDateDirectory.cpp +++ b/mythfs/service/inodes/filterByDateDirectory.cpp @@ -28,7 +28,7 @@ namespace MythFS { { for (auto r :db->getRecorded()) { if (matches(r) && attribute(r) == n) { - return new Symlink("/var/store/mythrecordings/" + r->basename); + return std::make_shared("/var/store/mythrecordings/" + r->basename); } } throw NetFS::SystemError(ENOENT); diff --git a/mythfs/service/inodes/filterByTitleDirectory.cpp b/mythfs/service/inodes/filterByTitleDirectory.cpp index 3d8f4bd..2c3a373 100644 --- a/mythfs/service/inodes/filterByTitleDirectory.cpp +++ b/mythfs/service/inodes/filterByTitleDirectory.cpp @@ -27,7 +27,7 @@ namespace MythFS { { for (auto r :db->getRecorded()) { if (matches(r) && attribute(r) == n) { - return new Symlink("/var/store/mythrecordings/" + r->basename); + return std::make_shared("/var/store/mythrecordings/" + r->basename); } } throw NetFS::SystemError(ENOENT); diff --git a/mythfs/service/inodes/groupingByDateDirectory.cpp b/mythfs/service/inodes/groupingByDateDirectory.cpp index 6aa842e..047488c 100644 --- a/mythfs/service/inodes/groupingByDateDirectory.cpp +++ b/mythfs/service/inodes/groupingByDateDirectory.cpp @@ -21,7 +21,7 @@ namespace MythFS { if (!AdHoc::containerContains(getContents(), t)) { throw NetFS::SystemError(ENOENT); } - return new FilterByDateDirectory(db, t); + return std::make_shared(db, t); } } diff --git a/mythfs/service/inodes/groupingByTitleDirectory.cpp b/mythfs/service/inodes/groupingByTitleDirectory.cpp index a87687c..edd5225 100644 --- a/mythfs/service/inodes/groupingByTitleDirectory.cpp +++ b/mythfs/service/inodes/groupingByTitleDirectory.cpp @@ -21,7 +21,7 @@ namespace MythFS { if (!AdHoc::containerContains(getContents(), t)) { throw NetFS::SystemError(ENOENT); } - return new FilterByTitleDirectory(db, t); + return std::make_shared(db, t); } } diff --git a/mythfs/service/inodes/node.h b/mythfs/service/inodes/node.h index b88e403..4497857 100644 --- a/mythfs/service/inodes/node.h +++ b/mythfs/service/inodes/node.h @@ -10,11 +10,11 @@ namespace MythFS { class Node; - typedef std::map> Contents; + typedef std::map> Contents; class Node : public virtual Ice::Object { public: - typedef IceUtil::Handle PointerType; + typedef std::shared_ptr PointerType; virtual NetFS::Attr getattr() const = 0; virtual std::string readlink() const; diff --git a/mythfs/service/main.cpp b/mythfs/service/main.cpp index c0e98ce..1368309 100644 --- a/mythfs/service/main.cpp +++ b/mythfs/service/main.cpp @@ -1,4 +1,4 @@ -#include +#include #include #include #include "service.h" @@ -11,8 +11,9 @@ namespace MythFS { void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override { auto dbpool = getConnectionPool(ic, "mysql", "MythFS"); - adp->add(new MythFS::Service(), ic->stringToIdentity("Service")); - adp->add(new RecordingsVolume(new DBImpl(dbpool)), ic->stringToIdentity("recordings")); + adp->add(std::make_shared(), Ice::stringToIdentity("Service")); + adp->add(std::make_shared( + std::make_shared(dbpool)), Ice::stringToIdentity("recordings")); } }; 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(db) }); + contents.insert({ "by title", std::make_shared(db) }); + contents.insert({ "by date", std::make_shared(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(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()); diff --git a/mythfs/service/recordingsVolume.h b/mythfs/service/recordingsVolume.h index c5b3fa8..8def17a 100644 --- a/mythfs/service/recordingsVolume.h +++ b/mythfs/service/recordingsVolume.h @@ -7,34 +7,34 @@ #include namespace MythFS { - class RecordingsVolume : public ::NetFS::Volume, public StaticDirectory { + class RecordingsVolume : public ::NetFS::Volume, public StaticDirectory, public std::enable_shared_from_this { public: RecordingsVolume(DBPtr); - virtual NetFS::DirectoryPrx opendir(const NetFS::ReqEnv &, const 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(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 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(const NetFS::ReqEnv &, const 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(const NetFS::ReqEnv &, const std::string & path, const Ice::Current&) override; + virtual void unlink(const NetFS::ReqEnv, const std::string path, const Ice::Current&) override; - virtual NetFS::FilePrx open(const NetFS::ReqEnv &, const std::string & path, Ice::Int flags, const Ice::Current&) override; - virtual NetFS::FilePrx create(const NetFS::ReqEnv &, const 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(const NetFS::ReqEnv &, const 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(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 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; diff --git a/mythfs/service/service.cpp b/mythfs/service/service.cpp index 8a2e77d..df7103d 100644 --- a/mythfs/service/service.cpp +++ b/mythfs/service/service.cpp @@ -1,13 +1,13 @@ #include "service.h" #include -#include +#include namespace MythFS { - ::NetFS::VolumePrx - Service::connect(const std::string & volume, const std::string &, const Ice::Current & ic) + ::NetFS::VolumePrxPtr + Service::connect(const std::string volume, const std::string, const Ice::Current & ic) { - return ::NetFS::VolumePrx::checkedCast( - ic.adapter->createProxy(ic.adapter->getCommunicator()->stringToIdentity(volume))); + return Ice::checkedCast<::NetFS::VolumePrx>( + ic.adapter->createProxy(Ice::stringToIdentity(volume))); } } diff --git a/mythfs/service/service.h b/mythfs/service/service.h index d021f2b..758cc9b 100644 --- a/mythfs/service/service.h +++ b/mythfs/service/service.h @@ -7,7 +7,7 @@ namespace MythFS { class Service : public ::NetFS::Service { public: - ::NetFS::VolumePrx connect(const std::string &, const ::std::string &, const Ice::Current &) override; + ::NetFS::VolumePrxPtr connect(const std::string, const ::std::string, const Ice::Current &) override; }; } diff --git a/mythfs/unittests/Jamfile.jam b/mythfs/unittests/Jamfile.jam index a76d1ec..033e2f8 100644 --- a/mythfs/unittests/Jamfile.jam +++ b/mythfs/unittests/Jamfile.jam @@ -21,23 +21,21 @@ lib testCommon : ..//boost_system ..//boost_filesystem ..//netfs-api - ..//IceUtil ..//Ice ..//IceBox ..//pthread dryice - ../service//mythfs - ../service//mythfs + ../service//mythfs++11 + ../service//mythfs++11 : : dryice ..//dbppcore ..//adhocutil - ..//IceUtil ..//Ice ..//IceBox ..//pthread - ../service//mythfs - ../service//mythfs + ../service//mythfs++11 + ../service//mythfs++11 ; run diff --git a/mythfs/unittests/mockDefs.cpp b/mythfs/unittests/mockDefs.cpp index d699f6e..9f30ca0 100644 --- a/mythfs/unittests/mockDefs.cpp +++ b/mythfs/unittests/mockDefs.cpp @@ -4,8 +4,7 @@ #include Service::Service() : - MySQL::Mock("MythFS", { - //rootDir / "fixtures" / "schema.sql", + DB::PluginMock("options=p2testmysql", "MythFS", { rootDir / "fixtures" / "schema-min.sql", rootDir / "fixtures" / "data.sql" }) @@ -14,7 +13,7 @@ Service::Service() : TestClient::TestClient() : dbpool(getService()->getConnectionPool(getAdapter()->getCommunicator(), "mock", "MythFS")), - db(new MythFS::DBImpl(dbpool)), + db(std::make_shared(dbpool)), s(getProxy("Service")) { } diff --git a/mythfs/unittests/mockDefs.h b/mythfs/unittests/mockDefs.h index f549e54..2b21522 100644 --- a/mythfs/unittests/mockDefs.h +++ b/mythfs/unittests/mockDefs.h @@ -8,7 +8,7 @@ #include #include -class DLL_PUBLIC Service : MySQL::Mock, public IceTray::DryIce { +class DLL_PUBLIC Service : DB::PluginMock, public IceTray::DryIce { public: Service(); }; @@ -17,9 +17,9 @@ class DLL_PUBLIC TestClient : public IceTray::DryIceClient { public: TestClient(); - IceTray::DatabasePoolPtr dbpool; + DB::ConnectionPoolPtr dbpool; MythFS::DBPtr db; - NetFS::ServicePrx s; + NetFS::ServicePrxPtr s; }; #endif diff --git a/mythfs/unittests/testMain.cpp b/mythfs/unittests/testMain.cpp index 61d68b5..36da42c 100644 --- a/mythfs/unittests/testMain.cpp +++ b/mythfs/unittests/testMain.cpp @@ -54,7 +54,7 @@ class RecordingsTest : public TestClient { protected: ::NetFS::ReqEnv re; - ::NetFS::VolumePrx rv; + ::NetFS::VolumePrxPtr rv; }; BOOST_FIXTURE_TEST_SUITE(rt, RecordingsTest) @@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE( listRoot ) BOOST_REQUIRE_EQUAL("by date", ls[1]); BOOST_REQUIRE_EQUAL("by title", ls[2]); - auto d2 = NetFS::DirectoryV2Prx::uncheckedCast(d); + auto d2 = Ice::uncheckedCast(d); auto ls2 = d2->listdir(); BOOST_REQUIRE_EQUAL(3, ls2.size()); BOOST_REQUIRE_EQUAL(defaultDirMode, ls2["all"].mode); diff --git a/slice.jam b/slice.jam index 434e562..d261c50 100644 --- a/slice.jam +++ b/slice.jam @@ -8,7 +8,6 @@ import toolset ; type.register SLICE : ice ; feature slicer : no yes pure ; -feature allow-ice : no yes ; feature ice-visibility : public hidden ; class slice-scanner : common-scanner @@ -29,27 +28,24 @@ generators.register-standard slice.slicer.pure : SLICE : CPP(slicer-%) : ; toolset.flags slice.slice2cpp DLLEXPORT public : --dll-export JAM_DLL_PUBLIC ; -toolset.flags slice.slice2cpp ALLOWICE yes : --ice ; toolset.flags slice.slicer INCLUDES ; toolset.flags slice.slicer DLLEXPORT public : --dll-export JAM_DLL_PUBLIC ; -toolset.flags slice.slicer ALLOWICE yes : --ice ; toolset.flags slice.slicer.pure INCLUDES ; -toolset.flags slice.slicer.pure ALLOWICE yes : --ice ; actions slice.slice2cpp { - slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) $(ALLOWICE[1]) + slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) } actions slice.slicer { - slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) $(ALLOWICE[1]) - slicer -I"$(INCLUDES)" $(2) $(1[2]) $(ALLOWICE[1]) + slice2cpp -I"$(INCLUDES)" --checksum --output-dir $(1[1]:D) $(2) $(DLLEXPORT) + slicer -I"$(INCLUDES)" $(2) $(1[2]) } actions slice.slicer.pure { - slicer -I"$(INCLUDES)" $(2) $(1[1]) $(ALLOWICE[1]) + slicer -I"$(INCLUDES)" $(2) $(1[1]) } IMPORT $(__name__) : slice.slice2cpp : : slice.slice2cpp ; -- cgit v1.2.3