-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeatherListener.h
55 lines (42 loc) · 1.09 KB
/
WeatherListener.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#pragma once
#include <JsonListener.h>
class WeatherListener: public JsonListener {
private:
bool in_data;
bool in_icon;
bool got_icon;
bool in_temperatureMin;
bool got_temperatureMin;
bool in_temperatureMax;
bool got_temperatureMax;
bool in_summary;
bool got_summary_daily;
bool got_summary_weekly;
public:
WeatherListener()
: in_data(false),
in_icon(false),
got_icon(false),
in_temperatureMin(false),
got_temperatureMin(false),
in_temperatureMax(false),
got_temperatureMax(false),
in_summary(false),
got_summary_daily(false),
got_summary_weekly(false),
JsonListener() { }
String icon;
int8_t temperatureMax;
int8_t temperatureMin;
String summary_daily;
String summary_weekly;
void whitespace(char c) {};
void startDocument() {};
virtual void key(String key);
virtual void value(String value);
virtual void endArray();
void endObject() {};
void endDocument() {};
void startArray() {};
void startObject() {};
};