42 lines
827 B
C

struct node {
struct node *next;
int e;
};
struct Hashtable {
unsigned Tablesize;
struct node *Cells;
};
struct forecast_temp{
float min;
float max;
char desc[25];
char icon[8];
};
struct meteoforecast_data{
int datetime;
bool isValid;
struct forecast_temp previsions;
};
typedef void (*weather_data_callback)(struct meteoforecast_data *datas);
typedef struct {
unsigned int humidity;
float temperature;
float pressure;
unsigned long retreival_period;
weather_data_callback data_retreived_cb;
} weather_data;
void printftemp(struct forecast_temp *tmp);
void printffd(struct meteoforecast_data *tmp);
void on_weather_data_retrieval(weather_data_callback data_retreived_cb);
void initialise_weather_data_retrieval(unsigned long retreival_period);