semilimes mcu sdk
0.1
semilimes Software Development Kit for microcontrollers
Loading...
Searching...
No Matches
header.h
1
#ifndef _header_
2
#define _header_
3
4
#include "../defines.h"
5
6
class
Header
7
{
8
private
:
9
char
** pauth;
10
char
** pjson;
11
char
** pwsheader;
12
SmeJson json_data;
13
14
// Function: Header.setJSON
15
16
// create the Autorization json
17
18
// Prototype:
19
// void Header::setJSON();
20
21
// Parameters:
22
23
// Returns:
25
26
void
setJSON();
27
28
public
:
29
30
// Function: Header
31
32
// set the api-key, and provide the pointers to json and websocket header array
33
34
// Prototype:
35
// Header(char* auth, char* json, char* wsheader);
36
37
// Parameters:
41
42
// Returns:
44
Header
(
char
* auth,
char
* json,
char
* wsheader)
45
{
46
pauth = &auth;
47
pjson = &json;
48
pwsheader = &wsheader;
49
json_data.initJson(*pjson);
50
}
51
52
// Function: Header.setAuthorization
53
54
// set the api-key
55
56
// Prototype:
57
// void Header::setAuthorization(char* apikey);
58
59
// Parameters:
61
62
// Returns:
64
65
void
setAuthorization
(
char
* apikey);
66
67
// Function: Header.getHttpsUrl
68
69
// return the https server url
70
71
// Prototype:
72
// char* Header::getHttpsUrl();
73
74
// Parameters:
75
76
// Returns:
78
79
char
*
getHttpsUrl
();
80
81
// Function: Header.getwsEP
82
83
// return the web socket endpoint
84
85
// Prototype:
86
// char* Header::getwsEP();
87
88
// Parameters:
89
90
// Returns:
92
93
char
*
getWsEP
();
94
95
// Function: Header.getwsClientEP
96
97
// return the web socket client endpoint
98
99
// Prototype:
100
// char* Header::getwsClientEP();
101
102
// Parameters:
103
104
// Returns:
106
107
char
*
getWsClientEP
();
108
109
// Function: Header.getwsHost
110
111
// return the web socket host
112
113
// Prototype:
114
// char* Header::getwsHost();
115
116
// Parameters:
117
118
// Returns:
120
121
char
*
getWsHost
();
122
123
// Function: Header.getwsPort
124
125
// return the web socket port
126
127
// Prototype:
128
// int Header::getwsPort();
129
130
// Parameters:
131
132
// Returns:
134
135
int
getWsPort
();
136
137
// Function: Header.getWsHeader
138
139
// return the formatted websocket header
140
141
// Prototype:
142
// char* Header::getWsHeader();
143
144
// Parameters:
145
146
// Returns:
148
149
char
*
getWsHeader
();
150
151
// Function: Header.getContentType
152
153
// return the contentType
154
155
// Prototype:
156
// char* Header::getContentType();
157
158
// Parameters:
159
160
// Returns:
162
163
char
*
getContentType
();
164
165
// Function: Header.getAuthorization
166
167
// return the authorization
168
169
// Prototype:
170
// char* Header::getAuthorization();
171
172
// Parameters:
173
174
// Returns:
176
177
char
*
getAuthorization
();
178
179
// Function: Header.getAuthorization
180
181
// return the accept
182
183
// Prototype:
184
// char* Header::getAccept();
185
186
// Parameters:
187
188
// Returns:
190
191
char
*
getAccept
();
192
};
193
194
#endif
Header
Definition
header.h:7
Header::getWsHost
char * getWsHost()
Definition
header.cpp:85
Header::getAuthorization
char * getAuthorization()
Definition
header.cpp:177
Header::getContentType
char * getContentType()
Definition
header.cpp:160
Header::getWsClientEP
char * getWsClientEP()
Definition
header.cpp:68
Header::getWsHeader
char * getWsHeader()
Definition
header.cpp:138
Header::getWsPort
int getWsPort()
Definition
header.cpp:102
Header::getWsEP
char * getWsEP()
Definition
header.cpp:51
Header::getAccept
char * getAccept()
Definition
header.cpp:194
Header::getHttpsUrl
char * getHttpsUrl()
Definition
header.cpp:34
Header::setAuthorization
void setAuthorization(char *apikey)
Definition
header.cpp:16
Header::Header
Header(char *auth, char *json, char *wsheader)
Definition
header.h:44
semilimes
src
account
header.h
Generated by
1.12.0