PipeWire 1.2.1
Loading...
Searching...
No Matches
security-context.h
Go to the documentation of this file.
1/* PipeWire */
2/* SPDX-FileCopyrightText: Copyright © 2019 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef PIPEWIRE_EXT_SECURITY_CONTEXT_H
6#define PIPEWIRE_EXT_SECURITY_CONTEXT_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12#include <spa/utils/defs.h>
13
22#define PW_TYPE_INTERFACE_SecurityContext PW_TYPE_INFO_INTERFACE_BASE "SecurityContext"
23
24#define PW_SECURITY_CONTEXT_PERM_MASK PW_PERM_RWX
25
26#define PW_VERSION_SECURITY_CONTEXT 3
28
29#define PW_EXTENSION_MODULE_SECURITY_CONTEXT PIPEWIRE_MODULE_PREFIX "module-security-context"
31#define PW_SECURITY_CONTEXT_EVENT_NUM 0
32
36#define PW_VERSION_SECURITY_CONTEXT_EVENTS 0
37 uint32_t version;
38};
39
40#define PW_SECURITY_CONTEXT_METHOD_ADD_LISTENER 0
41#define PW_SECURITY_CONTEXT_METHOD_CREATE 1
42#define PW_SECURITY_CONTEXT_METHOD_NUM 2
43
46#define PW_VERSION_SECURITY_CONTEXT_METHODS 0
47 uint32_t version;
49 int (*add_listener) (void *object,
50 struct spa_hook *listener,
51 const struct pw_security_context_events *events,
52 void *data);
53
91 int (*create) (void *object,
92 int listen_fd,
93 int close_fd,
94 const struct spa_dict *props);
95};
96
97
98#define pw_security_context_method(o,method,version,...) \
99({ \
100 int _res = -ENOTSUP; \
101 spa_interface_call_res((struct spa_interface*)o, \
102 struct pw_security_context_methods, _res, \
103 method, version, ##__VA_ARGS__); \
104 _res; \
105})
107#define pw_security_context_add_listener(c,...) pw_security_context_method(c,add_listener,0,__VA_ARGS__)
108#define pw_security_context_create(c,...) pw_security_context_method(c,create,0,__VA_ARGS__)
109
114#ifdef __cplusplus
115} /* extern "C" */
116#endif
117
118#endif /* PIPEWIRE_EXT_SECURITY_CONTEXT_H */
spa/utils/defs.h
Security Context events
Definition security-context.h:45
uint32_t version
Definition security-context.h:48
Security Context methods
Definition security-context.h:59
uint32_t version
Definition security-context.h:62
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_security_context_events *events, void *data)
Definition security-context.h:64
int(* create)(void *object, int listen_fd, int close_fd, const struct spa_dict *props)
Create a new security context.
Definition security-context.h:106
Definition dict.h:39
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:350