hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
Macros | Functions
ifx-record-mime.h File Reference

Model interface to create the MIME record types and set/get record fields. More...

#include <stddef.h>
#include <stdint.h>
#include "infineon/ifx-error.h"
#include "infineon/ifx-ndef-record.h"
#include "infineon/ifx-utils.h"

Go to the source code of this file.

Macros

#define IFX_RECORD_MIME_NEW   UINT8_C(0x01)
 Identifier for model new MIME record.
 
#define IFX_RECORD_MIME_SET   UINT8_C(0x02)
 Identifier for model set MIME record ID.
 
#define IFX_RECORD_MIME_GET   UINT8_C(0x03)
 Identifier for model get MIME record ID.
 

Functions

ifx_status_t ifx_record_mime_new (ifx_record_handle_t *handle, const ifx_blob_t *type)
 Creates a new Multipurpose Internet Mail Extensions (MIME) 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_mime_set_payload (ifx_record_handle_t *handle, const ifx_blob_t *payload)
 Sets the payload in the MIME record for the given record handle.
 
ifx_status_t ifx_record_mime_get_payload (const ifx_record_handle_t *handle, ifx_blob_t *payload)
 Gets the payload from the MIME record for the given record handle.
 

Detailed Description

Model interface to create the MIME record types and set/get record fields.

Definition in file ifx-record-mime.h.

Macro Definition Documentation

◆ IFX_RECORD_MIME_GET

#define IFX_RECORD_MIME_GET   UINT8_C(0x03)

Identifier for model get MIME record ID.

Definition at line 38 of file ifx-record-mime.h.

◆ IFX_RECORD_MIME_NEW

#define IFX_RECORD_MIME_NEW   UINT8_C(0x01)

Identifier for model new MIME record.

Definition at line 28 of file ifx-record-mime.h.

◆ IFX_RECORD_MIME_SET

#define IFX_RECORD_MIME_SET   UINT8_C(0x02)

Identifier for model set MIME record ID.

Definition at line 33 of file ifx-record-mime.h.

Function Documentation

◆ ifx_record_mime_get_payload()

ifx_status_t ifx_record_mime_get_payload ( const ifx_record_handle_t * handle,
ifx_blob_t * payload )

Gets the payload from the MIME record for the given record handle.

Parameters
[out]handlePointer to the record handle.
[in]payloadPointer to the payload.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the get operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid

◆ ifx_record_mime_new()

ifx_status_t ifx_record_mime_new ( ifx_record_handle_t * handle,
const ifx_blob_t * type )

Creates a new Multipurpose Internet Mail Extensions (MIME) record and handle of the created record. This handle holds the values of the record needed for encode and decode operations.

Parameters
[out]handleHandle of the created MIME record.
[in]typePointer to the type.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the record creation operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid

◆ ifx_record_mime_set_payload()

ifx_status_t ifx_record_mime_set_payload ( ifx_record_handle_t * handle,
const ifx_blob_t * payload )

Sets the payload in the MIME record for the given record handle.

Parameters
[out]handlePointer to the record handle.
[in]payloadPointer to the payload.
Returns
ifx_status_t
Return values
IFX_SUCCESSIf the set operation is successful
IFX_ILLEGAL_ARGUMENTIf invalid/NULL parameter is passed to function
IFX_OUT_OF_MEMORYIf memory allocation is invalid