#ifndef __COMMAND_H__ #define __COMMAND_H__ #include #include #include #define ENABLE_HTTP_COOKIE 1 #define MAX_TIMEOUT 20 //devices.db http #define PUB_GET_DEVICES_NONE_HTTP "get/devices/none/http" #define SUB_GET_DEVICES_NONE_HTTP "ack/get/devices/none/http" #define PUB_ADD_DEVICES_NONE_HTTP "add/devices/none/http" #define SUB_ADD_DEVICES_NONE_HTTP "ack/add/devices/none/http" #define PUB_SET_DEVICES_NONE_HTTP "set/devices/none/http" #define SUB_SET_DEVICES_NONE_HTTP "ack/set/devices/none/http" #define PUB_DEL_DEVICES_NONE_HTTP "del/devices/none/http" #define SUB_DEL_DEVICES_NONE_HTTP "ack/del/devices/none/http" //platform.json #define PUB_GET_PLATFORM_NONE_HTTP "get/platform/none/http" #define SUB_GET_PLATFORM_NONE_HTTP "ack/get/platform/none/http" #define PUB_ADD_PLATFORM_NONE_HTTP "add/platform/none/http" #define SUB_ADD_PLATFORM_NONE_HTTP "ack/add/platform/none/http" #define PUB_SET_PLATFORM_NONE_HTTP "set/platform/none/http" #define SUB_SET_PLATFORM_NONE_HTTP "ack/set/platform/none/http" #define PUB_DEL_PLATFORM_NONE_HTTP "del/platform/none/http" #define SUB_DEL_PLATFORM_NONE_HTTP "ack/del/platform/none/http" //system.json #define PUB_GET_SYSTEM_NONE_HTTP "get/system/none/http" #define SUB_GET_SYSTEM_NONE_HTTP "ack/get/system/none/http" #define PUB_ADD_SYSTEM_NONE_HTTP "add/system/none/http" #define SUB_ADD_SYSTEM_NONE_HTTP "ack/add/system/none/http #define PUB_SET_SYSTEM_NONE_HTTP "set/system/none/http" #define SUB_SET_SYSTEM_NONE_HTTP "ack/set/system/none/http" #define PUB_DEL_SYSTEM_NONE_HTTP "del/system/none/http" #define SUB_DEL_SYSTEM_NONE_HTTP "ack/del/system/none/http" //user.json #define PUB_GET_USER_NONE_HTTP "get/user/none/http" #define SUB_GET_USER_NONE_HTTP "ack/get/user/none/http" #define PUB_ADD_SYSTEM_NONE_HTTP "add/user/none/http" #define SUB_ADD_SYSTEM_NONE_HTTP "ack/add/user/none/http" #define PUB_SET_SYSTEM_NONE_HTTP "set/user/none/http" #define SUB_SET_SYSTEM_NONE_HTTP "ack/set/user/none/http" #define PUB_DEL_SYSTEM_NONE_HTTP "del/user/none/http" #define SUB_DEL_SYSTEM_NONE_HTTP "ack/del/user/none/http" bool auth_user(); void get_configure_by_type(char *pub_topic, char *sub_topic); void set_configure_by_type(char *pub_topic, char *sub_topic); void del_configure_by_type(char *pub_topic, char *sub_topic); void add_configure_by_type(char *pub_topic, char *sub_topic); #endif