avoid including private.h

Expose some more methods to make it possible to build without
including the private.h header, especially in modules.
This commit is contained in:
Wim Taymans 2020-01-02 13:48:50 +01:00
parent 8e6a5a1714
commit df519ee3b3
43 changed files with 349 additions and 372 deletions

View file

@ -35,7 +35,6 @@
#include <spa/debug/types.h>
#include "spa-device.h"
#include "pipewire/private.h"
struct impl {
struct pw_impl_device *this;
@ -84,7 +83,7 @@ pw_spa_device_new(struct pw_context *context,
if (this == NULL)
return NULL;
impl = this->user_data;
impl = pw_impl_device_get_user_data(this);
impl->this = this;
impl->device = device;
impl->handle = handle;
@ -110,7 +109,7 @@ error_register:
void *pw_spa_device_get_user_data(struct pw_impl_device *device)
{
struct impl *impl = device->user_data;
struct impl *impl = pw_impl_device_get_user_data(device);
return impl->user_data;
}