syslog-ng source
response-handler.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Balabit
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 as published
6  * by the Free Software Foundation, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * As an additional exemption you are allowed to compile & link against the
18  * OpenSSL libraries as published by the OpenSSL project. See the file
19  * COPYING for details.
20  *
21  */
22 
23 #ifndef HTTP_RESPONSE_HANDLER_H_INCLUDED
24 #define HTTP_RESPONSE_HANDLER_H_INCLUDED 1
25 
26 #include "syslog-ng.h"
27 
28 typedef enum
29 {
36 
37 typedef HttpResult (*HttpResponseAction)(gpointer user_data);
38 HttpResult http_result_success(gpointer user_data);
39 HttpResult http_result_retry(gpointer user_data);
40 HttpResult http_result_drop(gpointer user_data);
41 HttpResult http_result_disconnect(gpointer user_data);
42 
43 typedef struct
44 {
47  gpointer user_data;
49 
50 typedef GHashTable HttpResponseHandlers;
51 
56 
57 #endif
HttpResponseHandlers * http_response_handlers_new(void)
Definition: response-handler.c:56
HttpResult(* HttpResponseAction)(gpointer user_data)
Definition: response-handler.h:37
HttpResult http_result_drop(gpointer user_data)
Definition: response-handler.c:38
void http_response_handlers_free(HttpResponseHandlers *self)
Definition: response-handler.c:62
HttpResult http_result_success(gpointer user_data)
Definition: response-handler.c:26
GHashTable HttpResponseHandlers
Definition: response-handler.h:50
HttpResponseHandler * http_response_handlers_lookup(HttpResponseHandlers *self, glong status_code)
Definition: response-handler.c:83
HttpResult http_result_retry(gpointer user_data)
Definition: response-handler.c:32
void http_response_handlers_insert(HttpResponseHandlers *self, HttpResponseHandler *result_handler)
Definition: response-handler.c:76
HttpResult http_result_disconnect(gpointer user_data)
Definition: response-handler.c:44
HttpResult
Definition: response-handler.h:29
@ HTTP_RESULT_DISCONNECT
Definition: response-handler.h:33
@ HTTP_RESULT_RETRY
Definition: response-handler.h:31
@ HTTP_RESULT_MAX
Definition: response-handler.h:34
@ HTTP_RESULT_DROP
Definition: response-handler.h:32
@ HTTP_RESULT_SUCCESS
Definition: response-handler.h:30
Definition: response-handler.h:44
gpointer user_data
Definition: response-handler.h:47
gint status_code
Definition: response-handler.h:45
HttpResponseAction action
Definition: response-handler.h:46