MQTT Server: D:/my_data/GIT/network_apps/netapps/mqtt/server/server_core.h Source File

MQTT Server Package

MQTT Server 1.0.0
D:/my_data/GIT/network_apps/netapps/mqtt/server/server_core.h
Go to the documentation of this file.
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 
00017 #ifndef __SERVER_CORE_H__
00018 #define __SERVER_CORE_H__
00019 
00020 #include "server_pkts.h"
00021 
00072 struct mqtt_server_app_cbs {
00073 
00102         u16  (*connect)(const struct utf8_string *client_id,
00103                         const struct utf8_string *user_name,
00104                         const struct utf8_string *pass_word,
00105                         void **app_usr);
00106 
00122         void (*publish)(const struct utf8_string *topic,
00123                         const u8 *payload, u32 pay_len,
00124                         bool dup, u8 qos, bool retain);
00125 
00138         void (*disconn)(const void *app_usr, bool due2err);
00139 };
00140 
00164 i32 mqtt_server_topic_enroll(const void *app_hnd,
00165                              const struct utf8_string *topic, enum mqtt_qos qos);
00166 
00180 i32 mqtt_server_topic_disenroll(const void *app_hnd,
00181                                 const struct utf8_string *topic);
00182 
00198 i32 mqtt_server_app_pub_send(const  struct utf8_string *topic,
00199                              const u8 *data_buf, u32 data_len,
00200                              enum mqtt_qos qos, bool retain);
00201 
00219 void *mqtt_server_app_register(const struct mqtt_server_app_cbs *cbs,
00220                                const i8 *name);
00221 
00222 
00227 struct mqtt_server_app_cfg {
00228 
00229         void        *place_holder; 
00230 };
00231 
00254 i32 mqtt_server_init(const struct mqtt_server_lib_cfg *lib_cfg,
00255                      const struct mqtt_server_app_cfg *app_cfg);
00256  /* End of server_daemon */
00258 
00259 #endif
00260 
Generated on Mon Nov 17 2014 12:12:08 for MQTT Server by  doxygen 1.7.4