Commit f6dd011e authored by Tristan Matthews's avatar Tristan Matthews

managerimpl: rename ManagerImpl::serialize/unserialize -> join_string/split_string

parent f04c0827
......@@ -102,7 +102,7 @@ void Account::setActiveCodecs(const std::vector<std::string> &list)
}
// update the codec string according to new codec selection
codecStr_ = ManagerImpl::serialize(list);
codecStr_ = ManagerImpl::join_string(list);
}
std::string Account::mapStateNumberToString(RegistrationState state)
......
......@@ -93,7 +93,7 @@ void IAXAccount::unserialize(const Conf::MappingNode &map)
map.getValue(CODECS_KEY, &codecStr_);
// Update codec list which one is used for SDP offer
setActiveCodecs(ManagerImpl::unserialize(codecStr_));
setActiveCodecs(ManagerImpl::split_string(codecStr_));
map.getValue(DISPLAY_NAME_KEY, &displayName_);
}
......
......@@ -1802,7 +1802,7 @@ std::string ManagerImpl::createConfigFile() const
return configdir + DIR_SEPARATOR_STR + PROGNAME + ".yml";
}
std::vector<std::string> ManagerImpl::unserialize(std::string s)
std::vector<std::string> ManagerImpl::split_string(std::string s)
{
std::vector<std::string> list;
std::string temp;
......@@ -1817,7 +1817,7 @@ std::vector<std::string> ManagerImpl::unserialize(std::string s)
return list;
}
std::string ManagerImpl::serialize(const std::vector<std::string> &v)
std::string ManagerImpl::join_string(const std::vector<std::string> &v)
{
std::ostringstream os;
std::copy(v.begin(), v.end(), std::ostream_iterator<std::string>(os, "/"));
......@@ -2531,7 +2531,7 @@ std::string ManagerImpl::getNewCallID()
std::vector<std::string> ManagerImpl::loadAccountOrder() const
{
return unserialize(preferences.getAccountOrder());
return split_string(preferences.getAccountOrder());
}
void ManagerImpl::loadDefaultAccountMap()
......@@ -2611,9 +2611,8 @@ void ManagerImpl::loadAccountMap(Conf::YamlParser &parser)
Sequence::const_iterator ip2ip = std::find_if(seq->begin(), seq->end(), isIP2IP);
if (ip2ip != seq->end()) {
MappingNode *node = dynamic_cast<MappingNode*>(*ip2ip);
if (node) {
if (node)
accountMap_[SIPAccount::IP2IP_PROFILE]->unserialize(*node);
}
}
// Initialize default UDP transport according to
......@@ -2734,13 +2733,13 @@ void ManagerImpl::setAddressbookSettings(const std::map<std::string, int32_t>& s
void ManagerImpl::setAddressbookList(const std::vector<std::string>& list)
{
addressbookPreference.setList(ManagerImpl::serialize(list));
addressbookPreference.setList(ManagerImpl::join_string(list));
saveConfig();
}
std::vector<std::string> ManagerImpl::getAddressbookList() const
{
return unserialize(addressbookPreference.getList());
return split_string(addressbookPreference.getList());
}
void ManagerImpl::setIPToIPForCall(const std::string& callID, bool IPToIP)
......
......@@ -571,9 +571,9 @@ class ManagerImpl {
* Required format: payloads separated with one slash.
* @return std::string The serializabled string
*/
static std::string serialize(const std::vector<std::string> &v);
static std::string join_string(const std::vector<std::string> &v);
static std::vector<std::string> unserialize(std::string v);
static std::vector<std::string> split_string(std::string v);
/**
* Ringtone option.
......
......@@ -268,7 +268,7 @@ void SIPAccount::unserialize(const Conf::MappingNode &map)
map.getValue(MAILBOX_KEY, &mailBox_);
map.getValue(CODECS_KEY, &codecStr_);
// Update codec list which one is used for SDP offer
setActiveCodecs(ManagerImpl::unserialize(codecStr_));
setActiveCodecs(ManagerImpl::split_string(codecStr_));
map.getValue(RINGTONE_PATH_KEY, &ringtonePath_);
map.getValue(RINGTONE_ENABLED_KEY, &ringtoneEnabled_);
......
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