Set user data for the dictionary returned with the last event.
#include <mm/renderer/events.h>
int mmr_event_data_set(mmr_context_t *ctxt,
void *usrdata)
BlackBerry 10.0.0
A context handle.
A pointer to the user data to associate with the dictionary.
Set a pointer to the user data to associate with the dictionary returned with the last event. The dictionary is stored in the mmr_event_t structure's data field and contains all the mm-renderer properties reported by the event.
The MMR_EVENT_STATUS, MMR_EVENT_CTXTPAR, MMR_EVENT_PLAYLIST, and MMR_EVENT_INPUT events have one user data pointer each, whose index is always zero. So, if you set the user data after receiving, say, an MMR_EVENT_STATUS event, the same user data pointer is returned with any subsequent MMR_EVENT_STATUS event.
The MMR_EVENT_STATE, MMR_EVENT_ERROR, and MMR_EVENT_WARNING, share a single dictionary and therefore have a common user data pointer. So, if you set the user data after receiving, say, an MMR_EVENT_STATE event, the same user data pointer is returned with any subsequent MMR_EVENT_STATE, MMR_EVENT_ERROR, or MMR_EVENT_WARNING event.
The MMR_EVENT_METADATA, MMR_EVENT_OUTPUT, and MMR_EVENT_TRKPAR events each have multiple dictionaries, distinguished by an index stored in the mmr_event_t details field. So, if you set the user data after receiving say, an MMR_EVENT_METADATA event with an index of 2, the same user data is returned only for other MMR_EVENT_METADATA events whose index is also 2.
The MMR_EVENT_OTHER event indicates that something has changed, but you can typically ignore this event. In any case, it's better to not attach user data to this type of event.
Zero on success, or -1 if the event was an MMR_EVENT_NONE or a deletion.