TI's MQTT Demo with freertos CM4F

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers client_mgmt.h Source File

client_mgmt.h

00001 /******************************************************************************
00002 *
00003 *   Copyright (C) 2014 Texas Instruments Incorporated
00004 *
00005 *   All rights reserved. Property of Texas Instruments Incorporated.
00006 *   Restricted rights to use, duplicate or disclose this code are
00007 *   granted through contract.
00008 *
00009 *   The program may not be used without the written permission of
00010 *   Texas Instruments Incorporated or against the terms and conditions
00011 *   stipulated in the agreement under which this program has been supplied,
00012 *   and under no circumstances can it be used with non-TI connectivity device.
00013 *
00014 ******************************************************************************/
00015 
00016 #ifndef __CLIENT_MGMT_H__
00017 #define __CLIENT_MGMT_H__
00018 
00019 #include "mqtt_common.h"
00020 
00021 #ifdef __cplusplus
00022 extern "C"
00023 {
00024 #endif
00025 
00026 namespace mbed_mqtt {
00027 
00028 uint32_t cl_bmap_get(void *usr_cl);
00029 
00030 void *cl_app_hndl_get(void *usr_cl);
00031 
00032 void *cl_will_hndl_get(void *usr_cl);
00033 
00034 bool cl_can_session_delete(void *usr_cl);
00035 
00036 void cl_sub_count_add(void *usr_cl);
00037 
00038 void cl_sub_count_del(void *usr_cl);
00039 
00040 bool cl_mgmt_qos2_pub_rx_update(void *usr_cl, uint16_t msg_id);
00041 
00042 void cl_pub_dispatch(uint32_t cl_map, struct mqtt_packet *mqp);
00043 
00044 int32_t cl_pub_msg_send(void *usr_cl,
00045                     const struct utf8_string *topic, const uint8_t *data_buf,
00046                     uint32_t data_len, enum mqtt_qos qos, bool retain);
00047 
00048 void cl_on_net_close(void *usr_cl);
00049 
00050 bool cl_notify_ack(void *usr_cl, uint8_t msg_type, uint16_t msg_id);
00051 
00052 /* uint16_t composition: MSB is CONNACK-Flags and LSB is CONNACK-RC. The place-holder
00053    '*usr_cl' has valid value, only if CONNACK-RC in return value is 0.
00054 */
00055 uint16_t cl_connect_rx(void *ctx_cl, bool clean_session, char *client_id,
00056                   void *app_cl, void *will, void **usr_cl);
00057 
00058 void cl_on_connack_send(void *usr_cl, bool clean_session);
00059 
00060 int32_t cl_mgmt_init(void);
00061 
00062 }//namespace mbed_mqtt 
00063 
00064 #ifdef __cplusplus  
00065 }
00066 #endif 
00067 
00068 #endif
00069