diff options
Diffstat (limited to 'src/microspdy/alstructures.h')
-rw-r--r-- | src/microspdy/alstructures.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/microspdy/alstructures.h b/src/microspdy/alstructures.h new file mode 100644 index 00000000..61eb8cb6 --- /dev/null +++ b/src/microspdy/alstructures.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | This file is part of libmicrospdy | ||
3 | Copyright (C) 2012 Andrey Uzunov | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 3 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | /** | ||
20 | * @file alstructures.h | ||
21 | * @brief structures only for the application layer | ||
22 | * @author Andrey Uzunov | ||
23 | */ | ||
24 | |||
25 | #ifndef ALSTRUCTURES_H | ||
26 | #define ALSTRUCTURES_H | ||
27 | |||
28 | #include "platform.h" | ||
29 | |||
30 | |||
31 | /** | ||
32 | * Represents a SPDY request. | ||
33 | */ | ||
34 | struct SPDY_Request | ||
35 | { | ||
36 | /** | ||
37 | * SPDY stream in whose context the request was received | ||
38 | */ | ||
39 | struct SPDYF_Stream *stream; | ||
40 | |||
41 | /** | ||
42 | * Other HTTP headers from the request | ||
43 | */ | ||
44 | struct SPDY_NameValue *headers; | ||
45 | |||
46 | /** | ||
47 | * HTTP method | ||
48 | */ | ||
49 | char *method; | ||
50 | |||
51 | /** | ||
52 | * HTTP path | ||
53 | */ | ||
54 | char *path; | ||
55 | |||
56 | /** | ||
57 | * HTTP version just like in HTTP request/response: | ||
58 | * "HTTP/1.0" or "HTTP/1.1" currently | ||
59 | */ | ||
60 | char *version; | ||
61 | |||
62 | /** | ||
63 | * called host as in HTTP | ||
64 | */ | ||
65 | char *host; | ||
66 | |||
67 | /** | ||
68 | * The scheme used ("http" or "https") | ||
69 | */ | ||
70 | char *scheme; | ||
71 | |||
72 | /** | ||
73 | * Extra field to be used by the user with set/get func for whatever | ||
74 | * purpose he wants. | ||
75 | */ | ||
76 | void *user_cls; | ||
77 | }; | ||
78 | |||
79 | #endif | ||