--- libaitmqtt/inc/aitmqtt.h 2012/01/26 13:07:33 1.1.1.1 +++ libaitmqtt/inc/aitmqtt.h 2012/01/26 14:44:33 1.1.1.1.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitmqtt.h,v 1.1.1.1 2012/01/26 13:07:33 misho Exp $ +* $Id: aitmqtt.h,v 1.1.1.1.2.1 2012/01/26 14:44:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -216,6 +216,19 @@ inline void mqtt_msgFree(mqtt_msg_t ** __restrict msg, * return: -1 error or >-1 old buffer length */ inline int mqtt_msgRealloc(mqtt_msg_t * __restrict msg, unsigned short len); + +/* + * mqtt_expandTopic() - Expanding topic to regular expression + * + * @csInput = Input topic + * @psRegEx = Output to regular expression + * @regexLen = Length of psRegEx + * @BOL = Begin of Line, if =0 not added + * @EOL = End of Line, if =0 not appended + * return: -1 error, 0 nothing expanded or >0 expanded bytes + */ +int mqtt_expandTopic(const char *csInput, char * __restrict psRegEx, int regexLen, + unsigned char BOL, unsigned char EOL); /* * mqtt_encodeLen() Encode number to MQTT length field