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 #include "logging/rtc_event_log/events/rtc_event_ice_candidate_pair.h"
12 
13 #include "absl/memory/memory.h"
14 
15 namespace webrtc {
16 
RtcEventIceCandidatePair(IceCandidatePairEventType type,uint32_t candidate_pair_id,uint32_t transaction_id)17 RtcEventIceCandidatePair::RtcEventIceCandidatePair(
18     IceCandidatePairEventType type,
19     uint32_t candidate_pair_id,
20     uint32_t transaction_id)
21     : type_(type),
22       candidate_pair_id_(candidate_pair_id),
23       transaction_id_(transaction_id) {}
24 
RtcEventIceCandidatePair(const RtcEventIceCandidatePair & other)25 RtcEventIceCandidatePair::RtcEventIceCandidatePair(
26     const RtcEventIceCandidatePair& other)
27     : RtcEvent(other.timestamp_us_),
28       type_(other.type_),
29       candidate_pair_id_(other.candidate_pair_id_),
30       transaction_id_(other.transaction_id_) {}
31 
32 RtcEventIceCandidatePair::~RtcEventIceCandidatePair() = default;
33 
GetType() const34 RtcEvent::Type RtcEventIceCandidatePair::GetType() const {
35   return RtcEvent::Type::IceCandidatePairEvent;
36 }
37 
IsConfigEvent() const38 bool RtcEventIceCandidatePair::IsConfigEvent() const {
39   return false;
40 }
41 
Copy() const42 std::unique_ptr<RtcEventIceCandidatePair> RtcEventIceCandidatePair::Copy()
43     const {
44   return absl::WrapUnique<RtcEventIceCandidatePair>(
45       new RtcEventIceCandidatePair(*this));
46 }
47 
48 }  // namespace webrtc
49