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
d0619b87
Commit
d0619b87
authored
Mar 01, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ui/views/App/Settings/SettingsCallsChat): supports file transfer
parent
5ac95dec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
43 deletions
+51
-43
CoreHandlers.cpp
linphone-desktop/src/components/core/CoreHandlers.cpp
+8
-4
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+26
-26
SettingsModel.hpp
linphone-desktop/src/components/settings/SettingsModel.hpp
+12
-12
SettingsCallsChat.qml
linphone-desktop/ui/views/App/Settings/SettingsCallsChat.qml
+5
-1
No files found.
linphone-desktop/src/components/core/CoreHandlers.cpp
View file @
d0619b87
...
...
@@ -56,11 +56,15 @@ void CoreHandlers::onMessageReceived (
const
shared_ptr
<
linphone
::
ChatRoom
>
&
,
const
shared_ptr
<
linphone
::
ChatMessage
>
&
message
)
{
emit
messageReceived
(
message
);
const
string
content_type
=
message
->
getContentType
(
);
const
App
*
app
=
App
::
getInstance
();
if
(
!
app
->
hasFocus
())
app
->
getNotifier
()
->
notifyReceivedMessage
(
message
);
if
(
content_type
==
"text/plain"
||
content_type
==
"application/vnd.gsma.rcs-ft-http+xml"
)
{
emit
messageReceived
(
message
);
const
App
*
app
=
App
::
getInstance
();
if
(
!
app
->
hasFocus
())
app
->
getNotifier
()
->
notifyReceivedMessage
(
message
);
}
}
void
CoreHandlers
::
onRegistrationStateChanged
(
...
...
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
d0619b87
...
...
@@ -42,6 +42,32 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
// Chat & calls.
// =============================================================================
bool
SettingsModel
::
getAutoAnswerStatus
()
const
{
return
!!
m_config
->
getInt
(
UI_SECTION
,
"auto_answer"
,
0
);
}
void
SettingsModel
::
setAutoAnswerStatus
(
bool
status
)
{
m_config
->
setInt
(
UI_SECTION
,
"auto_answer"
,
status
);
emit
autoAnswerStatusChanged
(
status
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getFileTransferUrl
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getFileTransferServer
()
);
}
void
SettingsModel
::
setFileTransferUrl
(
const
QString
&
url
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setFileTransferServer
(
::
Utils
::
qStringToLinphoneString
(
url
)
);
emit
fileTransferUrlChanged
(
url
);
}
// -----------------------------------------------------------------------------
bool
SettingsModel
::
getLimeIsSupported
()
const
{
return
CoreManager
::
getInstance
()
->
getCore
()
->
limeAvailable
();
}
...
...
@@ -367,32 +393,6 @@ void SettingsModel::setDscpVideo (int dscp) {
// Misc.
// =============================================================================
bool
SettingsModel
::
getAutoAnswerStatus
()
const
{
return
!!
m_config
->
getInt
(
UI_SECTION
,
"auto_answer"
,
0
);
}
void
SettingsModel
::
setAutoAnswerStatus
(
bool
status
)
{
m_config
->
setInt
(
UI_SECTION
,
"auto_answer"
,
status
);
emit
autoAnswerStatusChanged
(
status
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getFileTransferUrl
()
const
{
return
::
Utils
::
linphoneStringToQString
(
CoreManager
::
getInstance
()
->
getCore
()
->
getFileTransferServer
()
);
}
void
SettingsModel
::
setFileTransferUrl
(
const
QString
&
url
)
{
CoreManager
::
getInstance
()
->
getCore
()
->
setFileTransferServer
(
::
Utils
::
qStringToLinphoneString
(
url
)
);
emit
fileTransferUrlChanged
(
url
);
}
// -----------------------------------------------------------------------------
QString
SettingsModel
::
getSavedScreenshotsFolder
()
const
{
return
QDir
::
cleanPath
(
::
Utils
::
linphoneStringToQString
(
...
...
linphone-desktop/src/components/settings/SettingsModel.hpp
View file @
d0619b87
...
...
@@ -37,6 +37,9 @@ class SettingsModel : public QObject {
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
Q_PROPERTY
(
QString
fileTransferUrl
READ
getFileTransferUrl
WRITE
setFileTransferUrl
NOTIFY
fileTransferUrlChanged
);
Q_PROPERTY
(
bool
limeIsSupported
READ
getLimeIsSupported
CONSTANT
);
Q_PROPERTY
(
QVariantList
supportedMediaEncryptions
READ
getSupportedMediaEncryptions
CONSTANT
);
...
...
@@ -79,9 +82,6 @@ class SettingsModel : public QObject {
// Misc. ---------------------------------------------------------------------
Q_PROPERTY
(
bool
autoAnswerStatus
READ
getAutoAnswerStatus
WRITE
setAutoAnswerStatus
NOTIFY
autoAnswerStatusChanged
);
Q_PROPERTY
(
QString
fileTransferUrl
READ
getFileTransferUrl
WRITE
setFileTransferUrl
NOTIFY
fileTransferUrlChanged
);
Q_PROPERTY
(
QString
savedScreenshotsFolder
READ
getSavedScreenshotsFolder
WRITE
setSavedScreenshotsFolder
NOTIFY
savedScreenshotsFolderChanged
);
Q_PROPERTY
(
QString
savedVideosFolder
READ
getSavedVideosFolder
WRITE
setSavedVideosFolder
NOTIFY
savedVideosFolderChanged
);
...
...
@@ -111,6 +111,12 @@ public:
// Chat & calls. -------------------------------------------------------------
bool
getAutoAnswerStatus
()
const
;
void
setAutoAnswerStatus
(
bool
status
);
QString
getFileTransferUrl
()
const
;
void
setFileTransferUrl
(
const
QString
&
url
);
bool
getLimeIsSupported
()
const
;
QVariantList
getSupportedMediaEncryptions
()
const
;
...
...
@@ -175,12 +181,6 @@ public:
// Misc. ---------------------------------------------------------------------
bool
getAutoAnswerStatus
()
const
;
void
setAutoAnswerStatus
(
bool
status
);
QString
getFileTransferUrl
()
const
;
void
setFileTransferUrl
(
const
QString
&
url
);
QString
getSavedScreenshotsFolder
()
const
;
void
setSavedScreenshotsFolder
(
const
QString
&
folder
);
...
...
@@ -198,6 +198,9 @@ public:
signals:
// Chat & calls. -------------------------------------------------------------
void
autoAnswerStatusChanged
(
bool
status
);
void
fileTransferUrlChanged
(
const
QString
&
url
);
void
mediaEncryptionChanged
(
MediaEncryption
encryption
);
void
limeStateChanged
(
LimeState
state
);
...
...
@@ -231,9 +234,6 @@ signals:
// Misc. ---------------------------------------------------------------------
void
autoAnswerStatusChanged
(
bool
status
);
void
fileTransferUrlChanged
(
const
QString
&
url
);
void
savedScreenshotsFolderChanged
(
const
QString
&
folder
);
void
savedVideosFolderChanged
(
const
QString
&
folder
);
...
...
linphone-desktop/ui/views/App/Settings/SettingsCallsChat.qml
View file @
d0619b87
...
...
@@ -77,7 +77,11 @@ TabContainer {
FormGroup
{
label
:
qsTr
(
'
fileServerLabel
'
)
TextField
{}
TextField
{
text
:
SettingsModel
.
fileTransferUrl
onEditingFinished
:
SettingsModel
.
fileTransferUrl
=
text
}
}
}
...
...
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