PipeWire 0.2.5

work-queue.h
Go to the documentation of this file.
1 /* PipeWire
2 * Copyright (C) 2016 Wim Taymans <wim.taymans@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef __PIPEWIRE_WORK_QUEUE_H__
21 #define __PIPEWIRE_WORK_QUEUE_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
31 struct pw_work_queue;
32
33 #include <pipewire/loop.h>
34
35 typedef void (*pw_work_func_t) (void *obj, void *data, int res, uint32_t id);
36
37 struct pw_work_queue *
38 pw_work_queue_new(struct pw_loop *loop);
39
40 void
41 pw_work_queue_destroy(struct pw_work_queue *queue);
42
43 uint32_t
44 pw_work_queue_add(struct pw_work_queue *queue,
45 void *obj, int res,
46 pw_work_func_t func, void *data);
47
48 int
49 pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id);
50
51 int
52 pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int res);
53
54 #ifdef __cplusplus
55 }
56 #endif
57
58 #endif /* __PIPEWIRE_WORK_QUEUE_H__ */
pw_work_queue
PipeWire work queue object.
pw_loop
PipeWire loop object provides an implementation of the spa loop interfaces.
Definition: loop.h:37
pw_work_queue::pw_work_queue_destroy
void pw_work_queue_destroy(struct pw_work_queue *queue)
Destroy a work queue.
Definition: work-queue.c:110
pw_work_queue::pw_work_queue_cancel
int pw_work_queue_cancel(struct pw_work_queue *queue, void *obj, uint32_t id)
Cancel a work item.
Definition: work-queue.c:189
pw_work_queue::pw_work_queue_add
uint32_t pw_work_queue_add(struct pw_work_queue *queue, void *obj, int res, pw_work_func_t func, void *data)
Add an item to the work queue.
Definition: work-queue.c:140
loop.h
pw_work_queue::pw_work_queue_complete
int pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int res)
Complete a work item.
Definition: work-queue.c:220
pw_work_func_t
void(* pw_work_func_t)(void *obj, void *data, int res, uint32_t id)
Definition: work-queue.h:35
pw_work_queue::pw_work_queue_new
struct pw_work_queue * pw_work_queue_new(struct pw_loop *loop)
Create a new pw_work_queue.
Definition: work-queue.c:88