20 #ifndef __PIPEWIRE_CLIENT_H__ 21 #define __PIPEWIRE_CLIENT_H__ 31 #include <sys/socket.h> 33 #include <spa/utils/hook.h> 53 #define PW_TYPE__Client PW_TYPE_OBJECT_BASE "Client" 54 #define PW_TYPE_CLIENT_BASE PW_TYPE__Client ":" 88 #define PW_VERSION_CLIENT_EVENTS 0 117 #define PW_CLIENT_PROP_PROTOCOL "pipewire.protocol" 119 #define PW_CLIENT_PROP_UCRED_PID "pipewire.ucred.pid" 120 #define PW_CLIENT_PROP_UCRED_UID "pipewire.ucred.uid" 121 #define PW_CLIENT_PROP_UCRED_GID "pipewire.ucred.gid" 128 size_t user_data_size );
171 struct spa_hook *listener,
const struct pw_client_info * pw_client_get_info(struct pw_client *client)
Get the client information.
Definition: client.c:338
void(* resource_impl)(void *data, struct pw_resource *resource)
emited when an implementation is set on a resource.
Definition: client.h:105
A collection of key/value pairs.
Definition: properties.h:38
void pw_client_destroy(struct pw_client *client)
Destroy a client object.
Definition: client.c:294
struct pw_resource * pw_client_get_core_resource(struct pw_client *client)
Get the client core resource.
Definition: client.c:249
void(* free)(void *data)
emited right before the client is freed
Definition: client.h:95
void(* resource_removed)(void *data, struct pw_resource *resource)
emited when a resource is removed
Definition: client.h:108
const struct ucred * pw_client_get_ucred(struct pw_client *client)
Get the ucred from a client or NULL when not specified/valid.
Definition: client.c:269
void pw_client_set_busy(struct pw_client *client, bool busy)
Mark the client busy.
Definition: client.c:502
void pw_client_add_listener(struct pw_client *client, struct spa_hook *listener, const struct pw_client_events *events, void *data)
listen to events from this client
Definition: client.c:330
void(* busy_changed)(void *data, bool busy)
emited when the client becomes busy processing an asynchronous message.
Definition: client.h:113
const struct pw_properties * pw_client_get_properties(struct pw_client *client)
Get the client properties.
Definition: client.c:264
void(* info_changed)(void *data, struct pw_client_info *info)
emited when the client info changed
Definition: client.h:98
struct pw_client * pw_client_new(struct pw_core *core, struct ucred *ucred, struct pw_properties *properties, size_t user_data_size)
Make a new client object.
Definition: client.c:151
struct pw_global * pw_client_get_global(struct pw_client *client)
Get the global associated with this client.
Definition: client.c:259
void * pw_client_get_user_data(struct pw_client *client)
Get the client user data.
Definition: client.c:277
struct pw_core * pw_client_get_core(struct pw_client *client)
Get the core used to create this client.
Definition: client.c:244
The client information.
Definition: introspect.h:125
PipeWire client object class.
void(* destroy)(void *data)
emited when the client is destroyed
Definition: client.h:92
uint32_t version
Definition: client.h:89
A global object visible to remote clients.
int pw_client_register(struct pw_client *client, struct pw_client *owner, struct pw_global *parent, struct pw_properties *properties)
Finish configuration and register a client.
Definition: client.c:218
void(* resource_added)(void *data, struct pw_resource *resource)
emited when a new resource is added for client
Definition: client.h:101
struct pw_resource * pw_client_find_resource(struct pw_client *client, uint32_t id)
Get a resource with the given id.
Definition: client.c:254
int pw_client_update_properties(struct pw_client *client, const struct spa_dict *dict)
Update client properties.
Definition: client.c:354
The events that a client can emit.
Definition: client.h:87
int pw_client_update_permissions(struct pw_client *client, const struct spa_dict *dict)
Update the client permissions.
Definition: client.c:441