2014-05-07 22:27:00 +00:00
|
|
|
/*
|
2018-04-11 14:24:29 +00:00
|
|
|
Copyright (c) 2009-2018 Roger Light <roger@atchoo.org>
|
2014-05-07 22:27:00 +00:00
|
|
|
|
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
and Eclipse Distribution License v1.0 which accompany this distribution.
|
|
|
|
|
|
|
|
The Eclipse Public License is available at
|
|
|
|
http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
and the Eclipse Distribution License is available at
|
|
|
|
http://www.eclipse.org/org/documents/edl-v10.php.
|
|
|
|
|
|
|
|
Contributors:
|
|
|
|
Roger Light - initial implementation and documentation.
|
|
|
|
*/
|
2016-03-13 18:43:13 +00:00
|
|
|
#ifndef UTIL_MOSQ_H
|
|
|
|
#define UTIL_MOSQ_H
|
2014-05-07 22:27:00 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "tls_mosq.h"
|
|
|
|
#include "mosquitto.h"
|
2015-01-26 20:46:15 +00:00
|
|
|
#include "mosquitto_internal.h"
|
|
|
|
#ifdef WITH_BROKER
|
2016-07-08 09:10:04 +00:00
|
|
|
# include "mosquitto_broker_internal.h"
|
2015-01-26 20:46:15 +00:00
|
|
|
#endif
|
2014-05-07 22:27:00 +00:00
|
|
|
|
2014-06-23 16:57:35 +00:00
|
|
|
#ifdef WITH_BROKER
|
2015-04-19 21:10:59 +00:00
|
|
|
void mosquitto__check_keepalive(struct mosquitto_db *db, struct mosquitto *mosq);
|
2014-06-23 16:57:35 +00:00
|
|
|
#else
|
2015-04-19 21:10:59 +00:00
|
|
|
void mosquitto__check_keepalive(struct mosquitto *mosq);
|
2014-06-23 16:57:35 +00:00
|
|
|
#endif
|
2015-04-19 21:10:59 +00:00
|
|
|
uint16_t mosquitto__mid_generate(struct mosquitto *mosq);
|
2017-07-16 21:52:01 +00:00
|
|
|
FILE *mosquitto__fopen(const char *path, const char *mode, bool restrict_read);
|
2014-05-07 22:27:00 +00:00
|
|
|
|
2018-04-11 16:10:27 +00:00
|
|
|
#ifdef WITH_TLS_PSK
|
2015-04-19 21:10:59 +00:00
|
|
|
int mosquitto__hex2bin(const char *hex, unsigned char *bin, int bin_max_len);
|
2014-05-07 22:27:00 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|