Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
130
Issues
130
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
f6dd011e
Commit
f6dd011e
authored
May 17, 2012
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
managerimpl: rename ManagerImpl::serialize/unserialize -> join_string/split_string
parent
f04c0827
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
12 deletions
+11
-12
daemon/src/account.cpp
daemon/src/account.cpp
+1
-1
daemon/src/iax/iaxaccount.cpp
daemon/src/iax/iaxaccount.cpp
+1
-1
daemon/src/managerimpl.cpp
daemon/src/managerimpl.cpp
+6
-7
daemon/src/managerimpl.h
daemon/src/managerimpl.h
+2
-2
daemon/src/sip/sipaccount.cpp
daemon/src/sip/sipaccount.cpp
+1
-1
No files found.
daemon/src/account.cpp
View file @
f6dd011e
...
...
@@ -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
)
...
...
daemon/src/iax/iaxaccount.cpp
View file @
f6dd011e
...
...
@@ -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_
);
}
...
...
daemon/src/managerimpl.cpp
View file @
f6dd011e
...
...
@@ -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
)
...
...
daemon/src/managerimpl.h
View file @
f6dd011e
...
...
@@ -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.
...
...
daemon/src/sip/sipaccount.cpp
View file @
f6dd011e
...
...
@@ -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_
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment