aboutsummaryrefslogtreecommitdiffstats
path: root/pulse.h
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2014-01-16 13:18:58 -0500
committerDave Reisner <dreisner@archlinux.org>2014-05-06 13:27:16 -0400
commitec1ce20be1dc30748c31fc18afc1b4ca1532852e (patch)
tree4a14abdab58ac12f31d6200d4d55da50ecb571fd /pulse.h
parent031743a96cf602ec20efaf6cbc292c5fd8d023bb (diff)
downloadmirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.tar.gz
mirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.tar.bz2
mirror-ponymix-ec1ce20be1dc30748c31fc18afc1b4ca1532852e.zip
add is-available verb
Diffstat (limited to 'pulse.h')
-rw-r--r--pulse.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pulse.h b/pulse.h
index 2d980f0..7c17baf 100644
--- a/pulse.h
+++ b/pulse.h
@@ -48,6 +48,12 @@ struct Operations {
class Device {
public:
+ typedef enum {
+ AVAILABLE_UNKNOWN = 0,
+ AVAILABLE_NO,
+ AVAILABLE_YES,
+ } Availability;
+
Device(const pa_source_info* info);
Device(const pa_sink_info* info);
Device(const pa_sink_input_info* info);
@@ -77,6 +83,7 @@ class Device {
int balance_;
uint32_t card_idx_;
Operations ops_;
+ Device::Availability available_ = Device::AVAILABLE_UNKNOWN;
};
class Card {
@@ -198,6 +205,10 @@ class PulseClient {
bool IsMuted(const Device& device) const { return device.mute_; };
bool SetMute(Device& device, bool mute);
+ Device::Availability Availability(const Device& device) const {
+ return device.available_;
+ }
+
// Set the profile for a card by name.
bool SetProfile(Card& card, const string& profile);