mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Implement access control
Move send and dispatch functions to the implementation. This makes it possible to place an access check before sending and dispatching. Add module-access that allows to bind and notify on globals owned by the client.
This commit is contained in:
parent
a8964ca657
commit
ee0aa6a2ac
27 changed files with 819 additions and 220 deletions
|
|
@ -29,17 +29,14 @@ extern "C" {
|
|||
|
||||
typedef struct _PinosResource PinosResource;
|
||||
|
||||
#include <spa/include/spa/list.h>
|
||||
|
||||
#include <pinos/client/sig.h>
|
||||
|
||||
#include <pinos/server/core.h>
|
||||
|
||||
typedef void (*PinosDestroy) (void *object);
|
||||
|
||||
typedef SpaResult (*PinosSendFunc) (void *object,
|
||||
uint32_t id,
|
||||
uint32_t opcode,
|
||||
void *message,
|
||||
bool flush,
|
||||
void *data);
|
||||
|
||||
typedef SpaResult (*PinosDispatchFunc) (void *object,
|
||||
uint32_t opcode,
|
||||
void *message,
|
||||
|
|
@ -56,22 +53,25 @@ struct _PinosResource {
|
|||
void *object;
|
||||
PinosDestroy destroy;
|
||||
|
||||
PinosSendFunc send_func;
|
||||
void *send_data;
|
||||
PinosDispatchFunc dispatch_func;
|
||||
void *dispatch_data;
|
||||
|
||||
PINOS_SIGNAL (destroy_signal, (PinosListener *listener,
|
||||
PinosResource *resource));
|
||||
};
|
||||
|
||||
PinosResource * pinos_resource_new (PinosClient *client,
|
||||
uint32_t id,
|
||||
uint32_t type,
|
||||
void *object,
|
||||
PinosDestroy destroy);
|
||||
PinosResource * pinos_resource_new (PinosClient *client,
|
||||
uint32_t id,
|
||||
uint32_t type,
|
||||
void *object,
|
||||
PinosDestroy destroy);
|
||||
SpaResult pinos_resource_destroy (PinosResource *resource);
|
||||
|
||||
void pinos_resource_set_dispatch (PinosResource *resource,
|
||||
PinosDispatchFunc func,
|
||||
void *data);
|
||||
|
||||
SpaResult pinos_resource_dispatch (PinosResource *resource,
|
||||
uint32_t opcode,
|
||||
void *message);
|
||||
|
||||
SpaResult pinos_resource_send_message (PinosResource *resource,
|
||||
uint32_t opcode,
|
||||
void *message,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue