Google Cloud IoT device SDK for embedded C  1.0.2
iotc_types.h File Reference

Go to the source code of this file.

Data Structures

union  iotc_sub_call_params_u
 
union  iotc_crypto_key_union_u
 
struct  iotc_crypto_key_data_t
 

Typedefs

typedef int32_t iotc_context_handle_t
 
typedef int32_t iotc_timed_task_handle_t
 
typedef void() iotc_user_task_callback_t(const iotc_context_handle_t context_handle, const iotc_timed_task_handle_t timed_task_handle, void *user_data)
 
typedef void() iotc_user_callback_t(iotc_context_handle_t in_context_handle, void *data, iotc_state_t state)
 
typedef enum iotc_subscription_data_type_e iotc_sub_call_type_t
 
typedef union iotc_sub_call_params_u iotc_sub_call_params_t
 
typedef void() iotc_user_subscription_callback_t(iotc_context_handle_t in_context_handle, iotc_sub_call_type_t call_type, const iotc_sub_call_params_t *const params, iotc_state_t state, void *user_data)
 
typedef enum iotc_crypto_key_union_type_e iotc_crypto_key_union_type_t
 
typedef union iotc_crypto_key_union_u iotc_crypto_key_union_t
 
typedef enum iotc_crypto_key_signature_algorithm_e iotc_crypto_key_signature_algorithm_t
 

Enumerations

enum  iotc_subscription_data_type_e { IOTC_SUB_CALL_UNKNOWN = 0, IOTC_SUB_CALL_SUBACK, IOTC_SUB_CALL_MESSAGE }
 
enum  iotc_crypto_key_union_type_e { IOTC_CRYPTO_KEY_UNION_TYPE_PEM = 0, IOTC_CRYPTO_KEY_UNION_TYPE_SLOT_ID, IOTC_CRYPTO_KEY_UNION_TYPE_CUSTOM }
 
enum  iotc_crypto_key_signature_algorithm_e { IOTC_CRYPTO_KEY_SIGNATURE_ALGORITHM_INVALID = 0, IOTC_CRYPTO_KEY_SIGNATURE_ALGORITHM_ES256 }
 

Detailed Description

Defines custom data formats.

Definition in file iotc_types.h.

Typedef Documentation

◆ iotc_context_handle_t

An internal context handle.

Definition at line 44 of file iotc_types.h.

◆ iotc_crypto_key_signature_algorithm_t

The ES256 algorithm with which to sign JWTs.

◆ iotc_crypto_key_union_t

The public or private key data.

See also
iotc_crypto_key_union_u

◆ iotc_crypto_key_union_type_t

The internal code that represents the data type of the public or private key.

See also
iotc_crypto_key_union_type_e

◆ iotc_sub_call_params_t

The operational data for the user-defined subscription callback.

See also
iotc_sub_call_params_u

◆ iotc_sub_call_type_t

The data type of the user-defined subscription callback.

See also
iotc_subscription_data_type_e

◆ iotc_timed_task_handle_t

The handle to identify timed tasks.

Definition at line 50 of file iotc_types.h.

◆ iotc_user_callback_t

iotc_user_callback_t

A custom callback. The API-specific parameters are cast to the data types in the API call.

Parameters
[in]in_context_handleThe context handle provided to the original API call.
[in]dataThe API-specific parameters.
[in]stateThe state on which to invoke the callback.

Definition at line 78 of file iotc_types.h.

◆ iotc_user_subscription_callback_t

iotc_user_subscription_callback_t

The subscription callback.

Parameters
[in]in_context_handleThe context on which the callback is invoked.
[in]call_typeThe data type of the data parameter.
[in]paramsA pointer to a structure that holds parameter details.
[in]topicThe name of the topic.
[in]user_dataA pointer specified when registering the subscription callback.

Definition at line 187 of file iotc_types.h.

◆ iotc_user_task_callback_t

iotc_user_task_callback_t

A custom callback for timed tasks.

Parameters
[in]in_context_handleThe context handle provided to the function that schedules timed tasks.
[in]timed_task_handleThe handle that identifies the timed task.
[in]user_dataThe data provided to the function that schedules timed tasks

Definition at line 63 of file iotc_types.h.

Enumeration Type Documentation

◆ iotc_crypto_key_signature_algorithm_e

Enumerator
IOTC_CRYPTO_KEY_SIGNATURE_ALGORITHM_INVALID 

The signature algorithm is invalid.

IOTC_CRYPTO_KEY_SIGNATURE_ALGORITHM_ES256 

The signature algorithm is an ECDSA with P-256 and SHA-256.

Definition at line 247 of file iotc_types.h.

◆ iotc_crypto_key_union_type_e

Enumerator
IOTC_CRYPTO_KEY_UNION_TYPE_PEM 

The public or private key data is a null-terminated PEM string.

IOTC_CRYPTO_KEY_UNION_TYPE_SLOT_ID 

Slot IDs address the public or private key data. These are the same slots from which the BSP reads the key.

IOTC_CRYPTO_KEY_UNION_TYPE_CUSTOM 

The public or private key data is untyped. The BSP determines the data format.

Definition at line 199 of file iotc_types.h.

◆ iotc_subscription_data_type_e

Enumerator
IOTC_SUB_CALL_UNKNOWN 

Unknown callback type. Check the state value.

IOTC_SUB_CALL_SUBACK 

The callback is a SUBACK notification.

IOTC_SUB_CALL_MESSAGE 

The callback is a MESSAGE notification.

Definition at line 87 of file iotc_types.h.