blob: d525056913bb1c3db4efe62957c18d5dea7b4a64 [file] [log] [blame]
// Copyright 2020 The Chromium OS 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 RUNTIME_PROBE_FUNCTIONS_EDID_H_
#define RUNTIME_PROBE_FUNCTIONS_EDID_H_
#include <memory>
#include <string>
#include <vector>
#include <base/files/file_path.h>
#include "runtime_probe/probe_function.h"
namespace runtime_probe {
// Parse EDID files from DRM devices in sysfs.
//
// @param edid_patterns a list of paths to be evaluated. (Default:
// {"/sys/class/drm/*/edid"})
class EdidFunction final : public PrivilegedProbeFunction {
public:
NAME_PROBE_FUNCTION("edid");
static std::unique_ptr<EdidFunction> FromKwargsValue(
const base::Value& dict_value);
private:
DataType EvalImpl() const override;
// The path of target edid files, can contain wildcard.
std::vector<std::string> edid_patterns_;
};
} // namespace runtime_probe
#endif // RUNTIME_PROBE_FUNCTIONS_EDID_H_