OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ | 5 #ifndef REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ |
6 #define REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ | 6 #define REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 // ContentDescription used for chromoting sessions. It contains the information | 21 // ContentDescription used for chromoting sessions. It contains the information |
22 // from the content description stanza in the session initialization handshake. | 22 // from the content description stanza in the session initialization handshake. |
23 // | 23 // |
24 // This class also provides a type abstraction so that the Chromotocol Session | 24 // This class also provides a type abstraction so that the Chromotocol Session |
25 // interface does not need to depend on libjingle. | 25 // interface does not need to depend on libjingle. |
26 class ContentDescription { | 26 class ContentDescription { |
27 public: | 27 public: |
28 static const char kChromotingContentName[]; | 28 static const char kChromotingContentName[]; |
29 | 29 |
30 ContentDescription(scoped_ptr<CandidateSessionConfig> config, | 30 ContentDescription(scoped_ptr<CandidateSessionConfig> config, |
31 scoped_ptr<buzz::XmlElement> authenticator_message, | 31 scoped_ptr<buzz::XmlElement> authenticator_message); |
32 const std::string& quic_config_message); | |
33 ~ContentDescription(); | 32 ~ContentDescription(); |
34 | 33 |
35 const CandidateSessionConfig* config() const { | 34 const CandidateSessionConfig* config() const { |
36 return candidate_config_.get(); | 35 return candidate_config_.get(); |
37 } | 36 } |
38 | 37 |
39 const buzz::XmlElement* authenticator_message() const { | 38 const buzz::XmlElement* authenticator_message() const { |
40 return authenticator_message_.get(); | 39 return authenticator_message_.get(); |
41 } | 40 } |
42 | 41 |
43 const std::string& quic_config_message() const { | |
44 return quic_config_message_; | |
45 } | |
46 | |
47 buzz::XmlElement* ToXml() const; | 42 buzz::XmlElement* ToXml() const; |
48 | 43 |
49 static scoped_ptr<ContentDescription> ParseXml( | 44 static scoped_ptr<ContentDescription> ParseXml( |
50 const buzz::XmlElement* element, | 45 const buzz::XmlElement* element, |
51 bool webrtc_transport); | 46 bool webrtc_transport); |
52 | 47 |
53 private: | 48 private: |
54 scoped_ptr<const CandidateSessionConfig> candidate_config_; | 49 scoped_ptr<const CandidateSessionConfig> candidate_config_; |
55 scoped_ptr<const buzz::XmlElement> authenticator_message_; | 50 scoped_ptr<const buzz::XmlElement> authenticator_message_; |
56 std::string quic_config_message_; | |
57 | 51 |
58 static bool ParseChannelConfigs(const buzz::XmlElement* const element, | 52 static bool ParseChannelConfigs(const buzz::XmlElement* const element, |
59 const char tag_name[], | 53 const char tag_name[], |
60 bool codec_required, | 54 bool codec_required, |
61 bool optional, | 55 bool optional, |
62 std::list<ChannelConfig>* const configs); | 56 std::list<ChannelConfig>* const configs); |
63 }; | 57 }; |
64 | 58 |
65 } // namespace protocol | 59 } // namespace protocol |
66 } // namespace remoting | 60 } // namespace remoting |
67 | 61 |
68 #endif // REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ | 62 #endif // REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ |
OLD | NEW |