PipeWire  0.3.27
proxy.c File Reference
Include dependency graph for proxy.c:

Macros

#define NAME   "proxy"
 

Functions

int pw_proxy_init (struct pw_proxy *proxy, const char *type, uint32_t version)
 
SPA_EXPORT int pw_proxy_install_marshal (struct pw_proxy *this, bool implementor)
 Install a marshal function on a proxy. More...
 
SPA_EXPORT void * pw_proxy_get_user_data (struct pw_proxy *proxy)
 Get the user_data. More...
 
SPA_EXPORT uint32_t pw_proxy_get_id (struct pw_proxy *proxy)
 Get the local id of the proxy. More...
 
SPA_EXPORT int pw_proxy_set_bound_id (struct pw_proxy *proxy, uint32_t global_id)
 Set the global id this proxy is bound to. More...
 
SPA_EXPORT uint32_t pw_proxy_get_bound_id (struct pw_proxy *proxy)
 Get the global id bound to this proxy of SPA_ID_INVALID when not bound to a global. More...
 
SPA_EXPORT const char * pw_proxy_get_type (struct pw_proxy *proxy, uint32_t *version)
 Get the type and version of the proxy. More...
 
SPA_EXPORT struct pw_core * pw_proxy_get_core (struct pw_proxy *proxy)
 
SPA_EXPORT struct pw_protocolpw_proxy_get_protocol (struct pw_proxy *proxy)
 Get the protocol used for the proxy. More...
 
SPA_EXPORT void pw_proxy_add_listener (struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data)
 Add an event listener to proxy. More...
 
SPA_EXPORT void pw_proxy_add_object_listener (struct pw_proxy *proxy, struct spa_hook *listener, const void *funcs, void *data)
 Add a listener for the events received from the remote object. More...
 
void pw_proxy_remove (struct pw_proxy *proxy)
 called when cleaning up or when the server removed the resource. More...
 
SPA_EXPORT void pw_proxy_unref (struct pw_proxy *proxy)
 
SPA_EXPORT void pw_proxy_ref (struct pw_proxy *proxy)
 
SPA_EXPORT int pw_proxy_sync (struct pw_proxy *proxy, int seq)
 Generate an sync method for a proxy. More...
 
SPA_EXPORT int pw_proxy_errorf (struct pw_proxy *proxy, int res, const char *error,...)
 
SPA_EXPORT int pw_proxy_error (struct pw_proxy *proxy, int res, const char *error)
 Generate an error for a proxy. More...
 
SPA_EXPORT struct spa_hook_list * pw_proxy_get_object_listeners (struct pw_proxy *proxy)
 Get the listener of proxy. More...
 
SPA_EXPORT const struct pw_protocol_marshalpw_proxy_get_marshal (struct pw_proxy *proxy)
 Get the marshal functions for the proxy. More...
 

Macro Definition Documentation

Function Documentation

SPA_EXPORT void pw_proxy_add_listener ( struct pw_proxy proxy,
struct spa_hook *  listener,
const struct pw_proxy_events events,
void *  data 
)

Add an event listener to proxy.

Referenced by pw_filter_connect(), and pw_stream_connect().

SPA_EXPORT void pw_proxy_add_object_listener ( struct pw_proxy proxy,
struct spa_hook *  listener,
const void *  funcs,
void *  data 
)

Add a listener for the events received from the remote object.

The events depend on the type of the remote object type.

Parameters
proxythe proxy
listenerlistener
funcsproxied functions
datadata passed to events
SPA_EXPORT int pw_proxy_error ( struct pw_proxy proxy,
int  res,
const char *  error 
)

Generate an error for a proxy.

References pw_core_error(), and r.

Referenced by pw_filter_set_error(), and pw_stream_set_error().

SPA_EXPORT int pw_proxy_errorf ( struct pw_proxy proxy,
int  res,
const char *  error,
  ... 
)

References r, va_end(), and va_start().

SPA_EXPORT uint32_t pw_proxy_get_bound_id ( struct pw_proxy proxy)

Get the global id bound to this proxy of SPA_ID_INVALID when not bound to a global.

SPA_EXPORT struct pw_core* pw_proxy_get_core ( struct pw_proxy proxy)
SPA_EXPORT uint32_t pw_proxy_get_id ( struct pw_proxy proxy)

Get the local id of the proxy.

SPA_EXPORT const struct pw_protocol_marshal* pw_proxy_get_marshal ( struct pw_proxy proxy)

Get the marshal functions for the proxy.

SPA_EXPORT struct spa_hook_list* pw_proxy_get_object_listeners ( struct pw_proxy proxy)

Get the listener of proxy.

SPA_EXPORT struct pw_protocol* pw_proxy_get_protocol ( struct pw_proxy proxy)

Get the protocol used for the proxy.

SPA_EXPORT const char* pw_proxy_get_type ( struct pw_proxy proxy,
uint32_t *  version 
)

Get the type and version of the proxy.

SPA_EXPORT void* pw_proxy_get_user_data ( struct pw_proxy proxy)

Get the user_data.

The size was given in pw_proxy_new

int pw_proxy_init ( struct pw_proxy proxy,
const char *  type,
uint32_t  version 
)
SPA_EXPORT int pw_proxy_install_marshal ( struct pw_proxy this,
bool  implementor 
)
SPA_EXPORT void pw_proxy_ref ( struct pw_proxy proxy)
void pw_proxy_remove ( struct pw_proxy proxy)

called when cleaning up or when the server removed the resource.

Can be called multiple times

References NAME, pw_log::pw_log_debug, and pw_proxy_unref().

Referenced by pw_core_disconnect().

SPA_EXPORT int pw_proxy_set_bound_id ( struct pw_proxy proxy,
uint32_t  global_id 
)

Set the global id this proxy is bound to.

This is usually used internally and will also emit the bound event

References NAME, and pw_log::pw_log_debug.

SPA_EXPORT int pw_proxy_sync ( struct pw_proxy proxy,
int  seq 
)

Generate an sync method for a proxy.

This will generate a done event with the same seq number of the reply.

References NAME, pw_core_sync, pw_log::pw_log_debug, and res.

SPA_EXPORT void pw_proxy_unref ( struct pw_proxy proxy)

client must explicitly destroy all proxies

References NAME, and pw_log::pw_log_debug.

Referenced by pw_proxy::pw_proxy_destroy(), and pw_proxy_remove().