blob: f3cbb4714d40bf9ba8356cc77378d1c6dd7ab41f [file] [log] [blame]
Zijie He9bb41492017-07-30 21:14:491// Copyright 2017 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 REMOTING_HOST_EVALUATE_CAPABILITY_H_
6#define REMOTING_HOST_EVALUATE_CAPABILITY_H_
7
8#include <string>
9
10namespace remoting {
11
12// Evaluates the host capability in current process. This function should only
13// be called in HostMain(), which consumes a --type=evaluate command line
14// parameter. Note, this function may execute some experimental features and
15// crash the process.
16int EvaluateCapabilityLocally(const std::string& type);
17
18// Evaluates the host capability in a different process and returns its exit
19// code. If |output| is provided, it will be set to the stdout of the process.
20// If the process failed to be started, though usually this should not happen,
21// it returns TERMINATION_STATUS_LAUNCH_FAILED.
22// Note, this is a blocking call. Depending on the platform and system load, it
23// may take a noticeable amount of time to complete.
24int EvaluateCapability(const std::string& type, std::string* output = nullptr);
25
26} // namespace remoting
27
28#endif // REMOTING_HOST_EVALUATE_CAPABILITY_H_