| 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/memory/scoped_ptr.h" | |
| 12 #include "base/threading/non_thread_safe.h" | |
| 13 | |
| 14 namespace pp { | |
| 15 class Instance; | |
| 16 } // namespace pp | |
| 17 | |
| 18 namespace cricket { | |
| 19 class Candidate; | |
| 20 } // namespace cricket | |
| 21 | |
| 22 namespace remoting { | |
| 23 namespace protocol { | |
| 24 | |
| 25 class ChannelAuthenticator; | |
| 26 struct TransportConfig; | |
| 27 | |
| 28 // Interface for stream and datagram channels used by PepperSession. | |
| 29 class PepperChannel : public base::NonThreadSafe { | |
| 30 public: | |
| 31 PepperChannel() { } | |
| 32 virtual ~PepperChannel() { } | |
| 33 | |
| 34 // Connect the channel using specified |config|. The specified | |
| 35 // |authenticator| is used to authenticate the channel. | |
| 36 virtual void Connect(pp::Instance* pp_instance, | |
| 37 const TransportConfig& config, | |
| 38 scoped_ptr<ChannelAuthenticator> authenticator) = 0; | |
| 39 | |
| 40 // Adds |candidate| received from the peer. | |
| 41 virtual void AddRemoteCandidate(const cricket::Candidate& candidate) = 0; | |
| 42 | |
| 43 // Name of the channel. | |
| 44 virtual const std::string& name() const = 0; | |
| 45 | |
| 46 // Returns true if the channel is already connected. | |
| 47 virtual bool is_connected() const = 0; | |
| 48 | |
| 49 protected: | |
| 50 DISALLOW_COPY_AND_ASSIGN(PepperChannel); | |
| 51 }; | |
| 52 | |
| 53 } // namespace protocol | |
| 54 } // namespace remoting | |
| 55 | |
| 56 #endif // REMOTING_PROTOCOL_PEPPER_CHANNEL_H_ | |
| OLD | NEW |