]> code.delx.au - pulseaudio/commitdiff
pulse: share private enum values with client side
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Fri, 16 Jan 2009 13:53:27 +0000 (15:53 +0200)
committerMarc-André Lureau <marcandre.lureau@gmail.com>
Mon, 19 Jan 2009 22:16:18 +0000 (00:16 +0200)
src/pulse/def.h
src/pulsecore/sink.h
src/pulsecore/source.h

index 7dc753f91181d0ce96ae609a1939f21e8d6127fd..8e8857c11cbbb186e560f23cccd5e99c5b25eefa 100644 (file)
@@ -624,9 +624,17 @@ typedef enum pa_sink_state { /* enum serialized in u8 */
     PA_SINK_IDLE = 1,
     /**< When idle, the sink is playing but there is no non-corked sink-input attached to it \since 0.9.15 */
 
-    PA_SINK_SUSPENDED = 2
+    PA_SINK_SUSPENDED = 2,
     /**< When suspended, actual sink access can be closed, for instance \since 0.9.15 */
 
+    /* *** PRIVATE: server-side values *** */
+
+    PA_SINK_INIT = -2,
+    /* Initialization state */
+
+    PA_SINK_UNLINKED = -3
+    /* The state when the sink is getting unregistered and removed from client access */
+
 } pa_sink_state_t;
 
 /** Returns non-zero if sink is playing: running or idle. \since 0.9.15 */
@@ -685,9 +693,17 @@ typedef enum pa_source_state {
     PA_SOURCE_IDLE = 1,
     /**< When idle, the source is still recording but there is no non-corked source-output \since 0.9.15 */
 
-    PA_SOURCE_SUSPENDED = 2
+    PA_SOURCE_SUSPENDED = 2,
     /**< When suspended, actual source access can be closed, for instance \since 0.9.15 */
 
+    /* *** PRIVATE: server-side values *** */
+
+    PA_SOURCE_INIT = -2,
+    /* Initialization state */
+
+    PA_SOURCE_UNLINKED = -3
+    /* The state when the source is getting unregistered and removed from client access */
+
 } pa_source_state_t;
 
 /** Returns non-zero if source is recording: running or idle. \since 0.9.15 */
index 382b2d0e9db9767ee84003866e3cfc0b62a22bfa..89ed6d4db42d9f6618536298604284312f176da5 100644 (file)
@@ -43,15 +43,6 @@ typedef struct pa_sink pa_sink;
 
 #define PA_MAX_INPUTS_PER_SINK 32
 
-/* anonymous enum extending pa_sink_state_t */
-enum {
-    PA_SINK_INIT = -2,
-    /* Initialization state */
-
-    PA_SINK_UNLINKED = -3
-    /* The state when the sink is getting unregistered and removed from client access */
-};
-
 /* Returns true if sink is linked: registered and accessible from client side. */
 static inline pa_bool_t PA_SINK_IS_LINKED(pa_sink_state_t x) {
     return x == PA_SINK_RUNNING || x == PA_SINK_IDLE || x == PA_SINK_SUSPENDED;
index 369da435bb8dc46b7c482ff0ecb7a25a5c02f88a..336599d6219e47b545e2780afa79a12d094de3f8 100644 (file)
@@ -45,15 +45,6 @@ typedef struct pa_source pa_source;
 
 #define PA_MAX_OUTPUTS_PER_SOURCE 32
 
-/* 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;