Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
0f69b02c
Commit
0f69b02c
authored
Aug 13, 2013
by
Tristan Matthews
Browse files
* #28351: im: use range-based for loops
parent
63502022
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/im/instant_messaging.cpp
View file @
0f69b02c
...
@@ -99,20 +99,17 @@ void InstantMessaging::sip_send(pjsip_inv_session *session, const std::string& i
...
@@ -99,20 +99,17 @@ void InstantMessaging::sip_send(pjsip_inv_session *session, const std::string& i
void
InstantMessaging
::
send_sip_message
(
pjsip_inv_session
*
session
,
const
std
::
string
&
id
,
const
std
::
string
&
message
)
void
InstantMessaging
::
send_sip_message
(
pjsip_inv_session
*
session
,
const
std
::
string
&
id
,
const
std
::
string
&
message
)
{
{
std
::
vector
<
std
::
string
>
msgs
(
split_message
(
message
));
std
::
vector
<
std
::
string
>
msgs
(
split_message
(
message
));
std
::
vector
<
std
::
string
>::
const_iterator
iter
;
for
(
const
auto
&
iter
:
msgs
)
sip_send
(
session
,
id
,
iter
);
for
(
iter
=
msgs
.
begin
();
iter
!=
msgs
.
end
();
++
iter
)
sip_send
(
session
,
id
,
*
iter
);
}
}
#if HAVE_IAX
#if HAVE_IAX
void
InstantMessaging
::
send_iax_message
(
iax_session
*
session
,
const
std
::
string
&
/* id */
,
const
std
::
string
&
message
)
void
InstantMessaging
::
send_iax_message
(
iax_session
*
session
,
const
std
::
string
&
/* id */
,
const
std
::
string
&
message
)
{
{
std
::
vector
<
std
::
string
>
msgs
(
split_message
(
message
));
std
::
vector
<
std
::
string
>
msgs
(
split_message
(
message
));
std
::
vector
<
std
::
string
>::
const_iterator
iter
;
for
(
iter
=
msgs
.
begin
();
iter
!=
msgs
.
end
();
++
iter
)
for
(
const
auto
&
iter
:
msgs
)
iax_send_text
(
session
,
(
*
iter
)
.
c_str
());
iax_send_text
(
session
,
iter
.
c_str
());
}
}
#endif
#endif
...
@@ -138,8 +135,8 @@ std::string InstantMessaging::generateXmlUriList(UriList &list)
...
@@ -138,8 +135,8 @@ std::string InstantMessaging::generateXmlUriList(UriList &list)
"<resource-lists xmlns=
\"
urn:ietf:params:xml:ns:resource-lists
\"
xmlns:cp=
\"
urn:ietf:params:xml:ns:copycontrol
\"
>"
"<resource-lists xmlns=
\"
urn:ietf:params:xml:ns:resource-lists
\"
xmlns:cp=
\"
urn:ietf:params:xml:ns:copycontrol
\"
>"
"<list>"
;
"<list>"
;
for
(
UriList
::
iterator
iter
=
list
.
begin
();
iter
!=
list
.
end
();
++
iter
)
for
(
auto
&
iter
:
list
)
xmlbuffer
+=
"<entry uri="
+
(
*
iter
)
[
sfl
::
IM_XML_URI
]
+
" cp:copyControl=
\"
to
\"
/>"
;
xmlbuffer
+=
"<entry uri="
+
iter
[
sfl
::
IM_XML_URI
]
+
" cp:copyControl=
\"
to
\"
/>"
;
return
xmlbuffer
+
"</list></resource-lists>"
;
return
xmlbuffer
+
"</list></resource-lists>"
;
}
}
...
...
Write
Preview
Supports
Markdown
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