OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_ANDROID_FORWARDER2_COMMAND_H_ | 5 #ifndef TOOLS_ANDROID_FORWARDER2_COMMAND_H_ |
6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_ | 6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 | 8 |
10 namespace forwarder2 { | 9 namespace forwarder2 { |
11 | 10 |
12 class Socket; | 11 class Socket; |
13 | 12 |
14 namespace command { | 13 namespace command { |
15 | 14 |
16 enum Type { | 15 enum Type { |
17 ACCEPT_ERROR = 0, | 16 ACCEPT_ERROR = 0, |
18 ACCEPT_SUCCESS, | 17 ACCEPT_SUCCESS, |
(...skipping 20 matching lines...) Expand all Loading... |
39 | 38 |
40 // Helper function to read the command from the |socket| and return true if the | 39 // Helper function to read the command from the |socket| and return true if the |
41 // |command| is equal to the given command parameter. | 40 // |command| is equal to the given command parameter. |
42 bool ReceivedCommand(command::Type command, Socket* socket); | 41 bool ReceivedCommand(command::Type command, Socket* socket); |
43 | 42 |
44 bool SendCommand(command::Type command, int port, Socket* socket); | 43 bool SendCommand(command::Type command, int port, Socket* socket); |
45 | 44 |
46 } // namespace forwarder | 45 } // namespace forwarder |
47 | 46 |
48 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_ | 47 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_ |
OLD | NEW |