blob: 1d6a672d681f88e7f0bbcabbe43b13957aa4c93c [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.
#include <mojo/public/cpp/platform/platform_channel_endpoint.h>
#include "mojo/cros_healthd_executor.mojom.h"
namespace diagnostics {
// Provides a convenient way to access the root-level executor.
class ExecutorAdapter {
using Executor = chromeos::cros_healthd_executor::mojom::Executor;
virtual ~ExecutorAdapter() = default;
// Establishes a Mojo connection with the executor.
virtual void Connect(mojo::PlatformChannelEndpoint endpoint) = 0;
// Returns the speed of each of the device's fans.
virtual void GetFanSpeed(Executor::GetFanSpeedCallback callback) = 0;
// Instructs the executor to run the memtester executable.
virtual void RunMemtester(Executor::RunMemtesterCallback callback) = 0;
} // namespace diagnostics