From 229385955109b866a23c4ac2aa03d4d11044c39d Mon Sep 17 00:00:00 2001 From: "Enrico Loparco (eloparco)" Date: Thu, 24 Jun 2021 09:15:41 +0200 Subject: [HICN-708] Rebase with master Signed-off-by: Enrico Loparco (eloparco) Change-Id: I2122e1d61dd3b2e039972624ffbdbcb3c5610159 --- libtransport/src/interfaces/portal.cc | 37 ++++++++++++++++------------------- 1 file changed, 17 insertions(+), 20 deletions(-) (limited to 'libtransport/src/interfaces/portal.cc') diff --git a/libtransport/src/interfaces/portal.cc b/libtransport/src/interfaces/portal.cc index 36cbd0c3b..2ab51c4b9 100644 --- a/libtransport/src/interfaces/portal.cc +++ b/libtransport/src/interfaces/portal.cc @@ -14,38 +14,35 @@ */ #include - #include namespace transport { namespace interface { -using implementation::BasePortal; - -Portal::Portal() { implementation_ = new implementation::BasePortal(); } +Portal::Portal() { implementation_ = new core::Portal(); } Portal::Portal(asio::io_service &io_service) { - implementation_ = new BasePortal(io_service); + implementation_ = new core::Portal(io_service); } -Portal::~Portal() { delete reinterpret_cast(implementation_); } +Portal::~Portal() { delete reinterpret_cast(implementation_); } void Portal::setConsumerCallback(ConsumerCallback *consumer_callback) { - reinterpret_cast(implementation_) + reinterpret_cast(implementation_) ->setConsumerCallback(consumer_callback); } void Portal::setProducerCallback(ProducerCallback *producer_callback) { - reinterpret_cast(implementation_) + reinterpret_cast(implementation_) ->setProducerCallback(producer_callback); } void Portal::connect(bool is_consumer) { - reinterpret_cast(implementation_)->connect(is_consumer); + reinterpret_cast(implementation_)->connect(is_consumer); } bool Portal::interestIsPending(const core::Name &name) { - return reinterpret_cast(implementation_) + return reinterpret_cast(implementation_) ->interestIsPending(name); } @@ -53,46 +50,46 @@ void Portal::sendInterest( core::Interest::Ptr &&interest, OnContentObjectCallback &&on_content_object_callback, OnInterestTimeoutCallback &&on_interest_timeout_callback) { - reinterpret_cast(implementation_) + reinterpret_cast(implementation_) ->sendInterest(std::move(interest), std::move(on_content_object_callback), std::move(on_interest_timeout_callback)); } void Portal::bind(const BindConfig &config) { - reinterpret_cast(implementation_)->bind(config); + reinterpret_cast(implementation_)->bind(config); } void Portal::runEventsLoop() { - reinterpret_cast(implementation_)->runEventsLoop(); + reinterpret_cast(implementation_)->runEventsLoop(); } void Portal::runOneEvent() { - reinterpret_cast(implementation_)->runOneEvent(); + reinterpret_cast(implementation_)->runOneEvent(); } void Portal::sendContentObject(core::ContentObject &content_object) { - reinterpret_cast(implementation_) + reinterpret_cast(implementation_) ->sendContentObject(content_object); } void Portal::stopEventsLoop() { - reinterpret_cast(implementation_)->stopEventsLoop(); + reinterpret_cast(implementation_)->stopEventsLoop(); } void Portal::killConnection() { - reinterpret_cast(implementation_)->killConnection(); + reinterpret_cast(implementation_)->killConnection(); } void Portal::clear() { - reinterpret_cast(implementation_)->clear(); + reinterpret_cast(implementation_)->clear(); } asio::io_service &Portal::getIoService() { - return reinterpret_cast(implementation_)->getIoService(); + return reinterpret_cast(implementation_)->getIoService(); } void Portal::registerRoute(core::Prefix &prefix) { - reinterpret_cast(implementation_)->registerRoute(prefix); + reinterpret_cast(implementation_)->registerRoute(prefix); } } // namespace interface -- cgit 1.2.3-korg