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;
25class ProposalApprovalManager;
31class ImGuiTestHarnessServiceImpl;
64 bool enable_test_harness =
true;
65 bool enable_rom_service =
true;
66 bool enable_canvas_automation =
true;
67 bool require_approval_for_rom_writes =
true;
85 absl::Status Initialize(
86 int port, test::TestManager* test_manager =
nullptr, Rom* rom =
nullptr,
87 net::RomVersionManager* version_mgr =
nullptr,
88 net::ProposalApprovalManager* approval_mgr =
nullptr,
89 CanvasAutomationServiceImpl* canvas_service =
nullptr);
101 absl::Status StartAsync();
111 bool IsRunning()
const;
116 int Port()
const {
return config_.port; }
121 void SetConfig(
const Config& config) { config_ = config; }
125 std::unique_ptr<grpc::Server> server_;
126 std::unique_ptr<test::ImGuiTestHarnessServiceImpl> test_harness_service_;
127 std::unique_ptr<net::RomServiceImpl> rom_service_;
128 CanvasAutomationServiceImpl* canvas_service_ =
nullptr;
130 std::unique_ptr<grpc::Service> canvas_grpc_service_;
134 absl::Status BuildServer();
145using UnifiedGRPCServer = YazeGRPCServer;