summaryrefslogtreecommitdiff
path: root/tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h
diff options
context:
space:
mode:
Diffstat (limited to 'tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h')
-rw-r--r--tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h b/tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h
new file mode 100644
index 0000000..b94fb35
--- /dev/null
+++ b/tts-mqtt-test/src/paho-mqtt/MQTTProtocolOut.h
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2017 IBM Corp.
+ *
+ * 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:
+ * Ian Craggs - initial API and implementation and/or initial documentation
+ * Ian Craggs, Allan Stockdill-Mander - SSL updates
+ * Ian Craggs - MQTT 3.1.1 support
+ * Ian Craggs - SNI support
+ *******************************************************************************/
+
+#if !defined(MQTTPROTOCOLOUT_H)
+#define MQTTPROTOCOLOUT_H
+
+#include "../paho-mqtt/Clients.h"
+#include "../paho-mqtt/LinkedList.h"
+#include "../paho-mqtt/Log.h"
+#include "../paho-mqtt/Messages.h"
+#include "../paho-mqtt/MQTTPacket.h"
+#include "../paho-mqtt/MQTTProtocol.h"
+#include "../paho-mqtt/MQTTProtocolClient.h"
+
+#define DEFAULT_PORT 1883
+
+char* MQTTProtocol_addressPort(const char* uri, int* port);
+void MQTTProtocol_reconnect(const char* ip_address, Clients* client);
+#if defined(OPENSSL)
+int MQTTProtocol_connect(const char* ip_address, Clients* acClients, int ssl, int MQTTVersion);
+#else
+int MQTTProtocol_connect(const char* ip_address, Clients* acClients, int MQTTVersion);
+#endif
+int MQTTProtocol_handlePingresps(void* pack, int sock);
+int MQTTProtocol_subscribe(Clients* client, List* topics, List* qoss, int msgID);
+int MQTTProtocol_handleSubacks(void* pack, int sock);
+int MQTTProtocol_unsubscribe(Clients* client, List* topics, int msgID);
+int MQTTProtocol_handleUnsubacks(void* pack, int sock);
+
+#endif