Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ | |
| 6 #define REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/threading/non_thread_safe.h" | |
| 12 | |
| 13 namespace pp { | |
| 14 class Instance; | |
| 15 } // namespace pp | |
| 16 | |
| 17 namespace crypto { | |
| 18 class RSAPrivateKey; | |
| 19 } // namespace crypto | |
| 20 | |
| 21 namespace cricket { | |
| 22 class Candidate; | |
| 23 } // namespace cricket | |
| 24 | |
| 25 namespace remoting { | |
| 26 namespace protocol { | |
| 27 | |
| 28 struct TransportConfig; | |
| 29 | |
| 30 // Interface for protocol channels. There will be two implementations: | |
| 31 // PepperStreamChannel and PepperDatagramChannel. | |
|
Wez
2011/09/09 23:39:12
This is actually an interface defining functions c
Sergey Ulanov
2011/09/12 19:50:50
Done.
| |
| 32 class PepperChannel : public base::NonThreadSafe { | |
| 33 public: | |
| 34 PepperChannel() { } | |
| 35 virtual ~PepperChannel() { } | |
| 36 | |
| 37 // Connect the channel using specified |config|. | |
| 38 virtual void Connect(pp::Instance* pp_instance, | |
| 39 const TransportConfig& config, | |
| 40 const std::string& remote_cert) = 0; | |
| 41 | |
| 42 // Adds |candidate| received from the peer. | |
| 43 virtual void AddRemoveCandidate(const cricket::Candidate& candidate) = 0; | |
| 44 | |
| 45 // Name of the channel. | |
| 46 virtual const std::string& name() = 0; | |
| 47 | |
| 48 protected: | |
| 49 DISALLOW_COPY_AND_ASSIGN(PepperChannel); | |
| 50 }; | |
| 51 | |
| 52 } // namespace protocol | |
| 53 } // namespace remoting | |
| 54 | |
| 55 #endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ | |
| OLD | NEW |