14 #include "jingleiceudp.h"
25 static const char* typeValues [] = {
46 TagList::const_iterator it = candidates.begin();
47 for( ; it != candidates.end(); ++it )
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 = (
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 ) );
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
virtual const std::string & filterString() const
std::list< std::string > StringList
virtual Tag * tag() const
const std::string XMLNS_JINGLE_ICE_UDP
const CandidateList & candidates() const
virtual Plugin * newInstance(const Tag *tag) const
std::list< Tag * > TagList
The namespace for the gloox library.
const std::string & xmlns() const
const std::string & findAttribute(const std::string &name) const
bool addAttribute(Attribute *attr)
std::list< Candidate > CandidateList
const std::string & name() const
TagList findChildren(const std::string &name, const std::string &xmlns=EmptyString) const
virtual const StringList features() const
ICEUDP(const std::string &pwd, const std::string &ufrag, CandidateList &candidates)
This is an abstraction of an XML element.