mosquitto_broker.h include file for end users.
This commit is contained in:
parent
017db6706f
commit
45ad23c7be
@ -22,7 +22,7 @@ set (MOSQ_SRCS
|
||||
loop.c
|
||||
../lib/memory_mosq.c ../lib/memory_mosq.h
|
||||
mosquitto.c
|
||||
mosquitto_broker_internal.h
|
||||
mosquitto_broker.h mosquitto_broker_internal.h
|
||||
net.c
|
||||
../lib/net_mosq.c ../lib/net_mosq.h
|
||||
../lib/packet_mosq.c ../lib/packet_mosq.h
|
||||
@ -148,7 +148,7 @@ if (UNIX)
|
||||
endif (UNIX)
|
||||
|
||||
install(TARGETS mosquitto RUNTIME DESTINATION "${SBINDIR}" LIBRARY DESTINATION "${LIBDIR}")
|
||||
install(FILES mosquitto_plugin.h DESTINATION "${INCLUDEDIR}")
|
||||
install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${INCLUDEDIR}")
|
||||
|
||||
if (${WITH_TLS} STREQUAL ON)
|
||||
add_executable(mosquitto_passwd mosquitto_passwd.c)
|
||||
|
@ -198,6 +198,7 @@ install : all
|
||||
$(INSTALL) -d ${DESTDIR}$(prefix)/sbin
|
||||
$(INSTALL) ${STRIP_OPTS} mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
|
||||
$(INSTALL) -d ${DESTDIR}$(prefix)/include
|
||||
$(INSTALL) mosquitto_broker.h ${DESTDIR}${prefix}/include/mosquitto_broker.h
|
||||
$(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
|
||||
ifeq ($(WITH_TLS),yes)
|
||||
$(INSTALL) -d ${DESTDIR}$(prefix)/bin
|
||||
@ -206,6 +207,7 @@ endif
|
||||
|
||||
uninstall :
|
||||
-rm -f ${DESTDIR}${prefix}/sbin/mosquitto
|
||||
-rm -f ${DESTDIR}${prefix}/include/mosquitto_broker.h
|
||||
-rm -f ${DESTDIR}${prefix}/include/mosquitto_plugin.h
|
||||
-rm -f ${DESTDIR}${prefix}/bin/mosquitto_passwd
|
||||
|
||||
|
57
src/mosquitto_broker.h
Normal file
57
src/mosquitto_broker.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
Copyright (c) 2012-2016 Roger Light <roger@atchoo.org>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef MOSQUITTO_BROKER_H
|
||||
#define MOSQUITTO_BROKER_H
|
||||
|
||||
struct mosquitto_opt {
|
||||
char *key;
|
||||
char *value;
|
||||
};
|
||||
|
||||
/* =========================================================================
|
||||
*
|
||||
* Utility Functions
|
||||
*
|
||||
* Use these functions from within your plugin.
|
||||
*
|
||||
* There are also very useful functions in libmosquitto.
|
||||
*
|
||||
* ========================================================================= */
|
||||
|
||||
/*
|
||||
* Function: mosquitto_log_printf
|
||||
*
|
||||
* Write a log message using the broker configured logging.
|
||||
*
|
||||
* Parameters:
|
||||
* level - Log message priority. Can currently be one of:
|
||||
*
|
||||
* MOSQ_LOG_INFO
|
||||
* MOSQ_LOG_NOTICE
|
||||
* MOSQ_LOG_WARNING
|
||||
* MOSQ_LOG_ERR
|
||||
* MOSQ_LOG_DEBUG
|
||||
* MOSQ_LOG_SUBSCRIBE (not recommended for use by plugins)
|
||||
* MOSQ_LOG_UNSUBSCRIBE (not recommended for use by plugins)
|
||||
*
|
||||
* These values are defined in mosquitto.h.
|
||||
*
|
||||
* fmt, ... - printf style format and arguments.
|
||||
*/
|
||||
void mosquitto_log_printf(int level, const char *fmt, ...);
|
||||
|
||||
#endif
|
@ -55,39 +55,6 @@ struct mosquitto_auth_opt {
|
||||
* denied.
|
||||
*/
|
||||
|
||||
/* =========================================================================
|
||||
*
|
||||
* Utility Functions
|
||||
*
|
||||
* Use these functions from within your plugin.
|
||||
*
|
||||
* There are also very useful functions in libmosquitto.
|
||||
*
|
||||
* ========================================================================= */
|
||||
|
||||
/*
|
||||
* Function: mosquitto_log_printf
|
||||
*
|
||||
* Write a log message using the broker configured logging.
|
||||
*
|
||||
* Parameters:
|
||||
* level - Log message priority. Can currently be one of:
|
||||
*
|
||||
* MOSQ_LOG_INFO
|
||||
* MOSQ_LOG_NOTICE
|
||||
* MOSQ_LOG_WARNING
|
||||
* MOSQ_LOG_ERR
|
||||
* MOSQ_LOG_DEBUG
|
||||
* MOSQ_LOG_SUBSCRIBE (not recommended for use by plugins)
|
||||
* MOSQ_LOG_UNSUBSCRIBE (not recommended for use by plugins)
|
||||
*
|
||||
* These values are defined in mosquitto.h.
|
||||
*
|
||||
* fmt, ... - printf style format and arguments.
|
||||
*/
|
||||
void mosquitto_log_printf(int level, const char *fmt, ...);
|
||||
|
||||
|
||||
|
||||
/* =========================================================================
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user