jingleiceudp.h
/*
Copyright (c) 2013-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef JINGLEICEUDP_H__
#define JINGLEICEUDP_H__
#include "jingleplugin.h"
#include <string>
#include <list>
namespace gloox
{
class Tag;
namespace Jingle
{
class GLOOX_API ICEUDP : public Plugin
{
public:
enum Type
{
Host,
PeerReflexive,
Relayed,
ServerReflexive
};
struct Candidate
{
std::string component;
std::string foundation;
std::string generation;
std::string id;
std::string ip;
std::string network;
int port;
int priority;
std::string protocol;
std::string rel_addr;
int rel_port;
Type type;
};
typedef std::list<Candidate> CandidateList;
ICEUDP( const std::string& pwd, const std::string& ufrag, CandidateList& candidates );
ICEUDP( const Tag* tag = 0 );
virtual ~ICEUDP() {}
const std::string& pwd() const { return m_pwd; }
const std::string& ufrag() const { return m_ufrag; }
const CandidateList& candidates() const { return m_candidates; }
// reimplemented from Plugin
virtual const StringList features() const;
// reimplemented from Plugin
virtual const std::string& filterString() const;
// reimplemented from Plugin
virtual Tag* tag() const;
// reimplemented from Plugin
virtual Plugin* newInstance( const Tag* tag ) const;
// reimplemented from Plugin
virtual Plugin* clone() const
{
return new ICEUDP( *this );
}
private:
std::string m_pwd;
std::string m_ufrag;
CandidateList m_candidates;
};
}
}
#endif // JINGLEICEUDP_H__
gloox::Jingle::ICEUDP::pwd
const std::string & pwd() const
Definition jingleiceudp.h:98
gloox::Jingle::ICEUDP::Type
Type
Definition jingleiceudp.h:45
gloox::Jingle::ICEUDP::ServerReflexive
@ ServerReflexive
Definition jingleiceudp.h:49
gloox::Jingle::ICEUDP::Relayed
@ Relayed
Definition jingleiceudp.h:48
gloox::Jingle::ICEUDP::Host
@ Host
Definition jingleiceudp.h:46
gloox::Jingle::ICEUDP::PeerReflexive
@ PeerReflexive
Definition jingleiceudp.h:47
gloox::Jingle::ICEUDP::clone
virtual Plugin * clone() const
Definition jingleiceudp.h:125
gloox::Jingle::ICEUDP::ufrag
const std::string & ufrag() const
Definition jingleiceudp.h:104
gloox::Jingle::ICEUDP::ICEUDP
ICEUDP(const std::string &pwd, const std::string &ufrag, CandidateList &candidates)
Definition jingleiceudp.cpp:32
gloox::Jingle::ICEUDP::candidates
const CandidateList & candidates() const
Definition jingleiceudp.h:110
gloox::Jingle::ICEUDP::~ICEUDP
virtual ~ICEUDP()
Definition jingleiceudp.h:92
gloox::Jingle::ICEUDP::CandidateList
std::list< Candidate > CandidateList
Definition jingleiceudp.h:73
gloox::Jingle::ICEUDP::tag
virtual Tag * tag() const
Definition jingleiceudp.cpp:84
gloox::Jingle::Plugin
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.).
Definition jingleplugin.h:68
gloox::Jingle::Plugin::Plugin
Plugin(JinglePluginType type)
Definition jingleplugin.h:76
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox::Jingle
The namespace containing Jingle-related (XEP-0166 et. al.) classes.
Definition jinglecontent.cpp:22
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::StringList
std::list< std::string > StringList
Definition gloox.h:1251
gloox::Jingle::ICEUDP::Candidate
Definition jingleiceudp.h:56
gloox::Jingle::ICEUDP::Candidate::network
std::string network
Definition jingleiceudp.h:63
gloox::Jingle::ICEUDP::Candidate::generation
std::string generation
Definition jingleiceudp.h:59
gloox::Jingle::ICEUDP::Candidate::ip
std::string ip
Definition jingleiceudp.h:62
gloox::Jingle::ICEUDP::Candidate::port
int port
Definition jingleiceudp.h:64
gloox::Jingle::ICEUDP::Candidate::rel_port
int rel_port
Definition jingleiceudp.h:68
gloox::Jingle::ICEUDP::Candidate::rel_addr
std::string rel_addr
Definition jingleiceudp.h:67
gloox::Jingle::ICEUDP::Candidate::component
std::string component
Definition jingleiceudp.h:57
gloox::Jingle::ICEUDP::Candidate::foundation
std::string foundation
Definition jingleiceudp.h:58
gloox::Jingle::ICEUDP::Candidate::type
Type type
Definition jingleiceudp.h:69
gloox::Jingle::ICEUDP::Candidate::priority
int priority
Definition jingleiceudp.h:65
gloox::Jingle::ICEUDP::Candidate::protocol
std::string protocol
Definition jingleiceudp.h:66
gloox::Jingle::ICEUDP::Candidate::id
std::string id
Definition jingleiceudp.h:61