| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright 2004 The WebRTC Project Authors. All rights reserved. |    2  *  Copyright 2004 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  | 
|   11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |   11 #ifndef WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 
|   12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |   12 #define WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 
|   13  |   13  | 
|   14 #include <string> |   14 #include <string> | 
 |   15  | 
|   15 #include "webrtc/p2p/base/transport.h" |   16 #include "webrtc/p2p/base/transport.h" | 
|   16 #include "webrtc/p2p/base/transportchannel.h" |   17 #include "webrtc/p2p/base/transportchannel.h" | 
|   17  |   18  | 
|   18 namespace buzz { class XmlElement; } |   19 namespace buzz { class XmlElement; } | 
|   19  |   20  | 
|   20 namespace cricket { |   21 namespace cricket { | 
|   21  |   22  | 
|   22 class Candidate; |   23 class Candidate; | 
|   23  |   24  | 
|   24 // Base class for real implementations of TransportChannel.  This includes some |   25 // Base class for real implementations of TransportChannel.  This includes some | 
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   69   // |   70   // | 
|   70   // Note: Since candidates are delivered asynchronously to the |   71   // Note: Since candidates are delivered asynchronously to the | 
|   71   // channel, they cannot return an error if the message is invalid. |   72   // channel, they cannot return an error if the message is invalid. | 
|   72   // It is assumed that the Transport will have checked validity |   73   // It is assumed that the Transport will have checked validity | 
|   73   // before forwarding. |   74   // before forwarding. | 
|   74   sigslot::signal2<TransportChannelImpl*, |   75   sigslot::signal2<TransportChannelImpl*, | 
|   75                    const Candidate&> SignalCandidateReady; |   76                    const Candidate&> SignalCandidateReady; | 
|   76   virtual void OnCandidate(const Candidate& candidate) = 0; |   77   virtual void OnCandidate(const Candidate& candidate) = 0; | 
|   77  |   78  | 
|   78   // DTLS methods |   79   // DTLS methods | 
|   79   // Set DTLS local identity.  The identity object is not copied, but the caller |   80   // Set DTLS local certificate. | 
|   80   // retains ownership and must delete it after this TransportChannelImpl is |   81   virtual bool SetLocalCertificate( | 
|   81   // destroyed. |   82       const rtc::scoped_refptr<webrtc::DtlsCertificate>& certificate) = 0; | 
|   82   // TODO(bemasc): Fix the ownership semantics of this method. |  | 
|   83   virtual bool SetLocalIdentity(rtc::SSLIdentity* identity) = 0; |  | 
|   84  |   83  | 
|   85   // Set DTLS Remote fingerprint. Must be after local identity set. |   84   // Set DTLS Remote fingerprint. Must be after local certificate set. | 
|   86   virtual bool SetRemoteFingerprint(const std::string& digest_alg, |   85   virtual bool SetRemoteFingerprint(const std::string& digest_alg, | 
|   87     const uint8* digest, |   86     const uint8* digest, | 
|   88     size_t digest_len) = 0; |   87     size_t digest_len) = 0; | 
|   89  |   88  | 
|   90   virtual bool SetSslRole(rtc::SSLRole role) = 0; |   89   virtual bool SetSslRole(rtc::SSLRole role) = 0; | 
|   91  |   90  | 
|   92   // TransportChannel is forwarding this signal from PortAllocatorSession. |   91   // TransportChannel is forwarding this signal from PortAllocatorSession. | 
|   93   sigslot::signal1<TransportChannelImpl*> SignalCandidatesAllocationDone; |   92   sigslot::signal1<TransportChannelImpl*> SignalCandidatesAllocationDone; | 
|   94  |   93  | 
|   95   // Invoked when there is conflict in the ICE role between local and remote |   94   // Invoked when there is conflict in the ICE role between local and remote | 
|   96   // agents. |   95   // agents. | 
|   97   sigslot::signal1<TransportChannelImpl*> SignalRoleConflict; |   96   sigslot::signal1<TransportChannelImpl*> SignalRoleConflict; | 
|   98  |   97  | 
|   99   // Emitted whenever the number of connections available to the transport |   98   // Emitted whenever the number of connections available to the transport | 
|  100   // channel decreases. |   99   // channel decreases. | 
|  101   sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; |  100   sigslot::signal1<TransportChannelImpl*> SignalConnectionRemoved; | 
|  102  |  101  | 
|  103  private: |  102  private: | 
|  104   DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); |  103   DISALLOW_COPY_AND_ASSIGN(TransportChannelImpl); | 
|  105 }; |  104 }; | 
|  106  |  105  | 
|  107 }  // namespace cricket |  106 }  // namespace cricket | 
|  108  |  107  | 
|  109 #endif  // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ |  108 #endif  // WEBRTC_P2P_BASE_TRANSPORTCHANNELIMPL_H_ | 
| OLD | NEW |