| // Copyright 2021 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: screenlock_service.proto |
| |
| package ui |
| |
| 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" |
| ) |
| |
| 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) |
| ) |
| |
| var File_screenlock_service_proto protoreflect.FileDescriptor |
| |
| var file_screenlock_service_proto_rawDesc = []byte{ |
| 0x0a, 0x18, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x73, 0x65, 0x72, |
| 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x74, 0x61, 0x73, 0x74, |
| 0x2e, 0x63, 0x72, 0x6f, 0x73, 0x2e, 0x75, 0x69, 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, 0x32, 0x8c, 0x02, 0x0a, 0x11, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, |
| 0x4c, 0x6f, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3f, 0x0a, 0x0b, 0x52, |
| 0x65, 0x75, 0x73, 0x65, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 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, 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, 0x3d, 0x0a, 0x09, |
| 0x4e, 0x65, 0x77, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 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, 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, 0x3f, 0x0a, 0x0b, 0x43, |
| 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x72, 0x6f, 0x6d, 0x65, 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, 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, 0x36, 0x0a, 0x04, |
| 0x4c, 0x6f, 0x63, 0x6b, 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, 0x16, 0x2e, 0x67, |
| 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, |
| 0x6d, 0x70, 0x74, 0x79, 0x42, 0x22, 0x5a, 0x20, 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, 0x75, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| } |
| |
| var file_screenlock_service_proto_goTypes = []interface{}{ |
| (*empty.Empty)(nil), // 0: google.protobuf.Empty |
| } |
| var file_screenlock_service_proto_depIdxs = []int32{ |
| 0, // 0: tast.cros.ui.ScreenLockService.ReuseChrome:input_type -> google.protobuf.Empty |
| 0, // 1: tast.cros.ui.ScreenLockService.NewChrome:input_type -> google.protobuf.Empty |
| 0, // 2: tast.cros.ui.ScreenLockService.CloseChrome:input_type -> google.protobuf.Empty |
| 0, // 3: tast.cros.ui.ScreenLockService.Lock:input_type -> google.protobuf.Empty |
| 0, // 4: tast.cros.ui.ScreenLockService.ReuseChrome:output_type -> google.protobuf.Empty |
| 0, // 5: tast.cros.ui.ScreenLockService.NewChrome:output_type -> google.protobuf.Empty |
| 0, // 6: tast.cros.ui.ScreenLockService.CloseChrome:output_type -> google.protobuf.Empty |
| 0, // 7: tast.cros.ui.ScreenLockService.Lock:output_type -> google.protobuf.Empty |
| 4, // [4:8] is the sub-list for method output_type |
| 0, // [0:4] 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_screenlock_service_proto_init() } |
| func file_screenlock_service_proto_init() { |
| if File_screenlock_service_proto != nil { |
| return |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: file_screenlock_service_proto_rawDesc, |
| NumEnums: 0, |
| NumMessages: 0, |
| NumExtensions: 0, |
| NumServices: 1, |
| }, |
| GoTypes: file_screenlock_service_proto_goTypes, |
| DependencyIndexes: file_screenlock_service_proto_depIdxs, |
| }.Build() |
| File_screenlock_service_proto = out.File |
| file_screenlock_service_proto_rawDesc = nil |
| file_screenlock_service_proto_goTypes = nil |
| file_screenlock_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 |
| |
| // ScreenLockServiceClient is the client API for ScreenLockService service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type ScreenLockServiceClient interface { |
| // ReuseChrome passes an Option to New to make Chrome reuse the existing login session |
| // from same user. Session will be re-used when Chrome configurations are compatible |
| // between two sessions. For noLogin and deferLogin modes, session will not be re-used. |
| // If the existing session cannot be re-used, a new Chrome session will be restarted. |
| // CloseChrome must be called later to clean up the associated resources. |
| ReuseChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) |
| // NewChrome logs into a Chrome session as a fake user. CloseChrome must be called later |
| // to clean up the associated resources. |
| NewChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) |
| // CloseChrome releases the resources obtained by NewChrome. |
| CloseChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) |
| // Lock performs the operation to lock the screen. Implementing Lock |
| // would be equivalent to pressing "Search+L" at a login session. |
| // Note, NewChrome or ReuseChrome needs to be called in prior, but not |
| // CloseChrome. |
| Lock(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) |
| } |
| |
| type screenLockServiceClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewScreenLockServiceClient(cc grpc.ClientConnInterface) ScreenLockServiceClient { |
| return &screenLockServiceClient{cc} |
| } |
| |
| func (c *screenLockServiceClient) ReuseChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/tast.cros.ui.ScreenLockService/ReuseChrome", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *screenLockServiceClient) NewChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/tast.cros.ui.ScreenLockService/NewChrome", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *screenLockServiceClient) CloseChrome(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/tast.cros.ui.ScreenLockService/CloseChrome", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *screenLockServiceClient) Lock(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) { |
| out := new(empty.Empty) |
| err := c.cc.Invoke(ctx, "/tast.cros.ui.ScreenLockService/Lock", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // ScreenLockServiceServer is the server API for ScreenLockService service. |
| type ScreenLockServiceServer interface { |
| // ReuseChrome passes an Option to New to make Chrome reuse the existing login session |
| // from same user. Session will be re-used when Chrome configurations are compatible |
| // between two sessions. For noLogin and deferLogin modes, session will not be re-used. |
| // If the existing session cannot be re-used, a new Chrome session will be restarted. |
| // CloseChrome must be called later to clean up the associated resources. |
| ReuseChrome(context.Context, *empty.Empty) (*empty.Empty, error) |
| // NewChrome logs into a Chrome session as a fake user. CloseChrome must be called later |
| // to clean up the associated resources. |
| NewChrome(context.Context, *empty.Empty) (*empty.Empty, error) |
| // CloseChrome releases the resources obtained by NewChrome. |
| CloseChrome(context.Context, *empty.Empty) (*empty.Empty, error) |
| // Lock performs the operation to lock the screen. Implementing Lock |
| // would be equivalent to pressing "Search+L" at a login session. |
| // Note, NewChrome or ReuseChrome needs to be called in prior, but not |
| // CloseChrome. |
| Lock(context.Context, *empty.Empty) (*empty.Empty, error) |
| } |
| |
| // UnimplementedScreenLockServiceServer can be embedded to have forward compatible implementations. |
| type UnimplementedScreenLockServiceServer struct { |
| } |
| |
| func (*UnimplementedScreenLockServiceServer) ReuseChrome(context.Context, *empty.Empty) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method ReuseChrome not implemented") |
| } |
| func (*UnimplementedScreenLockServiceServer) NewChrome(context.Context, *empty.Empty) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method NewChrome not implemented") |
| } |
| func (*UnimplementedScreenLockServiceServer) CloseChrome(context.Context, *empty.Empty) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method CloseChrome not implemented") |
| } |
| func (*UnimplementedScreenLockServiceServer) Lock(context.Context, *empty.Empty) (*empty.Empty, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented") |
| } |
| |
| func RegisterScreenLockServiceServer(s *grpc.Server, srv ScreenLockServiceServer) { |
| s.RegisterService(&_ScreenLockService_serviceDesc, srv) |
| } |
| |
| func _ScreenLockService_ReuseChrome_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.(ScreenLockServiceServer).ReuseChrome(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/tast.cros.ui.ScreenLockService/ReuseChrome", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ScreenLockServiceServer).ReuseChrome(ctx, req.(*empty.Empty)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ScreenLockService_NewChrome_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.(ScreenLockServiceServer).NewChrome(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/tast.cros.ui.ScreenLockService/NewChrome", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ScreenLockServiceServer).NewChrome(ctx, req.(*empty.Empty)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ScreenLockService_CloseChrome_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.(ScreenLockServiceServer).CloseChrome(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/tast.cros.ui.ScreenLockService/CloseChrome", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ScreenLockServiceServer).CloseChrome(ctx, req.(*empty.Empty)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _ScreenLockService_Lock_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.(ScreenLockServiceServer).Lock(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/tast.cros.ui.ScreenLockService/Lock", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(ScreenLockServiceServer).Lock(ctx, req.(*empty.Empty)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _ScreenLockService_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "tast.cros.ui.ScreenLockService", |
| HandlerType: (*ScreenLockServiceServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "ReuseChrome", |
| Handler: _ScreenLockService_ReuseChrome_Handler, |
| }, |
| { |
| MethodName: "NewChrome", |
| Handler: _ScreenLockService_NewChrome_Handler, |
| }, |
| { |
| MethodName: "CloseChrome", |
| Handler: _ScreenLockService_CloseChrome_Handler, |
| }, |
| { |
| MethodName: "Lock", |
| Handler: _ScreenLockService_Lock_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "screenlock_service.proto", |
| } |