gloox
1.0.10
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
jingleiceudp.h
1
/*
2
Copyright (c) 2013 by Jakob Schroeter <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
22
namespace
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
{
46
Host
,
47
PeerReflexive
,
48
Relayed
,
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
;
65
int
priority
;
66
std::string
protocol
;
67
std::string
rel_addr
;
68
int
rel_port
;
69
Type
type
;
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__
Generated on Wed Apr 9 2014 00:25:20 for gloox by
1.8.1.2