MQTTPacketOut.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*******************************************************************************
  2. * Copyright (c) 2009, 2018 IBM Corp.
  3. *
  4. * All rights reserved. This program and the accompanying materials
  5. * are made available under the terms of the Eclipse Public License v1.0
  6. * and Eclipse Distribution License v1.0 which accompany this distribution.
  7. *
  8. * The Eclipse Public License is available at
  9. * http://www.eclipse.org/legal/epl-v10.html
  10. * and the Eclipse Distribution License is available at
  11. * http://www.eclipse.org/org/documents/edl-v10.php.
  12. *
  13. * Contributors:
  14. * Ian Craggs - initial API and implementation and/or initial documentation
  15. * Ian Craggs, Allan Stockdill-Mander - SSL updates
  16. * Ian Craggs - MQTT 3.1.1 support
  17. * Ian Craggs - MQTT 5.0 support
  18. *******************************************************************************/
  19. #if !defined(MQTTPACKETOUT_H)
  20. #define MQTTPACKETOUT_H
  21. #include "MQTTPacket.h"
  22. int MQTTPacket_send_connect(Clients* client, int MQTTVersion,
  23. MQTTProperties* connectProperties, MQTTProperties* willProperties);
  24. void* MQTTPacket_connack(int MQTTVersion, unsigned char aHeader, char* data, size_t datalen);
  25. void MQTTPacket_freeConnack(Connack* pack);
  26. int MQTTPacket_send_pingreq(networkHandles* net, const char* clientID);
  27. int MQTTPacket_send_subscribe(List* topics, List* qoss, MQTTSubscribe_options* opts, MQTTProperties* props,
  28. int msgid, int dup, Clients* client);
  29. void* MQTTPacket_suback(int MQTTVersion, unsigned char aHeader, char* data, size_t datalen);
  30. int MQTTPacket_send_unsubscribe(List* topics, MQTTProperties* props, int msgid, int dup, Clients* client);
  31. void* MQTTPacket_unsuback(int MQTTVersion, unsigned char aHeader, char* data, size_t datalen);
  32. #endif