.. _program_listing_file_src_tile_client.hpp: Program Listing for File tile_client.hpp ======================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/tile_client.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* Copyright 2018-2019 TomTom N.V. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #pragma once #include #include #include #include "tile.hpp" namespace rviz_satellite { class tile_request_error : public std::exception { private: std::string message_; public: explicit tile_request_error(const std::string & message) : message_(message) { } const char * what() const noexcept override { return message_.c_str(); } }; class TileClient : public QObject { Q_OBJECT private: QNetworkAccessManager * manager_; std::map> tile_promises_; public: TileClient(); std::future request(const TileId & tile_id); std::future request_local(const TileId & tile_id); std::future request_remote(const TileId & tile_id); private Q_SLOTS: void request_finished(QNetworkReply * reply); }; } // namespace rviz_satellite