aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
IoTSDKMetrics.h
Go to the documentation of this file.
1 #pragma once
2 
6 #include <aws/crt/Types.h>
7 
8 namespace Aws
9 {
10  namespace Crt
11  {
12  namespace Mqtt5
13  {
14  class Mqtt5ClientOptions;
15  } // namespace Mqtt5
16 
17  namespace Mqtt
18  {
26  {
27  public:
28  AWSIoTMetrics();
29  ~AWSIoTMetrics() = default;
30  AWSIoTMetrics(const AWSIoTMetrics &other);
31  AWSIoTMetrics &operator=(const AWSIoTMetrics &other);
32  AWSIoTMetrics(AWSIoTMetrics &&other) noexcept;
33  AWSIoTMetrics &operator=(AWSIoTMetrics &&other) noexcept;
34 
40  void SetLibraryName(Aws::Crt::String name);
41 
45  const Aws::Crt::String &GetLibraryName() const;
46 
53  void SetMetadataEntry(const Crt::String &key, const Crt::String &value);
54 
61  void RemoveMetadataEntry(const Crt::String &key);
62 
66  const Crt::Map<Crt::String, Crt::String> &GetMetadata() const;
67 
68  private:
70  friend class MqttConnectionCore;
71  friend class IoTSDKMetricsEncoder;
72 
77  Aws::Crt::String m_libraryName;
78 
83 
93  void initializeRawOptions(struct aws_mqtt_iot_metrics &raw_options) noexcept;
94 
99  void resetRawData() noexcept;
100 
107  Crt::Vector<aws_mqtt_metadata_entry> m_rawMetadataEntries;
108  };
109  } // namespace Mqtt
110  } // namespace Crt
111 } // namespace Aws
#define AWS_CRT_CPP_API
Definition: Exports.h:36
Definition: IoTSDKMetrics.h:25
std::basic_string< char, std::char_traits< char >, StlAllocator< char >> String
Definition: Types.h:45
std::map< K, V, std::less< K >, StlAllocator< std::pair< const K, V >>> Map
Definition: Types.h:47
std::vector< T, StlAllocator< T >> Vector
Definition: Types.h:53
Definition: Mqtt5Client.h:497
Definition: Allocator.h:10