Go to the documentation of this file.
154 #include <global-hal.h>
158 namespace VirgilIoTKit {
163 #define VS_UPD_URL_STR_SIZE 200
199 const char *request_body,
200 size_t request_body_size,
204 size_t *in_out_size);
319 const char *device_cert,
320 const char *priv_key,
321 const char *ca_cert);
339 const char *password,
vs_cloud_mb_init_func_t init
Message bin initialization.
Definition: cloud.h:355
@ VS_CLOUD_MB_TOPIC_FW
Firmware.
Definition: cloud.h:250
@ VS_CLOUD_REQUEST_GET
HTTP request by GET method.
Definition: cloud.h:178
Cloud implementation.
Definition: cloud.h:207
Security Module implementation.
Definition: secmodule.h:458
vs_cloud_mb_topic_id_t
Default topics.
Definition: cloud.h:248
vs_status_e
Status code.
Definition: status_code.h:77
vs_cloud_http_request_func_t http_request
GET and POST requests processing.
Definition: cloud.h:208
vs_status_e vs_cloud_init(const vs_cloud_impl_t *cloud_impl, const vs_cloud_message_bin_impl_t *message_bin_impl, vs_secmodule_impl_t *secmodule)
Initialize message bin.
@ VS_CLOUD_MB_TOPIC_TL
Trust List.
Definition: cloud.h:249
vs_cloud_http_method_e
Definition: cloud.h:177
vs_status_e vs_cloud_message_bin_register_default_handler(vs_cloud_mb_topic_id_t topic_id, vs_cloud_mb_process_default_topic_cb_t handler)
Register processing handlers for default topics from vs_cloud_mb_topic_id_t enumeration.
void(* vs_cloud_mb_process_custom_topic_cb_t)(const char *topic, uint16_t topic_sz, const uint8_t *data, uint16_t length)
Implementation for custom topics processing.
Definition: cloud.h:262
vs_cloud_mb_process_func_t process
Message bin processing : listen incoming messages and executing implementation calls.
Definition: cloud.h:358
Status codes and macroses.
vs_cloud_mb_connect_subscribe_func_t connect_subscribe
Message bin connection and topic subscribing.
Definition: cloud.h:356
vs_status_e(* vs_cloud_mb_connect_subscribe_func_t)(const char *client_id, const char *login, const char *password, const vs_cloud_mb_topics_list_t *topic_list, vs_cloud_mb_process_custom_topic_cb_t process_topic)
Message bin connection and subscription to topic implementation.
Definition: cloud.h:337
Message Bin implementation.
Definition: cloud.h:354
vs_status_e(* vs_cloud_mb_init_func_t)(const char *host, uint16_t port, const char *device_cert, const char *priv_key, const char *ca_cert)
Message bin initialization.
Definition: cloud.h:317
Firmware uploading/downloading and installation implementation.
vs_status_e(* vs_cloud_http_request_func_t)(vs_cloud_http_method_e method, const char *url, const char *request_body, size_t request_body_size, char *out_data, vs_fetch_handler_cb_t fetch_handler, void *hander_data, size_t *in_out_size)
Implementation for GET and POST requests processing.
Definition: cloud.h:197
vs_status_e vs_cloud_fetch_and_store_fw_file(const char *fw_file_url, vs_firmware_header_t *fetched_header)
Fetch and store Firmware.
vs_status_e vs_cloud_fetch_and_store_tl(const char *tl_file_url)
Fetch and store Trust List.
vs_status_e vs_cloud_message_bin_register_custom_handler(vs_cloud_mb_process_custom_topic_cb_t handler)
Register custom handler implementation.
size_t topic_count
Topics amount for topic_list and topic_len_list.
Definition: cloud.h:241
size_t(* vs_fetch_handler_cb_t)(const char *contents, size_t chunksize, void *userdata)
Implementation for data header download.
Definition: cloud.h:175
uint16_t * topic_len_list
List for each topis size.
Definition: cloud.h:240
List of available topics.
Definition: cloud.h:238
vs_status_e(* vs_cloud_mb_process_func_t)(void)
Message Bin processing.
Definition: cloud.h:351
@ VS_CLOUD_REQUEST_POST
HTTP request by POST method.
Definition: cloud.h:179
char * topic_list
Text string with all topics.
Definition: cloud.h:239
vs_status_e vs_cloud_message_bin_process(void)
Process message bin.
void(* vs_cloud_mb_process_default_topic_cb_t)(const uint8_t *url, uint16_t length)
Implementation for default topics processing.
Definition: cloud.h:276