aboutsummaryrefslogtreecommitdiff
path: root/cast/cast_core/api/platform/platform_service.proto
blob: 6ecb7d4915ab7440f9c51d1fd150e0169515d495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2021 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";

package cast.platform;

import "cast/cast_core/api/common/service_info.proto";

option optimize_for = LITE_RUNTIME;

// Platform service. Implemented and hosted by Platform.
service PlatformService {
  // Starts a runtime. Called by CastCoreService which endpoint is fetched from
  // the ServerContext.
  rpc StartRuntime(StartRuntimeRequest) returns (StartRuntimeResponse);

  // Stops a runtime.
  rpc StopRuntime(StopRuntimeRequest) returns (StopRuntimeResponse);

  // Gets device info.
  rpc GetDeviceInfo(GetDeviceInfoRequest) returns (GetDeviceInfoResponse);
}

message StartRuntimeRequest {
  // Cast Runtime ID assigned in CastCoreService.RegisterRuntime.
  string runtime_id = 1;
  // gRPC endpoint Cast Runtime must run on.
  cast.common.ServiceInfo runtime_service_info = 2;
}

message StartRuntimeResponse {}

message StopRuntimeRequest {
  string runtime_id = 1;
}

message StopRuntimeResponse {}

message GetDeviceInfoRequest {}

message GetDeviceInfoResponse {
  // TODO: Add device information that Cast needs. Below is an approximation of
  // such information.
  bool has_surface = 1;
}