#ifndef WLAN_H
#define WLAN_H

#include "config.h"
#include <ESP8266WiFi.h>
#include <PubSubClient.h>

void initial_connection(const char *ssid, const char *psk);
void connect_wlan(Config *config);
void connect_mqtt(PubSubClient &client, Config *config);
void disconnect_mqtt(PubSubClient &client, const char *topic);
size_t construct_json(float *data, char *buffer, int buffer_size);
void mqtt_transfer(PubSubClient &client, Config *config, float *data);
void enter_deep_sleep(bool wifi_timeout, int sleep_time);

#endif /* WLAN_H */
