-
Notifications
You must be signed in to change notification settings - Fork 0
/
dynamic_resource.h
42 lines (29 loc) · 1.28 KB
/
dynamic_resource.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
//---------------------------------------------------------------------------------------------------------------------
/*!
\file
\brief Container for "topics" published on the server and "pushed" to clients.
*/
//---------------------------------------------------------------------------------------------------------------------
#ifndef DYNAMIC_RESOURCE_H_INCLUDED
#define DYNAMIC_RESOURCE_H_INCLUDED
/* -- Includes ------------------------------------------------------------ */
#include <string>
#include <stdint.h>
/* -- Defines ------------------------------------------------------------- */
/* -- Types --------------------------------------------------------------- */
class DynamicResource
{
public:
DynamicResource(const std::string& uri, const std::string& statusCode="200 OK");
void setContentType(const std::string& contentType);
void setContent(const std::string& content);
std::string uri;
std::string content;
std::string contentType;
std::string statusCode;
uint32_t hash;
};
/* -- Global Variables ---------------------------------------------------- */
/* -- Function Prototypes ------------------------------------------------- */
/* -- Implementation ------------------------------------------------------ */
#endif // TCPCONNECT_H_INCLUDED