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_ICE_CANDIDATE_PAIR_H_ 12 #define LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_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 IceCandidatePairEventType { 23 kCheckSent, 24 kCheckReceived, 25 kCheckResponseSent, 26 kCheckResponseReceived, 27 kNumValues, 28 }; 29 30 class RtcEventIceCandidatePair final : public RtcEvent { 31 public: 32 RtcEventIceCandidatePair(IceCandidatePairEventType type, 33 uint32_t candidate_pair_id, 34 uint32_t transaction_id); 35 36 ~RtcEventIceCandidatePair() override; 37 38 Type GetType() const override; 39 40 bool IsConfigEvent() const override; 41 42 std::unique_ptr<RtcEventIceCandidatePair> Copy() const; 43 type()44 IceCandidatePairEventType type() const { return type_; } candidate_pair_id()45 uint32_t candidate_pair_id() const { return candidate_pair_id_; } transaction_id()46 uint32_t transaction_id() const { return transaction_id_; } 47 48 private: 49 RtcEventIceCandidatePair(const RtcEventIceCandidatePair& other); 50 51 const IceCandidatePairEventType type_; 52 const uint32_t candidate_pair_id_; 53 const uint32_t transaction_id_; 54 }; 55 56 } // namespace webrtc 57 58 #endif // LOGGING_RTC_EVENT_LOG_EVENTS_RTC_EVENT_ICE_CANDIDATE_PAIR_H_ 59