OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 // When creating answers, performs the appropriate negotiation | 29 // When creating answers, performs the appropriate negotiation |
30 // of the various fields to determine the proper result. | 30 // of the various fields to determine the proper result. |
31 class TransportDescriptionFactory { | 31 class TransportDescriptionFactory { |
32 public: | 32 public: |
33 // Default ctor; use methods below to set configuration. | 33 // Default ctor; use methods below to set configuration. |
34 TransportDescriptionFactory(); | 34 TransportDescriptionFactory(); |
35 SecurePolicy secure() const { return secure_; } | 35 SecurePolicy secure() const { return secure_; } |
36 // The identity to use when setting up DTLS. | 36 // The identity to use when setting up DTLS. |
37 rtc::SSLIdentity* identity() const { return identity_; } | 37 rtc::SSLIdentity* identity() const { return identity_; } |
38 | 38 |
| 39 // Specifies the transport protocol to be use. |
| 40 void set_protocol(TransportProtocol protocol) { protocol_ = protocol; } |
39 // Specifies the transport security policy to use. | 41 // Specifies the transport security policy to use. |
40 void set_secure(SecurePolicy s) { secure_ = s; } | 42 void set_secure(SecurePolicy s) { secure_ = s; } |
41 // Specifies the identity to use (only used when secure is not SEC_DISABLED). | 43 // Specifies the identity to use (only used when secure is not SEC_DISABLED). |
42 void set_identity(rtc::SSLIdentity* identity) { identity_ = identity; } | 44 void set_identity(rtc::SSLIdentity* identity) { identity_ = identity; } |
43 | 45 |
44 // Creates a transport description suitable for use in an offer. | 46 // Creates a transport description suitable for use in an offer. |
45 TransportDescription* CreateOffer(const TransportOptions& options, | 47 TransportDescription* CreateOffer(const TransportOptions& options, |
46 const TransportDescription* current_description) const; | 48 const TransportDescription* current_description) const; |
47 // Create a transport description that is a response to an offer. | 49 // Create a transport description that is a response to an offer. |
48 TransportDescription* CreateAnswer( | 50 TransportDescription* CreateAnswer( |
49 const TransportDescription* offer, | 51 const TransportDescription* offer, |
50 const TransportOptions& options, | 52 const TransportOptions& options, |
51 const TransportDescription* current_description) const; | 53 const TransportDescription* current_description) const; |
52 | 54 |
53 private: | 55 private: |
54 bool SetSecurityInfo(TransportDescription* description, | 56 bool SetSecurityInfo(TransportDescription* description, |
55 ConnectionRole role) const; | 57 ConnectionRole role) const; |
56 | 58 |
| 59 TransportProtocol protocol_; |
57 SecurePolicy secure_; | 60 SecurePolicy secure_; |
58 rtc::SSLIdentity* identity_; | 61 rtc::SSLIdentity* identity_; |
59 }; | 62 }; |
60 | 63 |
61 } // namespace cricket | 64 } // namespace cricket |
62 | 65 |
63 #endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_ | 66 #endif // WEBRTC_P2P_BASE_TRANSPORTDESCRIPTIONFACTORY_H_ |
OLD | NEW |