summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/source.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2009-01-15 17:16:31 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2009-01-20 00:16:18 +0200
commit9c4f8e627a70fc610a81da2703eeddfde4a7e4fa (patch)
tree8b8096c7505eb452ffa270116db742eecaca8972 /src/pulsecore/source.h
parentf83111dd1710d7e0a3240879217e6d0c783c4a4b (diff)
pulse: introspect sink state
Diffstat (limited to 'src/pulsecore/source.h')
-rw-r--r--src/pulsecore/source.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h
index 48240996..369da435 100644
--- a/src/pulsecore/source.h
+++ b/src/pulsecore/source.h
@@ -45,18 +45,16 @@ typedef struct pa_source pa_source;
#define PA_MAX_OUTPUTS_PER_SOURCE 32
-typedef enum pa_source_state {
- PA_SOURCE_INIT,
- PA_SOURCE_RUNNING,
- PA_SOURCE_SUSPENDED,
- PA_SOURCE_IDLE,
- PA_SOURCE_UNLINKED
-} pa_source_state_t;
-
-static inline pa_bool_t PA_SOURCE_IS_OPENED(pa_source_state_t x) {
- return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE;
-}
+/* anonymous enum extending pa_source_state_t */
+enum {
+ PA_SOURCE_INIT = -2,
+ /* Initialization state */
+
+ PA_SOURCE_UNLINKED = -3
+ /* The state when the source is getting unregistered and removed from client access */
+};
+/* Returns true if source is linked: registered and accessible from client side. */
static inline pa_bool_t PA_SOURCE_IS_LINKED(pa_source_state_t x) {
return x == PA_SOURCE_RUNNING || x == PA_SOURCE_IDLE || x == PA_SOURCE_SUSPENDED;
}