Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-lrc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-lrc
Commits
9ce238b7
Commit
9ce238b7
authored
Feb 17, 2020
by
Andreas Traczyk
Committed by
Kateryna Kostiuk
Mar 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api: remove the use of std::string
Change-Id: I18bb655e76e1409e752c12878ad65ed16eaf382b
parent
1f3f9c13
Changes
48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1917 additions
and
2000 deletions
+1917
-2000
src/api/account.h
src/api/account.h
+41
-43
src/api/avmodel.h
src/api/avmodel.h
+35
-35
src/api/behaviorcontroller.h
src/api/behaviorcontroller.h
+13
-16
src/api/call.h
src/api/call.h
+21
-21
src/api/contact.h
src/api/contact.h
+3
-5
src/api/contactmodel.h
src/api/contactmodel.h
+20
-25
src/api/conversation.h
src/api/conversation.h
+8
-9
src/api/conversationmodel.h
src/api/conversationmodel.h
+38
-42
src/api/datatransfer.h
src/api/datatransfer.h
+11
-9
src/api/datatransfermodel.h
src/api/datatransfermodel.h
+11
-15
src/api/interaction.h
src/api/interaction.h
+9
-9
src/api/lrc.h
src/api/lrc.h
+6
-9
src/api/newaccountmodel.h
src/api/newaccountmodel.h
+41
-45
src/api/newcallmodel.h
src/api/newcallmodel.h
+36
-42
src/api/newcodecmodel.h
src/api/newcodecmodel.h
+16
-21
src/api/newdevicemodel.h
src/api/newdevicemodel.h
+14
-18
src/api/newvideo.h
src/api/newvideo.h
+13
-13
src/api/peerdiscoverymodel.h
src/api/peerdiscoverymodel.h
+9
-11
src/api/profile.h
src/api/profile.h
+6
-7
src/authority/daemon.cpp
src/authority/daemon.cpp
+10
-17
src/authority/daemon.h
src/authority/daemon.h
+5
-5
src/authority/storagehelper.cpp
src/authority/storagehelper.cpp
+168
-168
src/authority/storagehelper.h
src/authority/storagehelper.h
+45
-40
src/avmodel.cpp
src/avmodel.cpp
+132
-140
src/behaviorcontroller.cpp
src/behaviorcontroller.cpp
+1
-1
src/callbackshandler.cpp
src/callbackshandler.cpp
+44
-66
src/callbackshandler.h
src/callbackshandler.h
+48
-58
src/contactmodel.cpp
src/contactmodel.cpp
+122
-120
src/conversationmodel.cpp
src/conversationmodel.cpp
+234
-226
src/database.cpp
src/database.cpp
+158
-159
src/database.h
src/database.h
+66
-62
src/datatransfermodel.cpp
src/datatransfermodel.cpp
+12
-29
src/dbus/configurationmanager.h
src/dbus/configurationmanager.h
+1
-0
src/directrenderer.cpp
src/directrenderer.cpp
+2
-2
src/directrenderer.h
src/directrenderer.h
+1
-1
src/lrc.cpp
src/lrc.cpp
+14
-14
src/newaccountmodel.cpp
src/newaccountmodel.cpp
+198
-200
src/newcallmodel.cpp
src/newcallmodel.cpp
+174
-177
src/newcodecmodel.cpp
src/newcodecmodel.cpp
+37
-37
src/newdevicemodel.cpp
src/newdevicemodel.cpp
+35
-41
src/newvideo.cpp
src/newvideo.cpp
+20
-20
src/peerdiscoverymodel.cpp
src/peerdiscoverymodel.cpp
+9
-9
src/qtwrapper/configurationmanager_wrap.h
src/qtwrapper/configurationmanager_wrap.h
+6
-6
src/qtwrapper/conversions_wrap.hpp
src/qtwrapper/conversions_wrap.hpp
+19
-0
src/shmrenderer.cpp
src/shmrenderer.cpp
+1
-2
src/shmrenderer.h
src/shmrenderer.h
+1
-1
src/video/renderer.cpp
src/video/renderer.cpp
+2
-1
src/video/renderer.h
src/video/renderer.h
+1
-3
No files found.
src/api/account.h
View file @
9ce238b7
...
...
@@ -18,16 +18,14 @@
***************************************************************************/
#pragma once
// Std
#include <string>
#include <memory>
// Data
#include "profile.h"
// old LRC
#include "typedefs.h"
#include <memory>
#include <QString>
namespace
lrc
{
...
...
@@ -64,7 +62,7 @@ enum class Status {
};
static
inline
account
::
Status
to_status
(
const
std
::
s
tring
&
type
)
to_status
(
const
QS
tring
&
type
)
{
if
(
type
==
"INITIALIZING"
)
return
account
::
Status
::
INITIALIZING
;
...
...
@@ -95,40 +93,40 @@ enum class TlsMethod {
};
struct
ConfProperties_t
{
std
::
string
mailbox
;
std
::
string
dtmfType
;
QString
mailbox
;
QString
dtmfType
;
bool
autoAnswer
;
int
activeCallLimit
;
std
::
string
hostname
;
std
::
string
username
;
std
::
string
routeset
;
std
::
string
password
;
std
::
string
realm
;
std
::
string
localInterface
;
std
::
string
deviceId
;
std
::
string
deviceName
;
std
::
string
managerUri
;
std
::
string
managerUsername
;
QString
hostname
;
QString
username
;
QString
routeset
;
QString
password
;
QString
realm
;
QString
localInterface
;
QString
deviceId
;
QString
deviceName
;
QString
managerUri
;
QString
managerUsername
;
bool
publishedSameAsLocal
;
int
localPort
;
int
publishedPort
;
std
::
string
publishedAddress
;
std
::
string
userAgent
;
QString
publishedAddress
;
QString
userAgent
;
bool
upnpEnabled
;
bool
hasCustomUserAgent
;
bool
allowIncoming
;
std
::
string
archivePassword
;
QString
archivePassword
;
bool
archiveHasPassword
;
std
::
string
archivePath
;
std
::
string
archivePin
;
QString
archivePath
;
QString
archivePin
;
bool
proxyEnabled
;
std
::
string
proxyServer
;
std
::
string
proxyPushToken
;
QString
proxyServer
;
QString
proxyPushToken
;
bool
peerDiscovery
;
bool
accountDiscovery
;
bool
accountPublish
;
int
registrationExpire
;
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>
credentials
;
VectorMapStringString
credentials
;
struct
Audio_t
{
int
audioPortMax
;
int
audioPortMin
;
...
...
@@ -139,15 +137,15 @@ struct ConfProperties_t {
int
videoPortMin
;
}
Video
;
struct
STUN_t
{
std
::
string
server
;
QString
server
;
bool
enable
;
}
STUN
;
struct
TURN_t
{
std
::
string
server
;
QString
server
;
bool
enable
;
std
::
string
username
;
std
::
string
password
;
std
::
string
realm
;
QString
username
;
QString
password
;
QString
realm
;
}
TURN
;
struct
Presence_t
{
bool
presencePublishSupported
;
...
...
@@ -155,7 +153,7 @@ struct ConfProperties_t {
bool
presenceEnabled
;
}
Presence
;
struct
Ringtone_t
{
std
::
string
ringtonePath
;
QString
ringtonePath
;
bool
ringtoneEnabled
;
}
Ringtone
;
struct
SRTP_t
{
...
...
@@ -167,13 +165,13 @@ struct ConfProperties_t {
int
listenerPort
;
bool
enable
;
int
port
;
std
::
string
certificateListFile
;
std
::
string
certificateFile
;
std
::
string
privateKeyFile
;
std
::
string
password
;
QString
certificateListFile
;
QString
certificateFile
;
QString
privateKeyFile
;
QString
password
;
TlsMethod
method
;
std
::
string
ciphers
;
std
::
string
serverName
;
QString
ciphers
;
QString
serverName
;
bool
verifyServer
;
bool
verifyClient
;
bool
requireClientCertificate
;
...
...
@@ -185,8 +183,8 @@ struct ConfProperties_t {
bool
AllowFromTrusted
;
}
DHT
;
struct
RingNS_t
{
std
::
string
uri
;
std
::
string
account
;
QString
uri
;
QString
account
;
}
RingNS
;
struct
Registration_t
{
int
expire
;
...
...
@@ -224,7 +222,7 @@ struct Info
{
bool
freeable
=
false
;
bool
valid
=
true
;
std
::
s
tring
registeredName
;
QS
tring
registeredName
;
Status
status
=
account
::
Status
::
INVALID
;
std
::
unique_ptr
<
lrc
::
api
::
ContactModel
>
contactModel
;
std
::
unique_ptr
<
lrc
::
api
::
ConversationModel
>
conversationModel
;
...
...
@@ -235,7 +233,7 @@ struct Info
NewAccountModel
*
accountModel
{
nullptr
};
// daemon config
std
::
string
id
;
QString
id
;
profile
::
Info
profileInfo
;
// contains: type, alias
bool
enabled
;
ConfProperties_t
confProperties
;
...
...
src/api/avmodel.h
View file @
9ce238b7
...
...
@@ -82,23 +82,23 @@ public:
* Get video devices
* @return list of devices
*/
std
::
vector
<
std
::
string
>
getDevices
()
const
;
VectorString
getDevices
()
const
;
/**
* Retrieve current default video device
* @return current default video device id
*/
std
::
s
tring
getDefaultDevice
()
const
;
QS
tring
getDefaultDevice
()
const
;
/**
* Set new default video device
* @param id of the device
*/
void
setDefaultDevice
(
const
std
::
s
tring
&
deviceId
);
void
setDefaultDevice
(
const
QS
tring
&
deviceId
);
/**
* Retrieve current framerate/resolution/etc of a device
* @param id of the device
* @return settings of the device
*/
video
::
Settings
getDeviceSettings
(
const
std
::
s
tring
&
deviceId
)
const
;
video
::
Settings
getDeviceSettings
(
const
QS
tring
&
deviceId
)
const
;
/**
* Set device settings
* @param video::Settings
...
...
@@ -109,58 +109,58 @@ public:
* @param id of the device
* @return possibilities of the device
*/
video
::
Capabilities
getDeviceCapabilities
(
const
std
::
s
tring
&
deviceId
)
const
;
video
::
Capabilities
getDeviceCapabilities
(
const
QS
tring
&
deviceId
)
const
;
/**
* Get the deviceId corresponding to a given device friendly name
* @return deviceId
*/
std
::
string
getDeviceIdFromName
(
const
std
::
s
tring
&
deviceName
)
const
;
QString
getDeviceIdFromName
(
const
QS
tring
&
deviceName
)
const
;
/**
* Get supported audio managers
* @return supported audio managers
*/
std
::
vector
<
std
::
string
>
getSupportedAudioManagers
()
const
;
VectorString
getSupportedAudioManagers
()
const
;
/**
* Get current audio manager
* @return current audio manager
*/
std
::
s
tring
getAudioManager
()
const
;
QS
tring
getAudioManager
()
const
;
/**
* Get current audio outputs
* @return audio outputs
*/
std
::
vector
<
std
::
string
>
getAudioOutputDevices
()
const
;
VectorString
getAudioOutputDevices
()
const
;
/**
* Get current audio inputs
* @return audio inputs
*/
std
::
vector
<
std
::
string
>
getAudioInputDevices
()
const
;
VectorString
getAudioInputDevices
()
const
;
/**
* Get current ringtone device
* @return current ringtone device
*/
std
::
s
tring
getRingtoneDevice
()
const
;
QS
tring
getRingtoneDevice
()
const
;
/**
* Get current output device
* @return current output device
*/
std
::
s
tring
getOutputDevice
()
const
;
QS
tring
getOutputDevice
()
const
;
/**
* Get current input device
* @return current input device
*/
std
::
s
tring
getInputDevice
()
const
;
QS
tring
getInputDevice
()
const
;
/**
* Get current state of the audio meter
* @return current state of the audio meter
*/
bool
isAudioMeterActive
(
const
std
::
s
tring
&
id
=
""
)
const
;
bool
isAudioMeterActive
(
const
QS
tring
&
id
=
""
)
const
;
/**
* Turn on/off the audio metering feature
* @param the new state of the meter
*/
void
setAudioMeterState
(
bool
active
,
const
std
::
s
tring
&
id
=
""
)
const
;
void
setAudioMeterState
(
bool
active
,
const
QS
tring
&
id
=
""
)
const
;
/**
* Starts audio device. Should only be invoked when outside of a call.
*/
...
...
@@ -174,43 +174,43 @@ public:
* @param name of the new audio manager
* @return if the operation is successful
*/
bool
setAudioManager
(
const
std
::
s
tring
&
name
);
bool
setAudioManager
(
const
QS
tring
&
name
);
/**
* Set current ringtone device
* @param name of the new ringtone device
*/
void
setRingtoneDevice
(
const
std
::
s
tring
&
name
);
void
setRingtoneDevice
(
const
QS
tring
&
name
);
/**
* Set current output device
* @param name of the new output device
*/
void
setOutputDevice
(
const
std
::
s
tring
&
name
);
void
setOutputDevice
(
const
QS
tring
&
name
);
/**
* Set current input device
* @param name of the new input device
*/
void
setInputDevice
(
const
std
::
s
tring
&
name
);
void
setInputDevice
(
const
QS
tring
&
name
);
/**
* Stop local record at given path
* @param path
*/
void
stopLocalRecorder
(
const
std
::
s
tring
&
path
)
const
;
void
stopLocalRecorder
(
const
QS
tring
&
path
)
const
;
/**
* Start a local recorder and return it path.
* @param audioOnly
*/
std
::
s
tring
startLocalRecorder
(
const
bool
&
audioOnly
)
const
;
QS
tring
startLocalRecorder
(
const
bool
&
audioOnly
)
const
;
/**
* Get the current recording path
* @return recording path
*/
std
::
s
tring
getRecordPath
()
const
;
QS
tring
getRecordPath
()
const
;
/**
* Sets the recording path
* @param path recording path
*/
void
setRecordPath
(
const
std
::
s
tring
&
path
)
const
;
void
setRecordPath
(
const
QS
tring
&
path
)
const
;
/**
* Whether or not to record every call
* @return always recording
...
...
@@ -256,7 +256,7 @@ public:
* @return the linked renderer
* @throw std::out_of_range if not found
*/
const
video
::
Renderer
&
getRenderer
(
const
std
::
s
tring
&
id
)
const
;
const
video
::
Renderer
&
getRenderer
(
const
QS
tring
&
id
)
const
;
/**
* Render a file to the call id specified
...
...
@@ -264,7 +264,7 @@ public:
* @param callId
* @note callId can be omitted to switch the input of the local recorder
*/
void
setInputFile
(
const
std
::
string
&
uri
,
const
std
::
s
tring
&
callId
=
{});
void
setInputFile
(
const
QString
&
uri
,
const
QS
tring
&
callId
=
{});
/**
* Change the current device rendered for the call id specified
* @param id of the camera
...
...
@@ -272,7 +272,7 @@ public:
* @note renders a black frame if device not found or empty
* @note callId can be omitted to switch the input of the local recorder
*/
void
switchInputTo
(
const
std
::
string
&
id
,
const
std
::
s
tring
&
callId
=
{});
void
switchInputTo
(
const
QString
&
id
,
const
QS
tring
&
callId
=
{});
/**
* Render the current display to the call id specified
* @param idx of the display
...
...
@@ -283,13 +283,13 @@ public:
* @param callId
* @note callId can be omitted to switch the input of the local recorder
*/
void
setDisplay
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
,
const
std
::
s
tring
&
callId
=
{});
void
setDisplay
(
int
idx
,
int
x
,
int
y
,
int
w
,
int
h
,
const
QS
tring
&
callId
=
{});
/**
* Get informations on the rendered device
* @param call_id linked call to the renderer
* @return the device rendered
*/
video
::
RenderedDevice
getCurrentRenderedDevice
(
const
std
::
s
tring
&
call_id
)
const
;
video
::
RenderedDevice
getCurrentRenderedDevice
(
const
QS
tring
&
call_id
)
const
;
/**
* set to true to receive AVFrames from render
...
...
@@ -300,13 +300,13 @@ public:
* set current using device
* @ param device name
*/
void
setCurrentVideoCaptureDevice
(
std
::
s
tring
&
currentVideoCaptureDevice
);
void
setCurrentVideoCaptureDevice
(
QS
tring
&
currentVideoCaptureDevice
);
/**
* set current using device
* @ return current using device name
*/
std
::
s
tring
getCurrentVideoCaptureDevice
()
const
;
QS
tring
getCurrentVideoCaptureDevice
()
const
;
/**
* clear current using device
...
...
@@ -318,17 +318,17 @@ Q_SIGNALS:
* Emitted when a renderer is started
* @param id of the renderer
*/
void
rendererStarted
(
const
std
::
s
tring
&
id
);
void
rendererStarted
(
const
QS
tring
&
id
);
/**
* Emitted when a renderer is stopped
* @param id of the renderer
*/
void
rendererStopped
(
const
std
::
s
tring
&
id
);
void
rendererStopped
(
const
QS
tring
&
id
);
/**
* Emitted when a new frame is ready
* @param id
*/
void
frameUpdated
(
const
std
::
s
tring
&
id
);
void
frameUpdated
(
const
QS
tring
&
id
);
/**
* Emitted when a device is plugged or unplugged
*/
...
...
@@ -338,12 +338,12 @@ Q_SIGNALS:
* @param id Ringbuffer id
* @param level Volume in range [0, 1]
*/
void
audioMeter
(
const
std
::
s
tring
&
id
,
float
level
);
void
audioMeter
(
const
QS
tring
&
id
,
float
level
);
/**
* local recorder stopped
* @param filePath
*/
void
recordPlaybackStopped
(
const
std
::
s
tring
&
filePath
);
void
recordPlaybackStopped
(
const
QS
tring
&
filePath
);
private:
std
::
unique_ptr
<
AVModelPimpl
>
pimpl_
;
...
...
src/api/behaviorcontroller.h
View file @
9ce238b7
...
...
@@ -18,14 +18,11 @@
***************************************************************************/
#pragma once
// Std
#include <memory>
#include "typedefs.h"
// Qt
#include <qobject.h>
#include <QObject>
// Lrc
#include "typedefs.h"
#include <memory>
namespace
lrc
{
...
...
@@ -61,44 +58,44 @@ Q_SIGNALS:
/**
* Emitted when the client should open the chat view.
*/
void
showChatView
(
const
std
::
s
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
void
showChatView
(
const
QS
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
/**
* Emitted when the client should ask the user whether it wants to leave a message after a failed call.
*/
void
showLeaveMessageView
(
const
std
::
s
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
void
showLeaveMessageView
(
const
QS
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
/**
* Emitted when the client should open the call view.
*/
void
showCallView
(
const
std
::
s
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
void
showCallView
(
const
QS
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
/**
* Emitted when the client should open the incoming call view.
*/
void
showIncomingCallView
(
const
std
::
s
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
void
showIncomingCallView
(
const
QS
tring
&
accountId
,
const
api
::
conversation
::
Info
&
conversationInfo
)
const
;
/**
* Emitted when the client receives a new trust request
*/
void
newTrustRequest
(
const
std
::
string
&
accountId
,
const
std
::
s
tring
&
contactUri
)
const
;
void
newTrustRequest
(
const
QString
&
accountId
,
const
QS
tring
&
contactUri
)
const
;
/**
* Emitted when a trust request has been accepted, refused or blocked
*/
void
trustRequestTreated
(
const
std
::
string
&
accountId
,
const
std
::
s
tring
&
contactUri
)
const
;
void
trustRequestTreated
(
const
QString
&
accountId
,
const
QS
tring
&
contactUri
)
const
;
/**
* Emitted when the client receives an unread message to display (text or file for now)
*/
void
newUnreadInteraction
(
const
std
::
string
&
accountId
,
const
std
::
s
tring
&
conversation
,
void
newUnreadInteraction
(
const
QString
&
accountId
,
const
QS
tring
&
conversation
,
uint64_t
interactionId
,
const
interaction
::
Info
&
interaction
)
const
;
/**
* Emitted when the unread interaction is now read
*/
void
newReadInteraction
(
const
std
::
string
&
accountId
,
const
std
::
s
tring
&
conversation
,
uint64_t
interactionId
)
const
;
void
newReadInteraction
(
const
QString
&
accountId
,
const
QS
tring
&
conversation
,
uint64_t
interactionId
)
const
;
/**
* Emitted debugMessageReceived
*/
void
debugMessageReceived
(
const
std
::
s
tring
&
message
);
void
debugMessageReceived
(
const
QS
tring
&
message
);
/**
* Emitted audioMeter
*/
void
audioMeter
(
const
std
::
s
tring
&
id
,
float
level
);
void
audioMeter
(
const
QS
tring
&
id
,
float
level
);
};
...
...
src/api/call.h
View file @
9ce238b7
/****************************************************************************
* Copyright (C) 2017-2020 Savoir-faire Linux Inc.
*
* Copyright (C) 2017-2020 Savoir-faire Linux Inc. *
* Author: Nicolas Jäger <nicolas.jager@savoirfairelinux.com> *
* Author: Sébastien Blin <sebastien.blin@savoirfairelinux.com> *
* *
...
...
@@ -18,14 +18,14 @@
***************************************************************************/
#pragma once
// Qt
#include <QObject>
// std
#include <string>
#include <ctime>
#include <chrono>
// Qt
#include <QObject>
namespace
lrc
{
...
...
@@ -51,37 +51,37 @@ enum class Status {
CONNECTED
};
static
inline
std
::
s
tring
static
inline
QS
tring
to_string
(
const
call
::
Status
&
status
)
{
switch
(
status
)
{
case
call
::
Status
::
PAUSED
:
return
QObject
::
tr
(
"Hold"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Hold"
);
case
call
::
Status
::
IN_PROGRESS
:
return
QObject
::
tr
(
"Talking"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Talking"
);
case
call
::
Status
::
INVALID
:
return
QObject
::
tr
(
"ERROR"
)
.
toStdString
()
;
return
QObject
::
tr
(
"ERROR"
);
case
call
::
Status
::
INCOMING_RINGING
:
return
QObject
::
tr
(
"Incoming"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Incoming"
);
case
call
::
Status
::
OUTGOING_RINGING
:
return
QObject
::
tr
(
"Calling"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Calling"
);
case
call
::
Status
::
CONNECTING
:
return
QObject
::
tr
(
"Connecting"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Connecting"
);
case
call
::
Status
::
SEARCHING
:
return
QObject
::
tr
(
"Searching"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Searching"
);
case
call
::
Status
::
INACTIVE
:
return
QObject
::
tr
(
"Inactive"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Inactive"
);
case
call
::
Status
::
ENDED
:
return
QObject
::
tr
(
"Finished"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Finished"
);
case
call
::
Status
::
TIMEOUT
:
return
QObject
::
tr
(
"Timeout"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Timeout"
);
case
call
::
Status
::
PEER_BUSY
:
return
QObject
::
tr
(
"Peer busy"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Peer busy"
);
case
call
::
Status
::
TERMINATING
:
return
QObject
::
tr
(
"Finished"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Finished"
);
case
call
::
Status
::
CONNECTED
:
return
QObject
::
tr
(
"Communication established"
)
.
toStdString
()
;
return
QObject
::
tr
(
"Communication established"
);
default:
return
""
;
// to remove a build warning, should not happen
}
...
...
@@ -94,7 +94,7 @@ to_string(const call::Status& status)
* @return
*/
static
inline
Status
to_status
(
const
std
::
s
tring
&
status
)
to_status
(
const
QS
tring
&
status
)
{
if
(
status
==
"INCOMING"
)
return
Status
::
INCOMING_RINGING
;
...
...
@@ -127,11 +127,11 @@ enum class Type {
struct
Info
{
std
::
s
tring
id
;
QS
tring
id
;
std
::
chrono
::
steady_clock
::
time_point
startTime
;
Status
status
=
Status
::
INVALID
;
Type
type
=
Type
::
INVALID
;
std
::
s
tring
peerUri
;
QS
tring
peerUri
;
bool
isOutgoing
;
bool
audioMuted
=
false
;
bool
videoMuted
=
false
;
...
...
src/api/contact.h
View file @
9ce238b7
...
...
@@ -18,12 +18,10 @@
***************************************************************************/
#pragma once
// Std
#include <string>
// Data
#include "profile.h"
#include <QString>
namespace
lrc
{
...
...
@@ -43,7 +41,7 @@ namespace contact
struct
Info
{
profile
::
Info
profileInfo
;
std
::
s
tring
registeredName
;
QS
tring
registeredName
;
bool
isTrusted
=
false
;
bool
isPresent
=
false
;
bool
isBanned
=
false
;
...
...
src/api/contactmodel.h
View file @
9ce238b7
...
...
@@ -18,18 +18,13 @@
***************************************************************************/
#pragma once
// Std
#include <string>
#include <memory>
#include <map>
// Qt
#include <qobject.h>
// LRC
#include "typedefs.h"
#include "api/behaviorcontroller.h"
#include <QObject>
#include <memory>
namespace
lrc
{
...
...
@@ -52,7 +47,7 @@ class ConversationModel;
class
LIB_EXPORT
ContactModel
:
public
QObject
{
Q_OBJECT
public: