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
0e50a6b5
Commit
0e50a6b5
authored
Jan 31, 2018
by
Danmei Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sips and sips-linphone in uri handler
parent
3af9220a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
9 deletions
+30
-9
linphone.desktop
assets/linphone.desktop
+1
-1
Info.plist.in
cmake_builder/linphone_package/Info.plist.in
+2
-0
uninstall.nsi
cmake_builder/linphone_package/uninstall.nsi
+2
-0
uri-handler-install.nsi.in
cmake_builder/linphone_package/uri-handler-install.nsi.in
+15
-1
Cli.cpp
src/app/cli/Cli.cpp
+10
-7
No files found.
assets/linphone.desktop
View file @
0e50a6b5
...
...
@@ -7,7 +7,7 @@ Exec=linphone %u
Icon=linphone
Terminal=false
Categories=Network;Telephony;
MimeType=x-scheme-handler/sip-linphone;x-scheme-handler/sip;
MimeType=x-scheme-handler/sip-linphone;x-scheme-handler/sip;
x-scheme-handler/sips-linphone;x-scheme-handler/sips;
# Translations
...
...
cmake_builder/linphone_package/Info.plist.in
View file @
0e50a6b5
...
...
@@ -41,6 +41,8 @@
<array>
<string>
sip
</string>
<string>
sip-linphone
</string>
<string>
sips
</string>
<string>
sips-linphone
</string>
</array>
</dict>
</array>
...
...
cmake_builder/linphone_package/uninstall.nsi
View file @
0e50a6b5
...
...
@@ -7,3 +7,5 @@ notRunningInUninstall:
DeleteRegKey HKCR "sip"
DeleteRegKey HKCR "sip-linphone"
DeleteRegKey HKCR "sips"
DeleteRegKey HKCR "sips-linphone"
cmake_builder/linphone_package/uri-handler-install.nsi.in
View file @
0e50a6b5
...
...
@@ -10,4 +10,18 @@ WriteRegStr HKCR "sip-linphone" "URL Protocol" ""
WriteRegExpandStr HKCR "sip-linphone\DefaultIcon" "" "@LINPHONE_DESKTOP_DIR@/assets/linphone.ico,1"
WriteRegStr HKCR "sip-linphone\shell" "" "open"
WriteRegStr HKCR "sip-linphone\shell\open" "" "command"
WriteRegStr HKCR "sip-linphone\shell\open\command" "" "$INSTDIR\bin\linphone.exe $\"%1$\""
\ No newline at end of file
WriteRegStr HKCR "sip-linphone\shell\open\command" "" "$INSTDIR\bin\linphone.exe $\"%1$\""
WriteRegStr HKCR "sips" "" "URL:sips Protocol"
WriteRegStr HKCR "sips" "URL Protocol" ""
WriteRegExpandStr HKCR "sips\DefaultIcon" "" "@LINPHONE_DESKTOP_DIR@/assets/linphone.ico,1"
WriteRegStr HKCR "sips\shell" "" "open"
WriteRegStr HKCR "sips\shell\open" "" "command"
WriteRegStr HKCR "sips\shell\open\command" "" "$INSTDIR\bin\linphone.exe $\"%1$\""
WriteRegStr HKCR "sips-linphone" "" "URL:sips-linphone Protocol"
WriteRegStr HKCR "sips-linphone" "URL Protocol" ""
WriteRegExpandStr HKCR "sips-linphone\DefaultIcon" "" "@LINPHONE_DESKTOP_DIR@/assets/linphone.ico,1"
WriteRegStr HKCR "sips-linphone\shell" "" "open"
WriteRegStr HKCR "sips-linphone\shell\open" "" "command"
WriteRegStr HKCR "sips-linphone\shell\open\command" "" "$INSTDIR\bin\linphone.exe $\"%1$\""
\ No newline at end of file
src/app/cli/Cli.cpp
View file @
0e50a6b5
...
...
@@ -334,8 +334,8 @@ QMap<QString, Cli::Command> Cli::mCommands = {
void
Cli
::
executeCommand
(
const
QString
&
command
,
CommandFormat
*
format
)
{
shared_ptr
<
linphone
::
Address
>
address
=
linphone
::
Factory
::
get
()
->
createAddress
(
::
Utils
::
appStringToCoreString
(
command
)
);
::
Utils
::
appStringToCoreString
(
command
)
);
// Execute cli command.
if
(
!
address
)
{
...
...
@@ -358,11 +358,14 @@ void Cli::executeCommand (const QString &command, CommandFormat *format) {
qInfo
()
<<
QStringLiteral
(
"Execute uri command: `%1`."
).
arg
(
command
);
string
scheme
=
address
->
getScheme
();
if
(
scheme
!=
"sip"
&&
scheme
!=
"sip-linphone"
)
{
qWarning
()
<<
QStringLiteral
(
"Not a valid uri: `%1`."
).
arg
(
command
);
return
;
}
for
(
const
string
&
validScheme
:
{
"sip"
,
"sip-linphone"
,
"sips"
,
"sips-linphone"
})
if
(
scheme
==
validScheme
)
goto
success
;
qWarning
()
<<
QStringLiteral
(
"Not a valid uri: `%1` Unsupported scheme: `%2`."
)
.
arg
(
command
).
arg
(
::
Utils
::
coreStringToAppString
(
scheme
));
return
;
success:
const
QString
functionName
=
::
Utils
::
coreStringToAppString
(
address
->
getHeader
(
"method"
)).
isEmpty
()
?
QStringLiteral
(
"call"
)
:
::
Utils
::
coreStringToAppString
(
address
->
getHeader
(
"method"
));
...
...
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