misc: minor cleanup

Change-Id: Ibebe3511681d869d3e2688ce9154df029e4d088c
This commit is contained in:
Sébastien Blin
2022-06-14 15:03:40 -04:00
parent a89f921c09
commit 9a98d6a679
3 changed files with 9 additions and 14 deletions

View File

@ -1008,8 +1008,7 @@ Manager::unregisterAccounts()
std::string
Manager::outgoingCall(const std::string& account_id,
const std::string& to,
const std::vector<DRing::MediaMap>& mediaList,
std::shared_ptr<Conference> conference)
const std::vector<DRing::MediaMap>& mediaList)
{
JAMI_DBG() << "try outgoing call to '" << to << "'"
<< " with account '" << account_id << "'";
@ -1485,7 +1484,7 @@ Manager::createConfFromParticipantList(const std::string& accountId,
pimpl_->unsetCurrentCall();
// Create call
auto callId = outgoingCall(account, tostr, {}, conf);
auto callId = outgoingCall(account, tostr, {});
if (callId.empty())
continue;
@ -1564,10 +1563,15 @@ Manager::joinConference(const std::string& accountId,
const std::string& confId2)
{
auto account = getAccount(accountId);
auto account2 = getAccount(account2Id);
if (not account) {
JAMI_ERR("Can't find account: %s", accountId.c_str());
return false;
}
if (not account2) {
JAMI_ERR("Can't find account: %s", account2Id.c_str());
return false;
}
auto conf = account->getConference(confId1);
if (not conf) {
@ -1575,7 +1579,7 @@ Manager::joinConference(const std::string& accountId,
return false;
}
auto conf2 = account->getConference(confId2);
auto conf2 = account2->getConference(confId2);
if (not conf2) {
JAMI_ERR("Not a valid conference ID: %s", confId2.c_str());
return false;

View File

@ -149,13 +149,11 @@ public:
* @param callee the callee's ID/URI. Depends on the account type.
* Refer to placeCall/placeCallWithMedia documentations.
* @param mediaList a list of medias to include
* @param confId the conference ID if any
* @return the call ID on success, empty string otherwise
*/
std::string outgoingCall(const std::string& accountId,
const std::string& callee,
const std::vector<DRing::MediaMap>& mediaList = {},
std::shared_ptr<Conference> conference = {});
const std::vector<DRing::MediaMap>& mediaList = {});
/**
* Functions which occur with a user's action

View File

@ -64,13 +64,6 @@ public:
receive_ = receive;
}
bool isReceiving() const noexcept
{
return receive_.enabled
&& (receive_.direction_ == MediaDirection::RECVONLY
|| receive_.direction_ == MediaDirection::SENDRECV);
}
void setMtu(uint16_t mtu) { mtu_ = mtu; }
void setSuccessfulSetupCb(const std::function<void(MediaType, bool)>& cb)