ecore-wl2: add function for accepting a single mime type

@feature
This commit is contained in:
Mike Blumenkrantz 2017-05-12 12:08:32 -04:00
parent 9f69882211
commit f6964f50e3
2 changed files with 18 additions and 0 deletions

View File

@ -1379,6 +1379,16 @@ EAPI Eina_Array* ecore_wl2_offer_mimes_get(Ecore_Wl2_Offer *offer);
*/
EAPI void ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, Eina_Array *mimes);
/**
* Accept a single mime type for an offer
*
* @param offer the offer to use
* @param mime_type the mime type
*
* @since 1.20
*/
EAPI void ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char *mime_type);
/**
* Request the data from this offer.
* The event ECORE_WL2_EVENT_OFFER_DATA_READY is called when the data is available.

View File

@ -744,6 +744,14 @@ ecore_wl2_offer_mimes_set(Ecore_Wl2_Offer *offer, Eina_Array *mimes)
wl_data_offer_accept(offer->offer, offer->serial, NULL);
}
EAPI void
ecore_wl2_offer_accept(Ecore_Wl2_Offer *offer, const char *mime_type)
{
EINA_SAFETY_ON_NULL_RETURN(offer);
wl_data_offer_accept(offer->offer, offer->serial, mime_type);
}
typedef struct {
int len;
void *data;