Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-libclient
Commits
1e3918e0
Unverified
Commit
1e3918e0
authored
Apr 30, 2019
by
Sébastien Blin
Browse files
lrc: add helper to get active calls
Change-Id: I50b8a0c748ab48038b5f5ac6709de8a02225f53a
parent
ccc1df52
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/api/lrc.h
View file @
1e3918e0
...
...
@@ -20,6 +20,8 @@
// Std
#include
<memory>
#include
<vector>
#include
<string>
// Lrc
#include
"typedefs.h"
...
...
@@ -76,7 +78,12 @@ public:
*/
static
bool
dbusIsValid
();
private:
/**
* Helper: get call list from daemon
*/
static
std
::
vector
<
std
::
string
>
activeCalls
();
private:
std
::
unique_ptr
<
LrcPimpl
>
lrcPimpl_
;
};
...
...
src/lrc.cpp
View file @
1e3918e0
...
...
@@ -25,15 +25,15 @@
#endif // !_MSC_VER
// Models and database
#include
"api/newaccountmodel.h"
#include
"api/avmodel.h"
#include
"api/datatransfermodel.h"
#include
"api/behaviorcontroller.h"
#include
"database.h"
#include
"api/datatransfermodel.h"
#include
"api/newaccountmodel.h"
#include
"callbackshandler.h"
#include
"database.h"
#include
"dbus/callmanager.h"
#include
"dbus/configurationmanager.h"
#include
"dbus/instancemanager.h"
#include
"dbus/configurationmanager.h"
namespace
lrc
{
...
...
@@ -123,6 +123,18 @@ Lrc::dbusIsValid()
#endif
}
std
::
vector
<
std
::
string
>
Lrc
::
activeCalls
()
{
QStringList
callLists
=
CallManager
::
instance
().
getCallList
();
std
::
vector
<
std
::
string
>
result
;
result
.
reserve
(
callLists
.
size
());
for
(
const
auto
&
call
:
callLists
)
{
result
.
emplace_back
(
call
.
toStdString
());
}
return
result
;
}
LrcPimpl
::
LrcPimpl
(
Lrc
&
linked
)
:
linked
(
linked
)
,
behaviorController
(
std
::
make_unique
<
BehaviorController
>
())
...
...
@@ -134,4 +146,4 @@ LrcPimpl::LrcPimpl(Lrc& linked)
{
}
}
// namespace lrc
}
// namespace lrc
\ No newline at end of file
Write
Preview
Supports
Markdown
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