OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_HOST_GNUBBY_AUTH_HANDLER_H_ |
| 6 #define REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 |
| 13 namespace base { |
| 14 class FilePath; |
| 15 } // namespace base |
| 16 |
| 17 namespace remoting { |
| 18 |
| 19 namespace protocol { |
| 20 class ClientStub; |
| 21 } // namespace protocol |
| 22 |
| 23 // Class responsible for proxying authentication data between a local gnubbyd |
| 24 // and the client. |
| 25 class GnubbyAuthHandler { |
| 26 public: |
| 27 virtual ~GnubbyAuthHandler() {} |
| 28 |
| 29 // Creates a platform-specific GnubbyAuthHandler. |
| 30 static scoped_ptr<GnubbyAuthHandler> Create( |
| 31 protocol::ClientStub* client_stub); |
| 32 |
| 33 // Specify the name of the socket to listen to gnubby requests on. |
| 34 static void SetGnubbySocketName(const base::FilePath& gnubby_socket_name); |
| 35 |
| 36 // A message was received from the client. |
| 37 virtual void DeliverClientMessage(const std::string& message) = 0; |
| 38 |
| 39 // Send data to client. |
| 40 virtual void DeliverHostDataMessage(int connection_id, |
| 41 const std::string& data) const = 0; |
| 42 }; |
| 43 |
| 44 } // namespace remoting |
| 45 |
| 46 #endif // REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_ |
OLD | NEW |