nfc_add_sp_media_data()

Add a smart poster media/icon record to a smart poster NDEF record.

Synopsis:

#include <nfc/nfc_ndef.h>
 
NFC_API nfc_result_t nfc_add_sp_media_data(nfc_ndef_record_t *sp_rec, const char *mime_type, const uchar_t *data, size_t data_length)

Since:

BlackBerry 10.0.0

Arguments:

sp_rec

The smart poster NDEF record to add the media record to its payload. Chunked NDEF records are not supported.

mime_type

The null-terminated mime type.

data

The media data to add.

data_length

The length of the data buffer.

Library:

libnfc (For the qcc command, use the -l nfc option to link against this library)

Description:

This function adds the data associated with a media record to a smart poster NDEF record payload.

Returns:

NFC_RESULT_SUCCESS, otherwise NFC_RESULT_INVALID_PARAMETER to indicate that a parameter is invalid, or that the provided NDEF record is chunked.