PipeWire  0.2.0
pw_global Class Reference

A global object visible to remote clients. More...

Public Member Functions

struct pw_globalpw_global_new (struct pw_core *core, uint32_t type, uint32_t version, struct pw_properties *properties, void *object)
 Create a new global. More...
 
int pw_global_register (struct pw_global *global, struct pw_client *owner, struct pw_global *parent)
 register a global to the core registry More...
 
int pw_global_bind (struct pw_global *global, struct pw_client *client, uint32_t permissions, uint32_t version, uint32_t id)
 Bind to a global. More...
 
void pw_global_destroy (struct pw_global *global)
 Destroy a global. More...
 

Detailed Description

A global object visible to remote clients.

A global object is visible to remote clients and represents a resource that can be used or inspected.

See Remote API

Member Function Documentation

◆ pw_global_bind()

int pw_global_bind ( struct pw_global global,
struct pw_client client,
uint32_t  permissions,
uint32_t  version,
uint32_t  id 
)

Bind to a global.

Parameters
globalthe global to bind to
clientthe client that binds
versionthe version
idthe id

Let client bind to global with the given version and id. After binding, the client and the global object will be able to exchange messages.

References pw_core_resource_error.

◆ pw_global_destroy()

◆ pw_global_new()

struct pw_global * pw_global_new ( struct pw_core core,
uint32_t  type,
uint32_t  version,
struct pw_properties properties,
void *  object 
)

Create a new global.

Parameters
corea core object
typethe type of the global
versionthe version of the type
propertiesextra properties
binda function to bind to this global
objectthe associated object
Returns
a result global

References pw_log::pw_log_debug(), and impl::this.

Referenced by pw_client_register(), pw_core::pw_core_new(), pw_factory_register(), pw_link_register(), and pw_port_register().

◆ pw_global_register()

int pw_global_register ( struct pw_global global,
struct pw_client owner,
struct pw_global parent 
)

register a global to the core registry

Parameters
globala global to add
owneran optional owner client of the global
parentan optional parent of the global
Returns
0 on success < 0 errno value on failure

References pw_global_get_permissions(), pw_log::pw_log_debug(), pw_map::pw_map_insert_new(), PW_PERM_IS_R, and pw_registry_resource_global.


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