blob: c60314fa2107b06d7e924dee683fc1db30483c6f [file] [log] [blame]
// Copyright 2022 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.11.4
// source: apps_service.proto
package apps
import (
context "context"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// LaunchAppRequest requests starting an app.
type LaunchAppRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AppName string `protobuf:"bytes,1,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"`
// Defaults to 1 minute.
TimeoutSecs int32 `protobuf:"varint,2,opt,name=timeout_secs,json=timeoutSecs,proto3" json:"timeout_secs,omitempty"`
}
func (x *LaunchAppRequest) Reset() {
*x = LaunchAppRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LaunchAppRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LaunchAppRequest) ProtoMessage() {}
func (x *LaunchAppRequest) ProtoReflect() protoreflect.Message {
mi := &file_apps_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LaunchAppRequest.ProtoReflect.Descriptor instead.
func (*LaunchAppRequest) Descriptor() ([]byte, []int) {
return file_apps_service_proto_rawDescGZIP(), []int{0}
}
func (x *LaunchAppRequest) GetAppName() string {
if x != nil {
return x.AppName
}
return ""
}
func (x *LaunchAppRequest) GetTimeoutSecs() int32 {
if x != nil {
return x.TimeoutSecs
}
return 0
}
// App represents a chromeOS app.
// More fields may be added as required.
type App struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *App) Reset() {
*x = App{}
if protoimpl.UnsafeEnabled {
mi := &file_apps_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *App) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*App) ProtoMessage() {}
func (x *App) ProtoReflect() protoreflect.Message {
mi := &file_apps_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use App.ProtoReflect.Descriptor instead.
func (*App) Descriptor() ([]byte, []int) {
return file_apps_service_proto_rawDescGZIP(), []int{1}
}
func (x *App) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *App) GetName() string {
if x != nil {
return x.Name
}
return ""
}
var File_apps_service_proto protoreflect.FileDescriptor
var file_apps_service_proto_rawDesc = []byte{
0x0a, 0x12, 0x61, 0x70, 0x70, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x72, 0x6f, 0x73, 0x2e,
0x61, 0x70, 0x70, 0x73, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x22, 0x50, 0x0a, 0x10, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x41, 0x70, 0x70, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x70, 0x70, 0x4e, 0x61, 0x6d, 0x65,
0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x73,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53,
0x65, 0x63, 0x73, 0x22, 0x29, 0x0a, 0x03, 0x41, 0x70, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xe1,
0x01, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x47,
0x0a, 0x09, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x41, 0x70, 0x70, 0x12, 0x20, 0x2e, 0x74, 0x61,
0x73, 0x74, 0x2e, 0x63, 0x72, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x4c, 0x61, 0x75,
0x6e, 0x63, 0x68, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x72,
0x69, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x74, 0x61, 0x73, 0x74, 0x2e, 0x63, 0x72, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x41, 0x70, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x14, 0x4c,
0x61, 0x75, 0x6e, 0x63, 0x68, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x42, 0x72, 0x6f, 0x77,
0x73, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x74, 0x61,
0x73, 0x74, 0x2e, 0x63, 0x72, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x41, 0x70, 0x70,
0x22, 0x00, 0x42, 0x24, 0x5a, 0x22, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73,
0x2f, 0x74, 0x61, 0x73, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x63,
0x72, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_apps_service_proto_rawDescOnce sync.Once
file_apps_service_proto_rawDescData = file_apps_service_proto_rawDesc
)
func file_apps_service_proto_rawDescGZIP() []byte {
file_apps_service_proto_rawDescOnce.Do(func() {
file_apps_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_apps_service_proto_rawDescData)
})
return file_apps_service_proto_rawDescData
}
var file_apps_service_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_apps_service_proto_goTypes = []interface{}{
(*LaunchAppRequest)(nil), // 0: tast.cros.apps.LaunchAppRequest
(*App)(nil), // 1: tast.cros.apps.App
(*empty.Empty)(nil), // 2: google.protobuf.Empty
}
var file_apps_service_proto_depIdxs = []int32{
0, // 0: tast.cros.apps.AppsService.LaunchApp:input_type -> tast.cros.apps.LaunchAppRequest
2, // 1: tast.cros.apps.AppsService.GetPrimaryBrowser:input_type -> google.protobuf.Empty
2, // 2: tast.cros.apps.AppsService.LaunchPrimaryBrowser:input_type -> google.protobuf.Empty
2, // 3: tast.cros.apps.AppsService.LaunchApp:output_type -> google.protobuf.Empty
1, // 4: tast.cros.apps.AppsService.GetPrimaryBrowser:output_type -> tast.cros.apps.App
1, // 5: tast.cros.apps.AppsService.LaunchPrimaryBrowser:output_type -> tast.cros.apps.App
3, // [3:6] is the sub-list for method output_type
0, // [0:3] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_apps_service_proto_init() }
func file_apps_service_proto_init() {
if File_apps_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_apps_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LaunchAppRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_apps_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*App); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_apps_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_apps_service_proto_goTypes,
DependencyIndexes: file_apps_service_proto_depIdxs,
MessageInfos: file_apps_service_proto_msgTypes,
}.Build()
File_apps_service_proto = out.File
file_apps_service_proto_rawDesc = nil
file_apps_service_proto_goTypes = nil
file_apps_service_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// AppsServiceClient is the client API for AppsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AppsServiceClient interface {
// LaunchApp requests to launch an app.
LaunchApp(ctx context.Context, in *LaunchAppRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// GetPrimaryBrowser returns the app that is set to the primary browser.
// This can be used to tell whether Lacros is enabled.
GetPrimaryBrowser(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*App, error)
// LaunchPrimaryBrowser launches the primary browser, and returns it.
LaunchPrimaryBrowser(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*App, error)
}
type appsServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAppsServiceClient(cc grpc.ClientConnInterface) AppsServiceClient {
return &appsServiceClient{cc}
}
func (c *appsServiceClient) LaunchApp(ctx context.Context, in *LaunchAppRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/tast.cros.apps.AppsService/LaunchApp", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *appsServiceClient) GetPrimaryBrowser(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*App, error) {
out := new(App)
err := c.cc.Invoke(ctx, "/tast.cros.apps.AppsService/GetPrimaryBrowser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *appsServiceClient) LaunchPrimaryBrowser(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*App, error) {
out := new(App)
err := c.cc.Invoke(ctx, "/tast.cros.apps.AppsService/LaunchPrimaryBrowser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AppsServiceServer is the server API for AppsService service.
type AppsServiceServer interface {
// LaunchApp requests to launch an app.
LaunchApp(context.Context, *LaunchAppRequest) (*empty.Empty, error)
// GetPrimaryBrowser returns the app that is set to the primary browser.
// This can be used to tell whether Lacros is enabled.
GetPrimaryBrowser(context.Context, *empty.Empty) (*App, error)
// LaunchPrimaryBrowser launches the primary browser, and returns it.
LaunchPrimaryBrowser(context.Context, *empty.Empty) (*App, error)
}
// UnimplementedAppsServiceServer can be embedded to have forward compatible implementations.
type UnimplementedAppsServiceServer struct {
}
func (*UnimplementedAppsServiceServer) LaunchApp(context.Context, *LaunchAppRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method LaunchApp not implemented")
}
func (*UnimplementedAppsServiceServer) GetPrimaryBrowser(context.Context, *empty.Empty) (*App, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetPrimaryBrowser not implemented")
}
func (*UnimplementedAppsServiceServer) LaunchPrimaryBrowser(context.Context, *empty.Empty) (*App, error) {
return nil, status.Errorf(codes.Unimplemented, "method LaunchPrimaryBrowser not implemented")
}
func RegisterAppsServiceServer(s *grpc.Server, srv AppsServiceServer) {
s.RegisterService(&_AppsService_serviceDesc, srv)
}
func _AppsService_LaunchApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LaunchAppRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AppsServiceServer).LaunchApp(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tast.cros.apps.AppsService/LaunchApp",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AppsServiceServer).LaunchApp(ctx, req.(*LaunchAppRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AppsService_GetPrimaryBrowser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AppsServiceServer).GetPrimaryBrowser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tast.cros.apps.AppsService/GetPrimaryBrowser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AppsServiceServer).GetPrimaryBrowser(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _AppsService_LaunchPrimaryBrowser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AppsServiceServer).LaunchPrimaryBrowser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tast.cros.apps.AppsService/LaunchPrimaryBrowser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AppsServiceServer).LaunchPrimaryBrowser(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _AppsService_serviceDesc = grpc.ServiceDesc{
ServiceName: "tast.cros.apps.AppsService",
HandlerType: (*AppsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LaunchApp",
Handler: _AppsService_LaunchApp_Handler,
},
{
MethodName: "GetPrimaryBrowser",
Handler: _AppsService_GetPrimaryBrowser_Handler,
},
{
MethodName: "LaunchPrimaryBrowser",
Handler: _AppsService_LaunchPrimaryBrowser_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "apps_service.proto",
}