blob: 1dc31cbc7e576373011cb7ccef49acf09b39efba [file]
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
import tconn_service_pb2 as tconn__service__pb2
class TconnServiceStub(object):
"""TconnService provides functions for interacting with tconn directly.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.Eval = channel.unary_unary(
'/tast.cros.ui.TconnService/Eval',
request_serializer=tconn__service__pb2.EvalRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_struct__pb2.Value.FromString,
)
self.Call = channel.unary_unary(
'/tast.cros.ui.TconnService/Call',
request_serializer=tconn__service__pb2.CallRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_struct__pb2.Value.FromString,
)
self.WaitForExpr = channel.unary_unary(
'/tast.cros.ui.TconnService/WaitForExpr',
request_serializer=tconn__service__pb2.WaitForExprRequest.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
self.ResetAutomation = channel.unary_unary(
'/tast.cros.ui.TconnService/ResetAutomation',
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
)
class TconnServiceServicer(object):
"""TconnService provides functions for interacting with tconn directly.
"""
def Eval(self, request, context):
"""Eval evaluates expr on the test connection. See Conn.Eval for details.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def Call(self, request, context):
"""Call calls the javascript fn with given args. See Conn.Call for details
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def WaitForExpr(self, request, context):
"""WaitForExpr repeatedly evaluates the JavaScript expression expr until it evaluates to true.
Errors returned by Eval are treated the same as expr == false unless fail_on_err is true.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def ResetAutomation(self, request, context):
"""ResetAutomation resets the automation API feature. The automation API feature
is widely used to control the UI, but keeping it activated sometimes causes
performance drawback on low-end devices. This method deactivates the
automation API and resets internal states. See: https://crbug.com/1096719.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_TconnServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'Eval': grpc.unary_unary_rpc_method_handler(
servicer.Eval,
request_deserializer=tconn__service__pb2.EvalRequest.FromString,
response_serializer=google_dot_protobuf_dot_struct__pb2.Value.SerializeToString,
),
'Call': grpc.unary_unary_rpc_method_handler(
servicer.Call,
request_deserializer=tconn__service__pb2.CallRequest.FromString,
response_serializer=google_dot_protobuf_dot_struct__pb2.Value.SerializeToString,
),
'WaitForExpr': grpc.unary_unary_rpc_method_handler(
servicer.WaitForExpr,
request_deserializer=tconn__service__pb2.WaitForExprRequest.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
'ResetAutomation': grpc.unary_unary_rpc_method_handler(
servicer.ResetAutomation,
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'tast.cros.ui.TconnService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class TconnService(object):
"""TconnService provides functions for interacting with tconn directly.
"""
@staticmethod
def Eval(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/tast.cros.ui.TconnService/Eval',
tconn__service__pb2.EvalRequest.SerializeToString,
google_dot_protobuf_dot_struct__pb2.Value.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Call(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/tast.cros.ui.TconnService/Call',
tconn__service__pb2.CallRequest.SerializeToString,
google_dot_protobuf_dot_struct__pb2.Value.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def WaitForExpr(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/tast.cros.ui.TconnService/WaitForExpr',
tconn__service__pb2.WaitForExprRequest.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def ResetAutomation(request,
target,
options=(),
channel_credentials=None,
call_credentials=None,
insecure=False,
compression=None,
wait_for_ready=None,
timeout=None,
metadata=None):
return grpc.experimental.unary_unary(request, target, '/tast.cros.ui.TconnService/ResetAutomation',
google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
google_dot_protobuf_dot_empty__pb2.Empty.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)