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

from avikom.generic import result_pb2 as avikom_dot_generic_dot_result__pb2
from avikom.headset import audio_peer_control_service_pb2 as avikom_dot_headset_dot_audio__peer__control__service__pb2


class AudioPeerControlServiceStub(object):
    """*
    This service controls an auditory peer. It can be used to trigger sounds, speech output or change 
    the mode of the auditory peer.
    @author: Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetMode = channel.unary_unary(
                '/avikom.headset.AudioPeerControlService/SetMode',
                request_serializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.AudioPeerModeRequest.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.PlaySound = channel.unary_unary(
                '/avikom.headset.AudioPeerControlService/PlaySound',
                request_serializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.FunctionalSoundRequest.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.Say = channel.unary_unary(
                '/avikom.headset.AudioPeerControlService/Say',
                request_serializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.SayRequest.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class AudioPeerControlServiceServicer(object):
    """*
    This service controls an auditory peer. It can be used to trigger sounds, speech output or change 
    the mode of the auditory peer.
    @author: Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

    def SetMode(self, request, context):
        """/ sets the mode of the auditory peer. 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PlaySound(self, request, context):
        """/ triggers immediate playback of a sound. 
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Say(self, request, context):
        """/ triggers generation of TTS output and playback on the auditory peer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AudioPeerControlServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMode,
                    request_deserializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.AudioPeerModeRequest.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'PlaySound': grpc.unary_unary_rpc_method_handler(
                    servicer.PlaySound,
                    request_deserializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.FunctionalSoundRequest.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'Say': grpc.unary_unary_rpc_method_handler(
                    servicer.Say,
                    request_deserializer=avikom_dot_headset_dot_audio__peer__control__service__pb2.SayRequest.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.headset.AudioPeerControlService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class AudioPeerControlService(object):
    """*
    This service controls an auditory peer. It can be used to trigger sounds, speech output or change 
    the mode of the auditory peer.
    @author: Lars Schalkwijk <lars.schalkwijk@fh-bielefeld.de>
    """

    @staticmethod
    def SetMode(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.headset.AudioPeerControlService/SetMode',
            avikom_dot_headset_dot_audio__peer__control__service__pb2.AudioPeerModeRequest.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PlaySound(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.headset.AudioPeerControlService/PlaySound',
            avikom_dot_headset_dot_audio__peer__control__service__pb2.FunctionalSoundRequest.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Say(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.headset.AudioPeerControlService/Say',
            avikom_dot_headset_dot_audio__peer__control__service__pb2.SayRequest.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
