|
hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
|
Model interface to create URI record types and get/set record fields. More...
#include <stddef.h>#include <stdint.h>#include "infineon/ifx-error.h"#include "infineon/ifx-utils.h"#include "infineon/ifx-ndef-record.h"Go to the source code of this file.
Macros | |
| #define | IFX_RECORD_URI_SET UINT8_C(0x01) |
| Identifier for model set URI record ID. | |
| #define | IFX_RECORD_URI_GET UINT8_C(0x02) |
| Identifier for model get URI record ID. | |
| #define | IFX_RECORD_URI_RELEASE_MEMORY UINT8_C(0x03) |
| Identifier for model URI record release memory. | |
| #define | IFX_RECORD_URI_TYPE {UINT8_C(0x55)} |
| Type information for uri record 'U'. | |
| #define | IFX_RECORD_IDENTIFIER_CODE_MAX UINT8_C(0x24) |
| Identifier code maximum numbers in list. | |
Enumerations | |
| enum | ifx_record_uri_identifier { IFX_URI_NA = 0x00 , IFX_URI_HTTP_WWW = 0x01 , IFX_URI_HTTPS_WWW = 0x02 , IFX_URI_HTTP = 0x03 , IFX_URI_HTTPS = 0x04 , IFX_URI_TEL = 0x05 , IFX_URI_MAILTO = 0x06 , IFX_URI_FTP_ANONYMOUS_ANONYMOUS = 0x07 , IFX_URI_FTP_FTP = 0x08 , IFX_URI_FTPS = 0x09 , IFX_URI_SFTP = 0x0A , IFX_URI_SMB = 0x0B , IFX_URI_NFS = 0x0C , IFX_URI_FTP = 0x0D , IFX_URI_DAV = 0x0E , IFX_URI_NEWS = 0x0F , IFX_URI_TELNET = 0x10 , IFX_URI_IMAP = 0x11 , IFX_URI_RTSP = 0x12 , IFX_URI_URN = 0x13 , IFX_URI_POP = 0x14 , IFX_URI_SIP = 0x15 , IFX_URI_SIPS = 0x16 , IFX_URI_TFTP = 0x17 , IFX_URI_BTSPP = 0x18 , IFX_URI_BT12CAP = 0x19 , IFX_URI_BTGOEP = 0x1A , IFX_URI_TCPOBEX = 0x1B , IFX_URI_IRDAOBEX = 0x1C , IFX_URI_FILE = 0x1D , IFX_URI_URN_EPC_ID = 0x1E , IFX_URI_URN_EPC_TAG = 0x1F , IFX_URI_URN_EPC_PAT = 0x20 , IFX_URI_URN_EPC_RAW = 0x21 , IFX_URI_URN_EPC = 0x22 , IFX_URI_URN_NFC = 0x23 } |
| URI identifiers for URI records identifier code. More... | |
Functions | |
| ifx_status_t | ifx_record_uri_new (ifx_record_handle_t *handle) |
| Creates a new URI record and handle of the created record. This handle holds the values of the record needed for encode and decode operations. | |
| ifx_status_t | ifx_record_uri_get_identifier (const ifx_record_handle_t *handle, ifx_blob_t *identifier) |
| Gets the identifier bytes from the URI record. | |
| ifx_status_t | ifx_record_uri_get_identifier_code (const ifx_record_handle_t *handle, uint8_t *identifier_code) |
| Gets the identifier code from the URI record details. | |
| ifx_status_t | ifx_record_uri_get_uri (const ifx_record_handle_t *handle, ifx_blob_t *uri) |
| Gets the URI value field from the URI record. | |
| ifx_status_t | ifx_record_uri_get_uri_with_identifier (const ifx_record_handle_t *handle, ifx_blob_t *uri_with_identifier) |
| Gets the URI value along with the identifier from the URI record. | |
| ifx_status_t | ifx_record_uri_set_identifier (ifx_record_handle_t *handle, const ifx_blob_t *identifier) |
| Sets an identifier code value of the record handle from the identifier bytes. | |
| ifx_status_t | ifx_record_uri_set_identifier_code (ifx_record_handle_t *handle, uint8_t identifier_code) |
| Sets the identifier code in the URI record details. | |
| ifx_status_t | ifx_record_uri_set_uri (ifx_record_handle_t *handle, const ifx_blob_t *uri) |
| Sets the URI value in the URI record details. | |
Model interface to create URI record types and get/set record fields.
For more details refer to technical specification document for URI Record Type Definition(NFCForum-TS-RTD_URI_1.0)
Definition in file ifx-record-uri.h.
| #define IFX_RECORD_IDENTIFIER_CODE_MAX UINT8_C(0x24) |
Identifier code maximum numbers in list.
Definition at line 48 of file ifx-record-uri.h.
| #define IFX_RECORD_URI_GET UINT8_C(0x02) |
Identifier for model get URI record ID.
Definition at line 34 of file ifx-record-uri.h.
| #define IFX_RECORD_URI_RELEASE_MEMORY UINT8_C(0x03) |
Identifier for model URI record release memory.
Definition at line 39 of file ifx-record-uri.h.
| #define IFX_RECORD_URI_SET UINT8_C(0x01) |
Identifier for model set URI record ID.
Definition at line 29 of file ifx-record-uri.h.
| #define IFX_RECORD_URI_TYPE {UINT8_C(0x55)} |
Type information for uri record 'U'.
Definition at line 43 of file ifx-record-uri.h.
URI identifiers for URI records identifier code.
User can directly use the enums to identify uri identifier code and pass identifier code value separately.
Definition at line 57 of file ifx-record-uri.h.
| ifx_status_t ifx_record_uri_get_identifier | ( | const ifx_record_handle_t * | handle, |
| ifx_blob_t * | identifier ) |
Gets the identifier bytes from the URI record.
| [in] | handle | Pointer to the record handle. |
| [out] | identifier | Pointer to the BLOB type data field and length excluded NULL termination character. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| IFX_RECORD_URI_IDENTIFIER_INVALID | CODE if identifier code does not match with existing list |
| ifx_status_t ifx_record_uri_get_identifier_code | ( | const ifx_record_handle_t * | handle, |
| uint8_t * | identifier_code ) |
Gets the identifier code from the URI record details.
| [in] | handle | Pointer to the record handle. |
| [out] | identifier_code | Pointer to the URI identifier code. |
| IFX_SUCCESS | If the get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_uri_get_uri | ( | const ifx_record_handle_t * | handle, |
| ifx_blob_t * | uri ) |
Gets the URI value field from the URI record.
| [in] | handle | Pointer to the record handle. |
| [out] | uri | Pointer to the BLOB type data, data field and length excluded NULL ('\0') termination character. |
| IFX_SUCCESS | If get operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_uri_get_uri_with_identifier | ( | const ifx_record_handle_t * | handle, |
| ifx_blob_t * | uri_with_identifier ) |
Gets the URI value along with the identifier from the URI record.
| [in] | handle | Pointer to the URI record handle. |
| [out] | uri_with_identifier | Pointer to the BLOB type data, if URI identifier code is not supported then return URI bytes without identifier bytes data field and length excluded NULL termination character. |
| IFX_SUCCESS | If identifier code matches with existing list, populates uri_value + identifier |
| IFX_RECORD_URI_IDENTIFIER_INVALID | CODE If identifier code does not match, still it populates uri_value |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_uri_new | ( | ifx_record_handle_t * | handle | ) |
Creates a new URI record and handle of the created record. This handle holds the values of the record needed for encode and decode operations.
| handle | Pointer to the record handle. |
| IFX_SUCCESS | If model new URI record operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| ifx_status_t ifx_record_uri_set_identifier | ( | ifx_record_handle_t * | handle, |
| const ifx_blob_t * | identifier ) |
Sets an identifier code value of the record handle from the identifier bytes.
| [out] | handle | Pointer to the record type handle. |
| [in] | identifier | Pointer to BLOB type identifier bytes. BLOB data field and length excluded NULL termination character |
| IFX_SUCCESS | If the set operation is successful |
| IFX_RECORD_URI_IDENTIFIER_CODE_INVALID | If identifier code does not match with existing list |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_URI_IDENTIFIER_INVALID | If identifier bytes is not matching with existing list |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_uri_set_identifier_code | ( | ifx_record_handle_t * | handle, |
| uint8_t | identifier_code ) |
Sets the identifier code in the URI record details.
| [out] | handle | Pointer to the record handle. |
| [in] | identifier_code | Identifier code data |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_RECORD_INVALID | If record type is invalid |
| ifx_status_t ifx_record_uri_set_uri | ( | ifx_record_handle_t * | handle, |
| const ifx_blob_t * | uri ) |
Sets the URI value in the URI record details.
| [out] | handle | Pointer to the record handle. |
| [in] | uri | Pointer to the BLOB type data, data field, and length excluded NULL termination character. |
| IFX_SUCCESS | If the set operation is successful |
| IFX_ILLEGAL_ARGUMENT | If invalid/NULL parameter is passed to function |
| IFX_OUT_OF_MEMORY | If memory allocation is invalid |
| IFX_RECORD_INVALID | If record type is invalid |