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

import bluetooth_pb2 as bluetooth__pb2


class BluetoothServiceGrpcStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.setEnable = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/setEnable',
                request_serializer=bluetooth__pb2.BtEnableRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtEnableResponse.FromString,
                )
        self.getBtStatus = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/getBtStatus',
                request_serializer=bluetooth__pb2.BtStatusRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtStatusResponse.FromString,
                )
        self.startBtStateListen = channel.unary_stream(
                '/BluetoothPackage.BluetoothServiceGrpc/startBtStateListen',
                request_serializer=bluetooth__pb2.BtStateListenRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtStatusResponse.FromString,
                )
        self.stopBtStateListen = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/stopBtStateListen',
                request_serializer=bluetooth__pb2.BtStateListenRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtStateListenResponse.FromString,
                )
        self.startDiscovery = channel.unary_stream(
                '/BluetoothPackage.BluetoothServiceGrpc/startDiscovery',
                request_serializer=bluetooth__pb2.StartDiscoveryRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.StartDiscoveryResponse.FromString,
                )
        self.cancelDiscovery = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/cancelDiscovery',
                request_serializer=bluetooth__pb2.CancelDiscoveryRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.CancelDiscoveryResponse.FromString,
                )
        self.isDiscovery = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/isDiscovery',
                request_serializer=bluetooth__pb2.IsDiscoveryRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.IsDiscoveryResponse.FromString,
                )
        self.getBtFoundedDeviceList = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/getBtFoundedDeviceList',
                request_serializer=bluetooth__pb2.BtFoundedDeviceListRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtFoundedDeviceListResponse.FromString,
                )
        self.disconnectBt = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/disconnectBt',
                request_serializer=bluetooth__pb2.BtDisconnectRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtDisconnectResponse.FromString,
                )
        self.pairBt = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/pairBt',
                request_serializer=bluetooth__pb2.BtPairRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtPairResponse.FromString,
                )
        self.unpairBt = channel.unary_unary(
                '/BluetoothPackage.BluetoothServiceGrpc/unpairBt',
                request_serializer=bluetooth__pb2.BtUnpairRequest.SerializeToString,
                response_deserializer=bluetooth__pb2.BtUnpairResponse.FromString,
                )


