nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
uri_rec.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#ifndef NFC_NDEF_URI_REC_H_
8#define NFC_NDEF_URI_REC_H_
9
19#include <stddef.h>
20#include <zephyr/types.h>
21#include <nfc/ndef/record.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
33 NFC_URI_NONE = 0x00,
36 NFC_URI_HTTP = 0x03,
38 NFC_URI_TEL = 0x05,
42 NFC_URI_FTPS = 0x09,
43 NFC_URI_SFTP = 0x0A,
44 NFC_URI_SMB = 0x0B,
45 NFC_URI_NFS = 0x0C,
46 NFC_URI_FTP = 0x0D,
47 NFC_URI_DAV = 0x0E,
48 NFC_URI_NEWS = 0x0F,
50 NFC_URI_IMAP = 0x11,
51 NFC_URI_RTSP = 0x12,
52 NFC_URI_URN = 0x13,
53 NFC_URI_POP = 0x14,
54 NFC_URI_SIP = 0x15,
55 NFC_URI_SIPS = 0x16,
56 NFC_URI_TFTP = 0x17,
62 NFC_URI_FILE = 0x1D,
69 NFC_URI_RFU = 0xFF
72};
73
81 uint8_t const *uri_data;
83 uint16_t uri_data_len;
84};
85
91extern const uint8_t nfc_ndef_uri_rec_type;
92
110 uint8_t *buff,
111 uint32_t *len);
112
129#define NFC_NDEF_URI_RECORD_DESC_DEF(name, \
130 uri_id_code_arg, \
131 uri_data_arg, \
132 uri_data_len_arg) \
133 struct nfc_ndef_uri_rec_payload name##_ndef_uri_record_payload_desc = \
134 { \
135 .uri_id_code = (uri_id_code_arg), \
136 .uri_data = (uri_data_arg), \
137 .uri_data_len = (uri_data_len_arg) \
138 }; \
139 \
140 NFC_NDEF_GENERIC_RECORD_DESC_DEF(name, \
141 TNF_WELL_KNOWN, \
142 NULL, \
143 0, \
144 &nfc_ndef_uri_rec_type, \
145 sizeof(nfc_ndef_uri_rec_type), \
146 nfc_ndef_uri_rec_payload_encode, \
147 &name##_ndef_uri_record_payload_desc) \
148
153#define NFC_NDEF_URI_RECORD_DESC(name) NFC_NDEF_GENERIC_RECORD_DESC(name)
154
155#ifdef __cplusplus
156}
157#endif
158
161#endif /* NFC_NDEF_URI_REC_H_ */
int nfc_ndef_uri_rec_payload_encode(struct nfc_ndef_uri_rec_payload *input, uint8_t *buff, uint32_t *len)
Construct the payload for a URI record.
const uint8_t nfc_ndef_uri_rec_type
External reference to the type field of the URI record, defined in the file uri_rec....
nfc_ndef_uri_rec_id
URI identifier codes according to "URI Record Type Definition" (denotation "NFCForum-TS-RTD_URI_1....
Definition: uri_rec.h:32
@ NFC_URI_TELNET
Definition: uri_rec.h:49
@ NFC_URI_HTTPS
Definition: uri_rec.h:37
@ NFC_URI_FTP
Definition: uri_rec.h:46
@ NFC_URI_NONE
Definition: uri_rec.h:33
@ NFC_URI_FTP_FTP
Definition: uri_rec.h:41
@ NFC_URI_URN_NFC
Definition: uri_rec.h:68
@ NFC_URI_FTPS
Definition: uri_rec.h:42
@ NFC_URI_NFS
Definition: uri_rec.h:45
@ NFC_URI_URN_EPC_TAG
Definition: uri_rec.h:64
@ NFC_URI_URN_EPC_PAT
Definition: uri_rec.h:65
@ NFC_URI_TEL
Definition: uri_rec.h:38
@ NFC_URI_SIPS
Definition: uri_rec.h:55
@ NFC_URI_URN_EPC_RAW
Definition: uri_rec.h:66
@ NFC_URI_HTTP_WWW
Definition: uri_rec.h:34
@ NFC_URI_HTTPS_WWW
Definition: uri_rec.h:35
@ NFC_URI_URN
Definition: uri_rec.h:52
@ NFC_URI_BTSPP
Definition: uri_rec.h:57
@ NFC_URI_IMAP
Definition: uri_rec.h:50
@ NFC_URI_TCPOBEX
Definition: uri_rec.h:60
@ NFC_URI_URN_EPC_ID
Definition: uri_rec.h:63
@ NFC_URI_DAV
Definition: uri_rec.h:47
@ NFC_URI_SMB
Definition: uri_rec.h:44
@ NFC_URI_BTGOEP
Definition: uri_rec.h:59
@ NFC_URI_HTTP
Definition: uri_rec.h:36
@ NFC_URI_FTP_ANONYMOUS
Definition: uri_rec.h:40
@ NFC_URI_BTL2CAP
Definition: uri_rec.h:58
@ NFC_URI_POP
Definition: uri_rec.h:53
@ NFC_URI_SFTP
Definition: uri_rec.h:43
@ NFC_URI_RTSP
Definition: uri_rec.h:51
@ NFC_URI_MAILTO
Definition: uri_rec.h:39
@ NFC_URI_URN_EPC
Definition: uri_rec.h:67
@ NFC_URI_NEWS
Definition: uri_rec.h:48
@ NFC_URI_RFU
Definition: uri_rec.h:69
@ NFC_URI_SIP
Definition: uri_rec.h:54
@ NFC_URI_FILE
Definition: uri_rec.h:62
@ NFC_URI_IRDAOBEX
Definition: uri_rec.h:61
@ NFC_URI_TFTP
Definition: uri_rec.h:56
uint16_t uri_data_len
Definition: uri_rec.h:83
uint8_t const * uri_data
Definition: uri_rec.h:81
enum nfc_ndef_uri_rec_id uri_id_code
Definition: uri_rec.h:79
Type of description of the payload of a URI record.
Definition: uri_rec.h:77