PipeWire: pw_security_context_methods Struct Reference

PipeWire 1.4.2 |

Loading...
Searching...
No Matches
Data Fields
pw_security_context_methods Struct Reference
Security Context

Security Context methods More...

`#include <pipewire/extensions/security-context.h>`

## Data Fields
uint32_t | version
int(* | add_listener )(void *object, struct spa_hook *listener, const struct pw_security_context_events *events, void *data)
int(* | create )(void *object, int listen_fd, int close_fd, const struct spa_dict *props)
| Create a new security context.

## Detailed Description

Security Context methods

## Field Documentation

## ◆ version

uint32_t pw_security_context_methods::version

## ◆ add_listener

int(* pw_security_context_methods::add_listener) (void *object, struct spa_hook *listener, const struct pw_security_context_events *events, void *data)

## ◆ create

int(* pw_security_context_methods::create) (void *object, int listen_fd, int close_fd, const struct spa_dict *props)

Create a new security context.

Creates a new security context with a socket listening FD. PipeWire will accept new client connections on listen_fd.

listen_fd must be ready to accept new connections when this request is sent by the client. In other words, the client must call bind(2) and listen(2) before sending the FD.

close_fd is a FD closed by the client when PipeWire should stop accepting new connections on listen_fd.

PipeWire must continue to accept connections on listen_fd when the client which created the security context disconnects.

After sending this request, closing listen_fd and close_fd remains the only valid operation on them.

Parameters

  listen_fd | the fd to listen on for new connections
  close_fd | the fd used to stop listening
  props | extra properties. These will be copied on the client that connects through this context.

Some properties to set:

- pipewire.sec.engine with the engine name.
- pipewire.sec.app-id with the application id, this is an opaque, engine specific id for an application
- pipewire.sec.instance-id with the instance id, this is an opaque, engine specific id for a running instance of an application.

See https://gitlab.freedesktop.org/wayland/wayland-protocols/-/blob/main/staging/security-context/engines.md For a list of engine names and the properties to set.

This requires X and W permissions on the security_context.

The documentation for this struct was generated from the following file:

- pipewire/extensions/security-context.h