diff options
Diffstat (limited to 'libtransport/includes/hicn/transport/http')
7 files changed, 11 insertions, 13 deletions
diff --git a/libtransport/includes/hicn/transport/http/CMakeLists.txt b/libtransport/includes/hicn/transport/http/CMakeLists.txt index 9cf618c21..36a2ca5ce 100644 --- a/libtransport/includes/hicn/transport/http/CMakeLists.txt +++ b/libtransport/includes/hicn/transport/http/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2017-2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # 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: @@ -11,8 +11,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) - list(APPEND HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/client_connection.h ${CMAKE_CURRENT_SOURCE_DIR}/request.h diff --git a/libtransport/includes/hicn/transport/http/client_connection.h b/libtransport/includes/hicn/transport/http/client_connection.h index 262756a09..d5edf6cd0 100644 --- a/libtransport/includes/hicn/transport/http/client_connection.h +++ b/libtransport/includes/hicn/transport/http/client_connection.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: @@ -31,7 +31,7 @@ namespace http { using namespace interface; using namespace core; -class HTTPClientConnection { +class HTTPClientConnection : private utils::NonCopyable { static constexpr uint32_t max_buffer_capacity = 64 * 1024; public: @@ -39,7 +39,7 @@ class HTTPClientConnection { public: virtual void onBytesReceived(std::unique_ptr<utils::MemBuf> &&buffer) = 0; virtual void onSuccess(std::size_t bytes) = 0; - virtual void onError(const std::error_code ec) = 0; + virtual void onError(const std::error_code &ec) = 0; }; enum class RC : uint32_t { DOWNLOAD_FAILED, DOWNLOAD_SUCCESS }; @@ -68,7 +68,7 @@ class HTTPClientConnection { HTTPClientConnection &setTimeout(const std::chrono::seconds &timeout); - HTTPClientConnection &setCertificate(const std::string &cert_path); + HTTPClientConnection &setVerifier(std::shared_ptr<auth::Verifier> verifier); private: class Implementation; @@ -77,4 +77,4 @@ class HTTPClientConnection { } // end namespace http -} // end namespace transport
\ No newline at end of file +} // end namespace transport diff --git a/libtransport/includes/hicn/transport/http/default_values.h b/libtransport/includes/hicn/transport/http/default_values.h index 2d5a6b821..8cf247e19 100644 --- a/libtransport/includes/hicn/transport/http/default_values.h +++ b/libtransport/includes/hicn/transport/http/default_values.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: diff --git a/libtransport/includes/hicn/transport/http/facade.h b/libtransport/includes/hicn/transport/http/facade.h index 8a465ce94..c886a7588 100644 --- a/libtransport/includes/hicn/transport/http/facade.h +++ b/libtransport/includes/hicn/transport/http/facade.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: diff --git a/libtransport/includes/hicn/transport/http/message.h b/libtransport/includes/hicn/transport/http/message.h index b8756224f..a07941413 100644 --- a/libtransport/includes/hicn/transport/http/message.h +++ b/libtransport/includes/hicn/transport/http/message.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: diff --git a/libtransport/includes/hicn/transport/http/request.h b/libtransport/includes/hicn/transport/http/request.h index b62f5b061..9939fbcaf 100644 --- a/libtransport/includes/hicn/transport/http/request.h +++ b/libtransport/includes/hicn/transport/http/request.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: diff --git a/libtransport/includes/hicn/transport/http/response.h b/libtransport/includes/hicn/transport/http/response.h index bab41acb8..79def27cd 100644 --- a/libtransport/includes/hicn/transport/http/response.h +++ b/libtransport/includes/hicn/transport/http/response.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Cisco and/or its affiliates. + * Copyright (c) 2021 Cisco and/or its affiliates. * 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: |