153 const std::string &filepath);
293std::vector<std::string>
301std::map<std::string, std::vector<std::string>, std::less<>>
330std::map<std::string, std::vector<endpoint_cache_t>, std::less<>>
338std::vector<endpoint_cache_t>
Handling timeout data and ctimers sharing data.
Definition: ota_cache.hpp:65
TimeoutHandler & operator=(TimeoutHandler &&)=delete
~TimeoutHandler()
TimeoutHandler deconstructor. Will stop ctimer in shared ptr.
TimeoutHandler(timeout_handler_t input_timeout_data)
Definition: ota_cache.hpp:74
std::string get_unid() const
std::shared_ptr< timeout_handler_t > timeout_data
Definition: ota_cache.hpp:66
bool get_unid_poll_state() const
ctimer * get_ctimer_pointer() const
TimeoutHandler & operator=(const TimeoutHandler &)=delete
void set_unid_poll_state(bool state) const
TimeoutHandler()=default
TimeoutHandler constructor.
uic_ota::image_ready_funct_t get_image_ready_cb() const
std::string get_subscribe_topic() const
TimeoutHandler(TimeoutHandler &&)=delete
Definition: ota_cache.hpp:101
bool is_image_received_and_cached(const std::string &key)
Check if image is received and cached.
void clear_images_cache()
Clear out cache of images.
uic_ota::meta_t get_image_meta_info(const std::string &key)
Get image meta info.
void set_image_meta_info(const std::string &key, const uic_ota::meta_t &meta_info)
Setting image filename.
bool check_if_meta_info_received(const std::string &key)
Checks if meta info is received for image key.
void set_images_received_cached_filepath(const std::string &key, const std::string &filepath)
Set image which is received and cache it.
void remove_image_meta_info(const std::string &key)
Remove image meta info.
std::string get_image_cached_filepath(const std::string &key)
Get image which is received and cached.
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
Definition: ota_cache.hpp:190
std::map< std::string, std::vector< endpoint_cache_t >, std::less<> > get_map_status_published_cached_and_clear()
Get map of published UNID and endpoints.
void set_status_published_cached(const dotdot_unid_t &unid, const dotdot_endpoint_id_t &ep)
Set UNID and endpoint as published to.
std::vector< std::string > get_unids_listening(const std::string &uiid)
Get all UNIDs listening to a specific UIID.
void pop_unid_poll(const std::string &unid)
Pop key from image key poll.
bool is_unid_in_poll(const std::string &unid)
Check if UNID in poll.
bool get_unid_poll_state(const std::string &unid)
Get image key poll state.
std::map< std::string, std::vector< std::string >, std::less<> > get_uiids_and_unids_listening()
Get all UIIDs and UNIDs active.
void remove_unid_listening(const std::string &uiid, const std::string &unid)
Remove UNID listening on UIID.
void set_unid_listening(const std::string &uiid, const std::string &unid)
Set UNID to listening on UIID.
bool is_status_published(const dotdot_unid_t &unid, const dotdot_endpoint_id_t &ep)
Check if UNID and ep has been published to.
std::vector< endpoint_cache_t > get_endpoints_status_published_and_pop(const dotdot_unid_t &unid)
Get published status updates on UNID and pop.
std::size_t get_unids_listening_count(const std::string &uiid)
Get count of listening UNIDs to a UIID.
std::vector< std::string > get_uiids_unid_is_listening_to(const std::string &unid)
Get all UIIDs which a single UNID is listening to.
bool is_poll_topic_subscribed(const std::string &topic)
Check if the topic is already subscribed.
void set_unid_poll(std::shared_ptr< TimeoutHandler > timeout_handler)
Setting image status of a specific image key.
void set_unid_poll_state_true(const std::string &unid)
Set UNID poll state.
uic_ota::image_ready_funct_t get_unid_callback(const std::string &unid)
Get the image callback for a specific image key.
struct timeout_handler timeout_handler_t
Setting the image callback for a specific image key.
uint8_t endpoint_cache_t
Type definition for endpoint caching.
Definition: ota_cache.hpp:41
Setting the image callback for a specific image key.
Definition: ota_cache.hpp:51
std::string subscribe_topic
Definition: ota_cache.hpp:53
std::string unid
Definition: ota_cache.hpp:52
uic_ota::image_ready_funct_t image_ready_cb
Definition: ota_cache.hpp:55
struct ctimer timeout_timer
Definition: ota_cache.hpp:56
bool state
Definition: ota_cache.hpp:54
uint8_t dotdot_endpoint_id_t
Definition: uic_typedefs.h:38
const char * dotdot_unid_t
Definition: uic_typedefs.h:39