1 /* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #ifndef LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_ 12 #define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_ 13 14 #include <stdint.h> 15 16 #include <memory> 17 18 #include "api/rtc_event_log/rtc_event.h" 19 20 namespace webrtc { 21 22 enum class ProbeFailureReason { 23 kInvalidSendReceiveInterval = 0, 24 kInvalidSendReceiveRatio, 25 kTimeout, 26 kLast 27 }; 28 29 class RtcEventProbeResultFailure final : public RtcEvent { 30 public: 31 RtcEventProbeResultFailure(int32_t id, ProbeFailureReason failure_reason); 32 ~RtcEventProbeResultFailure() override = default; 33 34 Type GetType() const override; 35 36 bool IsConfigEvent() const override; 37 38 std::unique_ptr<RtcEventProbeResultFailure> Copy() const; 39 id()40 int32_t id() const { return id_; } failure_reason()41 ProbeFailureReason failure_reason() const { return failure_reason_; } 42 43 private: 44 RtcEventProbeResultFailure(const RtcEventProbeResultFailure& other); 45 46 const int32_t id_; 47 const ProbeFailureReason failure_reason_; 48 }; 49 50 } // namespace webrtc 51 52 #endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_PROBE_RESULT_FAILURE_H_ 53