-
Notifications
You must be signed in to change notification settings - Fork 0
/
ihomesession.h
45 lines (41 loc) · 1.09 KB
/
ihomesession.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
#ifndef IHOMESESSION_H
#define IHOMESESSION_H
#include "protocol.h"
#include "ierror.h"
#include "md5.h"
#include "ssocket.h"
#include "video.h"
#include <iostream>
#include <xpath_static.h>
using namespace std;
class IHomeSession
{
public:
IHomeSession();
bool StartSession(int sock);
bool GetRequest(Request *req,int sock);
bool DealRequest(Request *req,int sock);
private:
bool Auth(Request *req,int sock);
bool GetTW(Request *req,int sock);
bool LedControl(Request *req,int sock);
bool LedState(Request *req,int sock);
bool Video(Request *req,int sock);
bool VideoEnd(Request *req,int sock);
bool VideoStream(Request *req,int sock);
bool Voice(Request *req,int sock);
bool VoiceEnd(Request *req,int sock);
bool VoiceStream(Request *req,int sock);
bool Quit(Request *req,int sock);
bool SendResponse(Request *req,int code,int sock);
private:
bool bQuit;
bool authOK;
TiXmlDocument *document;
TiXmlElement *root;
SSocket serverSock;
//ZigbeeCom zigbee;
video cam;
bool stopped;
};
#endif // IHOMESESSION_H