1 // Copyright (c) 2012 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 TOOLS_ANDROID_FORWARDER2_COMMAND_H_
6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_
8 #include "base/basictypes.h"
10 namespace forwarder2
{
20 ADB_DATA_SOCKET_ERROR
,
21 ADB_DATA_SOCKET_SUCCESS
,
31 } // namespace command
33 bool ReadCommand(Socket
* socket
,
35 command::Type
* command_type_out
);
37 // Helper function to read the command from the |socket| and return true if the
38 // |command| is equal to the given command parameter.
39 bool ReceivedCommand(command::Type command
, Socket
* socket
);
41 bool SendCommand(command::Type command
, int port
, Socket
* socket
);
43 } // namespace forwarder
45 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_