Loading...
Searching...
No Matches
store_poll.c File Reference

The polling decisions the weather, stock, and calendar stores share. More...

Functions

bool store_poll_start (StorePoll *poll, int poll_min, bool live, time_t now)
 Take a store's interval and whether it is live, as its init does.
bool store_poll_set (StorePoll *poll, int poll_min, bool live, time_t now)
 Take a store's interval and whether it is live, as its reconfigure does.
bool store_poll_turn (StorePoll *poll, time_t now)
 A store's turn on the face's cadence: whether a poll should go out now.
bool store_poll_reconnect (const StorePoll *poll, int age_s)
 A store's catch-up when the phone comes back: whether to ask for its reading again.

Detailed Description

The polling decisions the weather, stock, and calendar stores share.

Each store keeps its own interval, its own first fetch, and its own request. What they share is when a poll is due and when polling is on at all.