blob: 45d4267049f51f6c289abb46c10b1c92ed37749e [file] [log] [blame]
// Copyright 2021 The Fuchsia 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 SRC_DEVELOPER_MEMORY_PRESSURE_SIGNALER_DEBUGGER_H_
#define SRC_DEVELOPER_MEMORY_PRESSURE_SIGNALER_DEBUGGER_H_
#include <fidl/fuchsia.memory.debug/cpp/fidl.h>
#include "src/developer/memory/pressure_signaler/pressure_notifier.h"
namespace pressure_signaler {
class MemoryDebugger : public fidl::Server<fuchsia_memory_debug::MemoryPressure> {
public:
explicit MemoryDebugger(PressureNotifier* notifier);
// Signals registered watchers of the fuchsia.memorypressure service with the
// specified memory pressure `level`.
void Signal(SignalRequest& request, SignalCompleter::Sync& completer) override;
private:
PressureNotifier* const notifier_;
};
} // namespace pressure_signaler
#endif // SRC_DEVELOPER_MEMORY_PRESSURE_SIGNALER_DEBUGGER_H_