# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from avikom.glasses import calibration_service_pb2 as avikom_dot_glasses_dot_calibration__service__pb2
from avikom.unity import game_object_pb2 as avikom_dot_unity_dot_game__object__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class CalibrationServiceStub(object):
    """*
    This service can be used to retrieve information about the system's calibration state.
    It is primarily intended for spatial computing devices that synchronize digital and real-world artifacts with so called space pins.
    Note: right now, AVIKOM calibrates 'on the fly' and does not make use of this interface.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.GetUncalibratedSpacePin = channel.unary_unary(
                '/avikom.glasses.CalibrationService/GetUncalibratedSpacePin',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
                )
        self.GetSpacePinNames = channel.unary_unary(
                '/avikom.glasses.CalibrationService/GetSpacePinNames',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=avikom_dot_glasses_dot_calibration__service__pb2.SpacePinNames.FromString,
                )


class CalibrationServiceServicer(object):
    """*
    This service can be used to retrieve information about the system's calibration state.
    It is primarily intended for spatial computing devices that synchronize digital and real-world artifacts with so called space pins.
    Note: right now, AVIKOM calibrates 'on the fly' and does not make use of this interface.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def GetUncalibratedSpacePin(self, request, context):
        """/ returns the next uncalibrated/unassigned anchor/space pin
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSpacePinNames(self, request, context):
        """/ get the names of all world anchors/space pins; intended for situations where the user should decide which target to calibrate next
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CalibrationServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetUncalibratedSpacePin': grpc.unary_unary_rpc_method_handler(
                    servicer.GetUncalibratedSpacePin,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=avikom_dot_unity_dot_game__object__pb2.GameObject.SerializeToString,
            ),
            'GetSpacePinNames': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSpacePinNames,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=avikom_dot_glasses_dot_calibration__service__pb2.SpacePinNames.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.glasses.CalibrationService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class CalibrationService(object):
    """*
    This service can be used to retrieve information about the system's calibration state.
    It is primarily intended for spatial computing devices that synchronize digital and real-world artifacts with so called space pins.
    Note: right now, AVIKOM calibrates 'on the fly' and does not make use of this interface.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def GetUncalibratedSpacePin(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, '/avikom.glasses.CalibrationService/GetUncalibratedSpacePin',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            avikom_dot_unity_dot_game__object__pb2.GameObject.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetSpacePinNames(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, '/avikom.glasses.CalibrationService/GetSpacePinNames',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            avikom_dot_glasses_dot_calibration__service__pb2.SpacePinNames.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
