aboutsummaryrefslogtreecommitdiff
path: root/cast/cast_core/api/core/cast_core_service.proto
blob: af8c0ad8e725d500c6391a2b34438b8af7cf84a9 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// 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 .proto was automatically generated. ****
syntax = "proto3";

package cast.core;

import "google/protobuf/empty.proto";
import "cast/cast_core/api/common/runtime_metadata.proto";
import "cast/cast_core/api/common/service_info.proto";

option optimize_for = LITE_RUNTIME;

// CastCore service.
service CastCoreService {
  // Registers a Cast Runtime. Usually called by platform.
  rpc RegisterRuntime(RegisterRuntimeRequest) returns (RegisterRuntimeResponse);

  // Unregisters a Cast Runtime. Usually called by platform.
  rpc UnregisterRuntime(UnregisterRuntimeRequest)
      returns (UnregisterRuntimeResponse);

  // Called by the Runtime when it starts up.
  rpc RuntimeStarted(RuntimeStartedNotification)
      returns (google.protobuf.Empty);

  // Called when the runtime is shutdown. May be called for an active Cast
  // session.
  rpc RuntimeStopped(RuntimeStoppedNotification)
      returns (google.protobuf.Empty);
}

message RegisterRuntimeRequest {
  // Platform-generated runtime ID associated with this runtime. Uniqueness is
  // guaranteed by the CastCore service.
  string runtime_id = 1;
  // Metadata about the runtime.
  cast.common.RuntimeMetadata runtime_metadata = 2;
}

message RegisterRuntimeResponse {}

message UnregisterRuntimeRequest {
  // Runtime ID.
  string runtime_id = 1;
}

message UnregisterRuntimeResponse {}

message RuntimeStartedNotification {
  // Runtime ID.
  string runtime_id = 1;
  // Runtime service info.
  cast.common.ServiceInfo runtime_service_info = 2;
}

message RuntimeStoppedNotification {
  // Runtime ID.
  string runtime_id = 1;
}