forked from tperamun2/Phillips-Hue-Lighting-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScheduleItem.hpp
49 lines (31 loc) · 875 Bytes
/
ScheduleItem.hpp
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
/**
* @brief A header for the scheduleitem class which represents a scheduled event to send to the hue api
* @author Gurkiran Tatla
* @author Jake Schindler
* @author Justine Kim
* @author Paul Salvatore
* @author Timal Peramune
*/
#ifndef SCHEDULEITEM_H
#define SCHEDULEITEM_H
#include "State.hpp"
#include "Light.hpp"
#include <iostream>
#include <stdlib.h>
#include <ctime>
#include <Wt/WIOService>
class State;
class ScheduleItem {
tm* time;
State* state;
public:
ScheduleItem();
virtual ~ScheduleItem();
void setState(State* state);
void setTime(tm* time);
void sendSchedule(int id, int group, std::string ip, std::string port);
private:
void handleHttpResponseSchedule(boost::system::error_code err, const Wt::Http::Message &response);
std::string buildMessage(int id, int group);
};
#endif