Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
1e3918e0
Unverified
Commit
1e3918e0
authored
5 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
lrc: add helper to get active calls
Change-Id: I50b8a0c748ab48038b5f5ac6709de8a02225f53a
parent
ccc1df52
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/api/lrc.h
+8
-1
8 additions, 1 deletion
src/api/lrc.h
src/lrc.cpp
+17
-5
17 additions, 5 deletions
src/lrc.cpp
with
25 additions
and
6 deletions
src/api/lrc.h
+
8
−
1
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_
;
};
...
...
This diff is collapsed.
Click to expand it.
src/lrc.cpp
+
17
−
5
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment