mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
api: filter-out subcall from getCallList() API
Internal subcalls don't have to be exposed to clients. This patch prevents to be listed by getCallList() API. Change-Id: If8f72670767f0a19ccc45255c9a44eabd534a7bf Tuleap: #1526
This commit is contained in:
@ -258,6 +258,13 @@ class Call : public Recordable, public std::enable_shared_from_this<Call> {
|
||||
*/
|
||||
void addSubCall(Call& call);
|
||||
|
||||
///
|
||||
/// Return true if this call instance is a subcall (internal call for multi-device handling)
|
||||
///
|
||||
bool isSubcall() const {
|
||||
return parent_.load() != nullptr;
|
||||
}
|
||||
|
||||
public: // media management
|
||||
virtual bool toggleRecording();
|
||||
|
||||
|
@ -2816,7 +2816,12 @@ Manager::getCallDetails(const std::string &callID)
|
||||
std::vector<std::string>
|
||||
Manager::getCallList() const
|
||||
{
|
||||
return callFactory.getCallIDs();
|
||||
std::vector<std::string> results;
|
||||
for (auto call: callFactory.getAllCalls()) {
|
||||
if (!call->isSubcall())
|
||||
results.push_back(call->getCallId());
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string>
|
||||
|
@ -417,8 +417,8 @@ class Manager {
|
||||
std::map<std::string, std::string> getCallDetails(const std::string& callID);
|
||||
|
||||
/**
|
||||
* Get call list
|
||||
* @return std::vector<std::string> A list of call IDs
|
||||
* Get list of calls (internal subcalls are filter-out)
|
||||
* @return std::vector<std::string> A list of call IDs (without subcalls)
|
||||
*/
|
||||
std::vector<std::string> getCallList() const;
|
||||
|
||||
|
Reference in New Issue
Block a user