Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: tools/android/forwarder2/command.h

Issue 10918057: Add forwarder2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/android/common/common.gyp ('k') | tools/android/forwarder2/command.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef TOOLS_ANDROID_FORWARDER2_COMMAND_H_
6 #define TOOLS_ANDROID_FORWARDER2_COMMAND_H_
7
8 #include "base/basictypes.h"
9
10 namespace forwarder {
11
12 class Socket;
13
14 namespace command {
15
16 enum Type {
17 ACCEPT_ERROR = 0,
18 ACCEPT_SUCCESS,
19 ACK,
20 ADB_DATA_SOCKET_ERROR,
21 ADB_DATA_SOCKET_SUCCESS,
22 BIND_ERROR,
23 BIND_SUCCESS,
24 DATA_CONNECTION,
25 HOST_SERVER_ERROR,
26 HOST_SERVER_SUCCESS,
27 KILL_ALL_LISTENERS,
28 LISTEN
29 };
30
31 } // namespace command
32
33 bool ReadCommand(Socket* socket, int* port, command::Type* command_type);
34
35 // Helper function to read the command from the |socket| and return true if the
36 // |command| is equal to the given command parameter.
37 bool ReceivedCommand(command::Type command, Socket* socket);
38
39 bool SendCommand(command::Type command, int port, Socket* socket);
40
41 } // namespace forwarder
42
43 #endif // TOOLS_ANDROID_FORWARDER2_COMMAND_H_
OLDNEW
« no previous file with comments | « tools/android/common/common.gyp ('k') | tools/android/forwarder2/command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698