blob: 6b489f3042d7aa8aae7194585fa344413c1940ec [file] [log] [blame]
Elly Jonesa44d22d2012-01-05 18:05:56 -05001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Elly Jones0c016cc2011-12-19 16:19:22 -05002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Ben Chana0011d82014-05-13 00:19:29 -07005#ifndef SUBPROCESS_TOOL_H_
6#define SUBPROCESS_TOOL_H_
Elly Jones0c016cc2011-12-19 16:19:22 -05007
8#include <map>
9#include <string>
10
11#include <base/basictypes.h>
12#include <dbus-c++/dbus.h>
13
14namespace debugd {
15
16class ProcessWithId;
17
18class SubprocessTool {
19 public:
20 SubprocessTool();
21 virtual ~SubprocessTool();
22
Elly Fong-Jonesd9a16cd2012-11-12 16:09:49 -050023 virtual ProcessWithId* CreateProcess(bool sandbox);
Ben Chana0011d82014-05-13 00:19:29 -070024 virtual void Stop(const std::string& handle, DBus::Error* error);
25
Elly Jones0c016cc2011-12-19 16:19:22 -050026 private:
27 std::map<std::string, ProcessWithId*> processes_;
Ben Chana0011d82014-05-13 00:19:29 -070028
Elly Jones0c016cc2011-12-19 16:19:22 -050029 DISALLOW_COPY_AND_ASSIGN(SubprocessTool);
30};
31
Ben Chana0011d82014-05-13 00:19:29 -070032} // namespace debugd
Elly Jones0c016cc2011-12-19 16:19:22 -050033
Ben Chana0011d82014-05-13 00:19:29 -070034#endif // SUBPROCESS_TOOL_H_