source: S-port/trunk/Core/Inc/cookie.h

Last change on this file was 1, checked in by AlexLir, 3 years ago
File size: 795 bytes
RevLine 
[1]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
8typedef struct {
9 uint16_t start;
10 uint16_t end;
11 uint16_t size;
12}cookie_token_typDef;
13
14typedef struct {
15 char *data;
16 uint16_t len;
17 cookie_token_typDef *tokens;
18 uint16_t tokenCount;
19}cookie_token_data_typDef;
20
21struct cookie_write_control {
22 char *buffer;
23 unsigned int buflen;
24 int stackpos;
25};
26
27void cookie_write_open(char *buffer, unsigned int buflen);
28void cookie_set(char *key, char* value);
29void cookie_close(void);
30
31void cookie_parse_tokens(cookie_token_data_typDef *cookie);
32void 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.