/* Generated by wayland-scanner 1.25.0 */

#ifndef EXT_DATA_CONTROL_V1_CLIENT_PROTOCOL_H
#define EXT_DATA_CONTROL_V1_CLIENT_PROTOCOL_H

#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_ext_data_control_v1 The ext_data_control_v1 protocol
 * control data devices
 *
 * @section page_desc_ext_data_control_v1 Description
 *
 * This protocol allows a privileged client to control data devices. In
 * particular, the client will be able to manage the current selection and take
 * the role of a clipboard manager.
 *
 * Warning! The protocol described in this file is currently in the testing
 * phase. Backward compatible changes may be added together with the
 * corresponding interface version bump. Backward incompatible changes can
 * only be done by creating a new major version of the extension.
 *
 * @section page_ifaces_ext_data_control_v1 Interfaces
 * - @subpage page_iface_ext_data_control_manager_v1 - manager to control data devices
 * - @subpage page_iface_ext_data_control_device_v1 - manage a data device for a seat
 * - @subpage page_iface_ext_data_control_source_v1 - offer to transfer data
 * - @subpage page_iface_ext_data_control_offer_v1 - offer to transfer data
 * @section page_copyright_ext_data_control_v1 Copyright
 * <pre>
 *
 * Copyright © 2018 Simon Ser
 * Copyright © 2019 Ivan Molodetskikh
 * Copyright © 2024 Neal Gompa
 *
 * Permission to use, copy, modify, distribute, and sell this
 * software and its documentation for any purpose is hereby granted
 * without fee, provided that the above copyright notice appear in
 * all copies and that both that copyright notice and this permission
 * notice appear in supporting documentation, and that the name of
 * the copyright holders not be used in advertising or publicity
 * pertaining to distribution of the software without specific,
 * written prior permission.  The copyright holders make no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied
 * warranty.
 *
 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
 * THIS SOFTWARE.
 * </pre>
 */
struct ext_data_control_device_v1;
struct ext_data_control_manager_v1;
struct ext_data_control_offer_v1;
struct ext_data_control_source_v1;
struct wl_seat;

#ifndef EXT_DATA_CONTROL_MANAGER_V1_INTERFACE
#define EXT_DATA_CONTROL_MANAGER_V1_INTERFACE
/**
 * @page page_iface_ext_data_control_manager_v1 ext_data_control_manager_v1
 * @section page_iface_ext_data_control_manager_v1_desc Description
 *
 * This interface is a manager that allows creating per-seat data device
 * controls.
 * @section page_iface_ext_data_control_manager_v1_api API
 * See @ref iface_ext_data_control_manager_v1.
 */
/**
 * @defgroup iface_ext_data_control_manager_v1 The ext_data_control_manager_v1 interface
 *
 * This interface is a manager that allows creating per-seat data device
 * controls.
 */
extern const struct wl_interface ext_data_control_manager_v1_interface;
#endif
#ifndef EXT_DATA_CONTROL_DEVICE_V1_INTERFACE
#define EXT_DATA_CONTROL_DEVICE_V1_INTERFACE
/**
 * @page page_iface_ext_data_control_device_v1 ext_data_control_device_v1
 * @section page_iface_ext_data_control_device_v1_desc Description
 *
 * This interface allows a client to manage a seat's selection.
 *
 * When the seat is destroyed, this object becomes inert.
 * @section page_iface_ext_data_control_device_v1_api API
 * See @ref iface_ext_data_control_device_v1.
 */
/**
 * @defgroup iface_ext_data_control_device_v1 The ext_data_control_device_v1 interface
 *
 * This interface allows a client to manage a seat's selection.
 *
 * When the seat is destroyed, this object becomes inert.
 */
extern const struct wl_interface ext_data_control_device_v1_interface;
#endif
#ifndef EXT_DATA_CONTROL_SOURCE_V1_INTERFACE
#define EXT_DATA_CONTROL_SOURCE_V1_INTERFACE
/**
 * @page page_iface_ext_data_control_source_v1 ext_data_control_source_v1
 * @section page_iface_ext_data_control_source_v1_desc Description
 *
 * The ext_data_control_source object is the source side of a
 * ext_data_control_offer. It is created by the source client in a data
 * transfer and provides a way to describe the offered data and a way to
 * respond to requests to transfer the data.
 * @section page_iface_ext_data_control_source_v1_api API
 * See @ref iface_ext_data_control_source_v1.
 */
/**
 * @defgroup iface_ext_data_control_source_v1 The ext_data_control_source_v1 interface
 *
 * The ext_data_control_source object is the source side of a
 * ext_data_control_offer. It is created by the source client in a data
 * transfer and provides a way to describe the offered data and a way to
 * respond to requests to transfer the data.
 */
