OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return candidates_.size(); | 63 return candidates_.size(); |
64 } | 64 } |
65 virtual bool HasCandidate(const IceCandidateInterface* candidate) const; | 65 virtual bool HasCandidate(const IceCandidateInterface* candidate) const; |
66 // Adds and takes ownership of the JsepIceCandidate. | 66 // Adds and takes ownership of the JsepIceCandidate. |
67 virtual void add(JsepIceCandidate* candidate) { | 67 virtual void add(JsepIceCandidate* candidate) { |
68 candidates_.push_back(candidate); | 68 candidates_.push_back(candidate); |
69 } | 69 } |
70 virtual const IceCandidateInterface* at(size_t index) const { | 70 virtual const IceCandidateInterface* at(size_t index) const { |
71 return candidates_[index]; | 71 return candidates_[index]; |
72 } | 72 } |
73 // Removes the candidate that has a matching address and protocol. | |
74 // Returns the number of candidates that were removed. | |
75 size_t remove(const cricket::Candidate& candidate); | |
76 | 73 |
77 private: | 74 private: |
78 std::vector<JsepIceCandidate*> candidates_; | 75 std::vector<JsepIceCandidate*> candidates_; |
79 | 76 |
80 RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection); | 77 RTC_DISALLOW_COPY_AND_ASSIGN(JsepCandidateCollection); |
81 }; | 78 }; |
82 | 79 |
83 } // namespace webrtc | 80 } // namespace webrtc |
84 | 81 |
85 #endif // WEBRTC_API_JSEPICECANDIDATE_H_ | 82 #endif // WEBRTC_API_JSEPICECANDIDATE_H_ |
OLD | NEW |