1#ifndef YAZE_APP_CORE_SERVICE_UNIFIED_GRPC_SERVER_H_
2#define YAZE_APP_CORE_SERVICE_UNIFIED_GRPC_SERVER_H_
8#include "absl/status/status.h"
12#include <grpcpp/impl/service_type.h>
21class CanvasAutomationServiceImpl;
26class ProposalApprovalManager;
33class ImGuiTestHarnessServiceImpl;
65 bool enable_test_harness =
true;
66 bool enable_rom_service =
true;
67 bool enable_canvas_automation =
true;
68 bool require_approval_for_rom_writes =
true;
85 absl::Status Initialize(
87 test::TestManager* test_manager =
nullptr,
89 net::RomVersionManager* version_mgr =
nullptr,
90 net::ProposalApprovalManager* approval_mgr =
nullptr,
91 CanvasAutomationServiceImpl* canvas_service =
nullptr);
103 absl::Status StartAsync();
113 bool IsRunning()
const;
118 int Port()
const {
return config_.port; }
123 void SetConfig(
const Config& config) { config_ = config; }
127 std::unique_ptr<grpc::Server> server_;
128 std::unique_ptr<test::ImGuiTestHarnessServiceImpl> test_harness_service_;
129 std::unique_ptr<net::RomServiceImpl> rom_service_;
130 std::unique_ptr<CanvasAutomationServiceImpl> canvas_service_;
132 std::unique_ptr<grpc::Service> canvas_grpc_service_;
136 absl::Status BuildServer();
147using UnifiedGRPCServer = YazeGRPCServer;
Main namespace for the application.