Commit 69061f3d authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #7393: methods that return pointers to internal members should not be const

parent e7724a88
......@@ -2761,7 +2761,7 @@ bool ManagerImpl::accountExists(const std::string& accountID)
}
Account*
ManagerImpl::getAccount(const std::string& accountID) const
ManagerImpl::getAccount(const std::string& accountID)
{
AccountMap::const_iterator iter = accountMap_.find(accountID);
if (iter != accountMap_.end())
......
......@@ -1160,7 +1160,7 @@ class ManagerImpl {
* @param accountID account ID to get
* @return Account* The account pointer or 0
*/
Account* getAccount(const std::string& accountID) const;
Account* getAccount(const std::string& accountID);
/** Return the std::string from a CallID
* Protected by mutex
......@@ -1174,7 +1174,7 @@ class ManagerImpl {
* @param accountID Account ID to get
* @return VoIPLink* The voip link from the account pointer or 0
*/
VoIPLink* getAccountLink(const std::string& accountID="") const;
VoIPLink* getAccountLink(const std::string& accountID="");
std::string getAccountIdFromNameAndServer(const std::string& userName, const std::string& server) const;
......
......@@ -63,7 +63,7 @@ ManagerImpl::registerAccounts()
}
VoIPLink* ManagerImpl::getAccountLink(const std::string& accountID) const
VoIPLink* ManagerImpl::getAccountLink(const std::string& accountID)
{
if (not accountID.empty())
return getAccount(accountID)->getVoIPLink();
......
......@@ -113,7 +113,7 @@ void Sdp::setActiveRemoteSdpSession(const pjmedia_sdp_session *sdp)
ERROR("Sdp: Error: Could not found dtmf event from remote sdp");
}
std::string Sdp::getCodecName() const
std::string Sdp::getCodecName()
{
try {
sfl::AudioCodec *codec = getSessionMedia();
......@@ -123,12 +123,12 @@ std::string Sdp::getCodecName() const
}
}
sfl::AudioCodec* Sdp::getSessionMedia() const
sfl::AudioCodec* Sdp::getSessionMedia()
{
if (sessionAudioMedia_.size() < 1)
throw SdpException("No codec description for this media");
return static_cast<sfl::AudioCodec *>(sessionAudioMedia_[0]);
return dynamic_cast<sfl::AudioCodec *>(sessionAudioMedia_[0]);
}
......
......@@ -138,7 +138,7 @@ class Sdp {
* Return the codec of the first media after negotiation
* @throw SdpException
*/
sfl::AudioCodec* getSessionMedia() const;
sfl::AudioCodec* getSessionMedia();
/*
* On building an invite outside a dialog, build the local offer and create the
......@@ -271,7 +271,7 @@ class Sdp {
void setMediaTransportInfoFromRemoteSdp();
std::string getCodecName() const;
std::string getCodecName();
void receivingAnswerAfterInitialOffer(const pjmedia_sdp_session* remote);
......
......@@ -204,7 +204,7 @@ class SIPAccount : public Account {
* @param void
* @return pjsip_regc* A pointer to the registration structure
*/
pjsip_regc* getRegistrationInfo() const {
pjsip_regc* getRegistrationInfo() {
return regc_;
}
......@@ -223,7 +223,7 @@ class SIPAccount : public Account {
* file, that can be used directly by PJSIP to initialize
* TLS transport.
*/
const pjsip_tls_setting * getTlsSetting() const {
pjsip_tls_setting * getTlsSetting() {
return &tlsSetting_;
}
......
......@@ -282,7 +282,7 @@ SIPVoIPLink::getEvent()
void SIPVoIPLink::sendRegister(Account *a)
{
SIPAccount *account = static_cast<SIPAccount*>(a);
SIPAccount *account = dynamic_cast<SIPAccount*>(a);
createSipTransport(account);
account->setRegister(true);
......
......@@ -41,7 +41,6 @@
#include <string.h>
#include <pango/pango.h>
#include "eds.h"
//#include <addressbook-config.h>
#include <libedataserver/e-source.h>
#include "config.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment