aboutsummaryrefslogtreecommitdiff
path: root/src/httpd.h
blob: 0c3d42fe4fdd300db4d68b9499376ff16e28a69c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 /*@@
   @header    httpd.h
   @date      Wed Sep 13 20:15:23 2000
   @author    Tom Goodale
   @desc 
   
   @enddesc
   @version $Header$
 @@*/

#include "httpRequest.h"

#ifndef __HTTPD_H__
#define __HTTPD_H__ 1

typedef struct
{
  int steer;
  int paused;
  int terminate;
  int timeout_seconds;
  int timeout_useconds;
} httpState;

#ifdef __cplusplus
extern "C" 
{
#endif

int HTTP_ReadFromClient (cGH *cctkGH, void *connection);

int HTTP_SetupServer(int port, int queue_size, int hunt);
int HTTP_ShutdownServer(void);

int HTTP_Poll(cGH *cctkGH, long sec, long usec);

/* Request stuff */
int HTTP_RequestGET(cGH *cctkGH, httpRequest *request);
int HTTP_RequestUnsupported(cGH *cctkGH, httpRequest *request);

/* State stuff */ 
int HTTP_UpdateState(cGH *cctkGH, httpState *state);
int HTTP_Terminate(cGH *cctkGH);

/* Content stuff */
int HTTP_RegisterPages(void);

#ifdef __cplusplus
}
#endif

#endif /* __HTTP_H__ */