Index: webrtc/p2p/base/candidatepair.h |
diff --git a/webrtc/p2p/base/candidatepair.h b/webrtc/p2p/base/candidatepair.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6f113beac2ac609d031734c9f15a24fd5db515ea |
--- /dev/null |
+++ b/webrtc/p2p/base/candidatepair.h |
@@ -0,0 +1,42 @@ |
+/* |
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#ifndef WEBRTC_P2P_BASE_CANDIDATEPAIR_H_ |
+#define WEBRTC_P2P_BASE_CANDIDATEPAIR_H_ |
+ |
+#include "webrtc/p2p/base/candidate.h" |
+#include "webrtc/p2p/base/candidatepairinterface.h" |
+ |
+namespace cricket { |
+ |
+class CandidatePair : public CandidatePairInterface { |
+ public: |
+ CandidatePair() = default; |
+ explicit CandidatePair(const CandidatePairInterface& selected_candidate_pair) |
+ : local_candidate_(selected_candidate_pair.local_candidate()), |
+ remote_candidate_(selected_candidate_pair.remote_candidate()) {} |
+ CandidatePair(const Candidate& local_candidate, |
+ const Candidate& remote_candidate) |
+ : local_candidate_(local_candidate), |
+ remote_candidate_(remote_candidate) {} |
+ ~CandidatePair() = default; |
+ const Candidate& local_candidate() const override { return local_candidate_; } |
+ const Candidate& remote_candidate() const override { |
+ return remote_candidate_; |
+ } |
+ |
+ private: |
+ Candidate local_candidate_; |
+ Candidate remote_candidate_; |
+}; |
+ |
+} // namespace cricket |
+ |
+#endif // WEBRTC_P2P_BASE_CANDIDATEPAIR_H_ |