gloox 1.0.28
jingleiceudp.h
1/*
2 Copyright (c) 2013-2023 by Jakob Schröter <js@camaya.net>
3 This file is part of the gloox library. http://camaya.net/gloox
4
5 This software is distributed under a license. The full license
6 agreement can be found in the file LICENSE in this distribution.
7 This software may not be copied, modified, sold or distributed
8 other than expressed in the named license agreement.
9
10 This software is distributed without any warranty.
11*/
12
13
14#ifndef JINGLEICEUDP_H__
15#define JINGLEICEUDP_H__
16
17#include "jingleplugin.h"
18
19#include <string>
20#include <list>
21
22namespace gloox
23{
24
25 class Tag;
26
27 namespace Jingle
28 {
29
38 class GLOOX_API ICEUDP : public Plugin
39 {
40 public:
44 enum Type
45 {
49 ServerReflexive
50 };
51
55 struct Candidate
56 {
57 std::string component;
58 std::string foundation;
59 std::string generation;
61 std::string id;
62 std::string ip;
63 std::string network;
64 int port;
66 std::string protocol;
67 std::string rel_addr;
70 };
71
73 typedef std::list<Candidate> CandidateList;
74
81 ICEUDP( const std::string& pwd, const std::string& ufrag, CandidateList& candidates );
82
87 ICEUDP( const Tag* tag = 0 );
88
92 virtual ~ICEUDP() {}
93
98 const std::string& pwd() const { return m_pwd; }
99
104 const std::string& ufrag() const { return m_ufrag; }
105
110 const CandidateList& candidates() const { return m_candidates; }
111
112 // reimplemented from Plugin
113 virtual const StringList features() const;
114
115 // reimplemented from Plugin
116 virtual const std::string& filterString() const;
117
118 // reimplemented from Plugin
119 virtual Tag* tag() const;
120
121 // reimplemented from Plugin
122 virtual Plugin* newInstance( const Tag* tag ) const;
123
124 // reimplemented from Plugin
125 virtual Plugin* clone() const
126 {
127 return new ICEUDP( *this );
128 }
129
130 private:
131 std::string m_pwd;
132 std::string m_ufrag;
133 CandidateList m_candidates;
134
135 };
136
137 }
138
139}
140
141#endif // JINGLEICEUDP_H__
An abstraction of the signaling part of Jingle ICE-UDP Transport Method (XEP-0176).
const std::string & pwd() const
virtual Plugin * clone() const
const std::string & ufrag() const
const CandidateList & candidates() const
std::list< Candidate > CandidateList
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
This is an abstraction of an XML element.
Definition tag.h:47
The namespace for the gloox library.
Definition adhoc.cpp:28
std::list< std::string > StringList
Definition gloox.h:1251