#ifndef __HTTP_REQUEST_LIST_H__
#define __HTTP_REQUEST_LIST_H__

#include "message.h"
#include "http_request.h"

typedef struct s_HttpRequestList HttpRequestList;

typedef void (*HttpRequestHandlerDelegate) (HttpRequest *request, void *context);

HttpRequestList * http_request_list_new (void);
void http_request_list_destroy (void *ptr);

void http_request_list_addRequest (HttpRequestList *requestList, HttpRequest *request);

void http_request_list_setHandler (HttpRequestList *instance,
                HttpRequestHandlerDelegate delegate, void *context);

HttpRequestList * http_request_list_getRequestList (void);

void http_request_list_handler (Message *requestMessage);

HttpRequest * http_request_list_getNextRequest (HttpRequestList *requestList);

void http_request_list_removeRequest (HttpRequestList *requestList, const char *token);

bool http_request_list_containsRequest (HttpRequestList *requestList, const char *token);


#endif
