def Disconnect(self):
    '''Disconnect a device '''
    device_path = self.path

    if device_path not in mockobject.objects:
        raise dbus.exceptions.DBusException('No such device.',
                                            name='org.bluez.Error.NoSuchDevice')

    device = mockobject.objects[device_path]

    try:
        device.props[AUDIO_IFACE]['State'] = dbus.String("disconnected",
                                                         variant_level=1)

        device.EmitSignal(AUDIO_IFACE, 'PropertyChanged', 'sv', [
            'State', dbus.String("disconnected", variant_level=1),
        ])
    except KeyError:
        pass

    device.props[DEVICE_IFACE]['Connected'] = dbus.Boolean(False,
                                                           variant_level=1)
    device.EmitSignal(DEVICE_IFACE, 'PropertyChanged', 'sv', [
        'Connected', dbus.Boolean(False, variant_level=1),
    ])
Disconnect a device