Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
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
Administrator
linphone-desktop
Commits
3c205c70
Commit
3c205c70
authored
Jun 27, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Notifications): deal with recording
parent
63ea842f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
240 additions
and
30 deletions
+240
-30
recording_sign.svg
assets/images/recording_sign.svg
+78
-0
settings_video_normal.svg
assets/images/settings_video_normal.svg
+0
-12
snapshot_sign.svg
assets/images/snapshot_sign.svg
+124
-12
resources.qrc
resources.qrc
+2
-1
CallModel.cpp
src/components/call/CallModel.cpp
+8
-2
Notifier.cpp
src/components/notifier/Notifier.cpp
+11
-1
Notifier.hpp
src/components/notifier/Notifier.hpp
+3
-1
NotificationRecordingCompleted.qml
...Linphone/Notifications/NotificationRecordingCompleted.qml
+13
-0
NotificationSnapshotWasTaken.qml
...s/Linphone/Notifications/NotificationSnapshotWasTaken.qml
+1
-1
No files found.
assets/images/recording_sign.svg
0 → 100644
View file @
3c205c70
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
xmlns:cc=
"http://creativecommons.org/ns#"
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg=
"http://www.w3.org/2000/svg"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:sodipodi=
"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape=
"http://www.inkscape.org/namespaces/inkscape"
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
id=
"svg12"
sodipodi:docname=
"recording_sign.svg"
inkscape:version=
"0.92.1 r"
>
<metadata
id=
"metadata16"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor=
"#ffffff"
bordercolor=
"#666666"
borderopacity=
"1"
objecttolerance=
"10"
gridtolerance=
"10"
guidetolerance=
"10"
inkscape:pageopacity=
"0"
inkscape:pageshadow=
"2"
inkscape:window-width=
"1920"
inkscape:window-height=
"985"
id=
"namedview14"
showgrid=
"false"
inkscape:zoom=
"5.9"
inkscape:cx=
"-27.881356"
inkscape:cy=
"20"
inkscape:window-x=
"0"
inkscape:window-y=
"35"
inkscape:window-maximized=
"1"
inkscape:current-layer=
"download_ended"
/>
<defs
id=
"defs6"
/>
<g
id=
"Symbols"
style=
"fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
>
<g
id=
"download_ended"
>
<polygon
id=
"call_pausing_sign"
points=
"40,0 0,40 0,0 "
style=
"fill:#4b5964"
/>
<g
id=
"attachment_default"
translate=
""
transform=
"translate(-7.2881356,-2.8813559)"
>
<circle
cx=
"19.5"
cy=
"15.5"
r=
"5"
id=
"circle10"
style=
"stroke:#ffffff"
/>
<circle
cx=
"19.5"
cy=
"15.5"
r=
"3"
id=
"circle12"
style=
"fill:#ffffff"
/>
</g>
</g>
</g>
</svg>
assets/images/settings_video_normal.svg
deleted
100644 → 0
View file @
63ea842f
<?xml version="1.0" encoding="UTF-8"?>
<svg
width=
"23px"
height=
"14px"
viewBox=
"0 0 23 14"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>
settings_video_default
</title>
<desc>
Created with Sketch.
</desc>
<defs></defs>
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
stroke-linecap=
"round"
stroke-linejoin=
"round"
>
<g
id=
"settings_video_default"
stroke-width=
"1.5"
stroke=
"#FFFFFF"
>
<polygon
id=
"videocall_icon"
points=
"22.25 6.89355494 22.25 1.08716608 16.4942742 5.63134348 16.4942742 0.75 0.75 0.75 0.75 13.25 16.4942742 13.25 16.4942742 8.36865652 22.25 12.9128339"
></polygon>
</g>
</g>
</svg>
assets/images/snapshot_sign.svg
View file @
3c205c70
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
>
<svg
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
<title>
download_ended
</title>
xmlns:cc=
"http://creativecommons.org/ns#"
<desc>
Created with Sketch.
</desc>
xmlns:rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
<defs></defs>
xmlns:svg=
"http://www.w3.org/2000/svg"
<g
id=
"Symbols"
stroke=
"none"
stroke-width=
"1"
fill=
"none"
fill-rule=
"evenodd"
>
xmlns=
"http://www.w3.org/2000/svg"
<g
id=
"download_ended"
>
xmlns:sodipodi=
"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
<polygon
id=
"call_pausing_sign"
fill=
"#4B5964"
points=
"0 0 40 0 0 40"
></polygon>
xmlns:inkscape=
"http://www.inkscape.org/namespaces/inkscape"
<path
d=
"M15.8862711,16.7118816 C15.8848622,18.47124 14.366077,19.9160243 12.4971822,19.9365977 C10.627583,19.9538529 9.11372887,18.5402605 9.1158422,16.7815657 L9.1158422,7.21360248 C9.1158422,6.03892711 10.1302442,5.0752951 11.3771133,5.06334925 C12.6225736,5.05007608 13.6292267,5.9911437 13.6292267,7.16648273 L13.6292267,16.7351096 C13.6292267,17.3224473 13.1206168,17.8022723 12.4978867,17.8095726 C11.8751565,17.8162091 11.3735911,17.3456753 11.3721822,16.7570103 L11.3721822,8.2535552 L10.24366,8.26417373 L10.24366,16.7682925 C10.24366,17.9429679 11.2524264,18.8846992 12.5,18.8727533 C13.7447558,18.8594801 14.75634,17.8978391 14.7577489,16.7244911 L14.7577489,7.15520054 C14.7598622,5.39584211 13.2460081,3.98224971 11.3757044,4.00016849 C9.50751409,4.02007824 8.00281778,5.46287161 8,7.2228937 L8,17.3231109 C8.27402943,19.4169532 10.1957577,21.0216792 12.4950689,20.9997785 C14.7971979,20.9752231 16.7217439,19.3333322 17,17.2321897 L17,6.07741929 L15.8862711,6.07741929 L15.8862711,16.7118816 Z"
id=
"attachment_default"
fill=
"#FFFFFF"
transform=
"translate(12.500000, 12.500000) rotate(-315.000000) translate(-12.500000, -12.500000) "
></path>
width=
"40px"
height=
"40px"
viewBox=
"0 0 40 40"
version=
"1.1"
id=
"svg12"
sodipodi:docname=
"snapshot_sign.svg"
inkscape:version=
"0.92.1 r"
>
<metadata
id=
"metadata16"
>
<rdf:RDF>
<cc:Work
rdf:about=
""
>
<dc:format>
image/svg+xml
</dc:format>
<dc:type
rdf:resource=
"http://purl.org/dc/dcmitype/StillImage"
/>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor=
"#ffffff"
bordercolor=
"#666666"
borderopacity=
"1"
objecttolerance=
"10"
gridtolerance=
"10"
guidetolerance=
"10"
inkscape:pageopacity=
"0"
inkscape:pageshadow=
"2"
inkscape:window-width=
"1920"
inkscape:window-height=
"985"
id=
"namedview14"
showgrid=
"false"
inkscape:zoom=
"5.9"
inkscape:cx=
"-32.457627"
inkscape:cy=
"19.322034"
inkscape:window-x=
"0"
inkscape:window-y=
"35"
inkscape:window-maximized=
"1"
inkscape:current-layer=
"download_ended"
/>
<defs
id=
"defs6"
>
<mask
id=
"mask-2"
maskContentUnits=
"userSpaceOnUse"
maskUnits=
"objectBoundingBox"
x=
"0"
y=
"0"
width=
"23"
height=
"16"
fill=
"white"
>
<rect
rx=
"1"
height=
"16"
width=
"23"
y=
"12"
x=
"8.5"
id=
"use7"
/>
</mask>
</defs>
<g
id=
"Symbols"
style=
"fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
>
<g
id=
"download_ended"
>
<polygon
id=
"call_pausing_sign"
points=
"0,40 0,0 40,0 "
style=
"fill:#4b5964"
/>
<g
style=
"fill:none;fill-rule:evenodd;stroke:none;stroke-width:1"
id=
"screenshot_default"
transform=
"matrix(0.70847458,0,0,0.70847458,-2.2203389,-3.7423729)"
>
<path
d=
"M 9.5,14.5 H 30.523796"
id=
"path14"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-linecap:square"
/>
<rect
rx=
"1"
height=
"16"
width=
"23"
y=
"12"
x=
"8.5"
id=
"use16"
style=
"stroke:#ffffff;stroke-width:2"
/>
<path
d=
"m 20,16.333333 v 2"
id=
"path18"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-linecap:square"
/>
<path
d=
"m 20,23.666667 v 2"
id=
"path20"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-linecap:square"
/>
<path
d=
"m 23.666667,20 v 2"
transform=
"rotate(90,23.666667,21)"
id=
"path22"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-linecap:square"
/>
<path
d=
"m 16.333333,20 v 2"
transform=
"rotate(90,16.333333,21)"
id=
"path24"
inkscape:connector-curvature=
"0"
style=
"stroke:#ffffff;stroke-linecap:square"
/>
<circle
cx=
"20"
cy=
"21"
r=
"3.6666667"
id=
"circle26"
style=
"stroke:#ffffff"
/>
</g>
</g>
</g>
</g>
</g>
</svg>
</svg>
resources.qrc
View file @
3c205c70
...
@@ -152,6 +152,7 @@
...
@@ -152,6 +152,7 @@
<file>
assets/images/pause_on_normal.svg
</file>
<file>
assets/images/pause_on_normal.svg
</file>
<file>
assets/images/pause_on_pressed.svg
</file>
<file>
assets/images/pause_on_pressed.svg
</file>
<file>
assets/images/pause_on_updating.svg
</file>
<file>
assets/images/pause_on_updating.svg
</file>
<file>
assets/images/recording_sign.svg
</file>
<file>
assets/images/record_off.svg
</file>
<file>
assets/images/record_off.svg
</file>
<file>
assets/images/record_on.svg
</file>
<file>
assets/images/record_on.svg
</file>
<file>
assets/images/screenshot_hovered.svg
</file>
<file>
assets/images/screenshot_hovered.svg
</file>
...
@@ -168,7 +169,6 @@
...
@@ -168,7 +169,6 @@
<file>
assets/images/settings_network_selected.svg
</file>
<file>
assets/images/settings_network_selected.svg
</file>
<file>
assets/images/settings_sip_accounts_normal.svg
</file>
<file>
assets/images/settings_sip_accounts_normal.svg
</file>
<file>
assets/images/settings_sip_accounts_selected.svg
</file>
<file>
assets/images/settings_sip_accounts_selected.svg
</file>
<file>
assets/images/settings_video_normal.svg
</file>
<file>
assets/images/settings_video_selected.svg
</file>
<file>
assets/images/settings_video_selected.svg
</file>
<file>
assets/images/snapshot_sign.svg
</file>
<file>
assets/images/snapshot_sign.svg
</file>
<file>
assets/images/speaker_off_hovered.svg
</file>
<file>
assets/images/speaker_off_hovered.svg
</file>
...
@@ -333,6 +333,7 @@
...
@@ -333,6 +333,7 @@
<file>
ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedCall.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedFileMessage.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationReceivedMessage.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationRecordingCompleted.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationSnapshotWasTaken.qml
</file>
<file>
ui/modules/Linphone/Notifications/NotificationSnapshotWasTaken.qml
</file>
<file>
ui/modules/Linphone/Presence/PresenceLevel.qml
</file>
<file>
ui/modules/Linphone/Presence/PresenceLevel.qml
</file>
<file>
ui/modules/Linphone/qmldir
</file>
<file>
ui/modules/Linphone/qmldir
</file>
...
...
src/components/call/CallModel.cpp
View file @
3c205c70
...
@@ -89,14 +89,16 @@ void CallModel::setRecordFile (shared_ptr<linphone::CallParams> &callParams) {
...
@@ -89,14 +89,16 @@ void CallModel::setRecordFile (shared_ptr<linphone::CallParams> &callParams) {
void
CallModel
::
updateStats
(
const
shared_ptr
<
const
linphone
::
CallStats
>
&
callStats
)
{
void
CallModel
::
updateStats
(
const
shared_ptr
<
const
linphone
::
CallStats
>
&
callStats
)
{
switch
(
callStats
->
getType
())
{
switch
(
callStats
->
getType
())
{
case
linphone
:
:
StreamTypeText
:
case
linphone
:
:
StreamTypeUnknown
:
break
;
case
linphone
:
:
StreamTypeAudio
:
case
linphone
:
:
StreamTypeAudio
:
updateStats
(
callStats
,
mAudioStats
);
updateStats
(
callStats
,
mAudioStats
);
break
;
break
;
case
linphone
:
:
StreamTypeVideo
:
case
linphone
:
:
StreamTypeVideo
:
updateStats
(
callStats
,
mVideoStats
);
updateStats
(
callStats
,
mVideoStats
);
break
;
break
;
default:
break
;
}
}
emit
statsUpdated
();
emit
statsUpdated
();
...
@@ -211,6 +213,10 @@ void CallModel::stopRecording () {
...
@@ -211,6 +213,10 @@ void CallModel::stopRecording () {
mRecording
=
false
;
mRecording
=
false
;
mCall
->
stopRecording
();
mCall
->
stopRecording
();
App
::
getInstance
()
->
getNotifier
()
->
notifyRecordingCompleted
(
::
Utils
::
coreStringToAppString
(
mCall
->
getParams
()
->
getRecordFile
())
);
emit
recordingChanged
(
false
);
emit
recordingChanged
(
false
);
}
}
...
...
src/components/notifier/Notifier.cpp
View file @
3c205c70
...
@@ -79,7 +79,8 @@ const QHash<int, Notifier::Notification> Notifier::mNotifications = {
...
@@ -79,7 +79,8 @@ const QHash<int, Notifier::Notification> Notifier::mNotifications = {
{
Notifier
::
ReceivedFileMessage
,
{
"NotificationReceivedFileMessage.qml"
,
10
}
},
{
Notifier
::
ReceivedFileMessage
,
{
"NotificationReceivedFileMessage.qml"
,
10
}
},
{
Notifier
::
ReceivedCall
,
{
"NotificationReceivedCall.qml"
,
30
}
},
{
Notifier
::
ReceivedCall
,
{
"NotificationReceivedCall.qml"
,
30
}
},
{
Notifier
::
NewVersionAvailable
,
{
"NotificationNewVersionAvailable.qml"
,
30
}
},
{
Notifier
::
NewVersionAvailable
,
{
"NotificationNewVersionAvailable.qml"
,
30
}
},
{
Notifier
::
SnapshotWasTaken
,
{
"NotificationSnapshotWasTaken.qml"
,
10
}
}
{
Notifier
::
SnapshotWasTaken
,
{
"NotificationSnapshotWasTaken.qml"
,
10
}
},
{
Notifier
::
RecordingCompleted
,
{
"NotificationRecordingCompleted.qml"
,
10
}
}
};
};
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
...
@@ -283,5 +284,14 @@ void Notifier::notifySnapshotWasTaken (const QString &filePath) {
...
@@ -283,5 +284,14 @@ void Notifier::notifySnapshotWasTaken (const QString &filePath) {
SHOW_NOTIFICATION
(
map
);
SHOW_NOTIFICATION
(
map
);
}
}
void
Notifier
::
notifyRecordingCompleted
(
const
QString
&
filePath
)
{
CREATE_NOTIFICATION
(
Notifier
::
RecordingCompleted
);
QVariantMap
map
;
map
[
"filePath"
]
=
filePath
;
SHOW_NOTIFICATION
(
map
);
}
#undef SHOW_NOTIFICATION
#undef SHOW_NOTIFICATION
#undef CREATE_NOTIFICATION
#undef CREATE_NOTIFICATION
src/components/notifier/Notifier.hpp
View file @
3c205c70
...
@@ -43,7 +43,8 @@ public:
...
@@ -43,7 +43,8 @@ public:
ReceivedFileMessage
,
ReceivedFileMessage
,
ReceivedCall
,
ReceivedCall
,
NewVersionAvailable
,
NewVersionAvailable
,
SnapshotWasTaken
SnapshotWasTaken
,
RecordingCompleted
};
};
void
notifyReceivedMessage
(
const
std
::
shared_ptr
<
linphone
::
ChatMessage
>
&
message
);
void
notifyReceivedMessage
(
const
std
::
shared_ptr
<
linphone
::
ChatMessage
>
&
message
);
...
@@ -51,6 +52,7 @@ public:
...
@@ -51,6 +52,7 @@ public:
void
notifyReceivedCall
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
notifyReceivedCall
(
const
std
::
shared_ptr
<
linphone
::
Call
>
&
call
);
void
notifyNewVersionAvailable
(
const
QString
&
version
,
const
QString
&
url
);
void
notifyNewVersionAvailable
(
const
QString
&
version
,
const
QString
&
url
);
void
notifySnapshotWasTaken
(
const
QString
&
filePath
);
void
notifySnapshotWasTaken
(
const
QString
&
filePath
);
void
notifyRecordingCompleted
(
const
QString
&
filePath
);
public
slots
:
public
slots
:
void
deleteNotification
(
QVariant
notification
);
void
deleteNotification
(
QVariant
notification
);
...
...
ui/modules/Linphone/Notifications/NotificationRecordingCompleted.qml
0 → 100644
View file @
3c205c70
import
Utils
1.0
// =============================================================================
NotificationBasic
{
icon
:
'
recording_sign
'
message
:
Utils
.
basename
(
notificationData
.
filePath
)
handler
:
(
function
()
{
Qt
.
openUrlExternally
(
Utils
.
dirname
(
Utils
.
getUriFromSystemPath
(
notificationData
.
filePath
)
))
})
}
ui/modules/Linphone/Notifications/NotificationSnapshotWasTaken.qml
View file @
3c205c70
...
@@ -4,7 +4,7 @@ import Utils 1.0
...
@@ -4,7 +4,7 @@ import Utils 1.0
NotificationBasic
{
NotificationBasic
{
icon
:
'
snapshot_sign
'
icon
:
'
snapshot_sign
'
message
:
notificationData
.
filePath
message
:
Utils
.
basename
(
notificationData
.
filePath
)
handler
:
(
function
()
{
handler
:
(
function
()
{
Qt
.
openUrlExternally
(
Utils
.
dirname
(
Qt
.
openUrlExternally
(
Utils
.
dirname
(
Utils
.
getUriFromSystemPath
(
notificationData
.
filePath
)
Utils
.
getUriFromSystemPath
(
notificationData
.
filePath
)
...
...
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