aboutsummaryrefslogtreecommitdiff
path: root/cast
diff options
context:
space:
mode:
authorGoogler <noreply@google.com>2021-05-12 11:01:11 -0700
committerOpenscreen LUCI CQ <openscreen-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-06-24 03:38:26 +0000
commit5df61d7305d4122d4724cab3edd03946c12326d7 (patch)
tree940b731e87181ba622ac6b2e571868ec4d607bff /cast
parentf3b911c8dbd011a8f96802ad6e3a4998799ebd9c (diff)
downloadopenscreen-5df61d7305d4122d4724cab3edd03946c12326d7.tar.gz
Internal change
PiperOrigin-RevId: 373407178 Change-Id: Ica1520f3a0f004f976840ce7b32ecb2d219bc600 Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2984101 Reviewed-by: Ryan Keane <rwkeane@google.com> Commit-Queue: Ryan Keane <rwkeane@google.com>
Diffstat (limited to 'cast')
-rw-r--r--cast/cast_core/api/bindings/api_bindings.proto2
-rw-r--r--cast/cast_core/api/common/application_config.proto2
-rw-r--r--cast/cast_core/api/common/runtime_metadata.proto2
-rw-r--r--cast/cast_core/api/common/service_info.proto2
-rw-r--r--cast/cast_core/api/core/cast_core_service.proto2
-rw-r--r--cast/cast_core/api/metrics/metrics_recorder.proto2
-rw-r--r--cast/cast_core/api/platform/platform_service.proto2
-rw-r--r--cast/cast_core/api/runtime/cast_audio_channel_service.proto2
-rw-r--r--cast/cast_core/api/runtime/runtime_service.proto56
-rw-r--r--cast/cast_core/api/v2/cast_message.proto2
-rw-r--r--cast/cast_core/api/v2/core_application_service.proto6
-rw-r--r--cast/cast_core/api/v2/core_message_port_application_service.proto30
-rw-r--r--cast/cast_core/api/v2/core_v2_application_service.proto19
-rw-r--r--cast/cast_core/api/v2/runtime_application_service.proto4
-rw-r--r--cast/cast_core/api/v2/runtime_message_port_application_service.proto21
-rw-r--r--cast/cast_core/api/v2/runtime_v2_application_service.proto19
-rw-r--r--cast/cast_core/api/v2/url_rewrite.proto2
-rw-r--r--cast/cast_core/api/web/message_channel.proto2
18 files changed, 156 insertions, 21 deletions
diff --git a/cast/cast_core/api/bindings/api_bindings.proto b/cast/cast_core/api/bindings/api_bindings.proto
index 78da4236..f275e122 100644
--- a/cast/cast_core/api/bindings/api_bindings.proto
+++ b/cast/cast_core/api/bindings/api_bindings.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.bindings;
diff --git a/cast/cast_core/api/common/application_config.proto b/cast/cast_core/api/common/application_config.proto
index cb426824..d49d077e 100644
--- a/cast/cast_core/api/common/application_config.proto
+++ b/cast/cast_core/api/common/application_config.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.common;
diff --git a/cast/cast_core/api/common/runtime_metadata.proto b/cast/cast_core/api/common/runtime_metadata.proto
index 38693389..734ad36f 100644
--- a/cast/cast_core/api/common/runtime_metadata.proto
+++ b/cast/cast_core/api/common/runtime_metadata.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.common;
diff --git a/cast/cast_core/api/common/service_info.proto b/cast/cast_core/api/common/service_info.proto
index e8dc7dd1..2d3539b9 100644
--- a/cast/cast_core/api/common/service_info.proto
+++ b/cast/cast_core/api/common/service_info.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.common;
diff --git a/cast/cast_core/api/core/cast_core_service.proto b/cast/cast_core/api/core/cast_core_service.proto
index ffd564d4..28ec7e05 100644
--- a/cast/cast_core/api/core/cast_core_service.proto
+++ b/cast/cast_core/api/core/cast_core_service.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.core;
diff --git a/cast/cast_core/api/metrics/metrics_recorder.proto b/cast/cast_core/api/metrics/metrics_recorder.proto
index c6654abe..16c2ee04 100644
--- a/cast/cast_core/api/metrics/metrics_recorder.proto
+++ b/cast/cast_core/api/metrics/metrics_recorder.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.metrics;
diff --git a/cast/cast_core/api/platform/platform_service.proto b/cast/cast_core/api/platform/platform_service.proto
index 9369ab93..6ecb7d49 100644
--- a/cast/cast_core/api/platform/platform_service.proto
+++ b/cast/cast_core/api/platform/platform_service.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.platform;
diff --git a/cast/cast_core/api/runtime/cast_audio_channel_service.proto b/cast/cast_core/api/runtime/cast_audio_channel_service.proto
index 900e9c3b..61c9c658 100644
--- a/cast/cast_core/api/runtime/cast_audio_channel_service.proto
+++ b/cast/cast_core/api/runtime/cast_audio_channel_service.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.media;
diff --git a/cast/cast_core/api/runtime/runtime_service.proto b/cast/cast_core/api/runtime/runtime_service.proto
index b3010c6d..0ea47daa 100644
--- a/cast/cast_core/api/runtime/runtime_service.proto
+++ b/cast/cast_core/api/runtime/runtime_service.proto
@@ -2,13 +2,15 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.runtime;
import "google/protobuf/duration.proto";
+import "cast/cast_core/api/common/application_config.proto";
import "cast/cast_core/api/common/service_info.proto";
+import "cast/cast_core/api/v2/url_rewrite.proto";
option optimize_for = LITE_RUNTIME;
@@ -16,9 +18,12 @@ option optimize_for = LITE_RUNTIME;
//
// This service is called by CastCore after Runtime starts up.
service RuntimeService {
+ // Loads a Cast application. The runtime must start its
+ // RuntimeApplicationService on runtime_application_service_info.
+ rpc LoadApplication(LoadApplicationRequest) returns (LoadApplicationResponse);
+
// Launches a Cast application. The application must connect to the
- // CoreApplicationService via core_application_service_info and start its
- // RuntimeApplicationService on runtime_applicationn_service_info.
+ // CoreApplicationService via core_application_service_info.
rpc LaunchApplication(LaunchApplicationRequest)
returns (LaunchApplicationResponse);
@@ -44,15 +49,50 @@ service RuntimeService {
returns (StopMetricsRecorderResponse);
}
-message LaunchApplicationRequest {
- // CoreApplication service info.
- cast.common.ServiceInfo core_application_service_info = 1;
+message LoadApplicationRequest {
+ // Cast application config.
+ cast.common.ApplicationConfig application_config = 1;
+ // Initial rules to rewrite URLs and headers.
+ cast.v2.UrlRequestRewriteRules url_rewrite_rules = 2;
// Cast session id used to setup a connection and pull the config from core
// application service.
- string cast_session_id = 2;
+ string cast_session_id = 3;
// RuntimeApplication service info. The endpoint is generated by Cast Core and
// must be used by the Runtime to bind the RuntimeApplication service.
- cast.common.ServiceInfo runtime_application_service_info = 3;
+ cast.common.ServiceInfo runtime_application_service_info = 4;
+}
+
+// Info relevant to a V2 channel between the runtime and cast core.
+message V2ChannelInfo {
+ // If set, only messages within these namespaces will be sent to the runtime.
+ // If empty, all V2 messages will be sent to the runtime regardless of
+ // namespace.
+ repeated string requested_namespaces = 1;
+}
+
+// Info relevant to a MessagePort channel between the runtime and cast core.
+message MessagePortInfo {}
+
+message LoadApplicationResponse {
+ // One of these fields must be set. This specifies what type of communication
+ // channel should be used to communicate between the runtime and cast core for
+ // the given application.
+ oneof channel_type {
+ V2ChannelInfo v2_info = 1;
+ MessagePortInfo message_port_info = 2;
+ }
+}
+
+message LaunchApplicationRequest {
+ // CoreApplication service info.
+ cast.common.ServiceInfo core_application_service_info = 1;
+ // DEPRECATED
+ string cast_session_id = 2 [deprecated = true];
+ // DEPRECATED
+ cast.common.ServiceInfo runtime_application_service_info = 3
+ [deprecated = true];
+ // CastMedia service info for this application in CastCore.
+ cast.common.ServiceInfo cast_media_service_info = 4;
}
// Returned by the runtime in response to a launch application request.
diff --git a/cast/cast_core/api/v2/cast_message.proto b/cast/cast_core/api/v2/cast_message.proto
index 62e7b104..639c3aaf 100644
--- a/cast/cast_core/api/v2/cast_message.proto
+++ b/cast/cast_core/api/v2/cast_message.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.v2;
diff --git a/cast/cast_core/api/v2/core_application_service.proto b/cast/cast_core/api/v2/core_application_service.proto
index de4f2b02..667bca67 100644
--- a/cast/cast_core/api/v2/core_application_service.proto
+++ b/cast/cast_core/api/v2/core_application_service.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.v2;
@@ -24,6 +24,7 @@ service CoreApplicationService {
// the gRPC status code.
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse);
+ // DEPRECATED
// Send a Cast V2 message to core application.
rpc SendCastMessage(CastMessageRequest) returns (CastMessageResponse);
@@ -34,15 +35,18 @@ service CoreApplicationService {
rpc SetApplicationStatus(ApplicationStatusRequest)
returns (ApplicationStatusResponse);
+ // DEPRECATED
// Posts messages between MessagePorts. MessagePorts are connected using other
// services (e.g. ApiBindings), then registered with the
// MessageConnectorService to communicate over IPC.
rpc PostMessage(cast.web.Message) returns (cast.web.MessagePortStatus);
+ // DEPRECATED
// Gets the list of bindings to early-inject into javascript at page load.
rpc GetAll(cast.bindings.GetAllRequest)
returns (cast.bindings.GetAllResponse);
+ // DEPRECATED
// Connects to a binding returned by GetAll.
rpc Connect(cast.bindings.ConnectRequest)
returns (cast.bindings.ConnectResponse);
diff --git a/cast/cast_core/api/v2/core_message_port_application_service.proto b/cast/cast_core/api/v2/core_message_port_application_service.proto
new file mode 100644
index 00000000..9dcd918e
--- /dev/null
+++ b/cast/cast_core/api/v2/core_message_port_application_service.proto
@@ -0,0 +1,30 @@
+// 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.v2;
+
+import "cast/cast_core/api/bindings/api_bindings.proto";
+import "cast/cast_core/api/web/message_channel.proto";
+
+option optimize_for = LITE_RUNTIME;
+
+// This service runs in Cast Core for a particular app. It uses a MessagePort to
+// communicate with the app.
+service CoreMessagePortApplicationService {
+ // Posts messages between MessagePorts. MessagePorts are connected using other
+ // services (e.g. ApiBindings), then registered with the
+ // MessageConnectorService to communicate over IPC.
+ rpc PostMessage(cast.web.Message) returns (cast.web.MessagePortStatus);
+
+ // Gets the list of bindings to early-inject into javascript at page load.
+ rpc GetAll(cast.bindings.GetAllRequest)
+ returns (cast.bindings.GetAllResponse);
+
+ // Connects to a binding returned by GetAll.
+ rpc Connect(cast.bindings.ConnectRequest)
+ returns (cast.bindings.ConnectResponse);
+}
diff --git a/cast/cast_core/api/v2/core_v2_application_service.proto b/cast/cast_core/api/v2/core_v2_application_service.proto
new file mode 100644
index 00000000..38a599bf
--- /dev/null
+++ b/cast/cast_core/api/v2/core_v2_application_service.proto
@@ -0,0 +1,19 @@
+// 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.v2;
+
+import "cast/cast_core/api/v2/cast_message.proto";
+
+option optimize_for = LITE_RUNTIME;
+
+// This service runs in Cast Core for a particular app. It uses the V2 protocol
+// to communicate with the app.
+service CoreV2ApplicationService {
+ // Send a Cast V2 message to core application.
+ rpc SendCastMessage(CastMessageRequest) returns (CastMessageResponse);
+}
diff --git a/cast/cast_core/api/v2/runtime_application_service.proto b/cast/cast_core/api/v2/runtime_application_service.proto
index 292dbaa9..f105f189 100644
--- a/cast/cast_core/api/v2/runtime_application_service.proto
+++ b/cast/cast_core/api/v2/runtime_application_service.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.v2;
@@ -18,6 +18,7 @@ option optimize_for = LITE_RUNTIME;
// This service is implemented by the Runtime and represents services
// specific to a Cast application.
service RuntimeApplicationService {
+ // DEPRECATED
// Sends a Cast message to the runtime.
rpc SendCastMessage(CastMessageRequest) returns (CastMessageResponse);
@@ -27,6 +28,7 @@ service RuntimeApplicationService {
rpc SetUrlRewriteRules(SetUrlRewriteRulesRequest)
returns (SetUrlRewriteRulesResponse);
+ // DEPRECATED
// "MessageConnectorService" provides the transport for MessagePorts.
// MessagePorts are connected using other services (e.g. ApiBindings), then
// registered with the MessageConnectorService to communicate over IPC
diff --git a/cast/cast_core/api/v2/runtime_message_port_application_service.proto b/cast/cast_core/api/v2/runtime_message_port_application_service.proto
new file mode 100644
index 00000000..9687fe50
--- /dev/null
+++ b/cast/cast_core/api/v2/runtime_message_port_application_service.proto
@@ -0,0 +1,21 @@
+// 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.v2;
+
+import "cast/cast_core/api/web/message_channel.proto";
+
+option optimize_for = LITE_RUNTIME;
+
+// This service runs in the runtime for a particular app. It uses a MessagePort
+// to communicate with Cast Core.
+service RuntimeMessagePortApplicationService {
+ // "MessageConnectorService" provides the transport for MessagePorts.
+ // MessagePorts are connected using other services (e.g. ApiBindings), then
+ // registered with the MessageConnectorService to communicate over IPC
+ rpc PostMessage(cast.web.Message) returns (cast.web.MessagePortStatus);
+}
diff --git a/cast/cast_core/api/v2/runtime_v2_application_service.proto b/cast/cast_core/api/v2/runtime_v2_application_service.proto
new file mode 100644
index 00000000..b5050a71
--- /dev/null
+++ b/cast/cast_core/api/v2/runtime_v2_application_service.proto
@@ -0,0 +1,19 @@
+// 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.v2;
+
+import "cast/cast_core/api/v2/cast_message.proto";
+
+option optimize_for = LITE_RUNTIME;
+
+// This service runs in the runtime for a particular app. It uses the V2
+// protocol to communicate with Cast Core.
+service RuntimeV2ApplicationService {
+ // Sends a Cast V2 message to the runtime.
+ rpc SendCastMessage(CastMessageRequest) returns (CastMessageResponse);
+}
diff --git a/cast/cast_core/api/v2/url_rewrite.proto b/cast/cast_core/api/v2/url_rewrite.proto
index 6f637c8d..e9987007 100644
--- a/cast/cast_core/api/v2/url_rewrite.proto
+++ b/cast/cast_core/api/v2/url_rewrite.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.v2;
diff --git a/cast/cast_core/api/web/message_channel.proto b/cast/cast_core/api/web/message_channel.proto
index 4e3f1ded..dc59b13b 100644
--- a/cast/cast_core/api/web/message_channel.proto
+++ b/cast/cast_core/api/web/message_channel.proto
@@ -2,7 +2,7 @@
// 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. ****
+// **** DO NOT EDIT - this file was automatically generated. ****
syntax = "proto3";
package cast.web;