#ifndef HTTP_SERVER_PRIVATE_H
#define HTTP_SERVER_PRIVATE_H
#include "connection.h"
#include "iostream-pump.h"
#include "http-server.h"
#include "llist.h"
struct http_server_payload_handler;
struct http_server_request;
struct http_server_connection;
/*
* Defaults
*/
/*
* Types
*/
enum http_server_request_state {
/* New request; request header is still being parsed. */
/* Queued request; callback to request handler executing. */
/* Reading request payload; request handler still needs to read more
payload. */
/* This request is being processed; request payload is fully read, but no
response is yet submitted */
/* A response is submitted for this request. If not all request payload
was read by the handler, it is first skipped on the input.
*/
/* Request is ready for response; a response is submitted and the request
payload is fully read */
/* The response for the request is sent (apart from payload) */
/* Sending response payload to client */
/* Request is finished; still lingering due to references */
/* Request is aborted; still lingering due to references */
};
/*
* Objects
*/
struct http_server_payload_handler {
};
struct http_server_response {
unsigned int status;
const char *reason;
void *tunnel_context;
};
struct http_server_request {
unsigned int refcount;
unsigned int id;
int callback_refcount;
void (*destroy_callback)(void *);
void *destroy_context;
};
struct http_server_connection {
unsigned int refcount;
void *context;
unsigned int request_queue_count;
char *disconnect_reason;
};
struct http_server {
};
/*
* Response
*/
/*
* Request
*/
static inline const char *
{
return t_strdup_printf("[Req%u: %s <INCOMPLETE>]",
}
}
static inline bool
{
}
static inline bool
}
struct http_server_request *
/* payload handler */
struct http_server_payload_handler **_handler);
struct http_server_payload_handler *handler);
/*
* connection
*/
static inline const char *
{
}
static inline void
struct http_server_request *sreq)
{
}
static inline void
struct http_server_request *sreq)
{
}
struct connection_list *http_server_connection_list_init(void);
struct http_server_connection *conn);
struct http_server_connection *conn);
struct http_server_connection *conn);
struct http_server_connection *conn);
#endif