syslog-ng source
consecutive_ack_tracker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2018 Balabit
3  * Copyright (c) 2018 Laszlo Budai <laszlo.budai@outlook.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 
25 #ifndef CONSECUTIVE_ACK_TRACKER_H_INCLUDED
26 #define CONSECUTIVE_ACK_TRACKER_H_INCLUDED
27 
28 #include "ack_tracker.h"
29 
30 typedef struct _AckTrackerOnAllAcked AckTrackerOnAllAcked;
31 
32 typedef void (*AckTrackerOnAllAckedFunc)(gpointer);
33 
35 {
37  gpointer user_data;
38  GDestroyNotify user_data_free_fn;
39 };
40 
41 gboolean consecutive_ack_tracker_is_empty(AckTracker *self);
42 void consecutive_ack_tracker_lock(AckTracker *self);
43 void consecutive_ack_tracker_unlock(AckTracker *self);
44 void consecutive_ack_tracker_set_on_all_acked(AckTracker *s, AckTrackerOnAllAckedFunc func, gpointer user_data,
45  GDestroyNotify user_data_free_fn);
46 
47 AckTracker *consecutive_ack_tracker_new(LogSource *source);
48 
49 #endif
50 
void consecutive_ack_tracker_lock(AckTracker *self)
Definition: consecutive_ack_tracker.c:41
void consecutive_ack_tracker_unlock(AckTracker *self)
Definition: consecutive_ack_tracker.c:48
AckTracker * consecutive_ack_tracker_new(LogSource *source)
Definition: consecutive_ack_tracker.c:260
gboolean consecutive_ack_tracker_is_empty(AckTracker *self)
Definition: consecutive_ack_tracker.c:169
void consecutive_ack_tracker_set_on_all_acked(AckTracker *s, AckTrackerOnAllAckedFunc func, gpointer user_data, GDestroyNotify user_data_free_fn)
Definition: consecutive_ack_tracker.c:55
void(* AckTrackerOnAllAckedFunc)(gpointer)
Definition: consecutive_ack_tracker.h:32
FILE ** source
Definition: file_reader.c:47
Definition: consecutive_ack_tracker.h:35
gpointer user_data
Definition: consecutive_ack_tracker.h:37
GDestroyNotify user_data_free_fn
Definition: consecutive_ack_tracker.h:38
AckTrackerOnAllAckedFunc func
Definition: consecutive_ack_tracker.h:36