extern const struct wl_interface ext_data_control_source_v1_interface;
#endif
#ifndef EXT_DATA_CONTROL_OFFER_V1_INTERFACE
#define EXT_DATA_CONTROL_OFFER_V1_INTERFACE
/**
 * @page page_iface_ext_data_control_offer_v1 ext_data_control_offer_v1
 * @section page_iface_ext_data_control_offer_v1_desc Description
 *
 * A ext_data_control_offer represents a piece of data offered for transfer
 * by another client (the source client). The offer describes the different
 * MIME types that the data can be converted to and provides the mechanism
 * for transferring the data directly from the source client.
 * @section page_iface_ext_data_control_offer_v1_api API
 * See @ref iface_ext_data_control_offer_v1.
 */
/**
 * @defgroup iface_ext_data_control_offer_v1 The ext_data_control_offer_v1 interface
 *
 * A ext_data_control_offer represents a piece of data offered for transfer
 * by another client (the source client). The offer describes the different
 * MIME types that the data can be converted to and provides the mechanism
 * for transferring the data directly from the source client.
 */
extern const struct wl_interface ext_data_control_offer_v1_interface;
#endif

#define EXT_DATA_CONTROL_MANAGER_V1_CREATE_DATA_SOURCE 0
#define EXT_DATA_CONTROL_MANAGER_V1_GET_DATA_DEVICE 1
#define EXT_DATA_CONTROL_MANAGER_V1_DESTROY 2


/**
 * @ingroup iface_ext_data_control_manager_v1
 */
#define EXT_DATA_CONTROL_MANAGER_V1_CREATE_DATA_SOURCE_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_manager_v1
 */
#define EXT_DATA_CONTROL_MANAGER_V1_GET_DATA_DEVICE_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_manager_v1
 */
#define EXT_DATA_CONTROL_MANAGER_V1_DESTROY_SINCE_VERSION 1

/** @ingroup iface_ext_data_control_manager_v1 */
static inline void
ext_data_control_manager_v1_set_user_data(struct ext_data_control_manager_v1 *ext_data_control_manager_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) ext_data_control_manager_v1, user_data);
}

/** @ingroup iface_ext_data_control_manager_v1 */
static inline void *
ext_data_control_manager_v1_get_user_data(struct ext_data_control_manager_v1 *ext_data_control_manager_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) ext_data_control_manager_v1);
}

static inline uint32_t
ext_data_control_manager_v1_get_version(struct ext_data_control_manager_v1 *ext_data_control_manager_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) ext_data_control_manager_v1);
}

/**
 * @ingroup iface_ext_data_control_manager_v1
 *
 * Create a new data source.
 */
static inline struct ext_data_control_source_v1 *
ext_data_control_manager_v1_create_data_source(struct ext_data_control_manager_v1 *ext_data_control_manager_v1)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_manager_v1,
			 EXT_DATA_CONTROL_MANAGER_V1_CREATE_DATA_SOURCE, &ext_data_control_source_v1_interface, wl_proxy_get_version((struct wl_proxy *) ext_data_control_manager_v1), 0, NULL);

	return (struct ext_data_control_source_v1 *) id;
}

/**
 * @ingroup iface_ext_data_control_manager_v1
 *
 * Create a data device that can be used to manage a seat's selection.
 */
static inline struct ext_data_control_device_v1 *
ext_data_control_manager_v1_get_data_device(struct ext_data_control_manager_v1 *ext_data_control_manager_v1, struct wl_seat *seat)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_manager_v1,
			 EXT_DATA_CONTROL_MANAGER_V1_GET_DATA_DEVICE, &ext_data_control_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) ext_data_control_manager_v1), 0, NULL, seat);

	return (struct ext_data_control_device_v1 *) id;
}

/**
 * @ingroup iface_ext_data_control_manager_v1
 *
 * All objects created by the manager will still remain valid, until their
 * appropriate destroy request has been called.
 */
static inline void
ext_data_control_manager_v1_destroy(struct ext_data_control_manager_v1 *ext_data_control_manager_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_manager_v1,
			 EXT_DATA_CONTROL_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}

#ifndef EXT_DATA_CONTROL_DEVICE_V1_ERROR_ENUM
#define EXT_DATA_CONTROL_DEVICE_V1_ERROR_ENUM
enum ext_data_control_device_v1_error {
	/**
	 * source given to set_selection or set_primary_selection was already used before
	 */
	EXT_DATA_CONTROL_DEVICE_V1_ERROR_USED_SOURCE = 1,
};
#endif /* EXT_DATA_CONTROL_DEVICE_V1_ERROR_ENUM */

