blob: f4fcace08a4e9a81c16ec7ee7d433d86c46a846d [file] [log] [blame]
Paul Stewart454acb62013-05-02 18:13:21 -07001// Copyright (c) 2012 The Chromium OS 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 PACKET_CAPTURE_TOOL_H
6#define PACKET_CAPTURE_TOOL_H
7
8#include <string>
9
10#include <base/basictypes.h>
11#include <dbus-c++/dbus.h>
12
13#include "subprocess_tool.h"
14
15namespace debugd {
16
17class ProcessWithId;
18
19class PacketCaptureTool : public SubprocessTool {
20 public:
21 PacketCaptureTool();
22 ~PacketCaptureTool();
23
24 std::string Start(
25 const DBus::FileDescriptor& status_fd,
26 const DBus::FileDescriptor& output_fd,
27 const std::map<std::string, DBus::Variant>& options,
28 DBus::Error& error); // NOLINT
29
30 private:
31 static bool AddValidatedStringOption(
32 const std::map<std::string, DBus::Variant>& options,
33 const std::string& dbus_option,
34 const std::string& command_line_option,
35 ProcessWithId* p);
36
37 DISALLOW_COPY_AND_ASSIGN(PacketCaptureTool);
38};
39
40}; // namespace debugd
41
42#endif // !PACKET_CAPTURE_TOOL_H