PipeWire  0.1.4
pw_client Class Reference

PipeWire client object class. More...

Collaboration diagram for pw_client:

Public Member Functions

struct pw_clientpw_client_new (struct pw_core *core, struct pw_global *parent, struct ucred *ucred, struct pw_properties *properties, size_t user_data_size)
 Make a new client object. More...
 
void pw_client_destroy (struct pw_client *client)
 Destroy a client object. More...
 
void pw_client_update_properties (struct pw_client *client, const struct spa_dict *dict)
 Update client properties. More...
 

Data Fields

struct pw_corecore
 core object More...
 
struct spa_list link
 link in core object client list More...
 
struct pw_globalglobal
 global object created for this client More...
 
struct pw_propertiesproperties
 Client properties. More...
 
struct pw_client_info info
 client info More...
 
bool ucred_valid
 if the ucred member is valid More...
 
struct ucred ucred
 ucred information More...
 
struct pw_resourcecore_resource
 core resource object More...
 
struct pw_map objects
 list of resource objects More...
 
uint32_t n_types
 number of client types More...
 
struct pw_map types
 map of client types More...
 
struct spa_list resource_list
 The list of resources of this client. More...
 
bool busy
 
struct spa_hook_list listener_list
 
struct pw_protocolprotocol
 protocol in use More...
 
struct spa_list protocol_link
 link in the protocol client_list More...
 
void * user_data
 extra user data More...
 

Detailed Description

PipeWire client object class.

The client object represents a client connection with the PipeWire server.

Each client has its own list of resources it is bound to along with a mapping between the client types and server types.

Member Function Documentation

◆ pw_client_destroy()

void pw_client_destroy ( struct pw_client client)

Destroy a client object.

Parameters
clientthe client to destroy

References global, link, listener_list, objects, pw_global_destroy(), pw_resource_destroy(), and resource_list.

◆ pw_client_new()

struct pw_client * pw_client_new ( struct pw_core core,
struct pw_global parent,
struct ucred ucred,
struct pw_properties properties,
size_t  user_data_size 
)

Make a new client object.

Parameters
corea pw_core object to register the client with
ucreda ucred structure or NULL when unknown
propertiesoptional client properties, ownership is taken
Returns
a newly allocated client object

References pw_type::client, pw_core::client_list, pw_properties::dict, pw_global::id, link, pw_core_add_global(), PW_VERSION_CLIENT, impl::this, and pw_core::type.

◆ pw_client_update_properties()

void pw_client_update_properties ( struct pw_client client,
const struct spa_dict *  dict 
)

Update client properties.

Parameters
clientthe client
dicta spa_dict with properties

Add all properties in dict to the client properties. Existing properties are overwritten. Items can be removed by setting the value to NULL.

References pw_client_info::change_mask, pw_properties::dict, info, pw_resource::link, listener_list, properties, pw_client_info::props, pw_client_resource_info, pw_properties_new_dict(), pw_properties_set(), and resource_list.

Field Documentation

◆ busy

bool pw_client::busy

Referenced by pw_client_set_busy().

◆ core

struct pw_core* pw_client::core

◆ core_resource

struct pw_resource* pw_client::core_resource

◆ global

struct pw_global* pw_client::global

global object created for this client

Referenced by pw_client_destroy(), pw_client_get_global(), and pw_core::pw_core_add_global().

◆ info

struct pw_client_info pw_client::info

client info

Referenced by pw_client_get_info(), and pw_client_update_properties().

◆ link

struct spa_list pw_client::link

link in core object client list

Referenced by pw_client_destroy(), and pw_client_new().

◆ listener_list

◆ n_types

uint32_t pw_client::n_types

number of client types

◆ objects

struct pw_map pw_client::objects

◆ properties

struct pw_properties* pw_client::properties

Client properties.

Referenced by pw_client_get_properties(), and pw_client_update_properties().

◆ protocol

struct pw_protocol* pw_client::protocol

protocol in use

Referenced by pw_resource_get_protocol(), and pw_resource_new().

◆ protocol_link

struct spa_list pw_client::protocol_link

link in the protocol client_list

◆ resource_list

struct spa_list pw_client::resource_list

The list of resources of this client.

Referenced by pw_client_destroy(), and pw_client_update_properties().

◆ types

struct pw_map pw_client::types

map of client types

◆ ucred

struct ucred pw_client::ucred

ucred information

Referenced by pw_client_get_ucred().

◆ ucred_valid

bool pw_client::ucred_valid

if the ucred member is valid

Referenced by pw_client_get_ucred().

◆ user_data

void* pw_client::user_data

extra user data

Referenced by pw_client_get_user_data().


The documentation for this class was generated from the following files: