mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
[AFV] Ref T739, context function to unregister per identifier
This commit is contained in:
committed by
Mat Sutcliffe
parent
134c805990
commit
8a89b8f261
@@ -88,14 +88,17 @@ namespace BlackCore
|
||||
public slots:
|
||||
// ------------- DBus ---------------
|
||||
|
||||
//! All registered devices
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const = 0;
|
||||
|
||||
//! Register a device on a machine (for core/GUI it will return all known devices on all machines)
|
||||
virtual void registerDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) = 0;
|
||||
|
||||
//! Unregister devices
|
||||
virtual void unRegisterDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) = 0;
|
||||
|
||||
//! All registered devices
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const = 0;
|
||||
//! Remove all devices for identifer (i.e. "a machine")
|
||||
virtual void unRegisterDevicesFor(const BlackMisc::CIdentifier &identifier) = 0;
|
||||
|
||||
// ------------- DBus ---------------
|
||||
|
||||
|
||||
@@ -48,6 +48,11 @@ namespace BlackCore
|
||||
m_registeredDevices.unRegisterDevices(devices);
|
||||
}
|
||||
|
||||
void CContextAudio::unRegisterDevicesFor(const CIdentifier &identifier)
|
||||
{
|
||||
m_registeredDevices.unRegisterDevices(identifier);
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CContextAudio::getRegisteredDevices() const
|
||||
{
|
||||
return m_registeredDevices;
|
||||
|
||||
@@ -44,9 +44,10 @@ namespace BlackCore
|
||||
// Interface implementations for DBus
|
||||
//! \publicsection
|
||||
//! @{
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const override;
|
||||
virtual void registerDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) override;
|
||||
virtual void unRegisterDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) override;
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const override;
|
||||
virtual void unRegisterDevicesFor(const BlackMisc::CIdentifier &identifier) override;
|
||||
//! @}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -54,6 +54,11 @@ namespace BlackCore
|
||||
m_dBusInterface->callDBus(QLatin1String("unRegisterDevices"));
|
||||
}
|
||||
|
||||
void CContextAudioProxy::unRegisterDevicesFor(const CIdentifier &identifier)
|
||||
{
|
||||
m_dBusInterface->callDBus(QLatin1String("unRegisterDevicesFor"), identifier);
|
||||
}
|
||||
|
||||
CAudioDeviceInfoList CContextAudioProxy::getRegisteredDevices() const
|
||||
{
|
||||
return m_dBusInterface->callDBusRet<BlackMisc::Audio::CAudioDeviceInfoList>(QLatin1String("getRegisteredDevices"));
|
||||
|
||||
@@ -62,9 +62,10 @@ namespace BlackCore
|
||||
//! \publicsection
|
||||
//! @{
|
||||
//! Register a device on a machine (for core/GUI it will return all known devices on all machines)
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const override;
|
||||
virtual void registerDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) override;
|
||||
virtual void unRegisterDevices(const BlackMisc::Audio::CAudioDeviceInfoList &devices) override;
|
||||
virtual BlackMisc::Audio::CAudioDeviceInfoList getRegisteredDevices() const override;
|
||||
virtual void unRegisterDevicesFor(const BlackMisc::CIdentifier &identifier) override;
|
||||
//! @}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user