// SLOT void GeoSearchReplyBb::receiveReply() { // Get the (unbounded) list of places from the future (this is exciting!) GeoregReply georegReply = _future.result(); if ( georegReply.error != QtMobilitySubset::QGeoSearchReply::NoError ) { finishReply( georegReply.error ); return; } // apply the bounds and set this GeoSearchReplyBb's places list to the bound subset. boundPlaces( georegReply.places ); // signal that the list of places is ready finishReply( QtMobilitySubset::QGeoSearchReply::NoError ); }
void TcpConnection::stop() { LOG_DEBUG(socket().native() << ": stop()"); finishReply(); try { boost::system::error_code ignored_ec; socket_.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignored_ec); LOG_DEBUG(socket().native() << ": closing socket"); socket_.close(); } catch (asio_system_error& e) { LOG_DEBUG(socket().native() << ": error " << e.what()); } }
// store the bounds and connect the future watcher to receiveReply() bool GeoSearchReplyBb::initialize( const QtMobilitySubset::QGeoBoundingArea *bounds ) { // the BB Geocode Service does not provide bounding of the request so the bounds are // saved here for filtering of the BB Geocode Service reply manually. setBounds( bounds ); // connect the future watcher to receiveReply() bool connected = connect( &_futureWatcher, SIGNAL(finished()), SLOT(receiveReply()) ); if ( !connected ) { finishReply( QtMobilitySubset::QGeoSearchReply::CommunicationError ); return false; } return true; }
void SslConnection::stop() { LOG_DEBUG(socket().native() << ": stop()"); finishReply(); LOG_DEBUG(socket().native() << ": SSL shutdown"); Connection::stop(); boost::shared_ptr<SslConnection> sft = boost::dynamic_pointer_cast<SslConnection>(shared_from_this()); sslShutdownTimer_.expires_from_now(boost::posix_time::seconds(1)); sslShutdownTimer_.async_wait(strand_.wrap( boost::bind(&SslConnection::stopNextLayer, sft, asio::placeholders::error))); socket_.async_shutdown(strand_.wrap (boost::bind(&SslConnection::stopNextLayer, sft, asio::placeholders::error))); }