syslog-ng source
mqtt-source.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 One Identity
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 MQTT_SOURCE_H_INCLUDE
24 #define MQTT_SOURCE_H_INCLUDE
25 
26 #include "mqtt-options.h"
28 #include "atomic.h"
29 #include <MQTTClient.h>
30 
31 typedef struct _MQTTSourceDriver MQTTSourceDriver;
32 
34 {
35  LogThreadedFetcherDriver super;
36  MQTTClientOptions options;
37  MQTTClient client;
38  gchar *topic;
39 };
40 
41 
42 LogDriver *mqtt_sd_new(GlobalConfig *cfg);
43 MQTTClientOptions *mqtt_sd_get_options(LogDriver *s);
44 void mqtt_sd_set_topic(LogDriver *s, const gchar *topic);
45 
46 #endif /* MQTT_SOURCE_H_INCLUDE */
LogDriver * mqtt_sd_new(GlobalConfig *cfg)
Definition: mqtt-source.c:265
void mqtt_sd_set_topic(LogDriver *s, const gchar *topic)
Definition: mqtt-source.c:32
MQTTClientOptions * mqtt_sd_get_options(LogDriver *s)
Definition: mqtt-source.c:291
Definition: mqtt-source.h:34
gchar * topic
Definition: mqtt-source.h:38
MQTTClientOptions options
Definition: mqtt-source.h:36
LogThreadedFetcherDriver super
Definition: mqtt-source.h:35
MQTTClient client
Definition: mqtt-source.h:37
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34