Android-cuttlefish cvd tool
wmediumd_server.h
Go to the documentation of this file.
1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <string>
19#include <unordered_set>
20#include <vector>
21
22#include <fruit/fruit.h>
23
30
31namespace cuttlefish {
32
34 public:
38 LogTeeCreator& log_tee, GrpcSocketCreator& grpc_socket));
39
40 // CommandSource
42
43 // SetupFeature
44 std::string Name() const override;
45 bool Enabled() const override;
46
47 Result<void> WaitForAvailability() const override;
48
49 private:
50 std::unordered_set<SetupFeature*> Dependencies() const override;
51 Result<void> ResultSetup() override;
52
57 std::string config_path_;
58};
59
60fruit::Component<fruit::Required<
64
65} // namespace cuttlefish
Definition: expected.h:86
Definition: cuttlefish_config.h:878
Definition: cuttlefish_config.h:269
Definition: cuttlefish_config.h:49
Definition: grpc_socket_creator.h:26
Definition: log_tee_creator.h:28
Definition: wmediumd_server.h:33
Result< void > ResultSetup() override
Definition: wmediumd_server.cpp:122
INJECT(WmediumdServer(const CuttlefishConfig::EnvironmentSpecific &environment, const CuttlefishConfig::InstanceSpecific &instance, LogTeeCreator &log_tee, GrpcSocketCreator &grpc_socket))
GrpcSocketCreator & grpc_socket_
Definition: wmediumd_server.h:56
bool Enabled() const override
Definition: wmediumd_server.cpp:102
std::unordered_set< SetupFeature * > Dependencies() const override
Definition: wmediumd_server.cpp:118
std::string config_path_
Definition: wmediumd_server.h:57
std::string Name() const override
Definition: wmediumd_server.cpp:100
const CuttlefishConfig::InstanceSpecific & instance_
Definition: wmediumd_server.h:54
const CuttlefishConfig::EnvironmentSpecific & environment_
Definition: wmediumd_server.h:53
Result< void > WaitForAvailability() const override
Definition: wmediumd_server.cpp:106
Result< std::vector< MonitorCommand > > Commands() override
Definition: wmediumd_server.cpp:86
LogTeeCreator & log_tee_
Definition: wmediumd_server.h:55
Definition: alloc_utils.cpp:23
fruit::Component< fruit::Required< const CuttlefishConfig, const CuttlefishConfig::EnvironmentSpecific, const CuttlefishConfig::InstanceSpecific, LogTeeCreator, GrpcSocketCreator > > WmediumdServerComponent()
Definition: wmediumd_server.cpp:146