Android-cuttlefish cvd tool
webrtc_controller.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
19#include <fruit/fruit.h>
20
25
26namespace cuttlefish {
27
29 public:
31 std::string Name() const override { return "WebRtcController"; }
32 Result<void> ResultSetup() override;
33
38 const std::string& screenshot_path);
39
40 protected:
42 std::optional<WebrtcClientCommandChannel> command_channel_;
43
44 private:
45 std::unordered_set<SetupFeature*> Dependencies() const override { return {}; }
46};
47
48fruit::Component<WebRtcController> WebRtcControllerComponent();
49
50} // namespace cuttlefish
Definition: expected.h:86
Definition: feature.h:48
Definition: shared_fd.h:129
Definition: webrtc_controller.h:28
SharedFD GetClientSocket() const
Definition: webrtc_controller.cpp:59
std::string Name() const override
Definition: webrtc_controller.h:31
Result< void > SendStartRecordingCommand()
Definition: webrtc_controller.cpp:61
Result< void > ResultSetup() override
Definition: webrtc_controller.cpp:48
std::unordered_set< SetupFeature * > Dependencies() const override
Definition: webrtc_controller.h:45
std::optional< WebrtcClientCommandChannel > command_channel_
Definition: webrtc_controller.h:42
INJECT(WebRtcController())
Definition: webrtc_controller.h:30
Result< void > SendStopRecordingCommand()
Definition: webrtc_controller.cpp:71
Result< void > SendScreenshotDisplayCommand(int display_number, const std::string &screenshot_path)
Definition: webrtc_controller.cpp:81
SharedFD client_socket_
Definition: webrtc_controller.h:41
Definition: alloc_utils.cpp:23
fruit::Component< WebRtcController > WebRtcControllerComponent()
Definition: webrtc_controller.cpp:94