OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 // ContentDescription used for chromoting sessions. It contains the information | 22 // ContentDescription used for chromoting sessions. It contains the information |
23 // from the content description stanza in the session intialization handshake. | 23 // from the content description stanza in the session intialization handshake. |
24 // | 24 // |
25 // This class also provides a type abstraction so that the Chromotocol Session | 25 // This class also provides a type abstraction so that the Chromotocol Session |
26 // interface does not need to depend on libjingle. | 26 // interface does not need to depend on libjingle. |
27 class ContentDescription : public cricket::ContentDescription { | 27 class ContentDescription : public cricket::ContentDescription { |
28 public: | 28 public: |
29 ContentDescription(const CandidateSessionConfig* config, | 29 ContentDescription(const CandidateSessionConfig* config, |
30 const std::string& auth_token, | 30 const std::string& auth_token, |
31 const std::string& master_key, | |
32 const std::string& certificate); | 31 const std::string& certificate); |
33 virtual ~ContentDescription(); | 32 virtual ~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 std::string& auth_token() const { return auth_token_; } | 38 const std::string& auth_token() const { return auth_token_; } |
40 const std::string& master_key() const { return master_key_; } | |
41 const std::string& certificate() const { return certificate_; } | 39 const std::string& certificate() const { return certificate_; } |
42 | 40 |
43 buzz::XmlElement* ToXml() const; | 41 buzz::XmlElement* ToXml() const; |
44 | 42 |
45 static cricket::ContentDescription* ParseXml(const buzz::XmlElement* element); | 43 static cricket::ContentDescription* ParseXml(const buzz::XmlElement* element); |
46 | 44 |
47 private: | 45 private: |
48 scoped_ptr<const CandidateSessionConfig> candidate_config_; | 46 scoped_ptr<const CandidateSessionConfig> candidate_config_; |
49 | 47 |
50 // This may contain the initiating, or the accepting token depending on | 48 // This may contain the initiating, or the accepting token depending on |
51 // context. | 49 // context. |
52 std::string auth_token_; | 50 std::string auth_token_; |
53 | 51 |
54 // Master key used for the session encrypted with the hosts key. | |
55 std::string master_key_; | |
56 | |
57 std::string certificate_; | 52 std::string certificate_; |
58 }; | 53 }; |
59 | 54 |
60 } // namespace protocol | 55 } // namespace protocol |
61 } // namespace remoting | 56 } // namespace remoting |
62 | 57 |
63 #endif // REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ | 58 #endif // REMOTING_PROTOCOL_CONTENT_DESCRIPTION_H_ |
OLD | NEW |