mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
proxy: add _get_type()
Also return the optional version in resource_get_type()
This commit is contained in:
parent
988144dda4
commit
b264ef0772
4 changed files with 16 additions and 3 deletions
|
|
@ -138,6 +138,14 @@ uint32_t pw_proxy_get_id(struct pw_proxy *proxy)
|
||||||
return proxy->id;
|
return proxy->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SPA_EXPORT
|
||||||
|
uint32_t pw_proxy_get_type(struct pw_proxy *proxy, uint32_t *version)
|
||||||
|
{
|
||||||
|
if (version)
|
||||||
|
*version = proxy->version;
|
||||||
|
return proxy->type;
|
||||||
|
}
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
struct pw_protocol *pw_proxy_get_protocol(struct pw_proxy *proxy)
|
struct pw_protocol *pw_proxy_get_protocol(struct pw_proxy *proxy)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,9 @@ void *pw_proxy_get_user_data(struct pw_proxy *proxy);
|
||||||
/** Get the local id of the proxy */
|
/** Get the local id of the proxy */
|
||||||
uint32_t pw_proxy_get_id(struct pw_proxy *proxy);
|
uint32_t pw_proxy_get_id(struct pw_proxy *proxy);
|
||||||
|
|
||||||
|
/** Get the type and version of the proxy */
|
||||||
|
uint32_t pw_proxy_get_type(struct pw_proxy *proxy, uint32_t *version);
|
||||||
|
|
||||||
/** Get the protocol used for the proxy */
|
/** Get the protocol used for the proxy */
|
||||||
struct pw_protocol *pw_proxy_get_protocol(struct pw_proxy *proxy);
|
struct pw_protocol *pw_proxy_get_protocol(struct pw_proxy *proxy);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,8 +144,10 @@ uint32_t pw_resource_get_permissions(struct pw_resource *resource)
|
||||||
}
|
}
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
uint32_t pw_resource_get_type(struct pw_resource *resource)
|
uint32_t pw_resource_get_type(struct pw_resource *resource, uint32_t *version)
|
||||||
{
|
{
|
||||||
|
if (version)
|
||||||
|
*version = resource->version;
|
||||||
return resource->type;
|
return resource->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,8 +96,8 @@ uint32_t pw_resource_get_id(struct pw_resource *resource);
|
||||||
/** Get the permissions of this resource */
|
/** Get the permissions of this resource */
|
||||||
uint32_t pw_resource_get_permissions(struct pw_resource *resource);
|
uint32_t pw_resource_get_permissions(struct pw_resource *resource);
|
||||||
|
|
||||||
/** Get the type of this resource */
|
/** Get the type and optionally the version of this resource */
|
||||||
uint32_t pw_resource_get_type(struct pw_resource *resource);
|
uint32_t pw_resource_get_type(struct pw_resource *resource, uint32_t *version);
|
||||||
|
|
||||||
/** Get the protocol used for this resource */
|
/** Get the protocol used for this resource */
|
||||||
struct pw_protocol *pw_resource_get_protocol(struct pw_resource *resource);
|
struct pw_protocol *pw_resource_get_protocol(struct pw_resource *resource);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue