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.
5 #ifndef REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_
6 #define REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
21 } // namespace protocol
23 // Class responsible for proxying authentication data between a local gnubbyd
25 class GnubbyAuthHandler
{
27 virtual ~GnubbyAuthHandler() {}
29 // Creates a platform-specific GnubbyAuthHandler.
30 static scoped_ptr
<GnubbyAuthHandler
> Create(
31 protocol::ClientStub
* client_stub
);
33 // Specify the name of the socket to listen to gnubby requests on.
34 static void SetGnubbySocketName(const base::FilePath
& gnubby_socket_name
);
36 // A message was received from the client.
37 virtual void DeliverClientMessage(const std::string
& message
) = 0;
39 // Send data to client.
40 virtual void DeliverHostDataMessage(int connection_id
,
41 const std::string
& data
) const = 0;
44 } // namespace remoting
46 #endif // REMOTING_HOST_GNUBBY_AUTH_HANDLER_H_