Skip to content
Snippets Groups Projects
Commit e42876e8 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6003: finished cleanup of account classes

parent e7cfcb99
Branches
Tags
No related merge requests found
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment