Generation of NFC NDEF URI record descriptions.
More...
|
enum | nfc_uri_id_t {
NFC_URI_NONE = 0x00,
NFC_URI_HTTP_WWW = 0x01,
NFC_URI_HTTPS_WWW = 0x02,
NFC_URI_HTTP = 0x03,
NFC_URI_HTTPS = 0x04,
NFC_URI_TEL = 0x05,
NFC_URI_MAILTO = 0x06,
NFC_URI_FTP_ANONYMOUS = 0x07,
NFC_URI_FTP_FTP = 0x08,
NFC_URI_FTPS = 0x09,
NFC_URI_SFTP = 0x0A,
NFC_URI_SMB = 0x0B,
NFC_URI_NFS = 0x0C,
NFC_URI_FTP = 0x0D,
NFC_URI_DAV = 0x0E,
NFC_URI_NEWS = 0x0F,
NFC_URI_TELNET = 0x10,
NFC_URI_IMAP = 0x11,
NFC_URI_RTSP = 0x12,
NFC_URI_URN = 0x13,
NFC_URI_POP = 0x14,
NFC_URI_SIP = 0x15,
NFC_URI_SIPS = 0x16,
NFC_URI_TFTP = 0x17,
NFC_URI_BTSPP = 0x18,
NFC_URI_BTL2CAP = 0x19,
NFC_URI_BTGOEP = 0x1A,
NFC_URI_TCPOBEX = 0x1B,
NFC_URI_IRDAOBEX = 0x1C,
NFC_URI_FILE = 0x1D,
NFC_URI_URN_EPC_ID = 0x1E,
NFC_URI_URN_EPC_TAG = 0x1F,
NFC_URI_URN_EPC_PAT = 0x20,
NFC_URI_URN_EPC_RAW = 0x21,
NFC_URI_URN_EPC = 0x22,
NFC_URI_URN_NFC = 0x23,
NFC_URI_RFU = 0xFF
} |
| URI identifier codes according to "URI Record Type Definition" (denotation "NFCForum-TS-RTD_URI_1.0" published on 2006-07-24) chapter 3.2.2. More...
|
|
Generation of NFC NDEF URI record descriptions.
#define NFC_NDEF_URI_RECORD_DESC_DEF |
( |
|
NAME, |
|
|
|
URI_ID_CODE, |
|
|
|
P_URI_DATA, |
|
|
|
URI_DATA_LEN |
|
) |
| |
Value:
{ \
.p_uri_data = (P_URI_DATA), \
.uri_data_len = (URI_DATA_LEN) \
NULL, \
0, \
&NAME##_ndef_uri_record_payload_desc) \
Macro for generating a description of a URI record.
This macro initializes an instance of an NFC NDEF record description of a URI record.
- Note
- The record descriptor is declared as automatic variable, which implies that the NDEF message encoding (see nfc_uri_msg_encode) must be done in the same variable scope.
- Parameters
-
[in] | NAME | Name for accessing record descriptor. |
[in] | URI_ID_CODE | URI identifier code that defines the protocol field of the URI. |
[in] | P_URI_DATA | Pointer to the URI string. The string should not contain the protocol field if the protocol was specified in uri_id_code . |
[in] | URI_DATA_LEN | Length of the URI string. |
URI identifier codes according to "URI Record Type Definition" (denotation "NFCForum-TS-RTD_URI_1.0" published on 2006-07-24) chapter 3.2.2.
Enumerator |
---|
NFC_URI_NONE |
No prepending is done.
|
NFC_URI_HTTP_WWW |
"http://www."
|
NFC_URI_HTTPS_WWW |
"https://www."
|
NFC_URI_HTTP |
"http:"
|
NFC_URI_HTTPS |
"https:"
|
NFC_URI_TEL |
"tel:"
|
NFC_URI_MAILTO |
"mailto:"
|
NFC_URI_FTP_ANONYMOUS |
"ftp://anonymous:anonymous@"
|
NFC_URI_FTP_FTP |
"ftp://ftp."
|
NFC_URI_FTPS |
"ftps://"
|
NFC_URI_SFTP |
"sftp://"
|
NFC_URI_SMB |
"smb://"
|
NFC_URI_NFS |
"nfs://"
|
NFC_URI_FTP |
"ftp://"
|
NFC_URI_DAV |
"dav://"
|
NFC_URI_NEWS |
"news:"
|
NFC_URI_TELNET |
"telnet://"
|
NFC_URI_IMAP |
"imap:"
|
NFC_URI_RTSP |
"rtsp://"
|
NFC_URI_URN |
"urn:"
|
NFC_URI_POP |
"pop:"
|
NFC_URI_SIP |
"sip:"
|
NFC_URI_SIPS |
"sips:"
|
NFC_URI_TFTP |
"tftp:"
|
NFC_URI_BTSPP |
"btspp://"
|
NFC_URI_BTL2CAP |
"btl2cap://"
|
NFC_URI_BTGOEP |
"btgoep://"
|
NFC_URI_TCPOBEX |
"tcpobex://"
|
NFC_URI_IRDAOBEX |
"irdaobex://"
|
NFC_URI_FILE |
"file://"
|
NFC_URI_URN_EPC_ID |
"urn:epc:id:"
|
NFC_URI_URN_EPC_TAG |
"urn:epc:tag:"
|
NFC_URI_URN_EPC_PAT |
"urn:epc:pat:"
|
NFC_URI_URN_EPC_RAW |
"urn:epc:raw:"
|
NFC_URI_URN_EPC |
"urn:epc:"
|
NFC_URI_URN_NFC |
"urn:nfc:"
|
NFC_URI_RFU |
No prepending is done. Reserved for future use.
|
Function for constructing the payload for a URI record.
This function encodes the payload according to the URI record definition. It implements an API compatible with p_payload_constructor_t.
- Parameters
-
[in] | p_input | Pointer to the description of the payload. |
[out] | p_buff | Pointer to payload destination. If NULL, function will calculate the expected size of the URI record payload. |
[in,out] | p_len | Size of available memory to write as input. Size of generated payload as output. |
- Return values
-
NRF_SUCCESS | If the payload was encoded successfully. |
NRF_ERROR_NO_MEM | If the predicted payload size is bigger than the provided buffer space. |