Line | |
---|
1 | #ifndef __COOKIE_H
|
---|
2 | #define __COOKIE_H
|
---|
3 |
|
---|
4 | #include "stm32f4xx_hal.h"
|
---|
5 | #include "main.h"
|
---|
6 | //char *str_cookie_options[4] = {"login", "password", "nonce", "time"};
|
---|
7 |
|
---|
8 | typedef struct {
|
---|
9 | uint16_t start;
|
---|
10 | uint16_t end;
|
---|
11 | uint16_t size;
|
---|
12 | }cookie_token_typDef;
|
---|
13 |
|
---|
14 | typedef struct {
|
---|
15 | char *data;
|
---|
16 | uint16_t len;
|
---|
17 | cookie_token_typDef *tokens;
|
---|
18 | uint16_t tokenCount;
|
---|
19 | }cookie_token_data_typDef;
|
---|
20 |
|
---|
21 | struct cookie_write_control {
|
---|
22 | char *buffer;
|
---|
23 | unsigned int buflen;
|
---|
24 | int stackpos;
|
---|
25 | };
|
---|
26 |
|
---|
27 | void cookie_write_open(char *buffer, unsigned int buflen);
|
---|
28 | void cookie_set(char *key, char* value);
|
---|
29 | void cookie_close(void);
|
---|
30 |
|
---|
31 | void cookie_parse_tokens(cookie_token_data_typDef *cookie);
|
---|
32 | void cookie_get_option(cookie_token_data_typDef *cookie, char *option, char *value);
|
---|
33 |
|
---|
34 | #endif /* __COOKIE_H */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.