diff --git a/sflphone-common/src/account.h b/sflphone-common/src/account.h index 054347782006fd1fb02e1d8a69da57cabb7ae042..252bb57e0d95d280ac3cf82ac40873a3622fb070 100644 --- a/sflphone-common/src/account.h +++ b/sflphone-common/src/account.h @@ -275,7 +275,7 @@ class Account : public Serializable std::string getHostname (void) const { return _hostname; } - void setHostname (std::string hostname) { + void setHostname (const std::string &hostname) { _hostname = hostname; } @@ -338,7 +338,7 @@ class Account : public Serializable std::string getUseragent (void) const { return _useragent; } - void setUseragent (std::string ua) { + void setUseragent (const std::string &ua) { _useragent = ua; } @@ -346,7 +346,7 @@ class Account : public Serializable return _mailBox; } - void setMailBox (std::string mb) { + void setMailBox (const std::string &mb) { _mailBox = mb; } diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index 604489486344aac0906580c0dbad6ef7fce0a4a3..e1614fce3160d8760eaf3df7ce4dd7441566a999 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -40,7 +40,9 @@ Credentials::Credentials() : credentialCount (0) {} Credentials::~Credentials() {} -void Credentials::setNewCredential (std::string username, std::string password, std::string realm) +void Credentials::setNewCredential (const std::string &username, + const std::string &password, + const std::string &realm) { credentialArray[credentialCount].username = username; credentialArray[credentialCount].password = password; diff --git a/sflphone-common/src/sip/sipaccount.h b/sflphone-common/src/sip/sipaccount.h index 2a349c4b61da91943759fc3218086885df94cddb..4e9cf88e697f46613fc9152da9f4769e463a561b 100644 --- a/sflphone-common/src/sip/sipaccount.h +++ b/sflphone-common/src/sip/sipaccount.h @@ -150,7 +150,9 @@ class Credentials : public Serializable credentialCount = count; } - void setNewCredential (std::string username, std::string password, std::string realm); + void setNewCredential (const std::string &username, + const std::string &password, + const std::string &realm); const CredentialItem *getCredential (int index) const; private: @@ -193,7 +195,7 @@ class SIPAccount : public Account /** * Set route header to appears in sip messages for this account */ - void setRouteSet (std::string route) { + void setRouteSet (const std::string &route) { _routeSet = route; } @@ -263,7 +265,7 @@ class SIPAccount : public Account * * @param A string describing the expiration value. */ - void setRegistrationExpire (std::string expr) { + void setRegistrationExpire (const std::string &expr) { _registrationExpire = expr; } @@ -519,7 +521,7 @@ class SIPAccount : public Account return _serviceRoute; } - void setServiceRoute (std::string route) { + void setServiceRoute (const std::string &route) { _serviceRoute = route; } @@ -558,7 +560,7 @@ class SIPAccount : public Account std::string getSrtpKeyExchange (void) const { return _srtpKeyExchange; } - void setSrtpKeyExchange (std::string key) { + void setSrtpKeyExchange (const std::string &key) { _srtpKeyExchange = key; } @@ -601,63 +603,63 @@ class SIPAccount : public Account std::string getRealm (void) const { return _realm; } - void setRealm (std::string r) { + void setRealm (const std::string &r) { _realm = r; } std::string getTlsEnable (void) const { return _tlsEnable; } - void setTlsEnable (std::string enabl) { + void setTlsEnable (const std::string &enabl) { _tlsEnable = enabl; } std::string getTlsCaListFile (void) const { return _tlsCaListFile; } - void setTlsCaListFile (std::string calist) { + void setTlsCaListFile (const std::string &calist) { _tlsCaListFile = calist; } std::string getTlsCertificateFile (void) const { return _tlsCertificateFile; } - void setTlsCertificateFile (std::string cert) { + void setTlsCertificateFile (const std::string &cert) { _tlsCertificateFile = cert; } std::string getTlsPrivateKeyFile (void) const { return _tlsPrivateKeyFile; } - void setTlsPrivateKeyFile (std::string priv) { + void setTlsPrivateKeyFile (const std::string &priv) { _tlsPrivateKeyFile = priv; } std::string getTlsPassword (void) const { return _tlsPassword; } - void setTlsPassword (std::string pass) { + void setTlsPassword (const std::string &pass) { _tlsPassword = pass; } std::string getTlsMethod (void) const { return _tlsMethod; } - void setTlsMethod (std::string meth) { + void setTlsMethod (const std::string &meth) { _tlsMethod = meth; } std::string getTlsCiphers (void) const { return _tlsCiphers; } - void setTlsCiphers (std::string cipher) { + void setTlsCiphers (const std::string &cipher) { _tlsCiphers = cipher; } std::string getTlsServerName (void) const { return _tlsServerName; } - void setTlsServerName (std::string name) { + void setTlsServerName (const std::string &name) { _tlsServerName = name; } @@ -685,7 +687,7 @@ class SIPAccount : public Account std::string getTlsNegotiationTimeoutSec (void) const { return _tlsNegotiationTimeoutSec; } - void setTlsNegotiationTimeoutSec (std::string timeout) { + void setTlsNegotiationTimeoutSec (const std::string &timeout) { _tlsNegotiationTimeoutSec = timeout; }