Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
248ad66a
Commit
248ad66a
authored
Jun 03, 2013
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* #23661: daemon: restore getCallList
parent
af812f0a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
15 deletions
+44
-15
daemon/src/Makefile.am
daemon/src/Makefile.am
+2
-1
daemon/src/iax/iaxvoiplink.cpp
daemon/src/iax/iaxvoiplink.cpp
+11
-0
daemon/src/iax/iaxvoiplink.h
daemon/src/iax/iaxvoiplink.h
+5
-0
daemon/src/managerimpl.cpp
daemon/src/managerimpl.cpp
+9
-14
daemon/src/map_utils.h
daemon/src/map_utils.h
+1
-0
daemon/src/sip/sipvoiplink.cpp
daemon/src/sip/sipvoiplink.cpp
+12
-0
daemon/src/sip/sipvoiplink.h
daemon/src/sip/sipvoiplink.h
+4
-0
No files found.
daemon/src/Makefile.am
View file @
248ad66a
...
...
@@ -102,4 +102,5 @@ libsflphone_la_SOURCES = conference.cpp \
sfl_types.h
\
array_size.h
\
account_schema.h
\
registration_states.h
registration_states.h
\
map_utils.h
daemon/src/iax/iaxvoiplink.cpp
View file @
248ad66a
...
...
@@ -44,6 +44,7 @@
#include "audio/samplerateconverter.h"
#include "array_size.h"
#include "scoped_lock.h"
#include "map_utils.h"
AccountMap
IAXVoIPLink
::
iaxAccountMap_
;
IAXCallMap
IAXVoIPLink
::
iaxCallMap_
;
...
...
@@ -168,6 +169,16 @@ IAXVoIPLink::getEvent()
return
handlingEvents_
;
}
std
::
vector
<
std
::
string
>
IAXVoIPLink
::
getCallIDs
()
{
std
::
vector
<
std
::
string
>
v
;
sfl
::
ScopedLock
m
(
iaxCallMapMutex_
);
map_utils
::
vectorFromMapKeys
(
iaxCallMap_
,
v
);
return
v
;
}
void
IAXVoIPLink
::
sendAudioFromMic
()
{
...
...
daemon/src/iax/iaxvoiplink.h
View file @
248ad66a
...
...
@@ -72,6 +72,11 @@ class IAXVoIPLink : public VoIPLink {
*/
virtual
bool
getEvent
();
/* Returns a list of all callIDs */
static
std
::
vector
<
std
::
string
>
getCallIDs
();
/**
* Return the internal account map for all VOIP links
*/
...
...
daemon/src/managerimpl.cpp
View file @
248ad66a
...
...
@@ -43,6 +43,7 @@
#include "dbus/callmanager.h"
#include "global.h"
#include "fileutils.h"
#include "map_utils.h"
#include "sip/sipvoiplink.h"
#include "sip/sipaccount.h"
#include "sip/sipcall.h"
...
...
@@ -2796,20 +2797,14 @@ std::vector<std::map<std::string, std::string> > ManagerImpl::getHistory()
return
history_
.
getSerialized
();
}
namespace
{
template
<
typename
M
,
typename
V
>
void
vectorFromMapKeys
(
const
M
&
m
,
V
&
v
)
{
for
(
typename
M
::
const_iterator
it
=
m
.
begin
();
it
!=
m
.
end
();
++
it
)
v
.
push_back
(
it
->
first
);
}
}
// FIXME: get call ids from voiplinks
std
::
vector
<
std
::
string
>
ManagerImpl
::
getCallList
()
const
std
::
vector
<
std
::
string
>
ManagerImpl
::
getCallList
()
const
{
std
::
vector
<
std
::
string
>
v
;
// vectorFromMapKeys(callAccountMap_, v);
std
::
vector
<
std
::
string
>
v
(
SIPVoIPLink
::
instance
()
->
getCallIDs
());
#if HAVE_IAX
const
std
::
vector
<
std
::
string
>
iaxCalls
(
IAXVoIPLink
::
getCallIDs
());
v
.
insert
(
v
.
end
(),
iaxCalls
.
begin
(),
iaxCalls
.
end
());
#endif
return
v
;
}
...
...
@@ -2830,7 +2825,7 @@ std::map<std::string, std::string> ManagerImpl::getConferenceDetails(
std
::
vector
<
std
::
string
>
ManagerImpl
::
getConferenceList
()
const
{
std
::
vector
<
std
::
string
>
v
;
vectorFromMapKeys
(
conferenceMap_
,
v
);
map_utils
::
vectorFromMapKeys
(
conferenceMap_
,
v
);
return
v
;
}
...
...
daemon/src/map_utils.h
View file @
248ad66a
...
...
@@ -32,6 +32,7 @@
#define MAP_UTILS_H_
#include <vector>
#include <map>
namespace
map_utils
{
template
<
typename
M
,
typename
V
>
...
...
daemon/src/sip/sipvoiplink.cpp
View file @
248ad66a
...
...
@@ -40,6 +40,7 @@
#include "sipvoiplink.h"
#include "array_size.h"
#include "manager.h"
#include "map_utils.h"
#include "logger.h"
#include "scoped_lock.h"
...
...
@@ -1150,6 +1151,17 @@ SIPVoIPLink::clearSipCallMap()
sipCallMap_
.
clear
();
}
std
::
vector
<
std
::
string
>
SIPVoIPLink
::
getCallIDs
()
{
std
::
vector
<
std
::
string
>
v
;
sfl
::
ScopedLock
m
(
sipCallMapMutex_
);
map_utils
::
vectorFromMapKeys
(
sipCallMap_
,
v
);
return
v
;
}
void
SIPVoIPLink
::
addSipCall
(
SIPCall
*
call
)
{
if
(
!
call
)
...
...
daemon/src/sip/sipvoiplink.h
View file @
248ad66a
...
...
@@ -96,6 +96,10 @@ class SIPVoIPLink : public VoIPLink {
*/
virtual
bool
getEvent
();
/* Returns a list of all callIDs */
std
::
vector
<
std
::
string
>
getCallIDs
();
/**
* Return the internal account map for this VOIP link
*/
...
...
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