# 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.glasses import media_info_pb2 as avikom_dot_glasses_dot_media__info__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class MediaFollowerServiceStub(object):
    """*
    A media follower receives events such as playing a video or stopping it and extends the user experience accordingly.
    For instance, an audio peer might play the (processed) audio stream of a video. 
    Media followers are passive and need to be addressed to get the required information.
    Whether pause and stop require individual treatment depends on the follower in question.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Play = channel.unary_unary(
                '/avikom.glasses.MediaFollowerService/Play',
                request_serializer=avikom_dot_glasses_dot_media__info__pb2.MediaInfo.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.Pause = channel.unary_unary(
                '/avikom.glasses.MediaFollowerService/Pause',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )
        self.Stop = channel.unary_unary(
                '/avikom.glasses.MediaFollowerService/Stop',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=avikom_dot_generic_dot_result__pb2.Result.FromString,
                )


class MediaFollowerServiceServicer(object):
    """*
    A media follower receives events such as playing a video or stopping it and extends the user experience accordingly.
    For instance, an audio peer might play the (processed) audio stream of a video. 
    Media followers are passive and need to be addressed to get the required information.
    Whether pause and stop require individual treatment depends on the follower in question.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    def Play(self, request, context):
        """/ informs the follower that a media file playback started
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Pause(self, request, context):
        """/ informs the follower that a media file has been paused
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Stop(self, request, context):
        """/ informs the follower that a media file has been stopped
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MediaFollowerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Play': grpc.unary_unary_rpc_method_handler(
                    servicer.Play,
                    request_deserializer=avikom_dot_glasses_dot_media__info__pb2.MediaInfo.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'Pause': grpc.unary_unary_rpc_method_handler(
                    servicer.Pause,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
            'Stop': grpc.unary_unary_rpc_method_handler(
                    servicer.Stop,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=avikom_dot_generic_dot_result__pb2.Result.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'avikom.glasses.MediaFollowerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MediaFollowerService(object):
    """*
    A media follower receives events such as playing a video or stopping it and extends the user experience accordingly.
    For instance, an audio peer might play the (processed) audio stream of a video. 
    Media followers are passive and need to be addressed to get the required information.
    Whether pause and stop require individual treatment depends on the follower in question.
    @author: Alexander Neumann <alneuman@techfak.uni-bielefeld.de>
    """

    @staticmethod
    def Play(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.MediaFollowerService/Play',
            avikom_dot_glasses_dot_media__info__pb2.MediaInfo.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Pause(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.MediaFollowerService/Pause',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Stop(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.MediaFollowerService/Stop',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            avikom_dot_generic_dot_result__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
