2020-03-16 17:43:07 +02:00
|
|
|
/* WirePlumber
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2020 Collabora Ltd.
|
|
|
|
|
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __WIREPLUMBER_SI_INTERFACES_H__
|
|
|
|
|
#define __WIREPLUMBER_SI_INTERFACES_H__
|
|
|
|
|
|
|
|
|
|
#include "session-item.h"
|
|
|
|
|
#include "properties.h"
|
|
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2021-03-23 12:27:22 -04:00
|
|
|
typedef struct _WpSiAcquisition WpSiAcquisition;
|
2020-03-16 17:43:07 +02:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* WP_TYPE_SI_ENDPOINT:
|
|
|
|
|
*
|
|
|
|
|
* The #WpSiEndpoint #GType
|
|
|
|
|
*/
|
|
|
|
|
#define WP_TYPE_SI_ENDPOINT (wp_si_endpoint_get_type ())
|
|
|
|
|
WP_API
|
|
|
|
|
G_DECLARE_INTERFACE (WpSiEndpoint, wp_si_endpoint,
|
|
|
|
|
WP, SI_ENDPOINT, WpSessionItem)
|
|
|
|
|
|
|
|
|
|
struct _WpSiEndpointInterface
|
|
|
|
|
{
|
|
|
|
|
GTypeInterface interface;
|
|
|
|
|
|
2020-03-20 14:45:17 +02:00
|
|
|
GVariant * (*get_registration_info) (WpSiEndpoint * self);
|
2020-03-16 17:43:07 +02:00
|
|
|
WpProperties * (*get_properties) (WpSiEndpoint * self);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
WP_API
|
2020-03-20 14:45:17 +02:00
|
|
|
GVariant * wp_si_endpoint_get_registration_info (WpSiEndpoint * self);
|
2020-03-16 17:43:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpProperties * wp_si_endpoint_get_properties (WpSiEndpoint * self);
|
|
|
|
|
|
2021-03-23 13:35:52 -04:00
|
|
|
/**
|
|
|
|
|
* WP_TYPE_SI_PORT_INFO:
|
|
|
|
|
*
|
|
|
|
|
* The #WpSiPortInfo #GType
|
|
|
|
|
*/
|
|
|
|
|
#define WP_TYPE_SI_PORT_INFO (wp_si_port_info_get_type ())
|
|
|
|
|
WP_API
|
|
|
|
|
G_DECLARE_INTERFACE (WpSiPortInfo, wp_si_port_info,
|
|
|
|
|
WP, SI_PORT_INFO, WpSessionItem)
|
|
|
|
|
|
|
|
|
|
struct _WpSiPortInfoInterface
|
|
|
|
|
{
|
|
|
|
|
GTypeInterface interface;
|
|
|
|
|
|
|
|
|
|
GVariant * (*get_ports) (WpSiPortInfo * self, const gchar * context);
|
|
|
|
|
WpSiAcquisition * (*get_acquisition) (WpSiPortInfo * self);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
GVariant * wp_si_port_info_get_ports (WpSiPortInfo * self,
|
|
|
|
|
const gchar * context);
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpSiAcquisition * wp_si_port_info_get_acquisition (WpSiPortInfo * self);
|
|
|
|
|
|
2020-03-16 17:43:07 +02:00
|
|
|
/**
|
|
|
|
|
* WP_TYPE_SI_LINK:
|
|
|
|
|
*
|
|
|
|
|
* The #WpSiLink #GType
|
|
|
|
|
*/
|
|
|
|
|
#define WP_TYPE_SI_LINK (wp_si_link_get_type ())
|
|
|
|
|
WP_API
|
|
|
|
|
G_DECLARE_INTERFACE (WpSiLink, wp_si_link,
|
|
|
|
|
WP, SI_LINK, WpSessionItem)
|
|
|
|
|
|
|
|
|
|
struct _WpSiLinkInterface
|
|
|
|
|
{
|
|
|
|
|
GTypeInterface interface;
|
|
|
|
|
|
2020-03-31 19:26:56 +03:00
|
|
|
GVariant * (*get_registration_info) (WpSiLink * self);
|
|
|
|
|
WpProperties * (*get_properties) (WpSiLink * self);
|
|
|
|
|
|
2021-03-23 13:35:52 -04:00
|
|
|
WpSiPortInfo * (*get_out_item) (WpSiLink * self);
|
|
|
|
|
WpSiPortInfo * (*get_in_item) (WpSiLink * self);
|
2020-03-16 17:43:07 +02:00
|
|
|
};
|
|
|
|
|
|
2020-03-31 19:26:56 +03:00
|
|
|
WP_API
|
|
|
|
|
GVariant * wp_si_link_get_registration_info (WpSiLink * self);
|
|
|
|
|
|
|
|
|
|
WP_API
|
|
|
|
|
WpProperties * wp_si_link_get_properties (WpSiLink * self);
|
|
|
|
|
|
2020-03-16 17:43:07 +02:00
|
|
|
WP_API
|
2021-03-23 13:35:52 -04:00
|
|
|
WpSiPortInfo * wp_si_link_get_out_item (WpSiLink * self);
|
2020-03-16 17:43:07 +02:00
|
|
|
|
|
|
|
|
WP_API
|
2021-03-23 13:35:52 -04:00
|
|
|
WpSiPortInfo * wp_si_link_get_in_item (WpSiLink * self);
|
2021-03-23 12:27:22 -04:00
|
|
|
|
2020-04-10 16:17:25 +03:00
|
|
|
/**
|
2021-03-23 12:27:22 -04:00
|
|
|
* WP_TYPE_SI_ACQUISITION:
|
2020-04-10 16:17:25 +03:00
|
|
|
*
|
2021-03-23 12:27:22 -04:00
|
|
|
* The #WpSiAcquisition #GType
|
2020-04-10 16:17:25 +03:00
|
|
|
*/
|
2021-03-23 12:27:22 -04:00
|
|
|
#define WP_TYPE_SI_ACQUISITION (wp_si_acquisition_get_type ())
|
2020-04-10 16:17:25 +03:00
|
|
|
WP_API
|
2021-03-23 12:27:22 -04:00
|
|
|
G_DECLARE_INTERFACE (WpSiAcquisition, wp_si_acquisition,
|
|
|
|
|
WP, SI_ACQUISITION, WpSessionItem)
|
2020-04-10 16:17:25 +03:00
|
|
|
|
2021-03-23 12:27:22 -04:00
|
|
|
struct _WpSiAcquisitionInterface
|
2020-04-10 16:17:25 +03:00
|
|
|
{
|
|
|
|
|
GTypeInterface interface;
|
|
|
|
|
|
2021-03-23 12:27:22 -04:00
|
|
|
void (*acquire) (WpSiAcquisition * self, WpSiLink * acquisitor,
|
|
|
|
|
WpSiPortInfo * item, GAsyncReadyCallback callback, gpointer data);
|
|
|
|
|
gboolean (*acquire_finish) (WpSiAcquisition * self, GAsyncResult * res,
|
|
|
|
|
GError ** error);
|
2020-04-10 16:17:25 +03:00
|
|
|
|
2021-03-23 12:27:22 -04:00
|
|
|
void (*release) (WpSiAcquisition * self, WpSiLink * acquisitor,
|
|
|
|
|
WpSiPortInfo * item);
|
2020-04-10 16:17:25 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
WP_API
|
2021-03-23 12:27:22 -04:00
|
|
|
void wp_si_acquisition_acquire (WpSiAcquisition * self, WpSiLink * acquisitor,
|
|
|
|
|
WpSiPortInfo * item, GAsyncReadyCallback callback, gpointer data);
|
2020-04-10 16:17:25 +03:00
|
|
|
|
|
|
|
|
WP_API
|
2021-03-23 12:27:22 -04:00
|
|
|
gboolean wp_si_acquisition_acquire_finish (
|
|
|
|
|
WpSiAcquisition * self, GAsyncResult * res, GError ** error);
|
2020-04-10 16:17:25 +03:00
|
|
|
|
|
|
|
|
WP_API
|
2021-03-23 12:27:22 -04:00
|
|
|
void wp_si_acquisition_release (WpSiAcquisition * self, WpSiLink * acquisitor,
|
|
|
|
|
WpSiPortInfo * item);
|
2020-03-31 19:26:56 +03:00
|
|
|
|
2020-03-16 17:43:07 +02:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif
|