smartPOC-tx/include/dwd.h
cheetah c3e574f443
Some checks failed
build / build (push) Has been cancelled
moved files to include
2025-03-30 17:11:51 +02:00

29 lines
No EOL
573 B
C++

#if !defined(_DWD_H)
#define _DWD_H
#include <WiFiClient.h>
#include <HTTPClient.h>
class DWDClient
{
public:
WiFiClient *_client;
String currentMessage;
explicit DWDClient(WiFiClient *client);
void begin(int intervalMinutes, String region);
void check();
void loop();
bool isDirty();
private:
bool _dirty;
unsigned long lastCheck = 0;
unsigned long checkInterval = 300000;
String lastMessage;
String rssUrl;
String rssData;
HTTPClient _http;
String parseRSS(String xmlData);
String extractTagContent(String source, String tag);
};
#endif