#include "MQTTExportDeclarations.h"

Go to the source code of this file.
Classes | |
| struct | MQTTLenString |
| struct | MQTTProperties |
| struct | MQTTProperty |
Macros | |
| #define | MQTT_INVALID_PROPERTY_ID -2 |
| #define | MQTTProperties_initializer {0, 0, 0, NULL} |
Typedefs | |
| typedef struct MQTTProperties | MQTTProperties |
| #define MQTT_INVALID_PROPERTY_ID -2 |
Definition at line 22 of file MQTTProperties.h.
| #define MQTTProperties_initializer {0, 0, 0, NULL} |
Definition at line 120 of file MQTTProperties.h.
| typedef struct MQTTProperties MQTTProperties |
MQTT version 5 property list
| enum MQTTPropertyCodes |
The one byte MQTT V5 property indicator
Definition at line 25 of file MQTTProperties.h.
| enum MQTTPropertyTypes |
The one byte MQTT V5 property type
Definition at line 64 of file MQTTProperties.h.
| LIBMQTT_API int MQTTProperties_add | ( | MQTTProperties * | props, |
| const MQTTProperty * | prop | ||
| ) |
Add a property pointer to the property array. There is no memory allocation.
| props | The property list to add the property to. |
| prop | The property to add to the list. |
Add a new property to a property list
| props | the property list |
| prop | the new property |
Definition at line 102 of file MQTTProperties.c.
| LIBMQTT_API MQTTProperties MQTTProperties_copy | ( | const MQTTProperties * | props | ) |
Copy the contents of a property list, allocating additional memory if needed.
| props | pointer to the property list. |
Definition at line 409 of file MQTTProperties.c.
| LIBMQTT_API void MQTTProperties_free | ( | MQTTProperties * | properties | ) |
Free all memory allocated to the property list, including any to individual properties.
| properties | pointer to the property list. |
Definition at line 378 of file MQTTProperties.c.
| LIBMQTT_API int MQTTProperties_getNumericValue | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid | ||
| ) |
Returns the integer value of a specific property. The property given must be a numeric type.
| props | pointer to the property list. |
| propid | the property id to check for. |
Definition at line 499 of file MQTTProperties.c.
| LIBMQTT_API int MQTTProperties_getNumericValueAt | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid, | ||
| int | index | ||
| ) |
Returns the integer value of a specific property when it's not the only instance. The property given must be a numeric type.
| props | pointer to the property list. |
| propid | the property id to check for. |
| index | the instance number, starting at 0. |
Definition at line 459 of file MQTTProperties.c.
| LIBMQTT_API MQTTProperty* MQTTProperties_getProperty | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid | ||
| ) |
Returns a pointer to the property structure for a specific property.
| props | pointer to the property list. |
| propid | the property id to check for. |
Definition at line 530 of file MQTTProperties.c.
| LIBMQTT_API MQTTProperty* MQTTProperties_getPropertyAt | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid, | ||
| int | index | ||
| ) |
Returns a pointer to the property structure for a specific property when it's not the only instance.
| props | pointer to the property list. |
| propid | the property id to check for. |
| index | the instance number, starting at 0. |
Definition at line 505 of file MQTTProperties.c.
| LIBMQTT_API int MQTTProperties_hasProperty | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid | ||
| ) |
Checks if property list contains a specific property.
| props | pointer to the property list. |
| propid | the property id to check for. |
Definition at line 428 of file MQTTProperties.c.
| int MQTTProperties_len | ( | MQTTProperties * | props | ) |
Returns the length of the properties structure when serialized ready for network transmission.
| props | an MQTT V5 property structure. |
Definition at line 89 of file MQTTProperties.c.
| LIBMQTT_API int MQTTProperties_propertyCount | ( | MQTTProperties * | props, |
| enum MQTTPropertyCodes | propid | ||
| ) |
Returns the number of instances of a property id. Most properties can exist only once. User properties and subscription ids can exist more than once.
| props | pointer to the property list. |
| propid | the property id to check for. |
Definition at line 445 of file MQTTProperties.c.
| int MQTTProperties_read | ( | MQTTProperties * | properties, |
| char ** | pptr, | ||
| char * | enddata | ||
| ) |
Reads a property list from a character buffer into an array.
| properties | pointer to the property list to be filled. Should be initalized but empty. |
| pptr | pointer to the character buffer. |
| enddata | pointer to the end of the character buffer so we don't read beyond. |
Definition at line 282 of file MQTTProperties.c.
| int MQTTProperties_write | ( | char ** | pptr, |
| const MQTTProperties * | properties | ||
| ) |
Serialize the given property list to a character buffer, e.g. for writing to the network.
| pptr | pointer to the buffer - move the pointer as we add data |
| properties | pointer to the property list, can be NULL |
Definition at line 208 of file MQTTProperties.c.
| LIBMQTT_API int MQTTProperty_getType | ( | enum MQTTPropertyCodes | value | ) |
Returns the MQTT V5 type code of an MQTT V5 property.
| value | an MQTT V5 property code. |
Definition at line 73 of file MQTTProperties.c.
| LIBMQTT_API const char* MQTTPropertyName | ( | enum MQTTPropertyCodes | value | ) |
Returns a printable string description of an MQTT V5 property code.
| value | an MQTT V5 property code. |
Definition at line 361 of file MQTTProperties.c.