aboutsummaryrefslogtreecommitdiff
path: root/src/httpd.h
blob: 6b8ad233b3eccd68be44de88b7157c438c15756e (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
 /*@@
   @header    httpd.h
   @date      Wed Sep 13 20:15:23 2000
   @author    Tom Goodale
   @desc 
   
   @enddesc
   @version $Header$
 @@*/

#include "http_Request.h"

#ifndef __HTTP_H__
#define __HTTP_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);

#ifdef __cplusplus
}
#endif

#endif /* __HTTP_H__ */