Lines Matching refs:Candidate
97 Candidate candidate;
99 &candidate, error)) {
103 desc->candidates.push_back(candidate);
125 for (std::vector<Candidate>::const_iterator iter = desc.candidates.begin();
142 Candidate* candidate,
144 return ParseCandidate(ICEPROTO_GOOGLE, elem, translator, candidate, error);
148 const Candidate& candidate,
154 bool ret = WriteCandidate(ICEPROTO_GOOGLE, candidate, translator, elem.get(),
167 return BadParse("candidate username is too long", error);
169 return BadParse("candidate username has non-base64 encoded characters",
173 return BadParse("candidate username is too long", error);
181 Candidate* candidate,
192 return BadParse("candidate missing required attribute", error);
203 return BadParse("candidate has unknown channel name " + channel_name,
209 return BadParse("candidate has unknown preference", error);
212 candidate->set_component(component);
213 candidate->set_address(address);
214 candidate->set_username(elem->Attr(QN_USERNAME));
215 candidate->set_preference(preference);
216 candidate->set_protocol(elem->Attr(QN_PROTOCOL));
217 candidate->set_generation_str(elem->Attr(QN_GENERATION));
219 candidate->set_password(elem->Attr(QN_PASSWORD));
221 candidate->set_type(elem->Attr(buzz::QN_TYPE));
223 candidate->set_network_name(elem->Attr(QN_NETWORK));
225 if (!VerifyUsernameFormat(proto, candidate->username(), error))
232 const Candidate& candidate,
242 candidate.component(), &channel_name)) {
243 return BadWrite("Cannot write candidate because of unknown component.",
248 elem->SetAttr(QN_ADDRESS, candidate.address().ipaddr().ToString());
249 elem->SetAttr(QN_PORT, candidate.address().PortAsString());
250 AddXmlAttr(elem, QN_PREFERENCE, candidate.preference());
251 elem->SetAttr(QN_USERNAME, candidate.username());
252 elem->SetAttr(QN_PROTOCOL, candidate.protocol());
253 elem->SetAttr(QN_GENERATION, candidate.generation_str());
254 if (!candidate.password().empty())
255 elem->SetAttr(QN_PASSWORD, candidate.password());
256 elem->SetAttr(buzz::QN_TYPE, candidate.type());
257 if (!candidate.network_name().empty())
258 elem->SetAttr(QN_NETWORK, candidate.network_name());