summaryrefslogtreecommitdiffstats
path: root/tools/android/common/daemon.h
diff options
context:
space:
mode:
authorwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 05:12:27 +0000
committerwangxianzhu@chromium.org <wangxianzhu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-15 05:12:27 +0000
commitc65c6e3150af3dc37471c76b10d2b05cf7367aa3 (patch)
treed1e2cd5de49cd95893c6ab6ce55de6a145951e4f /tools/android/common/daemon.h
parent69f406901670991e1d8a5e44346ffba25741b5cd (diff)
downloadchromium_src-c65c6e3150af3dc37471c76b10d2b05cf7367aa3.zip
chromium_src-c65c6e3150af3dc37471c76b10d2b05cf7367aa3.tar.gz
chromium_src-c65c6e3150af3dc37471c76b10d2b05cf7367aa3.tar.bz2
tools/android/forwarder (as well as tools/android/common)
'forwarder' is a tool that can forward a TCP port listening on the device to a port on the host. It works like 'adb forward' but in the reverse direction. It's useful to run tests on the device that need to access TCP services on the host. Review URL: http://codereview.chromium.org/9359003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122048 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/android/common/daemon.h')
-rw-r--r--tools/android/common/daemon.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/android/common/daemon.h b/tools/android/common/daemon.h
new file mode 100644
index 0000000..2bd25d4
--- /dev/null
+++ b/tools/android/common/daemon.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TOOLS_ANDROID_COMMON_DAEMON_H__
+#define TOOLS_ANDROID_COMMON_DAEMON_H__
+#pragma once
+
+#include <string>
+#include <vector>
+
+class CommandLine;
+
+namespace tools {
+
+bool HasHelpSwitch(const CommandLine& command_line);
+
+bool HasNoSpawnDaemonSwitch(const CommandLine& command_line);
+
+void ShowHelp(const char* program,
+ const char* extra_title,
+ const char* extra_descriptions);
+
+// Spawns a daemon process and exit the current process.
+// Any code after this function will be executed in the spawned daemon process.
+void SpawnDaemon(int exit_status);
+
+} // namespace tools
+
+#endif // TOOLS_ANDROID_COMMON_DAEMON_H__
+