Flutter Engine
Loading...
Searching...
No Matches
log_interest_listener.h
Go to the documentation of this file.
1
// Copyright 2013 The Flutter 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 FLUTTER_FML_PLATFORM_FUCHSIA_LOG_INTEREST_LISTENER_H_
6
#define FLUTTER_FML_PLATFORM_FUCHSIA_LOG_INTEREST_LISTENER_H_
7
8
#include <fidl/fuchsia.diagnostics.types/cpp/fidl.h>
9
#include <fidl/fuchsia.logger/cpp/fidl.h>
10
#include <lib/fidl/cpp/client.h>
11
12
namespace
fml
{
13
14
// Class to monitor the Fuchsia LogSink service for log interest changes (i.e.
15
// when the Fuchsia OS requests a change to the minimum log level).
16
//
17
// Care should be taken to always use this object on the same thread.
18
class
LogInterestListener
{
19
public
:
20
LogInterestListener
(fidl::ClientEnd<::fuchsia_logger::LogSink> client_end,
21
async_dispatcher_t* dispatcher)
22
: log_sink_(
std
::move(client_end), dispatcher) {}
23
24
// Schedules async task to monitor the log sink for log interest changes.
25
void
AsyncWaitForInterestChanged
();
26
27
// Updates the global log settings in response to a log interest change.
28
static
void
HandleInterestChange
(
29
const
fuchsia_diagnostics_types::Interest& interest);
30
31
private
:
32
fidl::Client<::fuchsia_logger::LogSink> log_sink_;
33
};
34
35
}
// namespace fml
36
37
#endif
// FLUTTER_FML_PLATFORM_FUCHSIA_LOG_INTEREST_LISTENER_H_
fml::LogInterestListener
Definition
log_interest_listener.h:18
fml::LogInterestListener::AsyncWaitForInterestChanged
void AsyncWaitForInterestChanged()
Definition
log_interest_listener.cc:16
fml::LogInterestListener::LogInterestListener
LogInterestListener(fidl::ClientEnd<::fuchsia_logger::LogSink > client_end, async_dispatcher_t *dispatcher)
Definition
log_interest_listener.h:20
fml::LogInterestListener::HandleInterestChange
static void HandleInterestChange(const fuchsia_diagnostics_types::Interest &interest)
Definition
log_interest_listener.cc:33
fml
Definition
ascii_trie.cc:9
std
Definition
ref_ptr.h:261
fml
platform
fuchsia
log_interest_listener.h
Generated on Thu Nov 6 2025 16:11:22 for Flutter Engine by
1.9.8