MQTTSubscribe.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * @Author: jiejie
  3. * @Github: https://github.com/jiejieTop
  4. * @Date: 2019-12-09 20:15:32
  5. * @LastEditTime: 2019-12-20 20:37:31
  6. * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
  7. */
  8. /*******************************************************************************
  9. * Copyright (c) 2014 IBM Corp.
  10. *
  11. * All rights reserved. This program and the accompanying materials
  12. * are made available under the terms of the Eclipse Public License v1.0
  13. * and Eclipse Distribution License v1.0 which accompany this distribution.
  14. *
  15. * The Eclipse Public License is available at
  16. * http://www.eclipse.org/legal/epl-v10.html
  17. * and the Eclipse Distribution License is available at
  18. * http://www.eclipse.org/org/documents/edl-v10.php.
  19. *
  20. * Contributors:
  21. * Ian Craggs - initial API and implementation and/or initial documentation
  22. * Xiang Rong - 442039 Add makefile to Embedded C client
  23. *******************************************************************************/
  24. #ifndef MQTTSUBSCRIBE_H_
  25. #define MQTTSUBSCRIBE_H_
  26. #if !defined(DLLImport)
  27. #define DLLImport
  28. #endif
  29. #if !defined(DLLExport)
  30. #define DLLExport
  31. #endif
  32. DLLExport int MQTTSerialize_subscribe(unsigned char* buf, int buflen, unsigned char dup, unsigned short packetid,
  33. int count, MQTTString topicFilters[], int requestedQoSs[]);
  34. DLLExport int MQTTDeserialize_subscribe(unsigned char* dup, unsigned short* packetid,
  35. int maxcount, int* count, MQTTString topicFilters[], int requestedQoSs[], unsigned char* buf, int len);
  36. DLLExport int MQTTSerialize_suback(unsigned char* buf, int buflen, unsigned short packetid, int count, int* grantedQoSs);
  37. DLLExport int MQTTDeserialize_suback(unsigned short* packetid, int maxcount, int* count, int grantedQoSs[], unsigned char* buf, int len);
  38. #endif /* MQTTSUBSCRIBE_H_ */