pw_core -> pw_context

The proxy API is the one that we would like to expose for applications
and the other API is used internally when implementing modules or
factories.

The current pw_core object is really a context for all objects so
name it that way. It also makes it possible to rename pw_core_proxy
to pw_proxy later.
This commit is contained in:
Wim Taymans 2019-12-10 18:19:56 +01:00
parent 42103a8218
commit 8ea78c2e3f
113 changed files with 905 additions and 906 deletions

View file

@ -142,7 +142,7 @@ global_bind(void *_data, struct pw_client *client, uint32_t permissions,
}
void *
pw_metadata_new(struct pw_core *core, struct pw_resource *resource,
pw_metadata_new(struct pw_context *context, struct pw_resource *resource,
struct pw_properties *properties)
{
struct impl *impl;
@ -162,7 +162,7 @@ pw_metadata_new(struct pw_core *core, struct pw_resource *resource,
pw_resource_install_marshal(resource, true);
impl->global = pw_global_new(core,
impl->global = pw_global_new(context,
PW_TYPE_INTERFACE_Metadata,
PW_VERSION_METADATA,
properties,

View file

@ -321,11 +321,11 @@ static const struct pw_protocol_marshal pw_protocol_native_metadata_impl_marshal
.client_demarshal = pw_protocol_native_metadata_client_method_demarshal,
};
int pw_protocol_native_ext_metadata_init(struct pw_core *core)
int pw_protocol_native_ext_metadata_init(struct pw_context *context)
{
struct pw_protocol *protocol;
protocol = pw_core_find_protocol(core, PW_TYPE_INFO_PROTOCOL_Native);
protocol = pw_context_find_protocol(context, PW_TYPE_INFO_PROTOCOL_Native);
if (protocol == NULL)
return -EPROTO;

View file

@ -39,7 +39,7 @@
#include "pipewire/private.h"
struct impl {
struct pw_core *core;
struct pw_context *context;
struct pw_device *device;
struct spa_hook device_listener;
@ -108,7 +108,7 @@ struct pw_device *pw_client_device_new(struct pw_resource *resource,
struct impl *impl;
struct pw_device *device;
struct pw_client *client = pw_resource_get_client(resource);
struct pw_core *core = pw_client_get_core(client);
struct pw_context *context = pw_client_get_context(client);
if (properties == NULL)
properties = pw_properties_new(NULL, NULL);
@ -117,13 +117,13 @@ struct pw_device *pw_client_device_new(struct pw_resource *resource,
pw_properties_setf(properties, PW_KEY_CLIENT_ID, "%d", client->global->id);
device = pw_device_new(core, properties, sizeof(struct impl));
device = pw_device_new(context, properties, sizeof(struct impl));
if (device == NULL)
return NULL;
impl = pw_device_get_user_data(device);
impl->device = device;
impl->core = core;
impl->context = context;
impl->resource = resource;
pw_resource_install_marshal(resource, true);