Skip to content
Snippets Groups Projects
Commit 88839b9b authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

Sync DBus API

parent 268bf59e
No related branches found
No related tags found
No related merge requests found
......@@ -168,27 +168,27 @@ bool AudioSettingsModel::isCaptureMuted() const
int AudioSettingsModel::playbackVolume() const
{
CallManagerInterface& callManager = DBus::CallManager::instance();
return callManager.getVolume(DeviceKey::PLAYBACK)*100;
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
return configurationManager.getVolume(DeviceKey::PLAYBACK)*100;
}
int AudioSettingsModel::captureVolume() const
{
CallManagerInterface& callManager = DBus::CallManager::instance();
return callManager.getVolume(DeviceKey::CAPTURE)*100;
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
return configurationManager.getVolume(DeviceKey::CAPTURE)*100;
}
void AudioSettingsModel::setPlaybackVolume(int volume)
{
CallManagerInterface& callManager = DBus::CallManager::instance();
callManager.setVolume(DeviceKey::PLAYBACK,volume/100.0f);
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
configurationManager.setVolume(DeviceKey::PLAYBACK,volume/100.0f);
emit playbackVolumeChanged(volume);
}
void AudioSettingsModel::setCaptureVolume(int volume)
{
CallManagerInterface& callManager = DBus::CallManager::instance();
callManager.setVolume(DeviceKey::CAPTURE,volume/100.0f);
ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance();
configurationManager.setVolume(DeviceKey::CAPTURE,volume/100.0f);
emit captureVolumeChanged(volume);
}
......
......@@ -157,40 +157,6 @@
<arg type="i" name="type" direction="in"/>
</method>
<method name="setVolume" tp:name-for-bindings="setVolume">
<tp:docstring>
<p>Sets the volume using a linear scale [0,100].</p>
<tp:rationale>Pulseaudio has its own mechanism to modify application volume. This method is enabled only if the ALSA API is used.</tp:rationale>
</tp:docstring>
<arg type="s" name="device" direction="in">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value" direction="in">
<tp:docstring>
The volume value (between 0 and 100)
</tp:docstring>
</arg>
</method>
<method name="getVolume" tp:name-for-bindings="getVolume">
<tp:docstring>
<p>Return the volume value of the given device on a linear scale [0,100].</p>
<tp:rationale>Only enabled if the ALSA API is used, Pulseaudio has its own mechanism to modify application volume.</tp:rationale>
</tp:docstring>
<arg type="s" name="device" direction="in">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value" direction="out">
<tp:docstring>
The volume value (between 0 and 100)
</tp:docstring>
</arg>
</method>
<method name="joinParticipant" tp:name-for-bindings="joinParticipant">
<tp:added version="0.9.7"/>
<tp:docstring>
......@@ -681,23 +647,6 @@
</arg>
</signal>
<signal name="volumeChanged" tp:name-for-bindings="volumeChanged">
<tp:docstring>
<p>Notify clients of a volume level change.</p>
<p>This signal occurs only if ALSA is enabled since Pulseaudio streams are managed externally. </p>
</tp:docstring>
<arg type="s" name="device">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value">
<tp:docstring>
The new volume value
</tp:docstring>
</arg>
</signal>
<signal name="transferSucceeded" tp:name-for-bindings="transferSucceeded">
<tp:docstring>
<p>Transfer has been successfully
......
......@@ -216,6 +216,58 @@
</arg>
</method>
<method name="setVolume" tp:name-for-bindings="setVolume">
<tp:docstring>
<p>Sets the volume using a linear scale [0,100].</p>
<tp:rationale>Pulseaudio has its own mechanism to modify application volume. This method is enabled only if the ALSA API is used.</tp:rationale>
</tp:docstring>
<arg type="s" name="device" direction="in">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value" direction="in">
<tp:docstring>
The volume value (between 0 and 100)
</tp:docstring>
</arg>
</method>
<method name="getVolume" tp:name-for-bindings="getVolume">
<tp:docstring>
<p>Return the volume value of the given device on a linear scale [0,100].</p>
<tp:rationale>Only enabled if the ALSA API is used, Pulseaudio has its own mechanism to modify application volume.</tp:rationale>
</tp:docstring>
<arg type="s" name="device" direction="in">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value" direction="out">
<tp:docstring>
The volume value (between 0 and 100)
</tp:docstring>
</arg>
</method>
<signal name="volumeChanged" tp:name-for-bindings="volumeChanged">
<tp:docstring>
<p>Notify clients of a volume level change.</p>
<p>This signal occurs only if ALSA is enabled since Pulseaudio streams are managed externally. </p>
</tp:docstring>
<arg type="s" name="device">
<tp:docstring>
The device: mic or speaker
</tp:docstring>
</arg>
<arg type="d" name="value">
<tp:docstring>
The new volume value
</tp:docstring>
</arg>
</signal>
<method name="muteCapture" tp:name-for-bindings="muteCapture">
<arg type="b" name="mute" direction="in">
<tp:docstring>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment