AWS SDK for C++

AWS SDK for C++ Version 1.11.832

Loading...
Searching...
No Matches
ProgressSnapshot.h
1
5#pragma once
6#include <aws/s3-transfer/S3Transfer_EXPORTS.h>
7#include <cstdint>
8#include <memory>
9#include <utility>
10
11namespace Aws {
12namespace S3 {
13namespace Transfer {
14
20template <typename ResponseT>
22 public:
23 virtual ~ProgressSnapshot() = default;
24
25 ProgressSnapshot(uint64_t transferredBytes,
26 uint64_t totalBytes,
27 std::shared_ptr<ResponseT> response,
28 bool totalBytesHasBeenSet)
29 : m_transferredBytes(transferredBytes),
30 m_totalBytes(totalBytes),
31 m_response(std::move(response)),
32 m_totalBytesHasBeenSet(totalBytesHasBeenSet) {}
33
34 inline uint64_t GetTransferredBytes() const { return m_transferredBytes; }
35 inline uint64_t GetTotalBytes() const { return m_totalBytes; }
36 inline bool TotalBytesHasBeenSet() const { return m_totalBytesHasBeenSet; }
37 inline const std::shared_ptr<ResponseT>& GetResponse() const { return m_response; }
38 inline bool ResponseHasBeenSet() const { return m_response != nullptr; }
39
40 private:
41 uint64_t m_transferredBytes = 0;
42 uint64_t m_totalBytes = 0;
43 std::shared_ptr<ResponseT> m_response;
44 bool m_totalBytesHasBeenSet = false;
45};
46
47}
48}
49}
ProgressSnapshot(uint64_t transferredBytes, uint64_t totalBytes, std::shared_ptr< ResponseT > response, bool totalBytesHasBeenSet)
const std::shared_ptr< ResponseT > & GetResponse() const