PipeWire: global.h Source File

PipeWire 0.1.7

global.h
Go to the documentation of this file.
1 /* PipeWire
2 * Copyright (C) 2017 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_GLOBAL_H__
21 #define __PIPEWIRE_GLOBAL_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
52 struct pw_global;
53
54 #include <pipewire/core.h>
55 #include <pipewire/client.h>
56
58 typedef int (*pw_bind_func_t) (struct pw_global *global,
59 struct pw_client *client,
60 uint32_t permissions,
61 uint32_t version,
62 uint32_t id );
63
65 struct pw_global *
66 pw_core_add_global(struct pw_core *core,
67 struct pw_client *owner,
68 struct pw_global *parent,
69 uint32_t type,
70 uint32_t version,
71 pw_bind_func_t bind,
72 void *object);
73
75 uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_client *client);
76
78 struct pw_core *pw_global_get_core(struct pw_global *global);
79
81 struct pw_client *pw_global_get_owner(struct pw_global *global);
82
84 struct pw_global *pw_global_get_parent(struct pw_global *global);
85
87 uint32_t pw_global_get_type(struct pw_global *global);
88
90 uint32_t pw_global_get_version(struct pw_global *global);
91
94 void *pw_global_get_object(struct pw_global *global);
95
97 uint32_t pw_global_get_id(struct pw_global *global);
98
100 int pw_global_bind(struct pw_global *global,
101 struct pw_client *client,
102 uint32_t permissions,
103 uint32_t version,
104 uint32_t id);
105
107 void pw_global_destroy(struct pw_global *global);
108
109 #ifdef __cplusplus
110 }
111 #endif
112
113 #endif /* __PIPEWIRE_GLOBAL_H__ */
pw_global_get_parent
struct pw_global * pw_global_get_parent(struct pw_global *global)
Get the parent of a global.
Definition: global.c:129
core.h
pw_core
the core PipeWire object
pw_bind_func_t
int(* pw_bind_func_t)(struct pw_global *global, struct pw_client *client, uint32_t permissions, uint32_t version, uint32_t id)
The function to let a client bind to a global.
Definition: global.h:58
pw_global_get_version
uint32_t pw_global_get_version(struct pw_global *global)
Get the global version.
Definition: global.c:139
pw_global_get_type
uint32_t pw_global_get_type(struct pw_global *global)
Get the global type.
Definition: global.c:134
pw_core::pw_core_add_global
struct pw_global * pw_core_add_global(struct pw_core *core, struct pw_client *owner, struct pw_global *parent, uint32_t type, uint32_t version, pw_bind_func_t bind, void *object)
Create and add a new global to the core.
Definition: global.c:63
pw_global_get_id
uint32_t pw_global_get_id(struct pw_global *global)
Get the unique id of the global.
Definition: global.c:149
pw_global::pw_global_bind
int pw_global_bind(struct pw_global *global, struct pw_client *client, uint32_t permissions, uint32_t version, uint32_t id)
Bind to a global.
Definition: global.c:168
pw_client
PipeWire client object class.
pw_global::pw_global_destroy
void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:204
pw_global_get_permissions
uint32_t pw_global_get_permissions(struct pw_global *global, struct pw_client *client)
Get the permissions of the global for a given client.
Definition: global.c:38
pw_global_get_core
struct pw_core * pw_global_get_core(struct pw_global *global)
Get the core object of this global.
Definition: global.c:118
pw_global_get_owner
struct pw_client * pw_global_get_owner(struct pw_global *global)
Get the owner of the global.
Definition: global.c:124
pw_global
A global object visible to remote clients.
pw_global_get_object
void * pw_global_get_object(struct pw_global *global)
Get the object associated with the global.
Definition: global.c:144
client.h