14 #include "jingleiceudp.h"
25 static const char* typeValues [] = {
46 TagList::const_iterator it =
candidates.begin();
50 c.
component = (*it)->findAttribute(
"component" );
51 c.
foundation = (*it)->findAttribute(
"foundation" );
52 c.
generation = (*it)->findAttribute(
"generation" );
53 c.
id = (*it)->findAttribute(
"id" );
54 c.
ip = (*it)->findAttribute(
"ip" );
55 c.
network = (*it)->findAttribute(
"network" );
56 c.
port = atoi( (*it)->findAttribute(
"port" ).c_str() );
57 c.
priority = atoi( (*it)->findAttribute(
"priority" ).c_str() );
58 c.
protocol = (*it)->findAttribute(
"protocol" );
59 c.
rel_addr = (*it)->findAttribute(
"rel-addr" );
60 c.
rel_port = atoi( (*it)->findAttribute(
"rel-port" ).c_str() );
61 c.
type =
static_cast<Type>( util::lookup( (*it)->findAttribute(
"type" ), typeValues ) );
62 m_candidates.push_back( c );
90 CandidateList::const_iterator it = m_candidates.begin();
91 for( ; it != m_candidates.end(); ++it )
93 Tag* c =
new Tag( t,
"candidate" );
105 c->
addAttribute(
"type", util::lookup( (*it).type, typeValues ) );
const CandidateList & candidates() const
ICEUDP(const std::string &pwd, const std::string &ufrag, CandidateList &candidates)
virtual Plugin * newInstance(const Tag *tag) const
virtual const StringList features() const
virtual const std::string & filterString() const
std::list< Candidate > CandidateList
virtual Tag * tag() const
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
This is an abstraction of an XML element.
const std::string xmlns() const
bool addAttribute(Attribute *attr)
const std::string & findAttribute(const std::string &name) const
TagList findChildren(const std::string &name, const std::string &xmlns=EmptyString) const
const std::string & name() const
The namespace for the gloox library.
std::list< Tag * > TagList
std::list< std::string > StringList
const std::string XMLNS_JINGLE_ICE_UDP