123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- extern "C" {
- typedef enum
- {
- 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
- } nfc_uri_id_t;
- typedef struct
- {
- nfc_uri_id_t uri_id_code;
- uint8_t const * p_uri_data;
- uint8_t uri_data_len;
- } uri_payload_desc_t;
- extern const uint8_t ndef_uri_record_type;
- ret_code_t nfc_uri_payload_constructor( uri_payload_desc_t * p_input,
- uint8_t * p_buff,
- uint32_t * p_len);
- URI_ID_CODE, \
- P_URI_DATA, \
- URI_DATA_LEN) \
- uri_payload_desc_t NAME
- { \
- .uri_id_code = (URI_ID_CODE), \
- .p_uri_data = (P_URI_DATA), \
- .uri_data_len = (URI_DATA_LEN) \
- }; \
- \
- NFC_NDEF_GENERIC_RECORD_DESC_DEF( NAME, \
- TNF_WELL_KNOWN, \
- NULL, \
- 0, \
- &ndef_uri_record_type, \
- sizeof(ndef_uri_record_type), \
- nfc_uri_payload_constructor, \
- &NAME
- }
|