/**
 * @ingroup iface_ext_data_control_device_v1
 * @struct ext_data_control_device_v1_listener
 */
struct ext_data_control_device_v1_listener {
	/**
	 * introduce a new ext_data_control_offer
	 *
	 * The data_offer event introduces a new ext_data_control_offer
	 * object, which will subsequently be used in either the
	 * ext_data_control_device.selection event (for the regular
	 * clipboard selections) or the
	 * ext_data_control_device.primary_selection event (for the primary
	 * clipboard selections). Immediately following the
	 * ext_data_control_device.data_offer event, the new data_offer
	 * object will send out ext_data_control_offer.offer events to
	 * describe the MIME types it offers.
	 */
	void (*data_offer)(void *data,
			   struct ext_data_control_device_v1 *ext_data_control_device_v1,
			   struct ext_data_control_offer_v1 *id);
	/**
	 * advertise new selection
	 *
	 * The selection event is sent out to notify the client of a new
	 * ext_data_control_offer for the selection for this device. The
	 * ext_data_control_device.data_offer and the
	 * ext_data_control_offer.offer events are sent out immediately
	 * before this event to introduce the data offer object. The
	 * selection event is sent to a client when a new selection is set.
	 * The ext_data_control_offer is valid until a new
	 * ext_data_control_offer or NULL is received. The client must
	 * destroy the previous selection ext_data_control_offer, if any,
	 * upon receiving this event. Regardless, the previous selection
	 * will be ignored once a new selection ext_data_control_offer is
	 * received.
	 *
	 * The first selection event is sent upon binding the
	 * ext_data_control_device object.
	 */
	void (*selection)(void *data,
			  struct ext_data_control_device_v1 *ext_data_control_device_v1,
			  struct ext_data_control_offer_v1 *id);
	/**
	 * this data control is no longer valid
	 *
	 * This data control object is no longer valid and should be
	 * destroyed by the client.
	 */
	void (*finished)(void *data,
			 struct ext_data_control_device_v1 *ext_data_control_device_v1);
	/**
	 * advertise new primary selection
	 *
	 * The primary_selection event is sent out to notify the client
	 * of a new ext_data_control_offer for the primary selection for
	 * this device. The ext_data_control_device.data_offer and the
	 * ext_data_control_offer.offer events are sent out immediately
	 * before this event to introduce the data offer object. The
	 * primary_selection event is sent to a client when a new primary
	 * selection is set. The ext_data_control_offer is valid until a
	 * new ext_data_control_offer or NULL is received. The client must
	 * destroy the previous primary selection ext_data_control_offer,
	 * if any, upon receiving this event. Regardless, the previous
	 * primary selection will be ignored once a new primary selection
	 * ext_data_control_offer is received.
	 *
	 * If the compositor supports primary selection, the first
	 * primary_selection event is sent upon binding the
	 * ext_data_control_device object.
	 */
	void (*primary_selection)(void *data,
				  struct ext_data_control_device_v1 *ext_data_control_device_v1,
				  struct ext_data_control_offer_v1 *id);
};

/**
 * @ingroup iface_ext_data_control_device_v1
 */
static inline int
ext_data_control_device_v1_add_listener(struct ext_data_control_device_v1 *ext_data_control_device_v1,
					const struct ext_data_control_device_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) ext_data_control_device_v1,
				     (void (**)(void)) listener, data);
}

#define EXT_DATA_CONTROL_DEVICE_V1_SET_SELECTION 0
#define EXT_DATA_CONTROL_DEVICE_V1_DESTROY 1
#define EXT_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION 2

/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_DATA_OFFER_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_SELECTION_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_FINISHED_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_PRIMARY_SELECTION_SINCE_VERSION 1

/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_SET_SELECTION_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_device_v1
 */
#define EXT_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION_SINCE_VERSION 1

/** @ingroup iface_ext_data_control_device_v1 */
static inline void
ext_data_control_device_v1_set_user_data(struct ext_data_control_device_v1 *ext_data_control_device_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) ext_data_control_device_v1, user_data);
}

/** @ingroup iface_ext_data_control_device_v1 */
static inline void *
ext_data_control_device_v1_get_user_data(struct ext_data_control_device_v1 *ext_data_control_device_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) ext_data_control_device_v1);
}

static inline uint32_t
ext_data_control_device_v1_get_version(struct ext_data_control_device_v1 *ext_data_control_device_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) ext_data_control_device_v1);
}

