aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcharles kerr <charlesk@canonical.com>2015-12-20 14:47:19 -0600
committercharles kerr <charlesk@canonical.com>2015-12-20 14:47:19 -0600
commit46d37bcc5c37ca887ed27751b07e61a6a7d3fcf7 (patch)
tree2a6adc557de1be04876fcb4aa9e4d8a58783151f /src
parentf2b76dc9e8cf64ccf23f366fbf44077be24ab1b1 (diff)
downloadayatana-indicator-sound-46d37bcc5c37ca887ed27751b07e61a6a7d3fcf7.tar.gz
ayatana-indicator-sound-46d37bcc5c37ca887ed27751b07e61a6a7d3fcf7.tar.bz2
ayatana-indicator-sound-46d37bcc5c37ca887ed27751b07e61a6a7d3fcf7.zip
make more of volume-control-pulse's pulse functions 'public static'
This time it's stream_restore_get_object_path(), again for use by volume-warning
Diffstat (limited to 'src')
-rw-r--r--src/volume-control-pulse.vala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/volume-control-pulse.vala b/src/volume-control-pulse.vala
index b1b7c73..fae113d 100644
--- a/src/volume-control-pulse.vala
+++ b/src/volume-control-pulse.vala
@@ -693,7 +693,7 @@ public class VolumeControlPulse : VolumeControl
}
}
- public static DBusConnection create_pulse_dbus_connection()
+ public static DBusConnection? create_pulse_dbus_connection()
{
unowned string pulse_dbus_server_env = Environment.get_variable ("PULSE_DBUS_SERVER");
string address;
@@ -749,10 +749,10 @@ public class VolumeControlPulse : VolumeControl
/* Check if the 4 currently supported media roles are already available in StreamRestore
* Roles: multimedia, alert, alarm and phone */
- _objp_role_multimedia = stream_restore_get_object_path ("sink-input-by-media-role:multimedia");
- _objp_role_alert = stream_restore_get_object_path ("sink-input-by-media-role:alert");
- _objp_role_alarm = stream_restore_get_object_path ("sink-input-by-media-role:alarm");
- _objp_role_phone = stream_restore_get_object_path ("sink-input-by-media-role:phone");
+ _objp_role_multimedia = stream_restore_get_object_path (_pconn, "sink-input-by-media-role:multimedia");
+ _objp_role_alert = stream_restore_get_object_path (_pconn, "sink-input-by-media-role:alert");
+ _objp_role_alarm = stream_restore_get_object_path (_pconn, "sink-input-by-media-role:alarm");
+ _objp_role_phone = stream_restore_get_object_path (_pconn, "sink-input-by-media-role:phone");
/* Only use stream restore if every used role is available */
if (_objp_role_multimedia != null && _objp_role_alert != null && _objp_role_alarm != null && _objp_role_phone != null) {
@@ -763,10 +763,10 @@ public class VolumeControlPulse : VolumeControl
}
}
- private string? stream_restore_get_object_path (string name) {
+ public static string? stream_restore_get_object_path (DBusConnection pconn, string name) {
string? objp = null;
try {
- Variant props_variant = _pconn.call_sync ("org.PulseAudio.Ext.StreamRestore1",
+ Variant props_variant = pconn.call_sync ("org.PulseAudio.Ext.StreamRestore1",
"/org/pulseaudio/stream_restore1", "org.PulseAudio.Ext.StreamRestore1",
"GetEntryByName", new Variant ("(s)", name), null, DBusCallFlags.NONE, -1);
/* Workaround for older versions of vala that don't provide get_objv */