Unify Framework Lib 1.6.0
ota_download.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
99#ifndef OTA_DOWNLOAD_HPP
100#define OTA_DOWNLOAD_HPP
101
102#include "ota.hpp"
103
105{
111void set_image_cache_size(unsigned long int cache_size);
112
118void set_image_base_path(const std::string &image_base_path);
119
127 const uic_ota::image_available_func_t &image_available_cb);
128
135
144void info_callback(const char *topic,
145 const char *message,
146 const size_t message_length);
147
160void get(const std::string &image_key,
161 const std::string &subscribe_topic,
162 const std::string &publish_topic,
163 const uic_ota::image_ready_funct_t &image_ready_cb,
164 uint32_t timeout_s);
165} // namespace ota_download
166
167#endif //OTA_DOWNLOAD_HPP
Definition: ota_download.hpp:105
bool available_info_callback_initialized()
Check if available info callback is initialized.
void set_image_available_callback(const uic_ota::image_available_func_t &image_available_cb)
Set the callback called for available images.
void get(const std::string &image_key, const std::string &subscribe_topic, const std::string &publish_topic, const uic_ota::image_ready_funct_t &image_ready_cb, uint32_t timeout_s)
Function for downloading images.
void info_callback(const char *topic, const char *message, const size_t message_length)
Callback function to be called when revceiving image files information on info topic.
void set_image_base_path(const std::string &image_base_path)
Set the image base path where image files are saved.
void set_image_cache_size(unsigned long int cache_size)
Set the image cache size for download.
std::function< void(const image_ready_result_t, const std::string &)> image_ready_funct_t
this callback is returned when the actually firmware image is downloaded and stored to disk,...
Definition: ota.hpp:209
std::function< void(const meta_t &)> image_available_func_t
Callback function that is triggered when an new firmware image is detected on the image provider.
Definition: ota.hpp:201