/**
 * @ingroup iface_ext_data_control_device_v1
 *
 * This request asks the compositor to set the selection to the data from
 * the source on behalf of the client.
 *
 * The given source may not be used in any further set_selection or
 * set_primary_selection requests. Attempting to use a previously used
 * source triggers the used_source protocol error.
 *
 * To unset the selection, set the source to NULL.
 */
static inline void
ext_data_control_device_v1_set_selection(struct ext_data_control_device_v1 *ext_data_control_device_v1, struct ext_data_control_source_v1 *source)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_device_v1,
			 EXT_DATA_CONTROL_DEVICE_V1_SET_SELECTION, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_device_v1), 0, source);
}

/**
 * @ingroup iface_ext_data_control_device_v1
 *
 * Destroys the data device object.
 */
static inline void
ext_data_control_device_v1_destroy(struct ext_data_control_device_v1 *ext_data_control_device_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_device_v1,
			 EXT_DATA_CONTROL_DEVICE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_device_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_ext_data_control_device_v1
 *
 * This request asks the compositor to set the primary selection to the
 * data from the source on behalf of the client.
 *
 * The given source may not be used in any further set_selection or
 * set_primary_selection requests. Attempting to use a previously used
 * source triggers the used_source protocol error.
 *
 * To unset the primary selection, set the source to NULL.
 *
 * The compositor will ignore this request if it does not support primary
 * selection.
 */
static inline void
ext_data_control_device_v1_set_primary_selection(struct ext_data_control_device_v1 *ext_data_control_device_v1, struct ext_data_control_source_v1 *source)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_device_v1,
			 EXT_DATA_CONTROL_DEVICE_V1_SET_PRIMARY_SELECTION, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_device_v1), 0, source);
}

#ifndef EXT_DATA_CONTROL_SOURCE_V1_ERROR_ENUM
#define EXT_DATA_CONTROL_SOURCE_V1_ERROR_ENUM
enum ext_data_control_source_v1_error {
	/**
	 * offer sent after ext_data_control_device.set_selection
	 */
	EXT_DATA_CONTROL_SOURCE_V1_ERROR_INVALID_OFFER = 1,
};
#endif /* EXT_DATA_CONTROL_SOURCE_V1_ERROR_ENUM */

/**
 * @ingroup iface_ext_data_control_source_v1
 * @struct ext_data_control_source_v1_listener
 */
struct ext_data_control_source_v1_listener {
	/**
	 * send the data
	 *
	 * Request for data from the client. Send the data as the
	 * specified MIME type over the passed file descriptor, then close
	 * it.
	 * @param mime_type MIME type for the data
	 * @param fd file descriptor for the data
	 */
	void (*send)(void *data,
		     struct ext_data_control_source_v1 *ext_data_control_source_v1,
		     const char *mime_type,
		     int32_t fd);
	/**
	 * selection was cancelled
	 *
	 * This data source is no longer valid. The data source has been
	 * replaced by another data source.
	 *
	 * The client should clean up and destroy this data source.
	 */
	void (*cancelled)(void *data,
			  struct ext_data_control_source_v1 *ext_data_control_source_v1);
};

/**
 * @ingroup iface_ext_data_control_source_v1
 */
static inline int
ext_data_control_source_v1_add_listener(struct ext_data_control_source_v1 *ext_data_control_source_v1,
					const struct ext_data_control_source_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) ext_data_control_source_v1,
				     (void (**)(void)) listener, data);
}

#define EXT_DATA_CONTROL_SOURCE_V1_OFFER 0
#define EXT_DATA_CONTROL_SOURCE_V1_DESTROY 1

/**
 * @ingroup iface_ext_data_control_source_v1
 */
#define EXT_DATA_CONTROL_SOURCE_V1_SEND_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_source_v1
 */
#define EXT_DATA_CONTROL_SOURCE_V1_CANCELLED_SINCE_VERSION 1

/**
 * @ingroup iface_ext_data_control_source_v1
 */
#define EXT_DATA_CONTROL_SOURCE_V1_OFFER_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_source_v1
 */
#define EXT_DATA_CONTROL_SOURCE_V1_DESTROY_SINCE_VERSION 1

/** @ingroup iface_ext_data_control_source_v1 */
static inline void
ext_data_control_source_v1_set_user_data(struct ext_data_control_source_v1 *ext_data_control_source_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) ext_data_control_source_v1, user_data);
}

/** @ingroup iface_ext_data_control_source_v1 */
static inline void *
ext_data_control_source_v1_get_user_data(struct ext_data_control_source_v1 *ext_data_control_source_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) ext_data_control_source_v1);
}

