Part of TI's mqtt
Dependents: mqtt_V1 cc3100_Test_mqtt_CM3
client_mgmt.h@0:547251f42a60, 2015-06-06 (annotated)
- Committer:
- dflet
- Date:
- Sat Jun 06 13:29:08 2015 +0000
- Revision:
- 0:547251f42a60
Part of mqtt_V1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:547251f42a60 | 1 | /****************************************************************************** |
dflet | 0:547251f42a60 | 2 | * |
dflet | 0:547251f42a60 | 3 | * Copyright (C) 2014 Texas Instruments Incorporated |
dflet | 0:547251f42a60 | 4 | * |
dflet | 0:547251f42a60 | 5 | * All rights reserved. Property of Texas Instruments Incorporated. |
dflet | 0:547251f42a60 | 6 | * Restricted rights to use, duplicate or disclose this code are |
dflet | 0:547251f42a60 | 7 | * granted through contract. |
dflet | 0:547251f42a60 | 8 | * |
dflet | 0:547251f42a60 | 9 | * The program may not be used without the written permission of |
dflet | 0:547251f42a60 | 10 | * Texas Instruments Incorporated or against the terms and conditions |
dflet | 0:547251f42a60 | 11 | * stipulated in the agreement under which this program has been supplied, |
dflet | 0:547251f42a60 | 12 | * and under no circumstances can it be used with non-TI connectivity device. |
dflet | 0:547251f42a60 | 13 | * |
dflet | 0:547251f42a60 | 14 | ******************************************************************************/ |
dflet | 0:547251f42a60 | 15 | |
dflet | 0:547251f42a60 | 16 | #ifndef __CLIENT_MGMT_H__ |
dflet | 0:547251f42a60 | 17 | #define __CLIENT_MGMT_H__ |
dflet | 0:547251f42a60 | 18 | |
dflet | 0:547251f42a60 | 19 | #include "mqtt_common.h" |
dflet | 0:547251f42a60 | 20 | |
dflet | 0:547251f42a60 | 21 | #ifdef __cplusplus |
dflet | 0:547251f42a60 | 22 | extern "C" |
dflet | 0:547251f42a60 | 23 | { |
dflet | 0:547251f42a60 | 24 | #endif |
dflet | 0:547251f42a60 | 25 | |
dflet | 0:547251f42a60 | 26 | namespace mbed_mqtt { |
dflet | 0:547251f42a60 | 27 | |
dflet | 0:547251f42a60 | 28 | uint32_t cl_bmap_get(void *usr_cl); |
dflet | 0:547251f42a60 | 29 | |
dflet | 0:547251f42a60 | 30 | void *cl_app_hndl_get(void *usr_cl); |
dflet | 0:547251f42a60 | 31 | |
dflet | 0:547251f42a60 | 32 | void *cl_will_hndl_get(void *usr_cl); |
dflet | 0:547251f42a60 | 33 | |
dflet | 0:547251f42a60 | 34 | bool cl_can_session_delete(void *usr_cl); |
dflet | 0:547251f42a60 | 35 | |
dflet | 0:547251f42a60 | 36 | void cl_sub_count_add(void *usr_cl); |
dflet | 0:547251f42a60 | 37 | |
dflet | 0:547251f42a60 | 38 | void cl_sub_count_del(void *usr_cl); |
dflet | 0:547251f42a60 | 39 | |
dflet | 0:547251f42a60 | 40 | bool cl_mgmt_qos2_pub_rx_update(void *usr_cl, uint16_t msg_id); |
dflet | 0:547251f42a60 | 41 | |
dflet | 0:547251f42a60 | 42 | void cl_pub_dispatch(uint32_t cl_map, struct mqtt_packet *mqp); |
dflet | 0:547251f42a60 | 43 | |
dflet | 0:547251f42a60 | 44 | int32_t cl_pub_msg_send(void *usr_cl, |
dflet | 0:547251f42a60 | 45 | const struct utf8_string *topic, const uint8_t *data_buf, |
dflet | 0:547251f42a60 | 46 | uint32_t data_len, enum mqtt_qos qos, bool retain); |
dflet | 0:547251f42a60 | 47 | |
dflet | 0:547251f42a60 | 48 | void cl_on_net_close(void *usr_cl); |
dflet | 0:547251f42a60 | 49 | |
dflet | 0:547251f42a60 | 50 | bool cl_notify_ack(void *usr_cl, uint8_t msg_type, uint16_t msg_id); |
dflet | 0:547251f42a60 | 51 | |
dflet | 0:547251f42a60 | 52 | /* uint16_t composition: MSB is CONNACK-Flags and LSB is CONNACK-RC. The place-holder |
dflet | 0:547251f42a60 | 53 | '*usr_cl' has valid value, only if CONNACK-RC in return value is 0. |
dflet | 0:547251f42a60 | 54 | */ |
dflet | 0:547251f42a60 | 55 | uint16_t cl_connect_rx(void *ctx_cl, bool clean_session, char *client_id, |
dflet | 0:547251f42a60 | 56 | void *app_cl, void *will, void **usr_cl); |
dflet | 0:547251f42a60 | 57 | |
dflet | 0:547251f42a60 | 58 | void cl_on_connack_send(void *usr_cl, bool clean_session); |
dflet | 0:547251f42a60 | 59 | |
dflet | 0:547251f42a60 | 60 | int32_t cl_mgmt_init(void); |
dflet | 0:547251f42a60 | 61 | |
dflet | 0:547251f42a60 | 62 | }//namespace mbed_mqtt |
dflet | 0:547251f42a60 | 63 | |
dflet | 0:547251f42a60 | 64 | #ifdef __cplusplus |
dflet | 0:547251f42a60 | 65 | } |
dflet | 0:547251f42a60 | 66 | #endif |
dflet | 0:547251f42a60 | 67 | |
dflet | 0:547251f42a60 | 68 | #endif |
dflet | 0:547251f42a60 | 69 |