class BluetoothServiceGrpcServicer(object):
    """Missing associated documentation comment in .proto file."""

    def setEnable(self, request, context):
        """开关系统蓝牙
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getBtStatus(self, request, context):
        """获取系统蓝牙状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def startBtStateListen(self, request, context):
        """订阅蓝牙状态变化    
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def stopBtStateListen(self, request, context):
        """取消订阅蓝牙状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def startDiscovery(self, request, context):
        """查找附近蓝牙设备
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def cancelDiscovery(self, request, context):
        """取消查找
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def isDiscovery(self, request, context):
        """是否在查找
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def getBtFoundedDeviceList(self, request, context):
        """获取扫描到的远程蓝牙设备列表, 包含发现的和已配对的
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def disconnectBt(self, request, context):
        """断开蓝牙连接
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def pairBt(self, request, context):
        """配对
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def unpairBt(self, request, context):
        """取消配对
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BluetoothServiceGrpcServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'setEnable': grpc.unary_unary_rpc_method_handler(
                    servicer.setEnable,
                    request_deserializer=bluetooth__pb2.BtEnableRequest.FromString,
                    response_serializer=bluetooth__pb2.BtEnableResponse.SerializeToString,
            ),
            'getBtStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.getBtStatus,
                    request_deserializer=bluetooth__pb2.BtStatusRequest.FromString,
                    response_serializer=bluetooth__pb2.BtStatusResponse.SerializeToString,
            ),
            'startBtStateListen': grpc.unary_stream_rpc_method_handler(
                    servicer.startBtStateListen,
                    request_deserializer=bluetooth__pb2.BtStateListenRequest.FromString,
                    response_serializer=bluetooth__pb2.BtStatusResponse.SerializeToString,
            ),
            'stopBtStateListen': grpc.unary_unary_rpc_method_handler(
                    servicer.stopBtStateListen,
                    request_deserializer=bluetooth__pb2.BtStateListenRequest.FromString,
                    response_serializer=bluetooth__pb2.BtStateListenResponse.SerializeToString,
            ),
            'startDiscovery': grpc.unary_stream_rpc_method_handler(
                    servicer.startDiscovery,
                    request_deserializer=bluetooth__pb2.StartDiscoveryRequest.FromString,
                    response_serializer=bluetooth__pb2.StartDiscoveryResponse.SerializeToString,
            ),
            'cancelDiscovery': grpc.unary_unary_rpc_method_handler(
                    servicer.cancelDiscovery,
                    request_deserializer=bluetooth__pb2.CancelDiscoveryRequest.FromString,
                    response_serializer=bluetooth__pb2.CancelDiscoveryResponse.SerializeToString,
            ),
            'isDiscovery': grpc.unary_unary_rpc_method_handler(
                    servicer.isDiscovery,
                    request_deserializer=bluetooth__pb2.IsDiscoveryRequest.FromString,
                    response_serializer=bluetooth__pb2.IsDiscoveryResponse.SerializeToString,
            ),
            'getBtFoundedDeviceList': grpc.unary_unary_rpc_method_handler(
                    servicer.getBtFoundedDeviceList,
                    request_deserializer=bluetooth__pb2.BtFoundedDeviceListRequest.FromString,
                    response_serializer=bluetooth__pb2.BtFoundedDeviceListResponse.SerializeToString,
            ),
            'disconnectBt': grpc.unary_unary_rpc_method_handler(
                    servicer.disconnectBt,
                    request_deserializer=bluetooth__pb2.BtDisconnectRequest.FromString,
                    response_serializer=bluetooth__pb2.BtDisconnectResponse.SerializeToString,
            ),
            'pairBt': grpc.unary_unary_rpc_method_handler(
                    servicer.pairBt,
                    request_deserializer=bluetooth__pb2.BtPairRequest.FromString,
                    response_serializer=bluetooth__pb2.BtPairResponse.SerializeToString,
            ),
            'unpairBt': grpc.unary_unary_rpc_method_handler(
                    servicer.unpairBt,
                    request_deserializer=bluetooth__pb2.BtUnpairRequest.FromString,
                    response_serializer=bluetooth__pb2.BtUnpairResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'BluetoothPackage.BluetoothServiceGrpc', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BluetoothServiceGrpc(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def setEnable(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, '/BluetoothPackage.BluetoothServiceGrpc/setEnable',
            bluetooth__pb2.BtEnableRequest.SerializeToString,
            bluetooth__pb2.BtEnableResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getBtStatus(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, '/BluetoothPackage.BluetoothServiceGrpc/getBtStatus',
            bluetooth__pb2.BtStatusRequest.SerializeToString,
            bluetooth__pb2.BtStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startBtStateListen(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_stream(request, target, '/BluetoothPackage.BluetoothServiceGrpc/startBtStateListen',
            bluetooth__pb2.BtStateListenRequest.SerializeToString,
            bluetooth__pb2.BtStatusResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopBtStateListen(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, '/BluetoothPackage.BluetoothServiceGrpc/stopBtStateListen',
            bluetooth__pb2.BtStateListenRequest.SerializeToString,
            bluetooth__pb2.BtStateListenResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startDiscovery(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_stream(request, target, '/BluetoothPackage.BluetoothServiceGrpc/startDiscovery',
            bluetooth__pb2.StartDiscoveryRequest.SerializeToString,
            bluetooth__pb2.StartDiscoveryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def cancelDiscovery(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, '/BluetoothPackage.BluetoothServiceGrpc/cancelDiscovery',
            bluetooth__pb2.CancelDiscoveryRequest.SerializeToString,
            bluetooth__pb2.CancelDiscoveryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def isDiscovery(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, '/BluetoothPackage.BluetoothServiceGrpc/isDiscovery',
            bluetooth__pb2.IsDiscoveryRequest.SerializeToString,
            bluetooth__pb2.IsDiscoveryResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getBtFoundedDeviceList(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, '/BluetoothPackage.BluetoothServiceGrpc/getBtFoundedDeviceList',
            bluetooth__pb2.BtFoundedDeviceListRequest.SerializeToString,
            bluetooth__pb2.BtFoundedDeviceListResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def disconnectBt(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, '/BluetoothPackage.BluetoothServiceGrpc/disconnectBt',
            bluetooth__pb2.BtDisconnectRequest.SerializeToString,
            bluetooth__pb2.BtDisconnectResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def pairBt(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, '/BluetoothPackage.BluetoothServiceGrpc/pairBt',
            bluetooth__pb2.BtPairRequest.SerializeToString,
            bluetooth__pb2.BtPairResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def unpairBt(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, '/BluetoothPackage.BluetoothServiceGrpc/unpairBt',
            bluetooth__pb2.BtUnpairRequest.SerializeToString,
            bluetooth__pb2.BtUnpairResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