static inline uint32_t
ext_data_control_source_v1_get_version(struct ext_data_control_source_v1 *ext_data_control_source_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) ext_data_control_source_v1);
}

/**
 * @ingroup iface_ext_data_control_source_v1
 *
 * This request adds a MIME type to the set of MIME types advertised to
 * targets. Can be called several times to offer multiple types.
 *
 * Calling this after ext_data_control_device.set_selection is a protocol
 * error.
 */
static inline void
ext_data_control_source_v1_offer(struct ext_data_control_source_v1 *ext_data_control_source_v1, const char *mime_type)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_source_v1,
			 EXT_DATA_CONTROL_SOURCE_V1_OFFER, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_source_v1), 0, mime_type);
}

/**
 * @ingroup iface_ext_data_control_source_v1
 *
 * Destroys the data source object.
 */
static inline void
ext_data_control_source_v1_destroy(struct ext_data_control_source_v1 *ext_data_control_source_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_source_v1,
			 EXT_DATA_CONTROL_SOURCE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_source_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_ext_data_control_offer_v1
 * @struct ext_data_control_offer_v1_listener
 */
struct ext_data_control_offer_v1_listener {
	/**
	 * advertise offered MIME type
	 *
	 * Sent immediately after creating the ext_data_control_offer
	 * object. One event per offered MIME type.
	 * @param mime_type offered MIME type
	 */
	void (*offer)(void *data,
		      struct ext_data_control_offer_v1 *ext_data_control_offer_v1,
		      const char *mime_type);
};

/**
 * @ingroup iface_ext_data_control_offer_v1
 */
static inline int
ext_data_control_offer_v1_add_listener(struct ext_data_control_offer_v1 *ext_data_control_offer_v1,
				       const struct ext_data_control_offer_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) ext_data_control_offer_v1,
				     (void (**)(void)) listener, data);
}

#define EXT_DATA_CONTROL_OFFER_V1_RECEIVE 0
#define EXT_DATA_CONTROL_OFFER_V1_DESTROY 1

/**
 * @ingroup iface_ext_data_control_offer_v1
 */
#define EXT_DATA_CONTROL_OFFER_V1_OFFER_SINCE_VERSION 1

/**
 * @ingroup iface_ext_data_control_offer_v1
 */
#define EXT_DATA_CONTROL_OFFER_V1_RECEIVE_SINCE_VERSION 1
/**
 * @ingroup iface_ext_data_control_offer_v1
 */
#define EXT_DATA_CONTROL_OFFER_V1_DESTROY_SINCE_VERSION 1

/** @ingroup iface_ext_data_control_offer_v1 */
static inline void
ext_data_control_offer_v1_set_user_data(struct ext_data_control_offer_v1 *ext_data_control_offer_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) ext_data_control_offer_v1, user_data);
}

/** @ingroup iface_ext_data_control_offer_v1 */
static inline void *
ext_data_control_offer_v1_get_user_data(struct ext_data_control_offer_v1 *ext_data_control_offer_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) ext_data_control_offer_v1);
}

static inline uint32_t
ext_data_control_offer_v1_get_version(struct ext_data_control_offer_v1 *ext_data_control_offer_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) ext_data_control_offer_v1);
}

/**
 * @ingroup iface_ext_data_control_offer_v1
 *
 * To transfer the offered data, the client issues this request and
 * indicates the MIME type it wants to receive. The transfer happens
 * through the passed file descriptor (typically created with the pipe
 * system call). The source client writes the data in the MIME type
 * representation requested and then closes the file descriptor.
 *
 * The receiving client reads from the read end of the pipe until EOF and
 * then closes its end, at which point the transfer is complete.
 *
 * This request may happen multiple times for different MIME types.
 */
static inline void
ext_data_control_offer_v1_receive(struct ext_data_control_offer_v1 *ext_data_control_offer_v1, const char *mime_type, int32_t fd)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_offer_v1,
			 EXT_DATA_CONTROL_OFFER_V1_RECEIVE, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_offer_v1), 0, mime_type, fd);
}

/**
 * @ingroup iface_ext_data_control_offer_v1
 *
 * Destroys the data offer object.
 */
static inline void
ext_data_control_offer_v1_destroy(struct ext_data_control_offer_v1 *ext_data_control_offer_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) ext_data_control_offer_v1,
			 EXT_DATA_CONTROL_OFFER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) ext_data_control_offer_v1), WL_MARSHAL_FLAG_DESTROY);
}

#ifdef  __cplusplus
}
#endif

#endif
