Index: remoting/protocol/jingle_messages.cc |
diff --git a/remoting/protocol/jingle_messages.cc b/remoting/protocol/jingle_messages.cc |
index 480a2c252d6aba242575d0b21217da0b67dc63c2..828d92f4671527d9cb10394825c5fe114e6112a2 100644 |
--- a/remoting/protocol/jingle_messages.cc |
+++ b/remoting/protocol/jingle_messages.cc |
@@ -9,6 +9,7 @@ |
#include "remoting/base/constants.h" |
#include "remoting/protocol/content_description.h" |
#include "remoting/protocol/name_value_map.h" |
+#include "remoting/protocol/session_plugin.h" |
#include "remoting/signaling/jid_util.h" |
#include "remoting/signaling/remoting_bot.h" |
#include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
@@ -511,6 +512,17 @@ std::unique_ptr<buzz::XmlElement> JingleMessage::ToXml() const { |
return root; |
} |
+void JingleMessage::AttachAttachment(std::unique_ptr<XmlElement> attachment) { |
+ if (!attachment) { |
Sergey Ulanov
2016/12/21 01:38:34
I don't think we want to allow attachment to be nu
Hzj_jie
2016/12/22 00:27:10
Done.
The null check needs to be placed either he
|
+ return; |
+ } |
+ if (!attachments) { |
+ attachments.reset(new XmlElement( |
+ QName(kChromotingXmlNamespace, "attachments"))); |
+ } |
+ attachments->AddElement(attachment.release()); |
+} |
+ |
JingleMessageReply::JingleMessageReply() |
: type(REPLY_RESULT), |
error_type(NONE) { |