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

* #6655: more constness, cleaned up/simplified methods

parent 13a24dfc
No related branches found
No related tags found
No related merge requests found
......@@ -71,14 +71,13 @@ void ConfigTree::addDefaultValue (const std::pair<std::string, std::string>& tok
}
}
std::string ConfigTree::getDefaultValue (const std::string& key)
std::string ConfigTree::getDefaultValue (const std::string& key) const
{
std::map<std::string, std::string>::iterator it;
std::map<std::string, std::string>::const_iterator it;
it = _defaultValueMap.find (key);
if (it == _defaultValueMap.end()) {
return std::string ("");
}
if (it == _defaultValueMap.end())
return "";
return it->second;
}
......@@ -152,20 +151,19 @@ ConfigTree::addConfigTreeItem (const std::string& section, const ConfigTreeItem
}
std::string
ConfigTree::getConfigTreeItemValue (const std::string& section, const std::string& itemName)
ConfigTree::getConfigTreeItemValue (const std::string& section, const std::string& itemName) const
{
ConfigTreeItem* item = getConfigTreeItem (section, itemName);
const ConfigTreeItem* item = getConfigTreeItem (section, itemName);
if (item != NULL) {
if (item)
return item->getValue();
}
return getDefaultValue (itemName);
}
// throw a ConfigTreeItemException if not found
int
ConfigTree::getConfigTreeItemIntValue (const std::string& section, const std::string& itemName)
ConfigTree::getConfigTreeItemIntValue (const std::string& section, const std::string& itemName) const
{
std::string configItem = getConfigTreeItemValue (section, itemName);
int retval = atoi (configItem.data());
......@@ -174,7 +172,7 @@ ConfigTree::getConfigTreeItemIntValue (const std::string& section, const std::st
}
bool
ConfigTree::getConfigTreeItemBoolValue (const std::string& section, const std::string& itemName)
ConfigTree::getConfigTreeItemBoolValue (const std::string& section, const std::string& itemName) const
{
std::string configItem = getConfigTreeItemValue (section, itemName);
......@@ -186,9 +184,9 @@ ConfigTree::getConfigTreeItemBoolValue (const std::string& section, const std::s
}
bool
ConfigTree::getConfigTreeItemToken (const std::string& section, const std::string& itemName, TokenList& arg)
ConfigTree::getConfigTreeItemToken (const std::string& section, const std::string& itemName, TokenList& arg) const
{
ConfigTreeItem *item = getConfigTreeItem (section, itemName);
const ConfigTreeItem *item = getConfigTreeItem (section, itemName);
if (item) {
arg.clear();
......@@ -206,22 +204,18 @@ ConfigTree::getConfigTreeItemToken (const std::string& section, const std::strin
/**
* Return a ConfigTreeItem or NULL if not found
*/
ConfigTreeItem*
ConfigTree::getConfigTreeItem (const std::string& section, const std::string& itemName)
const ConfigTreeItem*
ConfigTree::getConfigTreeItem (const std::string& section, const std::string& itemName) const
{
SectionMap::iterator iter = _sections.find (section);
SectionMap::const_iterator iter = _sections.find (section);
if (iter == _sections.end()) {
// _error("ConfigTree: Error: Did not found section %s in config tree", section.c_str());
if (iter == _sections.end())
return NULL;
}
ItemMap::iterator iterItem = iter->second->find (itemName);
ItemMap::const_iterator iterItem = iter->second->find (itemName);
if (iterItem == iter->second->end()) {
// _error("ConfigTree: Error: Did not found item %s in config tree", itemName.c_str());
if (iterItem == iter->second->end())
return NULL;
}
return & (iterItem->second);
}
......
......@@ -159,9 +159,9 @@ class ConfigTree
* @return The value of the corresponding item. The default value if the section exists
* but the item doesn't.
*/
std::string getConfigTreeItemValue (const std::string& section, const std::string& itemName);
int getConfigTreeItemIntValue (const std::string& section, const std::string& itemName);
bool getConfigTreeItemBoolValue (const std::string& section, const std::string& itemName);
std::string getConfigTreeItemValue (const std::string& section, const std::string& itemName) const;
int getConfigTreeItemIntValue (const std::string& section, const std::string& itemName) const;
bool getConfigTreeItemBoolValue (const std::string& section, const std::string& itemName) const;
/**
* Flush data to .ini file
......@@ -173,11 +173,11 @@ class ConfigTree
*/
int populateFromFile (const std::string& fileName);
bool getConfigTreeItemToken (const std::string& section, const std::string& itemName, TokenList& arg);
bool getConfigTreeItemToken (const std::string& section, const std::string& itemName, TokenList& arg) const;
private:
std::string getDefaultValue (const std::string& key);
ConfigTreeItem* getConfigTreeItem (const std::string& section, const std::string& itemName);
std::string getDefaultValue (const std::string& key) const;
const ConfigTreeItem* getConfigTreeItem (const std::string& section, const std::string& itemName) const;
/**
* List of sections. Each sections has an ItemList as child
......
This diff is collapsed.
......@@ -484,7 +484,7 @@ class ManagerImpl
* Get account list
* @return std::vector<std::string> A list of accoundIDs
*/
std::vector< std::string > getAccountList();
std::vector< std::string > getAccountList() const;
/**
* Set the account order in the config file
......@@ -495,14 +495,14 @@ class ManagerImpl
* Load the accounts order set by the user from the sflphonedrc config file
* @return std::vector<std::string> A vector containing the account ID's
*/
std::vector<std::string> loadAccountOrder ();
std::vector<std::string> loadAccountOrder () const;
/**
* Retrieve details about a given account
* @param accountID The account identifier
* @return std::map< std::string, std::string > The account details
*/
std::map< std::string, std::string > getAccountDetails (const std::string& accountID);
std::map< std::string, std::string > getAccountDetails (const std::string& accountID) const;
/**
* Retrieve details about a given call
......@@ -515,27 +515,27 @@ class ManagerImpl
* Get call list
* @return std::vector<std::string> A list of call IDs
*/
std::vector< std::string > getCallList (void);
std::vector< std::string > getCallList (void) const;
/**
* Retrieve details about a given call
* @param callID The account identifier
* @return std::map< std::string, std::string > The call details
*/
std::map< std::string, std::string > getConferenceDetails (const std::string& callID);
std::map< std::string, std::string > getConferenceDetails (const std::string& callID) const;
/**
* Get call list
* @return std::vector<std::string> A list of call IDs
*/
std::vector< std::string > getConferenceList (void);
std::vector< std::string > getConferenceList (void) const;
/**
* Get a list of participant to a conference
* @return std::vector<std::string> A list of call IDs
*/
std::vector< std::string > getParticipantList (const std::string& confID);
std::vector< std::string > getParticipantList (const std::string& confID) const;
/**
* Save the details of an existing account, given the account ID
......@@ -604,42 +604,42 @@ class ManagerImpl
* @param name The string description of an audio device
* @return int His index
*/
int getAudioDeviceIndex (const std::string name);
int getAudioDeviceIndex (const std::string &name);
/**
* Get current alsa plugin
* @return std::string The Alsa plugin
*/
std::string getCurrentAudioOutputPlugin (void);
std::string getCurrentAudioOutputPlugin (void) const;
/**
* Get the noise reduction engin state from
* the current audio layer.
*/
std::string getNoiseSuppressState (void);
std::string getNoiseSuppressState (void) const;
/**
* Set the noise reduction engin state in the current
* audio layer.
*/
void setNoiseSuppressState (std::string state);
void setNoiseSuppressState (const std::string &state);
/**
* Get the echo canceller engin state from
* the current audio layer
*/
std::string getEchoCancelState(void);
std::string getEchoCancelState(void) const;
/**
* Set the echo canceller engin state
*/
void setEchoCancelState(std::string state);
void setEchoCancelState(const std::string &state);
int getEchoCancelTailLength(void);
int getEchoCancelTailLength(void) const;
void setEchoCancelTailLength(int);
int getEchoCancelDelay(void);
int getEchoCancelDelay(void) const;
void setEchoCancelDelay(int);
......@@ -648,7 +648,7 @@ class ManagerImpl
* Required format: payloads separated with one slash.
* @return std::string The serializabled string
*/
static std::string serialize (std::vector<std::string> v);
static std::string serialize (const std::vector<std::string> &v);
static std::vector<std::string> unserialize (std::string v);
......@@ -677,7 +677,7 @@ class ManagerImpl
* Get the ringtone
* @return gchar* The file name selected as a ringtone
*/
std::string getRingtoneChoice (const std::string& id);
std::string getRingtoneChoice (const std::string& id) const;
/**
* Set a ringtone
......@@ -689,7 +689,7 @@ class ManagerImpl
* Get the recording path from configuration tree
* @return the string correspoding to the path
*/
std::string getRecordPath (void);
std::string getRecordPath (void) const;
/**
* Set the recoding path in the configuration tree
......@@ -700,7 +700,7 @@ class ManagerImpl
/**
* Get is always recording functionality
*/
bool getIsAlwaysRecording(void);
bool getIsAlwaysRecording(void) const;
/**
* Set is always recording functionality, every calls will then be set in RECORDING mode
......@@ -742,12 +742,7 @@ class ManagerImpl
* Get the maximum number of days to keep in the history
* @return double The number of days
*/
int getHistoryLimit (void);
// void setHistoryEnabled (void);
// std::string getHistoryEnabled (void);
int getHistoryLimit (void) const;
/**
* Configure the start-up option
......@@ -762,41 +757,6 @@ class ManagerImpl
*/
void startHidden (void);
/**
* Configure the popup behaviour
* @return int 1 if it should popup on incoming calls
* 0 if it should never popups
*/
// int popupMode( void );
/**
* Configure the popup behaviour
* When SFLphone is in the system tray, you can configure when it popups
* Never or only on incoming calls
*/
// void switchPopupMode( void );
/**
* Determine whether or not the search bar (history) should be displayed
*/
// int getSearchbar( void );
/**
* Configure the search bar behaviour
*/
// void setSearchbar( void );
/**
* Set the desktop notification level
*/
// void setNotify( void );
/**
* Get the desktop notification level
* @return int The notification level
*/
// int32_t getNotify( void );
/**
* Set the desktop mail notification level
*/
......@@ -806,7 +766,7 @@ class ManagerImpl
/**
* Addressbook configuration
*/
std::map<std::string, int32_t> getAddressbookSettings (void);
std::map<std::string, int32_t> getAddressbookSettings (void) const;
/**
* Addressbook configuration
......@@ -821,12 +781,12 @@ class ManagerImpl
/**
* Addressbook list
*/
std::vector <std::string> getAddressbookList (void);
std::vector <std::string> getAddressbookList (void) const;
/**
* Hook configuration
*/
std::map<std::string, std::string> getHookSettings (void);
std::map<std::string, std::string> getHookSettings (void) const;
/**
* Hook configuration
......@@ -840,7 +800,7 @@ class ManagerImpl
* 0 ALSA
* 1 PULSEAUDIO
*/
int32_t getAudioManager (void);
int32_t getAudioManager (void) const;
/**
* Set the audio manager
......@@ -859,13 +819,13 @@ class ManagerImpl
* Get the desktop mail notification level
* @return int The mail notification level
*/
int32_t getMailNotify (void);
int32_t getMailNotify (void) const;
/**
* Get the list of the active codecs
* @return std::vector< ::std::string > The list of active codecs
*/
std::vector< ::std::string > getActiveCodecList (void);
std::vector< ::std::string > getActiveCodecList (void) const;
/*
* Notify the client that an error occured
......@@ -882,7 +842,7 @@ class ManagerImpl
* @return bool true on success
* false otherwise
*/
bool getConfig (const std::string& section, const std::string& name, TokenList& arg);
bool getConfig (const std::string& section, const std::string& name, TokenList& arg) const;
/**
* Change a specific value in the configuration tree.
......@@ -926,7 +886,7 @@ class ManagerImpl
* @return int The int value
*/
int getConfigInt (const std::string& section, const std::string& name);
int getConfigInt (const std::string& section, const std::string& name) const;
/**
* Get a bool from the configuration tree
......@@ -936,7 +896,7 @@ class ManagerImpl
* @return bool The bool value
*/
bool getConfigBool (const std::string& section, const std::string& name);
bool getConfigBool (const std::string& section, const std::string& name) const;
/**
* Get a string from the configuration tree
......@@ -945,7 +905,7 @@ class ManagerImpl
* @param name The parameter name
* @return sdt::string The string value
*/
std::string getConfigString (const std::string& section, const std::string& name);
std::string getConfigString (const std::string& section, const std::string& name) const;
/**
* Retrieve the soundcards index in the user config file and try to open audio devices
......@@ -1009,7 +969,7 @@ class ManagerImpl
* Write by main thread only
* @return unsigned short The volume value
*/
unsigned short getSpkrVolume (void) {
unsigned short getSpkrVolume (void) const {
return _spkr_volume;
}
......@@ -1027,7 +987,7 @@ class ManagerImpl
* Write by main thread only
* @return unsigned short The volume value
*/
unsigned short getMicVolume (void) {
unsigned short getMicVolume (void) const {
return _mic_volume;
}
......@@ -1065,7 +1025,7 @@ class ManagerImpl
* Get the current call id
* @return std::string The call id or ""
*/
const std::string& getCurrentCallId();
const std::string& getCurrentCallId() const;
/**
* Check if a call is the current one
......@@ -1112,7 +1072,7 @@ class ManagerImpl
/**
* Create config directory in home user and return configuration file path
*/
std::string getConfigFile (void);
std::string getConfigFile (void) const;
/*
* Initialize audiocodec with config setting
......@@ -1243,7 +1203,7 @@ class ManagerImpl
bool associateConfigToCall (const std::string& callID, Call::CallConfiguration config);
Call::CallConfiguration getConfigFromCall (const std::string& callID);
Call::CallConfiguration getConfigFromCall (const std::string& callID) const;
bool removeCallConfig (const std::string& callID);
......@@ -1276,14 +1236,6 @@ class ManagerImpl
*/
MainBuffer _mainBuffer;
/**
* Instant messaging module, resposible to initiate, format, parse,
* send, and receive instant messages.
*/
sfl::InstantMessaging *_imModule;
public:
/** Associate a new std::string to a std::string
......@@ -1319,7 +1271,7 @@ class ManagerImpl
/**
* Return a pointer to the instance of InstantMessaging
*/
sfl::InstantMessaging *getInstantMessageModule (void) {
sfl::InstantMessaging *getInstantMessageModule (void) const {
return _imModule;
}
......@@ -1350,7 +1302,7 @@ class ManagerImpl
* Get a list of serialized history entries
* @return A list of serialized entry
*/
std::vector<std::string> getHistorySerialized (void);
std::vector<std::string> getHistorySerialized (void) const;
/**
* Set a list of serialized history entries
......@@ -1362,7 +1314,7 @@ class ManagerImpl
* @param accountID account ID to get
* @return Account* The account pointer or 0
*/
Account* getAccount (const std::string& accountID);
Account* getAccount (const std::string& accountID) const;
/** Return the std::string from a CallID
* Protected by mutex
......@@ -1376,13 +1328,13 @@ 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="");
VoIPLink* getAccountLink (const std::string& accountID="") const;
std::string getAccountIdFromNameAndServer (const std::string& userName, const std::string& server);
std::string getAccountIdFromNameAndServer (const std::string& userName, const std::string& server) const;
int getLocalIp2IpPort();
int getLocalIp2IpPort() const;
std::string getStunServer (void);
std::string getStunServer (void) const;
void setStunServer (const std::string &server);
int isStunEnabled (void);
......@@ -1416,6 +1368,12 @@ class ManagerImpl
*/
HistoryManager * _history;
/**
* Instant messaging module, resposible to initiate, format, parse,
* send, and receive instant messages.
*/
sfl::InstantMessaging *_imModule;
/**
* Check if the call is a classic call or a direct IP-to-IP call
*/
......
......@@ -157,14 +157,13 @@ void ManagerImpl::restartPJSIP (void)
this->registerCurSIPAccounts ();
}
VoIPLink* ManagerImpl::getAccountLink (const std::string& accountID)
VoIPLink* ManagerImpl::getAccountLink (const std::string& accountID) const
{
if (accountID!="") {
if (not accountID.empty()) {
Account* acc = getAccount (accountID);
if (acc) {
if (acc)
return acc->getVoIPLink();
}
return 0;
} else
......@@ -173,10 +172,6 @@ VoIPLink* ManagerImpl::getAccountLink (const std::string& accountID)
pjsip_regc *getSipRegcFromID (const std::string& id UNUSED)
{
/*SIPAccount *tmp = dynamic_cast<SIPAccount *>getAccount(id);
if(tmp != NULL)
return tmp->getSipRegc();
else*/
return NULL;
}
......
......@@ -450,16 +450,15 @@ ShortcutPreferences::ShortcutPreferences() : _hangup ("")
ShortcutPreferences::~ShortcutPreferences() {}
std::map<std::string, std::string> ShortcutPreferences::getShortcuts()
std::map<std::string, std::string> ShortcutPreferences::getShortcuts() const
{
std::map<std::string, std::string> shortcutsMap;
shortcutsMap.insert (std::pair<std::string, std::string> (hangupShortKey, _hangup));
shortcutsMap.insert (std::pair<std::string, std::string> (pickupShortKey, _pickup));
shortcutsMap.insert (std::pair<std::string, std::string> (popupShortKey, _popup));
shortcutsMap.insert (std::pair<std::string, std::string> (toggleHoldShortKey, _toggleHold));
shortcutsMap.insert (std::pair<std::string, std::string> (togglePickupHangupShortKey, _togglePickupHangup));
shortcutsMap[hangupShortKey] = _hangup;
shortcutsMap[pickupShortKey] = _pickup;
shortcutsMap[popupShortKey] = _popup;
shortcutsMap[toggleHoldShortKey] = _toggleHold;
shortcutsMap[togglePickupHangupShortKey] = _togglePickupHangup;
return shortcutsMap;
}
......@@ -472,15 +471,6 @@ void ShortcutPreferences::setShortcuts (std::map<std::string, std::string> map)
_popup = map[popupShortKey];
_toggleHold = map[toggleHoldShortKey];
_togglePickupHangup = map[togglePickupHangupShortKey];
/*
for (int i = 0; i < (int)shortcutsKeys.size(); i++) {
std::string key = shortcutsKeys.at(i);
std::string val = map[key];
if (val != "")
Manager::instance().setConfig("Shortcuts", key, val);
}
*/
}
......
......@@ -115,77 +115,77 @@ class Preferences : public Serializable
virtual void unserialize (Conf::MappingNode *map);
std::string getAccountOrder (void) {
std::string getAccountOrder (void) const {
return _accountOrder;
}
void setAccountOrder (std::string ord) {
_accountOrder = ord;
}
int getAudioApi (void) {
int getAudioApi (void) const {
return _audioApi;
}
void setAudioApi (int api) {
_audioApi = api;
}
int getHistoryLimit (void) {
int getHistoryLimit (void) const {
return _historyLimit;
}
void setHistoryLimit (int lim) {
_historyLimit = lim;
}
int getHistoryMaxCalls (void) {
int getHistoryMaxCalls (void) const {
return _historyMaxCalls;
}
void setHistoryMaxCalls (int max) {
_historyMaxCalls = max;
}
bool getNotifyMails (void) {
bool getNotifyMails (void) const {
return _notifyMails;
}
void setNotifyMails (bool mails) {
_notifyMails = mails;
}
std::string getZoneToneChoice (void) {
std::string getZoneToneChoice (void) const {
return _zoneToneChoice;
}
void setZoneToneChoice (std::string str) {
_zoneToneChoice = str;
}
int getRegistrationExpire (void) {
int getRegistrationExpire (void) const {
return _registrationExpire;
}
void setRegistrationExpire (int exp) {
_registrationExpire = exp;
}
int getPortNum (void) {
int getPortNum (void) const {
return _portNum;
}
void setPortNum (int port) {
_portNum = port;
}
bool getSearchBarDisplay (void) {
bool getSearchBarDisplay (void) const {
return _searchBarDisplay;
}
void setSearchBarDisplay (bool search) {
_searchBarDisplay = search;
}
bool getZeroConfenable (void) {
bool getZeroConfenable (void) const {
return _zeroConfenable;
}
void setZeroConfenable (bool enable) {
_zeroConfenable = enable;
}
bool getMd5Hash (void) {
bool getMd5Hash (void) const {
return _md5Hash;
}
void setMd5Hash (bool md5) {
......@@ -224,35 +224,35 @@ class VoipPreference : public Serializable
virtual void unserialize (Conf::MappingNode *map);
bool getPlayDtmf (void) {
bool getPlayDtmf (void) const {
return _playDtmf;
}
void setPlayDtmf (bool dtmf) {
_playDtmf = dtmf;
}
bool getPlayTones (void) {
bool getPlayTones (void) const {
return _playTones;
}
void setPlayTones (bool tone) {
_playTones = tone;
}
int getPulseLength (void) {
int getPulseLength (void) const {
return _pulseLength;
}
void setPulseLength (int length) {
_pulseLength = length;
}
bool getSymmetricRtp (void) {
bool getSymmetricRtp (void) const {
return _symmetricRtp;
}
void setSymmetricRtp (bool sym) {
_symmetricRtp = sym;
}
std::string getZidFile (void) {
std::string getZidFile (void) const {
return _zidFile;
}
void setZidFile (std::string file) {
......@@ -282,49 +282,49 @@ class AddressbookPreference : public Serializable
virtual void unserialize (Conf::MappingNode *map);
bool getPhoto (void) {
bool getPhoto (void) const {
return _photo;
}
void setPhoto (bool p) {
_photo = p;
}
bool getEnabled (void) {
bool getEnabled (void) const {
return _enabled;
}
void setEnabled (bool e) {
_enabled = e;
}
std::string getList (void) {
std::string getList (void) const {
return _list;
}
void setList (std::string l) {
_list = l;
}
int getMaxResults (void) {
int getMaxResults (void) const {
return _maxResults;
}
void setMaxResults (int r) {
_maxResults = r;
}
bool getBusiness (void) {
bool getBusiness (void) const {
return _business;
}
void setBusiness (bool b) {
_business = b;
}
bool getHome (void) {
bool getHome (void) const {
return _home;
}
void setHone (bool h) {
_home = h;
}
bool getMobile (void) {
bool getMobile (void) const {
return _mobile;
}
void setMobile (bool m) {
......@@ -357,42 +357,42 @@ class HookPreference : public Serializable
virtual void unserialize (Conf::MappingNode *map);
bool getIax2Enabled (void) {
bool getIax2Enabled (void) const {
return _iax2Enabled;
}
void setIax2Enabled (bool i) {
_iax2Enabled = i;
}
std::string getNumberAddPrefix (void) {
std::string getNumberAddPrefix (void) const {
return _numberAddPrefix;
}
void setNumberAddPrefix (std::string n) {
_numberAddPrefix = n;
}
bool getNumberEnabled (void) {
bool getNumberEnabled (void) const {
return _numberEnabled;
}
void setNumberEnabled (bool n) {
_numberEnabled = n;
}
bool getSipEnabled (void) {
bool getSipEnabled (void) const {
return _sipEnabled;
}
void setSipEnabled (bool s) {
_sipEnabled = s;
}
std::string getUrlCommand (void) {
std::string getUrlCommand (void) const {
return _urlCommand;
}
void setUrlCommand (std::string u) {
_urlCommand = u;
}
std::string getUrlSipField (void) {
std::string getUrlSipField (void) const {
return _urlSipField;
}
void setUrlSipField (std::string u) {
......@@ -425,42 +425,42 @@ class AudioPreference : public Serializable
virtual void unserialize (Conf::MappingNode *map);
// alsa preference
int getCardin (void) {
int getCardin (void) const {
return _cardin;
}
void setCardin (int c) {
_cardin = c;
}
int getCardout (void) {
int getCardout (void) const {
return _cardout;
}
void setCardout (int c) {
_cardout = c;
}
int getCardring (void) {
int getCardring (void) const {
return _cardring;
}
void setCardring (int c) {
_cardring = c;
}
int getFramesize (void) {
int getFramesize (void) const {
return _framesize;
}
void setFramesize (int f) {
_framesize = f;
}
std::string getPlugin (void) {
std::string getPlugin (void) const {
return _plugin;
}
void setPlugin (std::string p) {
_plugin = p;
}
int getSmplrate (void) {
int getSmplrate (void) const {
return _smplrate;
}
void setSmplrate (int r) {
......@@ -468,21 +468,21 @@ class AudioPreference : public Serializable
}
//pulseaudio preference
std::string getDevicePlayback (void) {
std::string getDevicePlayback (void) const {
return _devicePlayback;
}
void setDevicePlayback (std::string p) {
_devicePlayback = p;
}
std::string getDeviceRecord (void) {
std::string getDeviceRecord (void) const {
return _deviceRecord;
}
void setDeviceRecord (std::string r) {
_deviceRecord = r;
}
std::string getDeviceRingtone (void) {
std::string getDeviceRingtone (void) const {
return _deviceRingtone;
}
void setDeviceRingtone (std::string r) {
......@@ -490,14 +490,14 @@ class AudioPreference : public Serializable
}
// general preference
std::string getRecordpath (void) {
std::string getRecordpath (void) const {
return _recordpath;
}
void setRecordpath (std::string r) {
void setRecordpath (const std::string &r) {
_recordpath = r;
}
bool getIsAlwaysRecording(void) {
bool getIsAlwaysRecording(void) const {
return _alwaysRecording;
}
......@@ -505,21 +505,21 @@ class AudioPreference : public Serializable
_alwaysRecording = rec;
}
int getVolumemic (void) {
int getVolumemic (void) const {
return _volumemic;
}
void setVolumemic (int m) {
_volumemic = m;
}
int getVolumespkr (void) {
int getVolumespkr (void) const {
return _volumespkr;
}
void setVolumespkr (int s) {
_volumespkr = s;
}
bool getNoiseReduce (void) {
bool getNoiseReduce (void) const {
return _noisereduce;
}
......@@ -527,7 +527,7 @@ class AudioPreference : public Serializable
_noisereduce = noise;
}
bool getEchoCancel(void) {
bool getEchoCancel(void) const {
return _echocancel;
}
......@@ -535,7 +535,7 @@ class AudioPreference : public Serializable
_echocancel = echo;
}
int getEchoCancelTailLength(void) {
int getEchoCancelTailLength(void) const {
return _echoCancelTailLength;
}
......@@ -543,7 +543,7 @@ class AudioPreference : public Serializable
_echoCancelTailLength = length;
}
int getEchoCancelDelay(void) {
int getEchoCancelDelay(void) const {
return _echoCancelDelay;
}
......@@ -592,38 +592,38 @@ class ShortcutPreferences : public Serializable
virtual void unserialize (Conf::MappingNode *map);
void setShortcuts (std::map<std::string, std::string> shortcut);
std::map<std::string, std::string> getShortcuts (void);
void setShortcuts (std::map<std::string, std::string> shortcuts);
std::map<std::string, std::string> getShortcuts (void) const;
std::string getHangup (void) {
std::string getHangup (void) const {
return _hangup;
}
void setHangup (std::string hangup) {
_hangup = hangup;
}
std::string getPickup (void) {
std::string getPickup (void) const {
return _pickup;
}
void setPickup (std::string pickup) {
_pickup = pickup;
}
std::string getPopup (void) {
std::string getPopup (void) const {
return _popup;
}
void setPopup (std::string popup) {
_popup = popup;
}
std::string getToggleHold (void) {
std::string getToggleHold (void) const {
return _toggleHold;
}
void setToggleHold (std::string hold) {
_toggleHold = hold;
}
std::string getTogglePickupHangup (void) {
std::string getTogglePickupHangup (void) const {
return _togglePickupHangup;
}
void setTogglePickupHangup (std::string toggle) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment