gwenhywfar  4.12.0beta
httpsession.h
Go to the documentation of this file.
1 /***************************************************************************
2  begin : Fri Feb 15 2008
3  copyright : (C) 2008-2010 by Martin Preuss
4  email : martin@libchipcard.de
5 
6  ***************************************************************************
7  * Please see toplevel file COPYING for license details *
8  ***************************************************************************/
9 
10 
11 #ifndef GWEN_HTTP_SESSION_H
12 #define GWEN_HTTP_SESSION_H
13 
14 
15 #include <gwenhywfar/inherit.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
23 
24 #ifdef __cplusplus
25 }
26 #endif
27 
28 
29 #include <gwenhywfar/url.h>
30 #include <gwenhywfar/buffer.h>
31 
32 
36 #define GWEN_HTTP_SESSION_FLAGS_FORCE_SSL3 0x00000001
37 #define GWEN_HTTP_SESSION_FLAGS_NO_CACHE 0x00000002
38 #define GWEN_HTTP_SESSION_FLAGS_TLS_ONLY_SAFE_CIPHERS 0x00000004
39 #define GWEN_HTTP_SESSION_FLAGS_TLS_FORCE_UNSAFE_CIPHERS 0x00000008
40 
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
52 
57 
59 GWEN_HTTP_SESSION *GWEN_HttpSession_new(const char *url, const char *defaultProto, int defaultPort);
60 
63 
77 
79 uint32_t GWEN_HttpSession_GetFlags(const GWEN_HTTP_SESSION *sess);
80 
82 void GWEN_HttpSession_SetFlags(GWEN_HTTP_SESSION *sess, uint32_t fl);
83 
85 void GWEN_HttpSession_AddFlags(GWEN_HTTP_SESSION *sess, uint32_t fl);
86 
88 void GWEN_HttpSession_SubFlags(GWEN_HTTP_SESSION *sess, uint32_t fl);
89 
92 
94 void GWEN_HttpSession_SetHttpUserAgent(GWEN_HTTP_SESSION *sess, const char *s);
95 
98 
100 void GWEN_HttpSession_SetHttpContentType(GWEN_HTTP_SESSION *sess, const char *s);
101 
102 
105 
108 
111 
124 
127 
128 
129 
134 
146  const char *httpCommand,
147  const uint8_t *buf, uint32_t blen);
148 
156 
158 int GWEN_HttpSession_RecvPacketToFile(GWEN_HTTP_SESSION *sess, const char *fname);
159 
168 
172  /* defgroup */
173 
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 
179 
180 #endif
181