]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/pstream.c
Remove pa_bool_t and replace it with bool.
[pulseaudio] / src / pulsecore / pstream.c
index 6cf4394c3b2ea49f5fc89e2cfbd19861e985abd5..190fc9a33a4045cf15520054658fe7ae14000358 100644 (file)
@@ -94,7 +94,7 @@ struct item_info {
     /* packet info */
     pa_packet *packet;
 #ifdef HAVE_CREDS
-    pa_bool_t with_creds;
+    bool with_creds;
     pa_creds creds;
 #endif
 
@@ -117,7 +117,7 @@ struct pa_pstream {
 
     pa_queue *send_queue;
 
-    pa_bool_t dead;
+    bool dead;
 
     struct {
         union {
@@ -140,7 +140,7 @@ struct pa_pstream {
         size_t index;
     } read;
 
-    pa_bool_t use_shm;
+    bool use_shm;
     pa_memimport *import;
     pa_memexport *export;
 
@@ -166,7 +166,7 @@ struct pa_pstream {
 
 #ifdef HAVE_CREDS
     pa_creds read_creds, write_creds;
-    pa_bool_t read_creds_valid, send_creds_now;
+    bool read_creds_valid, send_creds_now;
 #endif
 };
 
@@ -241,7 +241,7 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
     PA_REFCNT_INIT(p);
     p->io = io;
     pa_iochannel_set_callback(io, io_callback, p);
-    p->dead = FALSE;
+    p->dead = false;
 
     p->mainloop = m;
     p->defer_event = m->defer_new(m, defer_callback, p);
@@ -271,7 +271,7 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
 
     p->mempool = pool;
 
-    p->use_shm = FALSE;
+    p->use_shm = false;
     p->export = NULL;
 
     /* We do importing unconditionally */
@@ -281,8 +281,8 @@ pa_pstream *pa_pstream_new(pa_mainloop_api *m, pa_iochannel *io, pa_mempool *poo
     pa_iochannel_socket_set_sndbuf(io, pa_mempool_block_size_max(p->mempool));
 
 #ifdef HAVE_CREDS
-    p->send_creds_now = FALSE;
-    p->read_creds_valid = FALSE;
+    p->send_creds_now = false;
+    p->read_creds_valid = false;
 #endif
     return p;
 }
@@ -385,7 +385,7 @@ void pa_pstream_send_memblock(pa_pstream*p, uint32_t channel, int64_t offset, pa
         i->offset = offset;
         i->seek_mode = seek_mode;
 #ifdef HAVE_CREDS
-        i->with_creds = FALSE;
+        i->with_creds = false;
 #endif
 
         pa_queue_push(p->send_queue, i);
@@ -412,7 +412,7 @@ void pa_pstream_send_release(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMRELEASE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_creds = FALSE;
+    item->with_creds = false;
 #endif
 
     pa_queue_push(p->send_queue, item);
@@ -449,7 +449,7 @@ void pa_pstream_send_revoke(pa_pstream *p, uint32_t block_id) {
     item->type = PA_PSTREAM_ITEM_SHMREVOKE;
     item->block_id = block_id;
 #ifdef HAVE_CREDS
-    item->with_creds = FALSE;
+    item->with_creds = false;
 #endif
 
     pa_queue_push(p->send_queue, item);
@@ -511,7 +511,7 @@ static void prepare_next_write_item(pa_pstream *p) {
 
     } else {
         uint32_t flags;
-        pa_bool_t send_payload = TRUE;
+        bool send_payload = true;
 
         pa_assert(p->write.current->type == PA_PSTREAM_ITEM_MEMBLOCK);
         pa_assert(p->write.current->chunk.memblock);
@@ -538,7 +538,7 @@ static void prepare_next_write_item(pa_pstream *p) {
                                  &length) >= 0) {
 
                 flags |= PA_FLAG_SHMDATA;
-                send_payload = FALSE;
+                send_payload = false;
 
                 shm_info[PA_PSTREAM_SHM_BLOCKID] = htonl(block_id);
                 shm_info[PA_PSTREAM_SHM_SHMID] = htonl(shm_id);
@@ -611,7 +611,7 @@ static int do_write(pa_pstream *p) {
         if ((r = pa_iochannel_write_with_creds(p->io, d, l, &p->write_creds)) < 0)
             goto fail;
 
-        p->send_creds_now = FALSE;
+        p->send_creds_now = false;
     } else
 #endif
 
@@ -674,7 +674,7 @@ static int do_read(pa_pstream *p) {
 
 #ifdef HAVE_CREDS
     {
-        pa_bool_t b = 0;
+        bool b = 0;
 
         if ((r = pa_iochannel_read_with_creds(p->io, d, l, &p->read_creds, &b)) <= 0)
             goto fail;
@@ -888,7 +888,7 @@ frame_done:
     p->read.data = NULL;
 
 #ifdef HAVE_CREDS
-    p->read_creds_valid = FALSE;
+    p->read_creds_valid = false;
 #endif
 
     return 0;
@@ -948,14 +948,14 @@ void pa_pstream_set_revoke_callback(pa_pstream *p, pa_pstream_block_id_cb_t cb,
     p->release_callback_userdata = userdata;
 }
 
-pa_bool_t pa_pstream_is_pending(pa_pstream *p) {
-    pa_bool_t b;
+bool pa_pstream_is_pending(pa_pstream *p) {
+    bool b;
 
     pa_assert(p);
     pa_assert(PA_REFCNT_VALUE(p) > 0);
 
     if (p->dead)
-        b = FALSE;
+        b = false;
     else
         b = p->write.current || !pa_queue_isempty(p->send_queue);
 
@@ -984,7 +984,7 @@ void pa_pstream_unlink(pa_pstream *p) {
     if (p->dead)
         return;
 
-    p->dead = TRUE;
+    p->dead = true;
 
     if (p->import) {
         pa_memimport_free(p->import);
@@ -1012,7 +1012,7 @@ void pa_pstream_unlink(pa_pstream *p) {
     p->receive_memblock_callback = NULL;
 }
 
-void pa_pstream_enable_shm(pa_pstream *p, pa_bool_t enable) {
+void pa_pstream_enable_shm(pa_pstream *p, bool enable) {
     pa_assert(p);
     pa_assert(PA_REFCNT_VALUE(p) > 0);
 
@@ -1032,7 +1032,7 @@ void pa_pstream_enable_shm(pa_pstream *p, pa_bool_t enable) {
     }
 }
 
-pa_bool_t pa_pstream_get_shm(pa_pstream *p) {
+bool pa_pstream_get_shm(pa_pstream *p) {
     pa_assert(p);
     pa_assert(PA_REFCNT_VALUE(p) > 0);