Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weblate
gajim
Commits
78e7361b
Commit
78e7361b
authored
13 years ago
by
zimio
Browse files
Options
Downloads
Patches
Plain Diff
refactoring
parent
eec056cc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/jingle_transport.py
+17
-18
17 additions, 18 deletions
src/common/jingle_transport.py
with
17 additions
and
18 deletions
src/common/jingle_transport.py
+
17
−
18
View file @
78e7361b
...
...
@@ -59,6 +59,8 @@ class JingleTransport(object):
Build a candidate stanza for the given candidate
"""
pass
def
make_transport
(
self
,
candidates
=
None
):
"""
...
...
@@ -77,6 +79,20 @@ class JingleTransport(object):
Return the list of transport candidates from a transport stanza
"""
return
[]
def
set_connection
(
self
,
conn
):
self
.
connection
=
conn
if
not
self
.
sid
:
self
.
sid
=
self
.
connection
.
connection
.
getAnID
()
def
set_file_props
(
self
,
file_props
):
self
.
file_props
=
file_props
def
set_our_jid
(
self
,
jid
):
self
.
ourjid
=
jid
def
set_sid
(
self
,
sid
):
self
.
sid
=
sid
class
JingleTransportSocks5
(
JingleTransport
):
"""
...
...
@@ -91,16 +107,6 @@ class JingleTransportSocks5(JingleTransport):
if
node
and
node
.
getAttr
(
'
sid
'
):
self
.
sid
=
node
.
getAttr
(
'
sid
'
)
def
set_file_props
(
self
,
file_props
):
self
.
file_props
=
file_props
def
set_our_jid
(
self
,
jid
):
self
.
ourjid
=
jid
def
set_connection
(
self
,
conn
):
self
.
connection
=
conn
if
not
self
.
sid
:
self
.
sid
=
self
.
connection
.
connection
.
getAnID
()
def
make_candidate
(
self
,
candidate
):
import
logging
...
...
@@ -309,9 +315,6 @@ class JingleTransportIBB(JingleTransport):
self
.
sid
=
node
.
getAttr
(
'
sid
'
)
def
set_sid
(
self
,
sid
):
self
.
sid
=
sid
def
make_transport
(
self
):
transport
=
xmpp
.
Node
(
'
transport
'
)
...
...
@@ -319,11 +322,7 @@ class JingleTransportIBB(JingleTransport):
transport
.
setAttr
(
'
block-size
'
,
self
.
block_sz
)
transport
.
setAttr
(
'
sid
'
,
self
.
sid
)
return
transport
def
set_file_props
(
self
,
file_props
):
self
.
file_props
=
file_props
import
farsight
class
JingleTransportICEUDP
(
JingleTransport
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment