diff --git a/src/org/ice4j/ice/Component.java b/src/org/ice4j/ice/Component.java index e98f813..1aa0310 100644 --- a/src/org/ice4j/ice/Component.java +++ b/src/org/ice4j/ice/Component.java @@ -86,7 +86,14 @@ public class Component * The default Candidate for this component or in other words, the * candidate that we would have used without ICE. */ - private Candidate defaultCandidate = null; + private LocalCandidate defaultCandidate = null; + + /** + * The default RemoteCandidate for this component or in other + * words, the candidate that we would have used to communicate with the + * remote peer if we hadn't been using ICE. + */ + private Candidate defaultRemoteCandidate = null; /** * Creates a new Component with the specified componentID @@ -479,11 +486,39 @@ public class Component * this Component or null if no such Candidate * has been selected yet */ - public Candidate getDefaultCandidate() + public LocalCandidate getDefaultCandidate() { return defaultCandidate; } + /** + * Returns the Candidate that the remote party has reported as + * default for this Component or null if no such + * Candidate has reported yet. A candidate is said to be + * default if it would be the target of media from a non-ICE peer; + * + * @return the Candidate that the remote party has reported as + * default for this Component or null if no such + * Candidate has reported yet. + */ + public Candidate getDefaultRemoteCandidate() + { + return defaultRemoteCandidate; + } + + /** + * Sets the Candidate that the remote party has reported as + * default for this Component. A candidate is said to be + * default if it would be the target of media from a non-ICE peer; + * + * @param candidate the Candidate that the remote party has + * reported as default for this Component. + */ + public void setDefaultRemoteCandidate(Candidate candidate) + { + this.defaultRemoteCandidate = candidate; + } + /** * Selects a Candidate that should be considered as the default * for this Component. A candidate is said to be default if it @@ -506,7 +541,7 @@ public class Component while (localCandsIter.hasNext()) { - Candidate cand = localCandsIter.next(); + LocalCandidate cand = localCandsIter.next(); if(this.defaultCandidate == null) {