Commit graph

4 commits

Author SHA1 Message Date
Tommi
c7a4b2a7eb Change internal candidate type to enum
Bug: webrtc:15846
Change-Id: I66480cd2a239655a897af5ed2625959e8d6cc33a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338644
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41802}
2024-02-25 23:46:52 +00:00
Tommi
f2431a97d5 Move ComputeFoundation to Candidate.
Move code from P2PTransportChannel to Candidate, where we set the
foundation value for remote prflx candidates.

Bug: none
Change-Id: I7dbcb85bca35dca7297136b0706092dd8d2b153c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339902
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41774}
2024-02-21 09:24:32 +00:00
Tommi
bde80e3c0e Deprecate Candidate::set_id(), offer generate_id() instead
Bug: none
Change-Id: I68df28a24446667c1bcde04120795fce54252feb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339940
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41762}
2024-02-19 15:01:02 +00:00
Tommi
f7b22c66ff Add Candidate::type_name()
Candidate::type() is currently how the name of the type is fetched,
but that getter returns a non-standard type name.

Instead, I'm adding a new getter, type_name(), will follow up with
updating dependent code that needs the string, to use type_name (and
adapt to potential dependency on "local" or "stun") and then switch
type() to be enum based.

Also adding a test file for Candidate with a couple of basic tests to
start with.

Bug: webrtc:15846
Change-Id: I9b78b2405a9f962a3c07eaa8e72a79854c6f5ceb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41740}
2024-02-15 10:26:28 +00:00