Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
048d1abd
Commit
048d1abd
authored
Jul 06, 2023
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for conference files
parent
6600a6ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
1 deletion
+22
-1
sessions.py
blink/sessions.py
+22
-1
No files found.
blink/sessions.py
View file @
048d1abd
...
@@ -46,6 +46,7 @@ from sipsimple.streams.msrp.screensharing import ExternalVNCServerHandler, Exter
...
@@ -46,6 +46,7 @@ from sipsimple.streams.msrp.screensharing import ExternalVNCServerHandler, Exter
from
sipsimple.threading
import
run_in_thread
,
run_in_twisted_thread
from
sipsimple.threading
import
run_in_thread
,
run_in_twisted_thread
from
blink.logging
import
MessagingTrace
as
message_log
from
blink.logging
import
MessagingTrace
as
message_log
from
blink.configuration.datatypes
import
File
from
blink.configuration.settings
import
BlinkSettings
from
blink.configuration.settings
import
BlinkSettings
from
blink.resources
import
ApplicationData
,
Resources
from
blink.resources
import
ApplicationData
,
Resources
from
blink.screensharing
import
ScreensharingWindow
,
VNCClient
,
ServerDefault
from
blink.screensharing
import
ScreensharingWindow
,
VNCClient
,
ServerDefault
...
@@ -1491,6 +1492,8 @@ class ServerConference(object):
...
@@ -1491,6 +1492,8 @@ class ServerConference(object):
self
.
pending_additions
=
set
()
self
.
pending_additions
=
set
()
self
.
pending_removals
=
set
()
self
.
pending_removals
=
set
()
self
.
shared_files
=
[]
notification_center
=
NotificationCenter
()
notification_center
=
NotificationCenter
()
notification_center
.
add_observer
(
self
,
sender
=
session
)
notification_center
.
add_observer
(
self
,
sender
=
session
)
...
@@ -1570,6 +1573,20 @@ class ServerConference(object):
...
@@ -1570,6 +1573,20 @@ class ServerConference(object):
notification
.
center
.
post_notification
(
'BlinkSessionWillAddParticipant'
,
sender
=
self
.
session
,
data
=
NotificationData
(
participant
=
participant
))
notification
.
center
.
post_notification
(
'BlinkSessionWillAddParticipant'
,
sender
=
self
.
session
,
data
=
NotificationData
(
participant
=
participant
))
notification
.
center
.
post_notification
(
'BlinkSessionDidAddParticipant'
,
sender
=
self
.
session
,
data
=
NotificationData
(
participant
=
participant
))
notification
.
center
.
post_notification
(
'BlinkSessionDidAddParticipant'
,
sender
=
self
.
session
,
data
=
NotificationData
(
participant
=
participant
))
data
=
notification
.
data
if
data
.
conference_info
.
conference_description
.
resources
is
not
None
and
data
.
conference_info
.
conference_description
.
resources
.
files
is
not
None
:
files
=
[
file
for
file
in
data
.
conference_info
.
conference_description
.
resources
.
files
]
for
file
in
[
file
for
file
in
files
if
(
file
.
hash
,
file
.
name
)
not
in
self
.
shared_files
]:
self
.
shared_files
.
append
((
file
.
hash
,
file
.
name
))
sender
=
SIPURI
.
parse
(
file
.
sender
)
file
.
contact
,
contact_uri
=
URIUtils
.
find_contact
(
sender
)
shared_file
=
File
(
file
.
name
,
file
.
size
,
file
.
contact
,
file
.
hash
,
str
(
uuid
.
uuid4
()))
notification
.
center
.
post_notification
(
'BlinkSessionDidShareFile'
,
sender
=
self
.
session
,
data
=
NotificationData
(
file
=
shared_file
,
direction
=
'incoming'
))
def
_NH_SIPConferenceDidNotAddParticipant
(
self
,
notification
):
def
_NH_SIPConferenceDidNotAddParticipant
(
self
,
notification
):
uri
=
self
.
sip_prefix_re
.
sub
(
''
,
str
(
notification
.
data
.
participant
))
uri
=
self
.
sip_prefix_re
.
sub
(
''
,
str
(
notification
.
data
.
participant
))
try
:
try
:
...
@@ -5017,9 +5034,13 @@ class FileListModel(QAbstractListModel):
...
@@ -5017,9 +5034,13 @@ class FileListModel(QAbstractListModel):
self
.
removeItem
(
notification
.
data
)
self
.
removeItem
(
notification
.
data
)
def
_NH_BlinkSessionDidShareFile
(
self
,
notification
):
def
_NH_BlinkSessionDidShareFile
(
self
,
notification
):
if
session
.
remote_focus
:
if
self
.
session
!=
notification
.
sender
:
return
if
self
.
session
.
remote_focus
:
self
.
addItem
(
FileListItem
(
notification
.
data
.
fiile
,
direction
=
notification
.
data
.
direction
,
conference_file
=
True
))
self
.
addItem
(
FileListItem
(
notification
.
data
.
fiile
,
direction
=
notification
.
data
.
direction
,
conference_file
=
True
))
return
return
self
.
addItem
(
FileListItem
(
notification
.
data
.
file
,
direction
=
notification
.
data
.
direction
))
self
.
addItem
(
FileListItem
(
notification
.
data
.
file
,
direction
=
notification
.
data
.
direction
))
def
_NH_BlinkSessionShouldDownloadFile
(
self
,
notification
):
def
_NH_BlinkSessionShouldDownloadFile
(
self
,
notification
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment