--- libaitmqtt/inc/mqttapi.h 2012/05/08 11:29:56 1.1.2.9 +++ libaitmqtt/inc/mqttapi.h 2012/06/20 15:02:23 1.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: mqttapi.h,v 1.1.2.9 2012/05/08 11:29:56 misho Exp $ +* $Id: mqttapi.h,v 1.2 2012/06/20 15:02:23 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -157,6 +157,22 @@ unsigned char *mqtt_cli_Subscribe(mqtt_cli_t * __restr int mqtt_cli_Unsubscribe(mqtt_cli_t * __restrict cli, mqtt_subscr_t * __restrict Topics, unsigned short msgID, unsigned char Dup, unsigned char QoS); +/* + * mqtt_cli_Publish() - Publish message to broker + * + * @cli = connected client + * @msgID = Message ID + * @Dup = Duplicated request + * @QoS = Message QoS + * @Retain = Retain message + * @csTopic = Topic + * @pData = Data + * @datLen = Data length + * return: -1 error or > -1 sended bytes + */ +int mqtt_cli_Publish(mqtt_cli_t * __restrict cli, unsigned short msgID, + unsigned char Dup, unsigned char QoS, unsigned char Retain, + const char *csTopic, const void *pData, int datLen); #endif