2020-09-13 18:59:50 +02:00
|
|
|
#include "Arduino.h"
|
|
|
|
|
|
|
|
#include <WiFi.h>
|
|
|
|
#include <WiFiClientSecure.h>
|
|
|
|
|
2020-10-25 10:45:00 +01:00
|
|
|
// To get vars from main file
|
2020-10-25 15:58:40 +01:00
|
|
|
extern char *timeZone;
|
2020-10-25 10:45:00 +01:00
|
|
|
extern char calName[5][31];
|
|
|
|
extern char calStart[5][26];
|
|
|
|
extern char calTitle[5][81];
|
2020-09-13 18:59:50 +02:00
|
|
|
|
|
|
|
// Wifi ssid and password
|
|
|
|
extern char *ssid;
|
|
|
|
extern char *pass;
|
|
|
|
|
2020-10-25 10:45:00 +01:00
|
|
|
extern char *calendarURL;
|
|
|
|
|
2020-09-13 18:59:50 +02:00
|
|
|
#ifndef NETWORK_H
|
|
|
|
#define NETWORK_H
|
|
|
|
|
|
|
|
// All functions defined in Network.cpp
|
|
|
|
|
|
|
|
class Network
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// Functions we can access in main file
|
|
|
|
void begin();
|
|
|
|
void getTime(int *timeDigits);
|
|
|
|
void off();
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Functions called from within our class
|
|
|
|
void setTime();
|
2020-10-25 10:45:00 +01:00
|
|
|
void setCalendar();
|
|
|
|
size_t utf8_to_latin9(char *const output, const char *const input, const size_t length);
|
2020-09-13 18:59:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|