nfc_create_media_type_record()

Create a NFC Forum Media type NDEF record.

Synopsis:

#include <nfc/nfc_ndef.h>
 
NFC_API nfc_result_t nfc_create_media_type_record(const char *mime_type, const uchar_t *payload, size_t payload_len, nfc_ndef_record_t **rec)

Since:

BlackBerry 10.0.0

Arguments:

mime_type

The MIME-type of the payload.

payload

Binary content of the data. The content is set as the NDEF record's payload.

payload_len

The length (in bytes) of the payload.

rec

The returned media type NDEF record.

Library:

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

Description:

This function creates an NFC Forum Media type NDEF record.

Returns:

NFC_RESULT_SUCCESS, or NFC_RESULT_INVALID_PARAMETER to indicate that a parameter is invalid.