aboutsummaryrefslogtreecommitdiff
path: root/src/clientinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/clientinfo.h')
-rw-r--r--src/clientinfo.h118
1 files changed, 118 insertions, 0 deletions
diff --git a/src/clientinfo.h b/src/clientinfo.h
new file mode 100644
index 00000000..6712f5ba
--- /dev/null
+++ b/src/clientinfo.h
@@ -0,0 +1,118 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Wed Oct 9 19:05:48 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16#ifndef _CLIENTINFO_H_
17#define _CLIENTINFO_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <fcntl.h>
25#include <string.h>
26
27#include "outstream.h"
28#include "client.h"
29#include "utils.h"
30#include "memory.h"
31#include "server.h"
32#include "error.h"
33
34
35
36/*
37 * Next's structs are redudant but it is an case of logic (spell)
38 */
39struct _Header {
40 char *id;
41 char *data;
42 struct _Header *next;
43};
44struct _Query {
45 unsigned int index;
46 unsigned int idf;
47 char *id;
48 char *data;
49 struct _Query *next;
50};
51struct _Post {
52 unsigned int index;
53 unsigned int idf;
54 char *id;
55 char *data;
56 struct _Post *next;
57};
58
59struct _MultiPart {
60 char *id;
61 char *data;
62 unsigned int size;
63 char *filename;
64 struct _MultiPart *next;
65};
66
67struct _Cookie {
68 char *id;
69 char *data;
70 struct _Cookie *next;
71};
72
73
74extern struct ClientInfo {
75 int outfd;
76 char *inetname;
77 char *request;
78 char *method;
79 char *user;
80 char *pass;
81
82 char *(*Header)(char *);
83 char *(*Query)(char *);
84 char *(*Post)(char *);
85 char *(*Cookie)(char *); // TODO
86 char *(*Conf)(const char *,const char *); // new on 0.5.0
87 struct _MultiPart (*MultiPart)(char *);
88 // not necessary for web_server.h
89 char *QueryString;
90 char *CookieString;
91 char *PostData;
92 struct memrequest *mem;
93 struct _Header *HeaderList; // Not necessary for web_server.h
94 struct _Query *QueryList; // Not necessary for web_server.h
95 struct _Post *PostList; // Not necessary for web_server.h
96 struct _MultiPart *MultiPartList; // Not necessary for web_server.h
97 struct _Cookie *CookieList; // Not necessary for web_server.h
98} *ClientInfo; //tochange
99
100
101void __ILWS_init_clientinfo();
102void __ILWS_free_clientinfo();
103char *__ILWS_clientinfo_getauthuser();
104char *__ILWS_clientinfo_getauthpass();
105char *__ILWS_clientinfo_getquerystring();
106char *__ILWS_clientinfo_getpostdata();
107char *__ILWS_clientinfo_getcookiestring();
108char *__ILWS_clientinfo_getmethod();
109char *__ILWS_clientinfo_getreqname();
110char *__ILWS_Header(char *);
111char *__ILWS_Query(char *);
112char *__ILWS_Post(char *);
113struct _MultiPart __ILWS_MultiPart(char *);
114char *__ILWS_Cookie(char *);
115char *__ILWS_Conf(const char *,const char *);
116
117#endif
118