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
d62dd5a5
Commit
d62dd5a5
authored
14 years ago
by
Zhenchao Li
Browse files
Options
Downloads
Patches
Plain Diff
construct well-formed jingle FT session-initiate stanza
parent
048feb55
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/jingle_ft.py
+19
-1
19 additions, 1 deletion
src/common/jingle_ft.py
src/filetransfers_window.py
+1
-1
1 addition, 1 deletion
src/filetransfers_window.py
with
20 additions
and
2 deletions
src/common/jingle_ft.py
+
19
−
1
View file @
d62dd5a5
...
...
@@ -75,4 +75,22 @@ class JingleFileTransfer(JingleContent):
pass
def
_fill_content
(
self
,
content
):
content
.
addChild
(
"
description
"
,
namespace
=
xmpp
.
NS_JINGLE_FILE_TRANSFER
)
description_node
=
xmpp
.
simplexml
.
Node
(
tag
=
xmpp
.
NS_JINGLE_FILE_TRANSFER
+
'
description
'
)
sioffer
=
xmpp
.
simplexml
.
Node
(
tag
=
'
offer
'
)
file_tag
=
sioffer
.
setTag
(
'
file
'
,
namespace
=
xmpp
.
NS_FILE
)
file_tag
.
setAttr
(
'
name
'
,
self
.
file_props
[
'
name
'
])
file_tag
.
setAttr
(
'
size
'
,
self
.
file_props
[
'
size
'
])
desc
=
file_tag
.
setTag
(
'
desc
'
)
if
'
desc
'
in
self
.
file_props
:
desc
.
setData
(
self
.
file_props
[
'
desc
'
])
description_node
.
addChild
(
node
=
sioffer
)
content
.
addChild
(
node
=
description_node
)
def
get_content
(
desc
):
return
JingleFileTransfer
contents
[
xmpp
.
NS_JINGLE_FILE_TRANSFER
]
=
get_content
This diff is collapsed.
Click to expand it.
src/filetransfers_window.py
+
1
−
1
View file @
d62dd5a5
...
...
@@ -304,7 +304,7 @@ class FileTransfersWindow:
return
False
self
.
add_transfer
(
account
,
contact
,
file_props
)
if
contact
.
supports
(
NS_JINGLE_FILE_TRANSFER
):
log
.
info
(
"
contact supports jingle file transfer
"
)
log
.
info
(
"
contact
%s
supports jingle file transfer
"
%
(
contact
.
get_full_jid
())
)
gajim
.
connections
[
account
].
start_file_transfer
(
contact
.
get_full_jid
(),
file_props
)
else
:
log
.
info
(
"
contact does not support jingle file transfer
"
)
...
...
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